blob: f865054039aaa5220c818c3ac2812eb6dd244a7e [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
Ned Deilya2a9f572013-10-25 00:30:10 -0700647TCLTK_LIBS
648TCLTK_INCLUDES
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000649LIBFFI_INCLUDEDIR
650PKG_CONFIG
651SHLIBS
652CFLAGSFORSHARED
653LINKFORSHARED
654CCSHARED
655BLDSHARED
656LDCXXSHARED
657LDSHARED
658SO
659LIBTOOL_CRUFT
660OTHER_LIBTOOL_OPT
661UNIVERSAL_ARCH_FLAGS
662BASECFLAGS
663OPT
664LN
Trent Nelsonf6407a12012-08-30 14:56:13 +0000665MKDIR_P
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000666INSTALL_DATA
667INSTALL_SCRIPT
668INSTALL_PROGRAM
Georg Brandl3a5508e2011-03-06 10:42:21 +0100669HAS_HG
670HGBRANCH
671HGTAG
672HGVERSION
Trent Nelsond86ceec2012-10-16 09:42:45 -0400673BASECPPFLAGS
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000674SVNVERSION
675ARFLAGS
doko@python.orgd65e2ba2013-01-31 23:52:03 +0100676ac_ct_AR
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000677AR
678RANLIB
679GNULD
680LINKCC
681RUNSHARED
682INSTSONAME
683LDLIBRARYDIR
684BLDLIBRARY
685DLLLIBRARY
686LDLIBRARY
687LIBRARY
688BUILDEXEEXT
689EGREP
690GREP
691CPP
doko@python.org4e63fbe2013-01-25 13:08:27 +0100692MULTIARCH
doko@python.orgd65e2ba2013-01-31 23:52:03 +0100693ac_ct_CXX
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000694MAINCC
695CXX
696OBJEXT
697EXEEXT
698ac_ct_CC
699CPPFLAGS
700LDFLAGS
701CFLAGS
702CC
703EXPORT_MACOSX_DEPLOYMENT_TARGET
704CONFIGURE_MACOSX_DEPLOYMENT_TARGET
705EXTRAMACHDEPPATH
706EXTRAPLATDIR
707SGI_ABI
doko@python.orgd65e2ba2013-01-31 23:52:03 +0100708_PYTHON_HOST_PLATFORM
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000709MACHDEP
710FRAMEWORKINSTALLAPPSPREFIX
711FRAMEWORKUNIXTOOLSPREFIX
712FRAMEWORKALTINSTALLLAST
713FRAMEWORKALTINSTALLFIRST
714FRAMEWORKINSTALLLAST
715FRAMEWORKINSTALLFIRST
716PYTHONFRAMEWORKINSTALLDIR
717PYTHONFRAMEWORKPREFIX
718PYTHONFRAMEWORKDIR
719PYTHONFRAMEWORKIDENTIFIER
720PYTHONFRAMEWORK
721LIPO_32BIT_FLAGS
722ARCH_RUN_32BIT
723UNIVERSALSDK
724CONFIG_ARGS
725SOVERSION
726VERSION
doko@python.orgd65e2ba2013-01-31 23:52:03 +0100727PYTHON_FOR_BUILD
728host_os
729host_vendor
730host_cpu
731host
732build_os
733build_vendor
734build_cpu
735build
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000736target_alias
737host_alias
738build_alias
739LIBS
740ECHO_T
741ECHO_N
742ECHO_C
743DEFS
744mandir
745localedir
746libdir
747psdir
748pdfdir
749dvidir
750htmldir
751infodir
752docdir
753oldincludedir
754includedir
755localstatedir
756sharedstatedir
757sysconfdir
758datadir
759datarootdir
760libexecdir
761sbindir
762bindir
763program_transform_name
764prefix
765exec_prefix
766PACKAGE_URL
767PACKAGE_BUGREPORT
768PACKAGE_STRING
769PACKAGE_VERSION
770PACKAGE_TARNAME
771PACKAGE_NAME
772PATH_SEPARATOR
773SHELL'
Skip Montanaro6dead952003-09-25 14:50:04 +0000774ac_subst_files=''
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000775ac_user_opts='
776enable_option_checking
777enable_universalsdk
778with_universal_archs
779with_framework_name
780enable_framework
781with_gcc
782with_cxx_main
783with_suffix
784enable_shared
785enable_profiling
786with_pydebug
787enable_toolbox_glue
788with_libs
789with_system_expat
790with_system_ffi
Ned Deilya2a9f572013-10-25 00:30:10 -0700791with_tcltk_includes
792with_tcltk_libs
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000793with_dbmliborder
794with_signal_module
795with_dec_threads
796with_threads
797with_thread
798with_pth
799enable_ipv6
800with_doc_strings
801with_tsc
802with_pymalloc
803with_valgrind
804with_wctype_functions
805with_fpectl
806with_libm
807with_libc
808enable_big_digits
809enable_unicode
810'
Martin v. Löwiseba40652007-08-30 20:10:57 +0000811 ac_precious_vars='build_alias
812host_alias
813target_alias
814CC
815CFLAGS
816LDFLAGS
817LIBS
818CPPFLAGS
819CPP'
820
Guido van Rossum627b2d71993-12-24 10:39:16 +0000821
Guido van Rossum7f43da71994-08-01 12:15:30 +0000822# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000823ac_init_help=
824ac_init_version=false
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000825ac_unrecognized_opts=
826ac_unrecognized_sep=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000827# The variables have the same names as the options, with
828# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000829cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000830exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000831no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000832no_recursion=
833prefix=NONE
834program_prefix=NONE
835program_suffix=NONE
836program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000837silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000838site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000839srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000840verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000841x_includes=NONE
842x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000843
844# Installation directory options.
845# These are left unexpanded so users can "make install exec_prefix=/foo"
846# and all the variables that are supposed to be based on exec_prefix
847# by default will actually change.
848# Use braces instead of parens because sh, perl, etc. also accept them.
Martin v. Löwiseba40652007-08-30 20:10:57 +0000849# (The list follows the same order as the GNU Coding Standards.)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000850bindir='${exec_prefix}/bin'
851sbindir='${exec_prefix}/sbin'
852libexecdir='${exec_prefix}/libexec'
Martin v. Löwiseba40652007-08-30 20:10:57 +0000853datarootdir='${prefix}/share'
854datadir='${datarootdir}'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000855sysconfdir='${prefix}/etc'
856sharedstatedir='${prefix}/com'
857localstatedir='${prefix}/var'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000858includedir='${prefix}/include'
859oldincludedir='/usr/include'
Martin v. Löwiseba40652007-08-30 20:10:57 +0000860docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
861infodir='${datarootdir}/info'
862htmldir='${docdir}'
863dvidir='${docdir}'
864pdfdir='${docdir}'
865psdir='${docdir}'
866libdir='${exec_prefix}/lib'
867localedir='${datarootdir}/locale'
868mandir='${datarootdir}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000869
Guido van Rossum7f43da71994-08-01 12:15:30 +0000870ac_prev=
Martin v. Löwiseba40652007-08-30 20:10:57 +0000871ac_dashdash=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000872for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000873do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000874 # If the previous option needs an argument, assign it.
875 if test -n "$ac_prev"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +0000876 eval $ac_prev=\$ac_option
Guido van Rossum7f43da71994-08-01 12:15:30 +0000877 ac_prev=
878 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000879 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000880
Martin v. Löwiseba40652007-08-30 20:10:57 +0000881 case $ac_option in
Georg Brandl71f4fbb2011-02-25 11:04:50 +0000882 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
883 *=) ac_optarg= ;;
884 *) ac_optarg=yes ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +0000885 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000886
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000887 # Accept the important Cygnus configure options, so we can diagnose typos.
888
Martin v. Löwiseba40652007-08-30 20:10:57 +0000889 case $ac_dashdash$ac_option in
890 --)
891 ac_dashdash=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000892
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000893 -bindir | --bindir | --bindi | --bind | --bin | --bi)
894 ac_prev=bindir ;;
895 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000896 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000897
898 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000899 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000900 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000901 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000902
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000903 -cache-file | --cache-file | --cache-fil | --cache-fi \
904 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
905 ac_prev=cache_file ;;
906 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
907 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000908 cache_file=$ac_optarg ;;
909
910 --config-cache | -C)
911 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000912
Martin v. Löwiseba40652007-08-30 20:10:57 +0000913 -datadir | --datadir | --datadi | --datad)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000914 ac_prev=datadir ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +0000915 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000916 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000917
Martin v. Löwiseba40652007-08-30 20:10:57 +0000918 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
919 | --dataroo | --dataro | --datar)
920 ac_prev=datarootdir ;;
921 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
922 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
923 datarootdir=$ac_optarg ;;
924
Guido van Rossum7f43da71994-08-01 12:15:30 +0000925 -disable-* | --disable-*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000926 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000927 # Reject names that are not valid shell variable names.
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000928 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Georg Brandl71f4fbb2011-02-25 11:04:50 +0000929 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000930 ac_useropt_orig=$ac_useropt
931 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
932 case $ac_user_opts in
933 *"
934"enable_$ac_useropt"
935"*) ;;
936 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
937 ac_unrecognized_sep=', ';;
938 esac
939 eval enable_$ac_useropt=no ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +0000940
941 -docdir | --docdir | --docdi | --doc | --do)
942 ac_prev=docdir ;;
943 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
944 docdir=$ac_optarg ;;
945
946 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
947 ac_prev=dvidir ;;
948 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
949 dvidir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000950
951 -enable-* | --enable-*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000952 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000953 # Reject names that are not valid shell variable names.
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000954 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Georg Brandl71f4fbb2011-02-25 11:04:50 +0000955 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000956 ac_useropt_orig=$ac_useropt
957 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
958 case $ac_user_opts in
959 *"
960"enable_$ac_useropt"
961"*) ;;
962 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
963 ac_unrecognized_sep=', ';;
964 esac
965 eval enable_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000966
Guido van Rossum7f43da71994-08-01 12:15:30 +0000967 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
968 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
969 | --exec | --exe | --ex)
970 ac_prev=exec_prefix ;;
971 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
972 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
973 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000974 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000975
976 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000977 # Obsolete; use --with-gas.
978 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000979
Martin v. Löwis11437992002-04-12 09:54:03 +0000980 -help | --help | --hel | --he | -h)
981 ac_init_help=long ;;
982 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
983 ac_init_help=recursive ;;
984 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
985 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000986
987 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +0000988 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000989 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000990 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000991
Martin v. Löwiseba40652007-08-30 20:10:57 +0000992 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
993 ac_prev=htmldir ;;
994 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
995 | --ht=*)
996 htmldir=$ac_optarg ;;
997
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000998 -includedir | --includedir | --includedi | --included | --include \
999 | --includ | --inclu | --incl | --inc)
1000 ac_prev=includedir ;;
1001 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1002 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001003 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001004
1005 -infodir | --infodir | --infodi | --infod | --info | --inf)
1006 ac_prev=infodir ;;
1007 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001008 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001009
1010 -libdir | --libdir | --libdi | --libd)
1011 ac_prev=libdir ;;
1012 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001013 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001014
1015 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1016 | --libexe | --libex | --libe)
1017 ac_prev=libexecdir ;;
1018 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1019 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001020 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001021
Martin v. Löwiseba40652007-08-30 20:10:57 +00001022 -localedir | --localedir | --localedi | --localed | --locale)
1023 ac_prev=localedir ;;
1024 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1025 localedir=$ac_optarg ;;
1026
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001027 -localstatedir | --localstatedir | --localstatedi | --localstated \
Martin v. Löwiseba40652007-08-30 20:10:57 +00001028 | --localstate | --localstat | --localsta | --localst | --locals)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001029 ac_prev=localstatedir ;;
1030 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Martin v. Löwiseba40652007-08-30 20:10:57 +00001031 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001032 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001033
1034 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1035 ac_prev=mandir ;;
1036 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001037 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001038
Guido van Rossum7f43da71994-08-01 12:15:30 +00001039 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001040 # Obsolete; use --without-fp.
1041 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001042
1043 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +00001044 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +00001045 no_create=yes ;;
1046
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001047 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1048 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1049 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001050
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001051 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1052 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1053 | --oldin | --oldi | --old | --ol | --o)
1054 ac_prev=oldincludedir ;;
1055 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1056 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1057 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001058 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001059
Guido van Rossum7f43da71994-08-01 12:15:30 +00001060 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1061 ac_prev=prefix ;;
1062 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001063 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001064
1065 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1066 | --program-pre | --program-pr | --program-p)
1067 ac_prev=program_prefix ;;
1068 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1069 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001070 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001071
1072 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1073 | --program-suf | --program-su | --program-s)
1074 ac_prev=program_suffix ;;
1075 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1076 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001077 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001078
1079 -program-transform-name | --program-transform-name \
1080 | --program-transform-nam | --program-transform-na \
1081 | --program-transform-n | --program-transform- \
1082 | --program-transform | --program-transfor \
1083 | --program-transfo | --program-transf \
1084 | --program-trans | --program-tran \
1085 | --progr-tra | --program-tr | --program-t)
1086 ac_prev=program_transform_name ;;
1087 -program-transform-name=* | --program-transform-name=* \
1088 | --program-transform-nam=* | --program-transform-na=* \
1089 | --program-transform-n=* | --program-transform-=* \
1090 | --program-transform=* | --program-transfor=* \
1091 | --program-transfo=* | --program-transf=* \
1092 | --program-trans=* | --program-tran=* \
1093 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001094 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001095
Martin v. Löwiseba40652007-08-30 20:10:57 +00001096 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1097 ac_prev=pdfdir ;;
1098 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1099 pdfdir=$ac_optarg ;;
1100
1101 -psdir | --psdir | --psdi | --psd | --ps)
1102 ac_prev=psdir ;;
1103 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1104 psdir=$ac_optarg ;;
1105
Guido van Rossum7f43da71994-08-01 12:15:30 +00001106 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1107 | -silent | --silent | --silen | --sile | --sil)
1108 silent=yes ;;
1109
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001110 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1111 ac_prev=sbindir ;;
1112 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1113 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001114 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001115
1116 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1117 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1118 | --sharedst | --shareds | --shared | --share | --shar \
1119 | --sha | --sh)
1120 ac_prev=sharedstatedir ;;
1121 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1122 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1123 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1124 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001125 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001126
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001127 -site | --site | --sit)
1128 ac_prev=site ;;
1129 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001130 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001131
Guido van Rossum7f43da71994-08-01 12:15:30 +00001132 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1133 ac_prev=srcdir ;;
1134 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001135 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001136
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001137 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1138 | --syscon | --sysco | --sysc | --sys | --sy)
1139 ac_prev=sysconfdir ;;
1140 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1141 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001142 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001143
Guido van Rossum7f43da71994-08-01 12:15:30 +00001144 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +00001145 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001146 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001147 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001148
1149 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1150 verbose=yes ;;
1151
Martin v. Löwis11437992002-04-12 09:54:03 +00001152 -version | --version | --versio | --versi | --vers | -V)
1153 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001154
1155 -with-* | --with-*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001156 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001157 # Reject names that are not valid shell variable names.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001158 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001159 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001160 ac_useropt_orig=$ac_useropt
1161 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1162 case $ac_user_opts in
1163 *"
1164"with_$ac_useropt"
1165"*) ;;
1166 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1167 ac_unrecognized_sep=', ';;
1168 esac
1169 eval with_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001170
1171 -without-* | --without-*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001172 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001173 # Reject names that are not valid shell variable names.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001174 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001175 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001176 ac_useropt_orig=$ac_useropt
1177 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1178 case $ac_user_opts in
1179 *"
1180"with_$ac_useropt"
1181"*) ;;
1182 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1183 ac_unrecognized_sep=', ';;
1184 esac
1185 eval with_$ac_useropt=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001186
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001187 --x)
1188 # Obsolete; use --with-x.
1189 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001190
1191 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1192 | --x-incl | --x-inc | --x-in | --x-i)
1193 ac_prev=x_includes ;;
1194 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1195 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001196 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001197
1198 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1199 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1200 ac_prev=x_libraries ;;
1201 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1202 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001203 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001204
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001205 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1206Try \`$0 --help' for more information"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001207 ;;
1208
Martin v. Löwis11437992002-04-12 09:54:03 +00001209 *=*)
1210 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1211 # Reject names that are not valid shell variable names.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001212 case $ac_envvar in #(
1213 '' | [0-9]* | *[!_$as_cr_alnum]* )
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001214 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001215 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00001216 eval $ac_envvar=\$ac_optarg
Martin v. Löwis11437992002-04-12 09:54:03 +00001217 export $ac_envvar ;;
1218
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001219 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001220 # FIXME: should be removed in autoconf 3.0.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001221 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001222 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001223 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
Matthias Klose3cef2a92012-03-14 23:39:33 +01001224 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001225 ;;
1226
1227 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00001228done
1229
Guido van Rossum7f43da71994-08-01 12:15:30 +00001230if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001231 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001232 as_fn_error $? "missing argument to $ac_option"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001233fi
1234
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001235if test -n "$ac_unrecognized_opts"; then
1236 case $enable_option_checking in
1237 no) ;;
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001238 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001239 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1240 esac
1241fi
1242
1243# Check all directory arguments for consistency.
Martin v. Löwiseba40652007-08-30 20:10:57 +00001244for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1245 datadir sysconfdir sharedstatedir localstatedir includedir \
1246 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1247 libdir localedir mandir
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001248do
Martin v. Löwiseba40652007-08-30 20:10:57 +00001249 eval ac_val=\$$ac_var
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001250 # Remove trailing slashes.
1251 case $ac_val in
1252 */ )
1253 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1254 eval $ac_var=\$ac_val;;
1255 esac
1256 # Be sure to have absolute directory names.
Martin v. Löwis11437992002-04-12 09:54:03 +00001257 case $ac_val in
Martin v. Löwiseba40652007-08-30 20:10:57 +00001258 [\\/$]* | ?:[\\/]* ) continue;;
1259 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001260 esac
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001261 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
Martin v. Löwis11437992002-04-12 09:54:03 +00001262done
Guido van Rossum627b2d71993-12-24 10:39:16 +00001263
Martin v. Löwis11437992002-04-12 09:54:03 +00001264# There might be people who depend on the old broken behavior: `$host'
1265# used to hold the argument of --host etc.
1266# FIXME: To remove some day.
1267build=$build_alias
1268host=$host_alias
1269target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +00001270
Martin v. Löwis11437992002-04-12 09:54:03 +00001271# FIXME: To remove some day.
1272if test "x$host_alias" != x; then
1273 if test "x$build_alias" = x; then
1274 cross_compiling=maybe
Martin v. Löwis11437992002-04-12 09:54:03 +00001275 elif test "x$build_alias" != "x$host_alias"; then
1276 cross_compiling=yes
1277 fi
1278fi
1279
1280ac_tool_prefix=
1281test -n "$host_alias" && ac_tool_prefix=$host_alias-
1282
1283test "$silent" = yes && exec 6>/dev/null
1284
Guido van Rossum627b2d71993-12-24 10:39:16 +00001285
Martin v. Löwiseba40652007-08-30 20:10:57 +00001286ac_pwd=`pwd` && test -n "$ac_pwd" &&
1287ac_ls_di=`ls -di .` &&
1288ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001289 as_fn_error $? "working directory cannot be determined"
Martin v. Löwiseba40652007-08-30 20:10:57 +00001290test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001291 as_fn_error $? "pwd does not report name of working directory"
Martin v. Löwiseba40652007-08-30 20:10:57 +00001292
1293
Guido van Rossum627b2d71993-12-24 10:39:16 +00001294# Find the source files, if location was not specified.
1295if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001296 ac_srcdir_defaulted=yes
Martin v. Löwiseba40652007-08-30 20:10:57 +00001297 # Try the directory containing this script, then the parent directory.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001298 ac_confdir=`$as_dirname -- "$as_myself" ||
1299$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1300 X"$as_myself" : 'X\(//\)[^/]' \| \
1301 X"$as_myself" : 'X\(//\)$' \| \
1302 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1303$as_echo X"$as_myself" |
Martin v. Löwiseba40652007-08-30 20:10:57 +00001304 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1305 s//\1/
1306 q
1307 }
1308 /^X\(\/\/\)[^/].*/{
1309 s//\1/
1310 q
1311 }
1312 /^X\(\/\/\)$/{
1313 s//\1/
1314 q
1315 }
1316 /^X\(\/\).*/{
1317 s//\1/
1318 q
1319 }
1320 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001321 srcdir=$ac_confdir
Martin v. Löwiseba40652007-08-30 20:10:57 +00001322 if test ! -r "$srcdir/$ac_unique_file"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001323 srcdir=..
1324 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001325else
1326 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001327fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00001328if test ! -r "$srcdir/$ac_unique_file"; then
1329 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001330 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
Brett Cannon19fab762007-06-02 03:02:29 +00001331fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00001332ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1333ac_abs_confdir=`(
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001334 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
Martin v. Löwiseba40652007-08-30 20:10:57 +00001335 pwd)`
1336# When building in place, set srcdir=.
1337if test "$ac_abs_confdir" = "$ac_pwd"; then
1338 srcdir=.
1339fi
1340# Remove unnecessary trailing slashes from srcdir.
1341# Double slashes in file names in object file debugging info
1342# mess up M-x gdb in Emacs.
1343case $srcdir in
1344*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1345esac
1346for ac_var in $ac_precious_vars; do
1347 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1348 eval ac_env_${ac_var}_value=\$${ac_var}
1349 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1350 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1351done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001352
Martin v. Löwis11437992002-04-12 09:54:03 +00001353#
1354# Report the --help message.
1355#
1356if test "$ac_init_help" = "long"; then
1357 # Omit some internal or obsolete options to make the list less imposing.
1358 # This message is too long to be a string in the A/UX 3.1 sh.
1359 cat <<_ACEOF
Martin v. Löwis174440b2008-10-03 08:59:41 +00001360\`configure' configures python 2.7 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +00001361
1362Usage: $0 [OPTION]... [VAR=VALUE]...
1363
1364To assign environment variables (e.g., CC, CFLAGS...), specify them as
1365VAR=VALUE. See below for descriptions of some of the useful variables.
1366
1367Defaults for the options are specified in brackets.
1368
1369Configuration:
1370 -h, --help display this help and exit
1371 --help=short display options specific to this package
1372 --help=recursive display the short help of all the included packages
1373 -V, --version display version information and exit
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001374 -q, --quiet, --silent do not print \`checking ...' messages
Martin v. Löwis11437992002-04-12 09:54:03 +00001375 --cache-file=FILE cache test results in FILE [disabled]
1376 -C, --config-cache alias for \`--cache-file=config.cache'
1377 -n, --no-create do not create output files
1378 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1379
Martin v. Löwis11437992002-04-12 09:54:03 +00001380Installation directories:
1381 --prefix=PREFIX install architecture-independent files in PREFIX
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001382 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001383 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001384 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +00001385
1386By default, \`make install' will install all the files in
1387\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1388an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1389for instance \`--prefix=\$HOME'.
1390
1391For better control, use the options below.
1392
1393Fine tuning of the installation directories:
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001394 --bindir=DIR user executables [EPREFIX/bin]
1395 --sbindir=DIR system admin executables [EPREFIX/sbin]
1396 --libexecdir=DIR program executables [EPREFIX/libexec]
1397 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1398 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1399 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1400 --libdir=DIR object code libraries [EPREFIX/lib]
1401 --includedir=DIR C header files [PREFIX/include]
1402 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1403 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1404 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1405 --infodir=DIR info documentation [DATAROOTDIR/info]
1406 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1407 --mandir=DIR man documentation [DATAROOTDIR/man]
1408 --docdir=DIR documentation root [DATAROOTDIR/doc/python]
1409 --htmldir=DIR html documentation [DOCDIR]
1410 --dvidir=DIR dvi documentation [DOCDIR]
1411 --pdfdir=DIR pdf documentation [DOCDIR]
1412 --psdir=DIR ps documentation [DOCDIR]
Martin v. Löwis11437992002-04-12 09:54:03 +00001413_ACEOF
1414
1415 cat <<\_ACEOF
doko@python.orgd65e2ba2013-01-31 23:52:03 +01001416
1417System types:
1418 --build=BUILD configure for building on BUILD [guessed]
1419 --host=HOST cross-compile to build programs to run on HOST [BUILD]
Martin v. Löwis11437992002-04-12 09:54:03 +00001420_ACEOF
1421fi
1422
1423if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +00001424 case $ac_init_help in
Martin v. Löwis174440b2008-10-03 08:59:41 +00001425 short | recursive ) echo "Configuration of python 2.7:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +00001426 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001427 cat <<\_ACEOF
1428
1429Optional Features:
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001430 --disable-option-checking ignore unrecognized --enable/--with options
Martin v. Löwis11437992002-04-12 09:54:03 +00001431 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1432 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Brett Cannon91a1dec2008-02-13 19:15:44 +00001433 --enable-universalsdk[=SDKDIR]
Brett Cannon9a8bb0e2008-02-03 02:07:55 +00001434 Build against Mac OS X 10.4u SDK (ppc/i386)
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001435 --enable-framework[=INSTALLDIR]
1436 Build (MacOSX|Darwin) framework
1437 --enable-shared disable/enable building shared python library
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00001438 --enable-profiling enable C-level code profiling
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001439 --enable-toolbox-glue disable/enable MacOSX glue code for extensions
1440 --enable-ipv6 Enable ipv6 (with ipv4) support
1441 --disable-ipv6 Disable ipv6 support
Mark Dickinsonefc82f72009-03-20 15:51:55 +00001442 --enable-big-digits[=BITS]
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001443 use big digits for Python longs [[BITS=30]]
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001444 --enable-unicode[=ucs[24]]
Benjamin Peterson66556b02010-05-25 02:23:32 +00001445 Enable Unicode strings (default is ucs2)
Martin v. Löwis11437992002-04-12 09:54:03 +00001446
1447Optional Packages:
1448 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1449 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Ronald Oussoren5640ce22008-06-05 12:58:24 +00001450 --with-universal-archs=ARCH
1451 select architectures for universal build ("32-bit",
Ronald Oussoren23d92532009-09-07 06:12:00 +00001452 "64-bit", "3-way", "intel" or "all")
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00001453 --with-framework-name=FRAMEWORK
1454 specify an alternate name of the framework built
1455 with --enable-framework
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001456 --without-gcc never use gcc
Martin v. Löwis0f48d982006-04-14 14:34:26 +00001457 --with-cxx-main=<compiler>
1458 compile main() and link python executable with C++
1459 compiler
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001460 --with-suffix=.exe set executable suffix
1461 --with-pydebug build with Py_DEBUG defined
1462 --with-libs='lib1 ...' link against additional libs
Benjamin Peterson2c196742009-12-31 03:17:18 +00001463 --with-system-expat build pyexpat module using an installed expat
1464 library
Martin v. Löwis9176fc12006-04-11 11:12:43 +00001465 --with-system-ffi build _ctypes module using an installed ffi library
Ned Deilya2a9f572013-10-25 00:30:10 -07001466 --with-tcltk-includes='-I...'
1467 override search for Tcl and Tk include files
1468 --with-tcltk-libs='-L...'
1469 override search for Tcl and Tk libs
Benjamin Peterson867475c2009-04-29 20:36:25 +00001470 --with-dbmliborder=db1:db2:...
1471 order to check db backends for dbm. Valid value is a
1472 colon separated string with the backend names
1473 `ndbm', `gdbm' and `bdb'.
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001474 --with-signal-module disable/enable signal module
1475 --with-dec-threads use DEC Alpha/OSF1 thread-safe libraries
1476 --with(out)-threads[=DIRECTORY]
1477 disable/enable thread support
1478 --with(out)-thread[=DIRECTORY]
1479 deprecated; use --with(out)-threads
1480 --with-pth use GNU pth threading libraries
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001481 --with(out)-doc-strings disable/enable documentation strings
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00001482 --with(out)-tsc enable/disable timestamp counter profile
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001483 --with(out)-pymalloc disable/enable specialized mallocs
Benjamin Peterson91c12eb2009-12-03 02:52:39 +00001484 --with-valgrind Enable Valgrind support
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001485 --with-wctype-functions use wctype.h functions
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001486 --with-fpectl enable SIGFPE catching
1487 --with-libm=STRING math library
1488 --with-libc=STRING C library
Martin v. Löwis11437992002-04-12 09:54:03 +00001489
1490Some influential environment variables:
1491 CC C compiler command
1492 CFLAGS C compiler flags
1493 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1494 nonstandard directory <lib dir>
Martin v. Löwiseba40652007-08-30 20:10:57 +00001495 LIBS libraries to pass to the linker, e.g. -l<library>
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001496 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
Martin v. Löwiseba40652007-08-30 20:10:57 +00001497 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001498 CPP C preprocessor
1499
1500Use these variables to override the choices made by `configure' or to help
1501it to find libraries and programs with nonstandard names/locations.
1502
Georg Brandl464432d2009-05-20 18:24:08 +00001503Report bugs to <http://bugs.python.org/>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001504_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00001505ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001506fi
1507
1508if test "$ac_init_help" = "recursive"; then
1509 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001510 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001511 test -d "$ac_dir" ||
1512 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1513 continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001514 ac_builddir=.
1515
Martin v. Löwiseba40652007-08-30 20:10:57 +00001516case "$ac_dir" in
1517.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1518*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001519 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Martin v. Löwiseba40652007-08-30 20:10:57 +00001520 # A ".." for each directory in $ac_dir_suffix.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001521 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Martin v. Löwiseba40652007-08-30 20:10:57 +00001522 case $ac_top_builddir_sub in
1523 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1524 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1525 esac ;;
1526esac
1527ac_abs_top_builddir=$ac_pwd
1528ac_abs_builddir=$ac_pwd$ac_dir_suffix
1529# for backward compatibility:
1530ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001531
1532case $srcdir in
Martin v. Löwiseba40652007-08-30 20:10:57 +00001533 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001534 ac_srcdir=.
Martin v. Löwiseba40652007-08-30 20:10:57 +00001535 ac_top_srcdir=$ac_top_builddir_sub
1536 ac_abs_top_srcdir=$ac_pwd ;;
1537 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001538 ac_srcdir=$srcdir$ac_dir_suffix;
Martin v. Löwiseba40652007-08-30 20:10:57 +00001539 ac_top_srcdir=$srcdir
1540 ac_abs_top_srcdir=$srcdir ;;
1541 *) # Relative name.
1542 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1543 ac_top_srcdir=$ac_top_build_prefix$srcdir
1544 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001545esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00001546ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001547
Martin v. Löwiseba40652007-08-30 20:10:57 +00001548 cd "$ac_dir" || { ac_status=$?; continue; }
1549 # Check for guested configure.
1550 if test -f "$ac_srcdir/configure.gnu"; then
1551 echo &&
1552 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1553 elif test -f "$ac_srcdir/configure"; then
1554 echo &&
1555 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001556 else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001557 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Martin v. Löwiseba40652007-08-30 20:10:57 +00001558 fi || ac_status=$?
1559 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001560 done
1561fi
1562
Martin v. Löwiseba40652007-08-30 20:10:57 +00001563test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001564if $ac_init_version; then
1565 cat <<\_ACEOF
Martin v. Löwis174440b2008-10-03 08:59:41 +00001566python configure 2.7
Charles-François Natalibe2b9072013-01-08 19:47:00 +01001567generated by GNU Autoconf 2.69
Martin v. Löwis11437992002-04-12 09:54:03 +00001568
Charles-François Natalibe2b9072013-01-08 19:47:00 +01001569Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001570This configure script is free software; the Free Software Foundation
1571gives unlimited permission to copy, distribute and modify it.
1572_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00001573 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001574fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001575
1576## ------------------------ ##
1577## Autoconf initialization. ##
1578## ------------------------ ##
1579
1580# ac_fn_c_try_compile LINENO
1581# --------------------------
1582# Try to compile conftest.$ac_ext, and return whether this succeeded.
1583ac_fn_c_try_compile ()
1584{
1585 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1586 rm -f conftest.$ac_objext
1587 if { { ac_try="$ac_compile"
1588case "(($ac_try" in
1589 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1590 *) ac_try_echo=$ac_try;;
1591esac
1592eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1593$as_echo "$ac_try_echo"; } >&5
1594 (eval "$ac_compile") 2>conftest.err
1595 ac_status=$?
1596 if test -s conftest.err; then
1597 grep -v '^ *+' conftest.err >conftest.er1
1598 cat conftest.er1 >&5
1599 mv -f conftest.er1 conftest.err
1600 fi
1601 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1602 test $ac_status = 0; } && {
1603 test -z "$ac_c_werror_flag" ||
1604 test ! -s conftest.err
1605 } && test -s conftest.$ac_objext; then :
1606 ac_retval=0
1607else
1608 $as_echo "$as_me: failed program was:" >&5
1609sed 's/^/| /' conftest.$ac_ext >&5
1610
1611 ac_retval=1
1612fi
Matthias Klose3cef2a92012-03-14 23:39:33 +01001613 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001614 as_fn_set_status $ac_retval
1615
1616} # ac_fn_c_try_compile
1617
1618# ac_fn_c_try_cpp LINENO
1619# ----------------------
1620# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1621ac_fn_c_try_cpp ()
1622{
1623 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1624 if { { ac_try="$ac_cpp conftest.$ac_ext"
1625case "(($ac_try" in
1626 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1627 *) ac_try_echo=$ac_try;;
1628esac
1629eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1630$as_echo "$ac_try_echo"; } >&5
1631 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1632 ac_status=$?
1633 if test -s conftest.err; then
1634 grep -v '^ *+' conftest.err >conftest.er1
1635 cat conftest.er1 >&5
1636 mv -f conftest.er1 conftest.err
1637 fi
1638 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001639 test $ac_status = 0; } > conftest.i && {
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001640 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1641 test ! -s conftest.err
1642 }; then :
1643 ac_retval=0
1644else
1645 $as_echo "$as_me: failed program was:" >&5
1646sed 's/^/| /' conftest.$ac_ext >&5
1647
1648 ac_retval=1
1649fi
Matthias Klose3cef2a92012-03-14 23:39:33 +01001650 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001651 as_fn_set_status $ac_retval
1652
1653} # ac_fn_c_try_cpp
1654
1655# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1656# -------------------------------------------------------
1657# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1658# the include files in INCLUDES and setting the cache variable VAR
1659# accordingly.
1660ac_fn_c_check_header_mongrel ()
1661{
1662 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Matthias Klose3cef2a92012-03-14 23:39:33 +01001663 if eval \${$3+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001664 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1665$as_echo_n "checking for $2... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01001666if eval \${$3+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001667 $as_echo_n "(cached) " >&6
1668fi
1669eval ac_res=\$$3
1670 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1671$as_echo "$ac_res" >&6; }
1672else
1673 # Is the header compilable?
1674{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1675$as_echo_n "checking $2 usability... " >&6; }
1676cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1677/* end confdefs.h. */
1678$4
1679#include <$2>
1680_ACEOF
1681if ac_fn_c_try_compile "$LINENO"; then :
1682 ac_header_compiler=yes
1683else
1684 ac_header_compiler=no
1685fi
1686rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1687{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1688$as_echo "$ac_header_compiler" >&6; }
1689
1690# Is the header present?
1691{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1692$as_echo_n "checking $2 presence... " >&6; }
1693cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1694/* end confdefs.h. */
1695#include <$2>
1696_ACEOF
1697if ac_fn_c_try_cpp "$LINENO"; then :
1698 ac_header_preproc=yes
1699else
1700 ac_header_preproc=no
1701fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001702rm -f conftest.err conftest.i conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001703{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1704$as_echo "$ac_header_preproc" >&6; }
1705
1706# So? What about this header?
1707case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1708 yes:no: )
1709 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1710$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1711 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1712$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1713 ;;
1714 no:yes:* )
1715 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1716$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1717 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1718$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1719 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1720$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1721 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1722$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1723 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1724$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001725( $as_echo "## -------------------------------------- ##
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001726## Report this to http://bugs.python.org/ ##
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001727## -------------------------------------- ##"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001728 ) | sed "s/^/$as_me: WARNING: /" >&2
1729 ;;
1730esac
1731 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1732$as_echo_n "checking for $2... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01001733if eval \${$3+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001734 $as_echo_n "(cached) " >&6
1735else
1736 eval "$3=\$ac_header_compiler"
1737fi
1738eval ac_res=\$$3
1739 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1740$as_echo "$ac_res" >&6; }
1741fi
Matthias Klose3cef2a92012-03-14 23:39:33 +01001742 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001743
1744} # ac_fn_c_check_header_mongrel
1745
1746# ac_fn_c_try_run LINENO
1747# ----------------------
1748# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1749# that executables *can* be run.
1750ac_fn_c_try_run ()
1751{
1752 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1753 if { { ac_try="$ac_link"
1754case "(($ac_try" in
1755 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1756 *) ac_try_echo=$ac_try;;
1757esac
1758eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1759$as_echo "$ac_try_echo"; } >&5
1760 (eval "$ac_link") 2>&5
1761 ac_status=$?
1762 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1763 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1764 { { case "(($ac_try" in
1765 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1766 *) ac_try_echo=$ac_try;;
1767esac
1768eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1769$as_echo "$ac_try_echo"; } >&5
1770 (eval "$ac_try") 2>&5
1771 ac_status=$?
1772 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1773 test $ac_status = 0; }; }; then :
1774 ac_retval=0
1775else
1776 $as_echo "$as_me: program exited with status $ac_status" >&5
1777 $as_echo "$as_me: failed program was:" >&5
1778sed 's/^/| /' conftest.$ac_ext >&5
1779
1780 ac_retval=$ac_status
1781fi
1782 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Matthias Klose3cef2a92012-03-14 23:39:33 +01001783 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001784 as_fn_set_status $ac_retval
1785
1786} # ac_fn_c_try_run
1787
1788# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1789# -------------------------------------------------------
1790# Tests whether HEADER exists and can be compiled using the include files in
1791# INCLUDES, setting the cache variable VAR accordingly.
1792ac_fn_c_check_header_compile ()
1793{
1794 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1795 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1796$as_echo_n "checking for $2... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01001797if eval \${$3+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001798 $as_echo_n "(cached) " >&6
1799else
1800 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1801/* end confdefs.h. */
1802$4
1803#include <$2>
1804_ACEOF
1805if ac_fn_c_try_compile "$LINENO"; then :
1806 eval "$3=yes"
1807else
1808 eval "$3=no"
1809fi
1810rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1811fi
1812eval ac_res=\$$3
1813 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1814$as_echo "$ac_res" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01001815 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001816
1817} # ac_fn_c_check_header_compile
1818
1819# ac_fn_c_try_link LINENO
1820# -----------------------
1821# Try to link conftest.$ac_ext, and return whether this succeeded.
1822ac_fn_c_try_link ()
1823{
1824 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1825 rm -f conftest.$ac_objext conftest$ac_exeext
1826 if { { ac_try="$ac_link"
1827case "(($ac_try" in
1828 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1829 *) ac_try_echo=$ac_try;;
1830esac
1831eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1832$as_echo "$ac_try_echo"; } >&5
1833 (eval "$ac_link") 2>conftest.err
1834 ac_status=$?
1835 if test -s conftest.err; then
1836 grep -v '^ *+' conftest.err >conftest.er1
1837 cat conftest.er1 >&5
1838 mv -f conftest.er1 conftest.err
1839 fi
1840 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1841 test $ac_status = 0; } && {
1842 test -z "$ac_c_werror_flag" ||
1843 test ! -s conftest.err
1844 } && test -s conftest$ac_exeext && {
1845 test "$cross_compiling" = yes ||
Charles-François Natalibe2b9072013-01-08 19:47:00 +01001846 test -x conftest$ac_exeext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001847 }; then :
1848 ac_retval=0
1849else
1850 $as_echo "$as_me: failed program was:" >&5
1851sed 's/^/| /' conftest.$ac_ext >&5
1852
1853 ac_retval=1
1854fi
1855 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1856 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1857 # interfere with the next link command; also delete a directory that is
1858 # left behind by Apple's compiler. We do this before executing the actions.
1859 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Matthias Klose3cef2a92012-03-14 23:39:33 +01001860 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001861 as_fn_set_status $ac_retval
1862
1863} # ac_fn_c_try_link
1864
1865# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
1866# -------------------------------------------
1867# Tests whether TYPE exists after having included INCLUDES, setting cache
1868# variable VAR accordingly.
1869ac_fn_c_check_type ()
1870{
1871 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1872 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1873$as_echo_n "checking for $2... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01001874if eval \${$3+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001875 $as_echo_n "(cached) " >&6
1876else
1877 eval "$3=no"
1878 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1879/* end confdefs.h. */
1880$4
1881int
1882main ()
1883{
1884if (sizeof ($2))
1885 return 0;
1886 ;
1887 return 0;
1888}
1889_ACEOF
1890if ac_fn_c_try_compile "$LINENO"; then :
1891 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1892/* end confdefs.h. */
1893$4
1894int
1895main ()
1896{
1897if (sizeof (($2)))
1898 return 0;
1899 ;
1900 return 0;
1901}
1902_ACEOF
1903if ac_fn_c_try_compile "$LINENO"; then :
1904
1905else
1906 eval "$3=yes"
1907fi
1908rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1909fi
1910rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1911fi
1912eval ac_res=\$$3
1913 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1914$as_echo "$ac_res" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01001915 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001916
1917} # ac_fn_c_check_type
1918
1919# ac_fn_c_find_uintX_t LINENO BITS VAR
1920# ------------------------------------
1921# Finds an unsigned integer type with width BITS, setting cache variable VAR
1922# accordingly.
1923ac_fn_c_find_uintX_t ()
1924{
1925 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1926 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uint$2_t" >&5
1927$as_echo_n "checking for uint$2_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01001928if eval \${$3+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001929 $as_echo_n "(cached) " >&6
1930else
1931 eval "$3=no"
1932 # Order is important - never check a type that is potentially smaller
1933 # than half of the expected target width.
1934 for ac_type in uint$2_t 'unsigned int' 'unsigned long int' \
1935 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
1936 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1937/* end confdefs.h. */
1938$ac_includes_default
1939int
1940main ()
1941{
1942static int test_array [1 - 2 * !((($ac_type) -1 >> ($2 / 2 - 1)) >> ($2 / 2 - 1) == 3)];
Charles-François Natalibe2b9072013-01-08 19:47:00 +01001943test_array [0] = 0;
1944return test_array [0];
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001945
1946 ;
1947 return 0;
1948}
1949_ACEOF
1950if ac_fn_c_try_compile "$LINENO"; then :
1951 case $ac_type in #(
1952 uint$2_t) :
1953 eval "$3=yes" ;; #(
1954 *) :
1955 eval "$3=\$ac_type" ;;
1956esac
1957fi
1958rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001959 if eval test \"x\$"$3"\" = x"no"; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001960
1961else
1962 break
1963fi
1964 done
1965fi
1966eval ac_res=\$$3
1967 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1968$as_echo "$ac_res" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01001969 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001970
1971} # ac_fn_c_find_uintX_t
1972
1973# ac_fn_c_find_intX_t LINENO BITS VAR
1974# -----------------------------------
1975# Finds a signed integer type with width BITS, setting cache variable VAR
1976# accordingly.
1977ac_fn_c_find_intX_t ()
1978{
1979 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1980 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for int$2_t" >&5
1981$as_echo_n "checking for int$2_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01001982if eval \${$3+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001983 $as_echo_n "(cached) " >&6
1984else
1985 eval "$3=no"
1986 # Order is important - never check a type that is potentially smaller
1987 # than half of the expected target width.
1988 for ac_type in int$2_t 'int' 'long int' \
1989 'long long int' 'short int' 'signed char'; do
1990 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1991/* end confdefs.h. */
1992$ac_includes_default
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001993 enum { N = $2 / 2 - 1 };
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001994int
1995main ()
1996{
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001997static 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 +01001998test_array [0] = 0;
1999return test_array [0];
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002000
2001 ;
2002 return 0;
2003}
2004_ACEOF
2005if ac_fn_c_try_compile "$LINENO"; then :
2006 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2007/* end confdefs.h. */
2008$ac_includes_default
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002009 enum { N = $2 / 2 - 1 };
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002010int
2011main ()
2012{
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002013static int test_array [1 - 2 * !(($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002014 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 2))];
Charles-François Natalibe2b9072013-01-08 19:47:00 +01002015test_array [0] = 0;
2016return test_array [0];
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002017
2018 ;
2019 return 0;
2020}
2021_ACEOF
2022if ac_fn_c_try_compile "$LINENO"; then :
2023
2024else
2025 case $ac_type in #(
2026 int$2_t) :
2027 eval "$3=yes" ;; #(
2028 *) :
2029 eval "$3=\$ac_type" ;;
2030esac
2031fi
2032rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2033fi
2034rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002035 if eval test \"x\$"$3"\" = x"no"; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002036
2037else
2038 break
2039fi
2040 done
2041fi
2042eval ac_res=\$$3
2043 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2044$as_echo "$ac_res" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01002045 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002046
2047} # ac_fn_c_find_intX_t
2048
2049# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2050# --------------------------------------------
2051# Tries to find the compile-time value of EXPR in a program that includes
2052# INCLUDES, setting VAR accordingly. Returns whether the value could be
2053# computed
2054ac_fn_c_compute_int ()
2055{
2056 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2057 if test "$cross_compiling" = yes; then
2058 # Depending upon the size, compute the lo and hi bounds.
2059cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2060/* end confdefs.h. */
2061$4
2062int
2063main ()
2064{
2065static int test_array [1 - 2 * !(($2) >= 0)];
Charles-François Natalibe2b9072013-01-08 19:47:00 +01002066test_array [0] = 0;
2067return test_array [0];
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002068
2069 ;
2070 return 0;
2071}
2072_ACEOF
2073if ac_fn_c_try_compile "$LINENO"; then :
2074 ac_lo=0 ac_mid=0
2075 while :; do
2076 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2077/* end confdefs.h. */
2078$4
2079int
2080main ()
2081{
2082static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Charles-François Natalibe2b9072013-01-08 19:47:00 +01002083test_array [0] = 0;
2084return test_array [0];
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002085
2086 ;
2087 return 0;
2088}
2089_ACEOF
2090if ac_fn_c_try_compile "$LINENO"; then :
2091 ac_hi=$ac_mid; break
2092else
2093 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2094 if test $ac_lo -le $ac_mid; then
2095 ac_lo= ac_hi=
2096 break
2097 fi
2098 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2099fi
2100rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2101 done
2102else
2103 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2104/* end confdefs.h. */
2105$4
2106int
2107main ()
2108{
2109static int test_array [1 - 2 * !(($2) < 0)];
Charles-François Natalibe2b9072013-01-08 19:47:00 +01002110test_array [0] = 0;
2111return test_array [0];
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002112
2113 ;
2114 return 0;
2115}
2116_ACEOF
2117if ac_fn_c_try_compile "$LINENO"; then :
2118 ac_hi=-1 ac_mid=-1
2119 while :; do
2120 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2121/* end confdefs.h. */
2122$4
2123int
2124main ()
2125{
2126static int test_array [1 - 2 * !(($2) >= $ac_mid)];
Charles-François Natalibe2b9072013-01-08 19:47:00 +01002127test_array [0] = 0;
2128return test_array [0];
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002129
2130 ;
2131 return 0;
2132}
2133_ACEOF
2134if ac_fn_c_try_compile "$LINENO"; then :
2135 ac_lo=$ac_mid; break
2136else
2137 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2138 if test $ac_mid -le $ac_hi; then
2139 ac_lo= ac_hi=
2140 break
2141 fi
2142 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2143fi
2144rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2145 done
2146else
2147 ac_lo= ac_hi=
2148fi
2149rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2150fi
2151rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2152# Binary search between lo and hi bounds.
2153while test "x$ac_lo" != "x$ac_hi"; do
2154 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2155 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2156/* end confdefs.h. */
2157$4
2158int
2159main ()
2160{
2161static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Charles-François Natalibe2b9072013-01-08 19:47:00 +01002162test_array [0] = 0;
2163return test_array [0];
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002164
2165 ;
2166 return 0;
2167}
2168_ACEOF
2169if ac_fn_c_try_compile "$LINENO"; then :
2170 ac_hi=$ac_mid
2171else
2172 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2173fi
2174rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2175done
2176case $ac_lo in #((
2177?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2178'') ac_retval=1 ;;
2179esac
2180 else
2181 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2182/* end confdefs.h. */
2183$4
2184static long int longval () { return $2; }
2185static unsigned long int ulongval () { return $2; }
2186#include <stdio.h>
2187#include <stdlib.h>
2188int
2189main ()
2190{
2191
2192 FILE *f = fopen ("conftest.val", "w");
2193 if (! f)
2194 return 1;
2195 if (($2) < 0)
2196 {
2197 long int i = longval ();
2198 if (i != ($2))
2199 return 1;
2200 fprintf (f, "%ld", i);
2201 }
2202 else
2203 {
2204 unsigned long int i = ulongval ();
2205 if (i != ($2))
2206 return 1;
2207 fprintf (f, "%lu", i);
2208 }
2209 /* Do not output a trailing newline, as this causes \r\n confusion
2210 on some platforms. */
2211 return ferror (f) || fclose (f) != 0;
2212
2213 ;
2214 return 0;
2215}
2216_ACEOF
2217if ac_fn_c_try_run "$LINENO"; then :
2218 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2219else
2220 ac_retval=1
2221fi
2222rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2223 conftest.$ac_objext conftest.beam conftest.$ac_ext
2224rm -f conftest.val
2225
2226 fi
Matthias Klose3cef2a92012-03-14 23:39:33 +01002227 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002228 as_fn_set_status $ac_retval
2229
2230} # ac_fn_c_compute_int
2231
2232# ac_fn_c_check_func LINENO FUNC VAR
2233# ----------------------------------
2234# Tests whether FUNC exists, setting the cache variable VAR accordingly
2235ac_fn_c_check_func ()
2236{
2237 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2238 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2239$as_echo_n "checking for $2... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01002240if eval \${$3+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002241 $as_echo_n "(cached) " >&6
2242else
2243 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2244/* end confdefs.h. */
2245/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2246 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2247#define $2 innocuous_$2
2248
2249/* System header to define __stub macros and hopefully few prototypes,
2250 which can conflict with char $2 (); below.
2251 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2252 <limits.h> exists even on freestanding compilers. */
2253
2254#ifdef __STDC__
2255# include <limits.h>
2256#else
2257# include <assert.h>
2258#endif
2259
2260#undef $2
2261
2262/* Override any GCC internal prototype to avoid an error.
2263 Use char because int might match the return type of a GCC
2264 builtin and then its argument prototype would still apply. */
2265#ifdef __cplusplus
2266extern "C"
2267#endif
2268char $2 ();
2269/* The GNU C library defines this for functions which it implements
2270 to always fail with ENOSYS. Some functions are actually named
2271 something starting with __ and the normal name is an alias. */
2272#if defined __stub_$2 || defined __stub___$2
2273choke me
2274#endif
2275
2276int
2277main ()
2278{
2279return $2 ();
2280 ;
2281 return 0;
2282}
2283_ACEOF
2284if ac_fn_c_try_link "$LINENO"; then :
2285 eval "$3=yes"
2286else
2287 eval "$3=no"
2288fi
2289rm -f core conftest.err conftest.$ac_objext \
2290 conftest$ac_exeext conftest.$ac_ext
2291fi
2292eval ac_res=\$$3
2293 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2294$as_echo "$ac_res" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01002295 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002296
2297} # ac_fn_c_check_func
2298
2299# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2300# ----------------------------------------------------
2301# Tries to find if the field MEMBER exists in type AGGR, after including
2302# INCLUDES, setting cache variable VAR accordingly.
2303ac_fn_c_check_member ()
2304{
2305 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2306 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2307$as_echo_n "checking for $2.$3... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01002308if eval \${$4+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002309 $as_echo_n "(cached) " >&6
2310else
2311 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2312/* end confdefs.h. */
2313$5
2314int
2315main ()
2316{
2317static $2 ac_aggr;
2318if (ac_aggr.$3)
2319return 0;
2320 ;
2321 return 0;
2322}
2323_ACEOF
2324if ac_fn_c_try_compile "$LINENO"; then :
2325 eval "$4=yes"
2326else
2327 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2328/* end confdefs.h. */
2329$5
2330int
2331main ()
2332{
2333static $2 ac_aggr;
2334if (sizeof ac_aggr.$3)
2335return 0;
2336 ;
2337 return 0;
2338}
2339_ACEOF
2340if ac_fn_c_try_compile "$LINENO"; then :
2341 eval "$4=yes"
2342else
2343 eval "$4=no"
2344fi
2345rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2346fi
2347rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2348fi
2349eval ac_res=\$$4
2350 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2351$as_echo "$ac_res" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01002352 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002353
2354} # ac_fn_c_check_member
2355
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002356# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2357# ---------------------------------------------
2358# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2359# accordingly.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002360ac_fn_c_check_decl ()
2361{
2362 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002363 as_decl_name=`echo $2|sed 's/ *(.*//'`
2364 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2365 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2366$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01002367if eval \${$3+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002368 $as_echo_n "(cached) " >&6
2369else
2370 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2371/* end confdefs.h. */
2372$4
2373int
2374main ()
2375{
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002376#ifndef $as_decl_name
2377#ifdef __cplusplus
2378 (void) $as_decl_use;
2379#else
2380 (void) $as_decl_name;
2381#endif
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002382#endif
2383
2384 ;
2385 return 0;
2386}
2387_ACEOF
2388if ac_fn_c_try_compile "$LINENO"; then :
2389 eval "$3=yes"
2390else
2391 eval "$3=no"
2392fi
2393rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2394fi
2395eval ac_res=\$$3
2396 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2397$as_echo "$ac_res" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01002398 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002399
2400} # ac_fn_c_check_decl
Martin v. Löwiseba40652007-08-30 20:10:57 +00002401cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00002402This file contains any messages produced by compilers while
2403running configure, to aid debugging if configure makes a mistake.
2404
Martin v. Löwis174440b2008-10-03 08:59:41 +00002405It was created by python $as_me 2.7, which was
Charles-François Natalibe2b9072013-01-08 19:47:00 +01002406generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00002407
2408 $ $0 $@
2409
2410_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00002411exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00002412{
2413cat <<_ASUNAME
2414## --------- ##
2415## Platform. ##
2416## --------- ##
2417
2418hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2419uname -m = `(uname -m) 2>/dev/null || echo unknown`
2420uname -r = `(uname -r) 2>/dev/null || echo unknown`
2421uname -s = `(uname -s) 2>/dev/null || echo unknown`
2422uname -v = `(uname -v) 2>/dev/null || echo unknown`
2423
2424/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2425/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2426
2427/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2428/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2429/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Martin v. Löwiseba40652007-08-30 20:10:57 +00002430/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00002431/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2432/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2433/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2434
2435_ASUNAME
2436
2437as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2438for as_dir in $PATH
2439do
2440 IFS=$as_save_IFS
2441 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002442 $as_echo "PATH: $as_dir"
2443 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002444IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002445
2446} >&5
2447
2448cat >&5 <<_ACEOF
2449
2450
2451## ----------- ##
2452## Core tests. ##
2453## ----------- ##
2454
2455_ACEOF
2456
2457
2458# Keep a trace of the command line.
2459# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00002460# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00002461# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00002462# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00002463ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00002464ac_configure_args0=
2465ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00002466ac_must_keep_next=false
2467for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00002468do
Skip Montanaro6dead952003-09-25 14:50:04 +00002469 for ac_arg
2470 do
2471 case $ac_arg in
2472 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2473 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2474 | -silent | --silent | --silen | --sile | --sil)
2475 continue ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00002476 *\'*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002477 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002478 esac
2479 case $ac_pass in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002480 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002481 2)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002482 as_fn_append ac_configure_args1 " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002483 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002484 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00002485 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00002486 case $ac_arg in
2487 *=* | --config-cache | -C | -disable-* | --disable-* \
2488 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2489 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2490 | -with-* | --with-* | -without-* | --without-* | --x)
2491 case "$ac_configure_args0 " in
2492 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2493 esac
2494 ;;
2495 -* ) ac_must_keep_next=true ;;
2496 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00002497 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002498 as_fn_append ac_configure_args " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002499 ;;
2500 esac
2501 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002502done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002503{ ac_configure_args0=; unset ac_configure_args0;}
2504{ ac_configure_args1=; unset ac_configure_args1;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002505
2506# When interrupted or exit'd, cleanup temporary files, and complete
2507# config.log. We remove comments because anyway the quotes in there
2508# would cause problems or look ugly.
Martin v. Löwiseba40652007-08-30 20:10:57 +00002509# WARNING: Use '\'' to represent an apostrophe within the trap.
2510# 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 +00002511trap 'exit_status=$?
2512 # Save into config.log some information that might help in debugging.
2513 {
2514 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002515
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002516 $as_echo "## ---------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002517## Cache variables. ##
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002518## ---------------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002519 echo
2520 # The following way of writing the cache mishandles newlines in values,
Martin v. Löwiseba40652007-08-30 20:10:57 +00002521(
2522 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2523 eval ac_val=\$$ac_var
2524 case $ac_val in #(
2525 *${as_nl}*)
2526 case $ac_var in #(
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002527 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2528$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00002529 esac
2530 case $ac_var in #(
2531 _ | IFS | as_nl) ;; #(
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002532 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2533 *) { eval $ac_var=; unset $ac_var;} ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00002534 esac ;;
2535 esac
2536 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002537 (set) 2>&1 |
Martin v. Löwiseba40652007-08-30 20:10:57 +00002538 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2539 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00002540 sed -n \
Martin v. Löwiseba40652007-08-30 20:10:57 +00002541 "s/'\''/'\''\\\\'\'''\''/g;
2542 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2543 ;; #(
Skip Montanaro89e975f2007-08-22 19:05:21 +00002544 *)
Martin v. Löwiseba40652007-08-30 20:10:57 +00002545 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaro89e975f2007-08-22 19:05:21 +00002546 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00002547 esac |
2548 sort
2549)
Martin v. Löwis11437992002-04-12 09:54:03 +00002550 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002551
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002552 $as_echo "## ----------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00002553## Output variables. ##
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002554## ----------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002555 echo
2556 for ac_var in $ac_subst_vars
2557 do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002558 eval ac_val=\$$ac_var
2559 case $ac_val in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002560 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00002561 esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002562 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002563 done | sort
2564 echo
2565
2566 if test -n "$ac_subst_files"; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002567 $as_echo "## ------------------- ##
Martin v. Löwiseba40652007-08-30 20:10:57 +00002568## File substitutions. ##
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002569## ------------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002570 echo
2571 for ac_var in $ac_subst_files
2572 do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002573 eval ac_val=\$$ac_var
2574 case $ac_val in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002575 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00002576 esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002577 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002578 done | sort
2579 echo
2580 fi
2581
Martin v. Löwis11437992002-04-12 09:54:03 +00002582 if test -s confdefs.h; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002583 $as_echo "## ----------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002584## confdefs.h. ##
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002585## ----------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002586 echo
Martin v. Löwiseba40652007-08-30 20:10:57 +00002587 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002588 echo
2589 fi
2590 test "$ac_signal" != 0 &&
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002591 $as_echo "$as_me: caught signal $ac_signal"
2592 $as_echo "$as_me: exit $exit_status"
Martin v. Löwis11437992002-04-12 09:54:03 +00002593 } >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00002594 rm -f core *.core core.conftest.* &&
2595 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00002596 exit $exit_status
Martin v. Löwiseba40652007-08-30 20:10:57 +00002597' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00002598for ac_signal in 1 2 13 15; do
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002599 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00002600done
2601ac_signal=0
2602
2603# confdefs.h avoids OS command line length limits that DEFS can exceed.
Martin v. Löwiseba40652007-08-30 20:10:57 +00002604rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002605
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002606$as_echo "/* confdefs.h */" > confdefs.h
2607
Martin v. Löwis11437992002-04-12 09:54:03 +00002608# Predefined preprocessor variables.
2609
2610cat >>confdefs.h <<_ACEOF
2611#define PACKAGE_NAME "$PACKAGE_NAME"
2612_ACEOF
2613
Martin v. Löwis11437992002-04-12 09:54:03 +00002614cat >>confdefs.h <<_ACEOF
2615#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2616_ACEOF
2617
Martin v. Löwis11437992002-04-12 09:54:03 +00002618cat >>confdefs.h <<_ACEOF
2619#define PACKAGE_VERSION "$PACKAGE_VERSION"
2620_ACEOF
2621
Martin v. Löwis11437992002-04-12 09:54:03 +00002622cat >>confdefs.h <<_ACEOF
2623#define PACKAGE_STRING "$PACKAGE_STRING"
2624_ACEOF
2625
Martin v. Löwis11437992002-04-12 09:54:03 +00002626cat >>confdefs.h <<_ACEOF
2627#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2628_ACEOF
2629
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002630cat >>confdefs.h <<_ACEOF
2631#define PACKAGE_URL "$PACKAGE_URL"
2632_ACEOF
2633
Martin v. Löwis11437992002-04-12 09:54:03 +00002634
2635# Let the site file select an alternate cache file if it wants to.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002636# Prefer an explicitly selected file to automatically selected ones.
2637ac_site_file1=NONE
2638ac_site_file2=NONE
Martin v. Löwiseba40652007-08-30 20:10:57 +00002639if test -n "$CONFIG_SITE"; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002640 # We do not want a PATH search for config.site.
2641 case $CONFIG_SITE in #((
2642 -*) ac_site_file1=./$CONFIG_SITE;;
2643 */*) ac_site_file1=$CONFIG_SITE;;
2644 *) ac_site_file1=./$CONFIG_SITE;;
2645 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00002646elif test "x$prefix" != xNONE; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002647 ac_site_file1=$prefix/share/config.site
2648 ac_site_file2=$prefix/etc/config.site
Martin v. Löwiseba40652007-08-30 20:10:57 +00002649else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002650 ac_site_file1=$ac_default_prefix/share/config.site
2651 ac_site_file2=$ac_default_prefix/etc/config.site
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002652fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002653for ac_site_file in "$ac_site_file1" "$ac_site_file2"
Martin v. Löwiseba40652007-08-30 20:10:57 +00002654do
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002655 test "x$ac_site_file" = xNONE && continue
2656 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2657 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2658$as_echo "$as_me: loading site script $ac_site_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002659 sed 's/^/| /' "$ac_site_file" >&5
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002660 . "$ac_site_file" \
2661 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2662$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2663as_fn_error $? "failed to load site script $ac_site_file
Matthias Klose3cef2a92012-03-14 23:39:33 +01002664See \`config.log' for more details" "$LINENO" 5; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002665 fi
2666done
2667
2668if test -r "$cache_file"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002669 # Some versions of bash will fail to source /dev/null (special files
2670 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2671 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2672 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2673$as_echo "$as_me: loading cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002674 case $cache_file in
Martin v. Löwiseba40652007-08-30 20:10:57 +00002675 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2676 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00002677 esac
2678 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002679else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002680 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2681$as_echo "$as_me: creating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002682 >$cache_file
2683fi
2684
2685# Check that the precious variables saved in the cache have kept the same
2686# value.
2687ac_cache_corrupted=false
Martin v. Löwiseba40652007-08-30 20:10:57 +00002688for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00002689 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2690 eval ac_new_set=\$ac_env_${ac_var}_set
Martin v. Löwiseba40652007-08-30 20:10:57 +00002691 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2692 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00002693 case $ac_old_set,$ac_new_set in
2694 set,)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002695 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2696$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 +00002697 ac_cache_corrupted=: ;;
2698 ,set)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002699 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2700$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002701 ac_cache_corrupted=: ;;
2702 ,);;
2703 *)
2704 if test "x$ac_old_val" != "x$ac_new_val"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002705 # differences in whitespace do not lead to failure.
2706 ac_old_val_w=`echo x $ac_old_val`
2707 ac_new_val_w=`echo x $ac_new_val`
2708 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2709 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2710$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2711 ac_cache_corrupted=:
2712 else
2713 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2714$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2715 eval $ac_var=\$ac_old_val
2716 fi
2717 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2718$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2719 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2720$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002721 fi;;
2722 esac
2723 # Pass precious variables to config.status.
2724 if test "$ac_new_set" = set; then
2725 case $ac_new_val in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002726 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002727 *) ac_arg=$ac_var=$ac_new_val ;;
2728 esac
2729 case " $ac_configure_args " in
2730 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002731 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002732 esac
2733 fi
2734done
2735if $ac_cache_corrupted; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002736 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2737$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2738 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2739$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002740 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002741fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002742## -------------------- ##
2743## Main body of script. ##
2744## -------------------- ##
Martin v. Löwiseba40652007-08-30 20:10:57 +00002745
Guido van Rossum7f43da71994-08-01 12:15:30 +00002746ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002747ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00002748ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2749ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2750ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002751
Guido van Rossum627b2d71993-12-24 10:39:16 +00002752
Michael W. Hudson54241132001-12-07 15:38:26 +00002753
Martin v. Löwiseba40652007-08-30 20:10:57 +00002754ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00002755
2756
doko@python.orgd65e2ba2013-01-31 23:52:03 +01002757ac_aux_dir=
2758for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
2759 if test -f "$ac_dir/install-sh"; then
2760 ac_aux_dir=$ac_dir
2761 ac_install_sh="$ac_aux_dir/install-sh -c"
2762 break
2763 elif test -f "$ac_dir/install.sh"; then
2764 ac_aux_dir=$ac_dir
2765 ac_install_sh="$ac_aux_dir/install.sh -c"
2766 break
2767 elif test -f "$ac_dir/shtool"; then
2768 ac_aux_dir=$ac_dir
2769 ac_install_sh="$ac_aux_dir/shtool install -c"
2770 break
2771 fi
2772done
2773if test -z "$ac_aux_dir"; then
2774 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
2775fi
2776
2777# These three variables are undocumented and unsupported,
2778# and are intended to be withdrawn in a future Autoconf release.
2779# They can cause serious problems if a builder's source tree is in a directory
2780# whose full name contains unusual characters.
2781ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
2782ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
2783ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
2784
2785
2786# Make sure we can run config.sub.
2787$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2788 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
2789
2790{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
2791$as_echo_n "checking build system type... " >&6; }
2792if ${ac_cv_build+:} false; then :
2793 $as_echo_n "(cached) " >&6
2794else
2795 ac_build_alias=$build_alias
2796test "x$ac_build_alias" = x &&
2797 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2798test "x$ac_build_alias" = x &&
2799 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
2800ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2801 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
2802
2803fi
2804{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
2805$as_echo "$ac_cv_build" >&6; }
2806case $ac_cv_build in
2807*-*-*) ;;
2808*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
2809esac
2810build=$ac_cv_build
2811ac_save_IFS=$IFS; IFS='-'
2812set x $ac_cv_build
2813shift
2814build_cpu=$1
2815build_vendor=$2
2816shift; shift
2817# Remember, the first character of IFS is used to create $*,
2818# except with old shells:
2819build_os=$*
2820IFS=$ac_save_IFS
2821case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2822
2823
2824{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
2825$as_echo_n "checking host system type... " >&6; }
2826if ${ac_cv_host+:} false; then :
2827 $as_echo_n "(cached) " >&6
2828else
2829 if test "x$host_alias" = x; then
2830 ac_cv_host=$ac_cv_build
2831else
2832 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2833 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
2834fi
2835
2836fi
2837{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
2838$as_echo "$ac_cv_host" >&6; }
2839case $ac_cv_host in
2840*-*-*) ;;
2841*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
2842esac
2843host=$ac_cv_host
2844ac_save_IFS=$IFS; IFS='-'
2845set x $ac_cv_host
2846shift
2847host_cpu=$1
2848host_vendor=$2
2849shift; shift
2850# Remember, the first character of IFS is used to create $*,
2851# except with old shells:
2852host_os=$*
2853IFS=$ac_save_IFS
2854case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
2855
2856
2857
2858
2859
2860if test "$cross_compiling" = yes; then
2861 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for python interpreter for cross build" >&5
2862$as_echo_n "checking for python interpreter for cross build... " >&6; }
2863 if test -z "$PYTHON_FOR_BUILD"; then
2864 for interp in python$PACKAGE_VERSION python2 python; do
2865 which $interp >/dev/null 2>&1 || continue
2866 if $interp -c 'import sys;sys.exit(not (sys.version_info[:2] >= (2,7) and sys.version_info[0] < 3))'; then
2867 break
2868 fi
2869 interp=
2870 done
2871 if test x$interp = x; then
2872 as_fn_error $? "python$PACKAGE_VERSION interpreter not found" "$LINENO" 5
2873 fi
2874 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $interp" >&5
2875$as_echo "$interp" >&6; }
2876 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
2877 fi
2878elif test "$cross_compiling" = maybe; then
2879 as_fn_error $? "Cross compiling required --host=HOST-TUPLE and --build=ARCH" "$LINENO" 5
2880else
2881 PYTHON_FOR_BUILD='./$(BUILDPYTHON) -E'
2882fi
2883
2884
Martin v. Löwis11437992002-04-12 09:54:03 +00002885
Georg Brandlbcd64a32009-03-31 21:45:18 +00002886if test "$prefix" != "/"; then
2887 prefix=`echo "$prefix" | sed -e 's/\/$//g'`
2888fi
2889
2890
Martin v. Löwis11437992002-04-12 09:54:03 +00002891
2892
Martin v. Löwis8316feb2003-06-14 07:48:07 +00002893# We don't use PACKAGE_ variables, and they cause conflicts
2894# with other autoconf-based packages that include Python.h
2895grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
2896rm confdefs.h
2897mv confdefs.h.new confdefs.h
2898
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00002899
Martin v. Löwis174440b2008-10-03 08:59:41 +00002900VERSION=2.7
Guido van Rossum1fd74a71997-07-19 19:36:02 +00002901
Martin v. Löwis1142de32002-03-29 16:28:31 +00002902
2903SOVERSION=1.0
2904
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002905# The later defininition of _XOPEN_SOURCE disables certain features
2906# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
2907
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002908$as_echo "#define _GNU_SOURCE 1" >>confdefs.h
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002909
2910
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002911# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2912# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
2913# them.
2914
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002915$as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002916
2917
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002918# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2919# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
2920# them.
2921
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002922$as_echo "#define __BSD_VISIBLE 1" >>confdefs.h
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002923
2924
Martin v. Löwisd6320502004-08-12 13:45:08 +00002925# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2926# u_int on Irix 5.3. Defining _BSD_TYPES brings it back.
2927
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002928$as_echo "#define _BSD_TYPES 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +00002929
2930
Ronald Oussoren5640ce22008-06-05 12:58:24 +00002931# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2932# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
2933# them.
2934
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002935$as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
Ronald Oussoren5640ce22008-06-05 12:58:24 +00002936
2937
2938
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002939define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002940
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00002941# Arguments passed to configure.
2942
2943CONFIG_ARGS="$ac_configure_args"
2944
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002945{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-universalsdk" >&5
2946$as_echo_n "checking for --enable-universalsdk... " >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00002947# Check whether --enable-universalsdk was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002948if test "${enable_universalsdk+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00002949 enableval=$enable_universalsdk;
Ronald Oussoren988117f2006-04-29 11:31:35 +00002950 case $enableval in
2951 yes)
2952 enableval=/Developer/SDKs/MacOSX10.4u.sdk
Ronald Oussoren3c0a1262010-01-17 19:27:57 +00002953 if test ! -d "${enableval}"
2954 then
2955 enableval=/
2956 fi
Ronald Oussoren988117f2006-04-29 11:31:35 +00002957 ;;
2958 esac
2959 case $enableval in
2960 no)
2961 UNIVERSALSDK=
2962 enable_universalsdk=
2963 ;;
2964 *)
2965 UNIVERSALSDK=$enableval
Ronald Oussoren3c0a1262010-01-17 19:27:57 +00002966 if test ! -d "${UNIVERSALSDK}"
2967 then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002968 as_fn_error $? "--enable-universalsdk specifies non-existing SDK: ${UNIVERSALSDK}" "$LINENO" 5
Ronald Oussoren3c0a1262010-01-17 19:27:57 +00002969 fi
Ronald Oussoren988117f2006-04-29 11:31:35 +00002970 ;;
2971 esac
2972
Ronald Oussoren3c0a1262010-01-17 19:27:57 +00002973
Ronald Oussoren988117f2006-04-29 11:31:35 +00002974else
2975
2976 UNIVERSALSDK=
2977 enable_universalsdk=
2978
Martin v. Löwiseba40652007-08-30 20:10:57 +00002979fi
Ronald Oussoren988117f2006-04-29 11:31:35 +00002980
Ronald Oussoren3c0a1262010-01-17 19:27:57 +00002981if test -n "${UNIVERSALSDK}"
2982then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002983 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSALSDK}" >&5
2984$as_echo "${UNIVERSALSDK}" >&6; }
Ronald Oussoren3c0a1262010-01-17 19:27:57 +00002985else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002986 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2987$as_echo "no" >&6; }
Ronald Oussoren3c0a1262010-01-17 19:27:57 +00002988fi
Ronald Oussoren988117f2006-04-29 11:31:35 +00002989
Martin v. Löwiseba40652007-08-30 20:10:57 +00002990
Benjamin Peterson0e6ea5d2008-07-16 20:17:04 +00002991
Ned Deily8e60f6e2013-05-30 00:14:29 -07002992ARCH_RUN_32BIT=""
Benjamin Peterson0e6ea5d2008-07-16 20:17:04 +00002993
Ronald Oussoren5640ce22008-06-05 12:58:24 +00002994UNIVERSAL_ARCHS="32-bit"
Ronald Oussoren92919a62009-12-24 13:30:58 +00002995
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002996{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-universal-archs" >&5
2997$as_echo_n "checking for --with-universal-archs... " >&6; }
Ronald Oussoren5640ce22008-06-05 12:58:24 +00002998
2999# Check whether --with-universal-archs was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003000if test "${with_universal_archs+set}" = set; then :
Ronald Oussoren5640ce22008-06-05 12:58:24 +00003001 withval=$with_universal_archs;
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003002 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
3003$as_echo "$withval" >&6; }
Ronald Oussoren5640ce22008-06-05 12:58:24 +00003004 UNIVERSAL_ARCHS="$withval"
Ronald Oussoren9ebd2422009-09-29 13:00:44 +00003005 if test "${enable_universalsdk}" ; then
3006 :
3007 else
Georg Brandl71f4fbb2011-02-25 11:04:50 +00003008 as_fn_error $? "--with-universal-archs without --enable-universalsdk. See Mac/README" "$LINENO" 5
Ronald Oussoren9ebd2422009-09-29 13:00:44 +00003009 fi
Ronald Oussoren5640ce22008-06-05 12:58:24 +00003010
3011else
3012
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003013 { $as_echo "$as_me:${as_lineno-$LINENO}: result: 32-bit" >&5
3014$as_echo "32-bit" >&6; }
Ronald Oussoren5640ce22008-06-05 12:58:24 +00003015
3016fi
3017
3018
3019
3020
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00003021
3022# Check whether --with-framework-name was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003023if test "${with_framework_name+set}" = set; then :
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00003024 withval=$with_framework_name;
Ronald Oussoren9ebd2422009-09-29 13:00:44 +00003025 if test "${enable_framework}"; then
3026 :
3027 else
Georg Brandl71f4fbb2011-02-25 11:04:50 +00003028 as_fn_error $? "--with-framework-name without --enable-framework. See Mac/README" "$LINENO" 5
Ronald Oussoren9ebd2422009-09-29 13:00:44 +00003029 fi
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00003030 PYTHONFRAMEWORK=${withval}
3031 PYTHONFRAMEWORKDIR=${withval}.framework
3032 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
3033
3034else
3035
3036 PYTHONFRAMEWORK=Python
3037 PYTHONFRAMEWORKDIR=Python.framework
3038 PYTHONFRAMEWORKIDENTIFIER=org.python.python
3039
3040fi
3041
Martin v. Löwiseba40652007-08-30 20:10:57 +00003042# Check whether --enable-framework was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003043if test "${enable_framework+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00003044 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00003045 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00003046 yes)
Jack Jansene578a632001-08-15 01:27:14 +00003047 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00003048 esac
3049 case $enableval in
3050 no)
3051 PYTHONFRAMEWORK=
3052 PYTHONFRAMEWORKDIR=no-framework
3053 PYTHONFRAMEWORKPREFIX=
3054 PYTHONFRAMEWORKINSTALLDIR=
Ronald Oussoren567a8ff2006-05-26 11:43:26 +00003055 FRAMEWORKINSTALLFIRST=
3056 FRAMEWORKINSTALLLAST=
Ronald Oussoren5b787322006-06-06 19:50:24 +00003057 FRAMEWORKALTINSTALLFIRST=
3058 FRAMEWORKALTINSTALLLAST=
Ronald Oussoren2db3a8f2006-06-07 19:06:01 +00003059 if test "x${prefix}" = "xNONE"; then
3060 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3061 else
3062 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3063 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00003064 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00003065 ;;
3066 *)
Ronald Oussoren01d149f2010-04-30 11:20:14 +00003067 PYTHONFRAMEWORKPREFIX="${enableval}"
Jack Jansen127e56e2001-09-11 14:41:54 +00003068 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Ronald Oussoren567a8ff2006-05-26 11:43:26 +00003069 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussoren5640ce22008-06-05 12:58:24 +00003070 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure bininstall maninstall"
Ronald Oussoren92919a62009-12-24 13:30:58 +00003071 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
3072 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
Ronald Oussoren01d149f2010-04-30 11:20:14 +00003073 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
Ronald Oussoren5640ce22008-06-05 12:58:24 +00003074
Ronald Oussoren2db3a8f2006-06-07 19:06:01 +00003075 if test "x${prefix}" = "xNONE" ; then
3076 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
Ronald Oussoren01d149f2010-04-30 11:20:14 +00003077
Ronald Oussoren2db3a8f2006-06-07 19:06:01 +00003078 else
3079 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3080 fi
Ronald Oussoren01d149f2010-04-30 11:20:14 +00003081
3082 case "${enableval}" in
3083 /System*)
3084 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3085 if test "${prefix}" = "NONE" ; then
3086 # See below
3087 FRAMEWORKUNIXTOOLSPREFIX="/usr"
3088 fi
3089 ;;
3090
3091 /Library*)
3092 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3093 ;;
3094
3095 */Library/Frameworks)
3096 MDIR="`dirname "${enableval}"`"
3097 MDIR="`dirname "${MDIR}"`"
3098 FRAMEWORKINSTALLAPPSPREFIX="${MDIR}/Applications"
3099
3100 if test "${prefix}" = "NONE"; then
3101 # User hasn't specified the
3102 # --prefix option, but wants to install
3103 # the framework in a non-default location,
3104 # ensure that the compatibility links get
3105 # installed relative to that prefix as well
3106 # instead of in /usr/local.
3107 FRAMEWORKUNIXTOOLSPREFIX="${MDIR}"
3108 fi
3109 ;;
3110
3111 *)
3112 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3113 ;;
3114 esac
3115
Jack Jansen127e56e2001-09-11 14:41:54 +00003116 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Ronald Oussoren836b0392006-05-14 19:56:34 +00003117
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00003118 # Add files for Mac specific code to the list of output
Ronald Oussoren836b0392006-05-14 19:56:34 +00003119 # files:
Martin v. Löwiseba40652007-08-30 20:10:57 +00003120 ac_config_files="$ac_config_files Mac/Makefile"
Ronald Oussoren836b0392006-05-14 19:56:34 +00003121
Martin v. Löwiseba40652007-08-30 20:10:57 +00003122 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Ronald Oussoren836b0392006-05-14 19:56:34 +00003123
Martin v. Löwiseba40652007-08-30 20:10:57 +00003124 ac_config_files="$ac_config_files Mac/IDLE/Makefile"
Ronald Oussoren836b0392006-05-14 19:56:34 +00003125
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00003126 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
3127
3128 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
3129
Jack Jansene578a632001-08-15 01:27:14 +00003130 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003131
Guido van Rossum563e7081996-09-10 18:20:48 +00003132else
Martin v. Löwis11437992002-04-12 09:54:03 +00003133
Jack Jansene578a632001-08-15 01:27:14 +00003134 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00003135 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00003136 PYTHONFRAMEWORKPREFIX=
3137 PYTHONFRAMEWORKINSTALLDIR=
Ronald Oussoren567a8ff2006-05-26 11:43:26 +00003138 FRAMEWORKINSTALLFIRST=
3139 FRAMEWORKINSTALLLAST=
Ronald Oussoren5b787322006-06-06 19:50:24 +00003140 FRAMEWORKALTINSTALLFIRST=
3141 FRAMEWORKALTINSTALLLAST=
Ronald Oussoren2db3a8f2006-06-07 19:06:01 +00003142 if test "x${prefix}" = "xNONE" ; then
3143 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3144 else
3145 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3146 fi
Jack Jansene578a632001-08-15 01:27:14 +00003147 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003148
Ronald Oussoren5640ce22008-06-05 12:58:24 +00003149
Martin v. Löwiseba40652007-08-30 20:10:57 +00003150fi
3151
Michael W. Hudson54241132001-12-07 15:38:26 +00003152
3153
3154
3155
Jack Jansene578a632001-08-15 01:27:14 +00003156
Ronald Oussoren567a8ff2006-05-26 11:43:26 +00003157
3158
Ronald Oussoren5b787322006-06-06 19:50:24 +00003159
3160
3161
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00003162
Ronald Oussoren01d149f2010-04-30 11:20:14 +00003163
Jack Jansene578a632001-08-15 01:27:14 +00003164##AC_ARG_WITH(dyld,
Matthias Klose22520ea2010-05-08 10:14:46 +00003165## AS_HELP_STRING([--with-dyld],
3166## [Use (OpenStep|Rhapsody) dynamic linker]))
Jack Jansene578a632001-08-15 01:27:14 +00003167##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003168# Set name for machine-dependent library files
3169
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003170{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP" >&5
3171$as_echo_n "checking MACHDEP... " >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003172if test -z "$MACHDEP"
3173then
doko@python.orgd65e2ba2013-01-31 23:52:03 +01003174 # avoid using uname for cross builds
3175 if test "$cross_compiling" = yes; then
3176 # ac_sys_system and ac_sys_release are only used for setting
3177 # `define_xopen_source' in the case statement below. For the
3178 # current supported cross builds, this macro is not adjusted.
3179 case "$host" in
3180 *-*-linux*)
3181 ac_sys_system=Linux
3182 ;;
3183 *-*-cygwin*)
3184 ac_sys_system=Cygwin
3185 ;;
3186 *)
3187 # for now, limit cross builds to known configurations
3188 MACHDEP="unknown"
3189 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3190 esac
3191 ac_sys_release=
3192 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003193 ac_sys_system=`uname -s`
Georg Brandlfe18a112009-09-04 07:55:14 +00003194 if test "$ac_sys_system" = "AIX" \
Martin v. Löwis21ee4092002-09-30 16:19:48 +00003195 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00003196 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003197 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003198 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003199 fi
doko@python.orgd65e2ba2013-01-31 23:52:03 +01003200 fi
3201 ac_md_system=`echo $ac_sys_system |
3202 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
3203 ac_md_release=`echo $ac_sys_release |
3204 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
3205 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00003206
doko@python.orgd65e2ba2013-01-31 23:52:03 +01003207 case $MACHDEP in
Victor Stinneracacbaa2011-08-20 14:02:38 +02003208 linux*) MACHDEP="linux2";;
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00003209 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00003210 darwin*) MACHDEP="darwin";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00003211 atheos*) MACHDEP="atheos";;
Martin v. Löwisf3322282003-07-13 09:46:13 +00003212 irix646) MACHDEP="irix6";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00003213 '') MACHDEP="unknown";;
doko@python.orgd65e2ba2013-01-31 23:52:03 +01003214 esac
3215fi
3216
3217
3218if test "$cross_compiling" = yes; then
3219 case "$host" in
3220 *-*-linux*)
3221 case "$host_cpu" in
3222 arm*)
3223 _host_cpu=arm
3224 ;;
3225 *)
3226 _host_cpu=$host_cpu
3227 esac
3228 ;;
3229 *-*-cygwin*)
3230 _host_cpu=
3231 ;;
3232 *)
3233 # for now, limit cross builds to known configurations
3234 MACHDEP="unknown"
3235 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003236 esac
doko@python.orgd65e2ba2013-01-31 23:52:03 +01003237 _PYTHON_HOST_PLATFORM="$MACHDEP${_host_cpu:+-$_host_cpu}"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003238fi
Guido van Rossum91922671997-10-09 20:24:13 +00003239
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003240# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
3241# disable features if it is defined, without any means to access these
3242# features as extensions. For these systems, we skip the definition of
3243# _XOPEN_SOURCE. Before adding a system to the list to gain access to
3244# some feature, make sure there is no alternative way to access this
3245# feature. Also, when using wildcards, make sure you have verified the
3246# need for not defining _XOPEN_SOURCE on all systems matching the
3247# wildcard, and that the wildcard does not include future systems
3248# (which may remove their limitations).
3249case $ac_sys_system/$ac_sys_release in
3250 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
3251 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00003252 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Martin v. Löwis7875ef62010-02-15 21:41:12 +00003253 # In addition, Stefan Krah confirms that issue #1244610 exists through
3254 # OpenBSD 4.6, but is fixed in 4.7.
Charles-François Natali97781b02011-07-22 23:43:42 +02003255 OpenBSD/2.* | OpenBSD/3.* | OpenBSD/4.[0123456])
Martin v. Löwiscb78de62007-12-29 18:49:21 +00003256 define_xopen_source=no
3257 # 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öwiscb78de62007-12-29 18:49:21 +00003262
3263 ;;
Charles-François Natali97781b02011-07-22 23:43:42 +02003264 OpenBSD/*)
Martin v. Löwis5e2dd862010-02-15 08:32:00 +00003265 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3266 # also defined. This can be overridden by defining _BSD_SOURCE
3267 # As this has a different meaning on Linux, only define it on OpenBSD
3268
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003269$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Martin v. Löwis5e2dd862010-02-15 08:32:00 +00003270
3271 ;;
Martin v. Löwis4d542ec2006-11-25 15:39:19 +00003272 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
3273 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
3274 # Marc Recht
Benjamin Petersoneac68f42008-11-16 17:54:55 +00003275 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 +00003276 define_xopen_source=no;;
Martin v. Löwisb41afb52010-05-28 15:28:47 +00003277 # From the perspective of Solaris, _XOPEN_SOURCE is not so much a
3278 # request to enable features supported by the standard as a request
3279 # to disable features not supported by the standard. The best way
3280 # for Python to use Solaris is simply to leave _XOPEN_SOURCE out
3281 # entirely and define __EXTENSIONS__ instead.
3282 SunOS/*)
Martin v. Löwisa9d71422003-03-28 18:43:31 +00003283 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003284 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
3285 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00003286 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00003287 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003288 define_xopen_source=no;;
3289 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003290 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003291 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003292 define_xopen_source=no;;
Martin v. Löwisbb86d832008-11-04 20:40:09 +00003293 # On FreeBSD 4, the math functions C89 does not cover are never defined
3294 # with _XOPEN_SOURCE and __BSD_VISIBLE does not re-enable them.
3295 FreeBSD/4.*)
3296 define_xopen_source=no;;
3297 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
3298 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
3299 # identifies itself as Darwin/7.*
3300 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3301 # disables platform specific features beyond repair.
3302 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3303 # has no effect, don't bother defining them
3304 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00003305 define_xopen_source=no;;
Ronald Oussorena55af9a2010-01-17 16:25:57 +00003306 Darwin/1[0-9].*)
3307 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003308 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
3309 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
3310 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00003311 AIX/4)
3312 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003313 AIX/5)
3314 if test `uname -r` -eq 1; then
3315 define_xopen_source=no
3316 fi
3317 ;;
Martin v. Löwis8c255e42008-05-23 15:06:50 +00003318 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
3319 # defining NI_NUMERICHOST.
3320 QNX/6.3.2)
3321 define_xopen_source=no
3322 ;;
Martin v. Löwisa0588362006-04-04 06:03:50 +00003323
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003324esac
3325
3326if test $define_xopen_source = yes
3327then
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003328
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003329$as_echo "#define _XOPEN_SOURCE 600" >>confdefs.h
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003330
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003331
3332 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
3333 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
3334 # several APIs are not declared. Since this is also needed in some
3335 # cases for HP-UX, we define it globally.
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003336
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003337$as_echo "#define _XOPEN_SOURCE_EXTENDED 1" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003338
3339
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003340
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003341$as_echo "#define _POSIX_C_SOURCE 200112L" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003342
3343
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003344fi
3345
Guido van Rossum91922671997-10-09 20:24:13 +00003346#
3347# SGI compilers allow the specification of the both the ABI and the
3348# ISA on the command line. Depending on the values of these switches,
3349# different and often incompatable code will be generated.
3350#
3351# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
3352# thus supply support for various ABI/ISA combinations. The MACHDEP
3353# variable is also adjusted.
3354#
3355
3356if test ! -z "$SGI_ABI"
3357then
3358 CC="cc $SGI_ABI"
3359 LDFLAGS="$SGI_ABI $LDFLAGS"
3360 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
3361fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003362{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP" >&5
3363$as_echo "$MACHDEP" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003364
Jack Jansen83f898c2002-12-30 22:23:40 +00003365# And add extra plat-mac for darwin
3366
Jack Jansen7b59b422003-03-17 15:44:10 +00003367
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003368{ $as_echo "$as_me:${as_lineno-$LINENO}: checking EXTRAPLATDIR" >&5
3369$as_echo_n "checking EXTRAPLATDIR... " >&6; }
Jack Jansen83f898c2002-12-30 22:23:40 +00003370if test -z "$EXTRAPLATDIR"
3371then
3372 case $MACHDEP in
Jack Jansen7b59b422003-03-17 15:44:10 +00003373 darwin)
3374 EXTRAPLATDIR="\$(PLATMACDIRS)"
3375 EXTRAMACHDEPPATH="\$(PLATMACPATH)"
3376 ;;
3377 *)
3378 EXTRAPLATDIR=""
3379 EXTRAMACHDEPPATH=""
3380 ;;
Jack Jansen83f898c2002-12-30 22:23:40 +00003381 esac
3382fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003383{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXTRAPLATDIR" >&5
3384$as_echo "$EXTRAPLATDIR" >&6; }
Jack Jansen83f898c2002-12-30 22:23:40 +00003385
Jack Jansen6b08a402004-06-03 12:41:45 +00003386# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
3387# it may influence the way we can build extensions, so distutils
3388# needs to check it
3389
Ronald Oussoren988117f2006-04-29 11:31:35 +00003390
Jack Jansen6b08a402004-06-03 12:41:45 +00003391CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Ronald Oussoren988117f2006-04-29 11:31:35 +00003392EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00003393
Guido van Rossum627b2d71993-12-24 10:39:16 +00003394# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00003395
3396# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
3397# for debug/optimization stuff. BASECFLAGS is for flags that are required
3398# just to get things to compile and link. Users are free to override OPT
3399# when running configure or make. The build should not break if they do.
3400# BASECFLAGS should generally not be messed with, however.
3401
3402# XXX shouldn't some/most/all of this code be merged with the stuff later
3403# on that fiddles with OPT and BASECFLAGS?
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003404{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --without-gcc" >&5
3405$as_echo_n "checking for --without-gcc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003406
Martin v. Löwiseba40652007-08-30 20:10:57 +00003407# Check whether --with-gcc was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003408if test "${with_gcc+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00003409 withval=$with_gcc;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003410 case $withval in
Mark Dickinson04b27232009-01-04 12:29:36 +00003411 no) CC=${CC:-cc}
Guido van Rossumda88dad1995-01-26 00:46:29 +00003412 without_gcc=yes;;
3413 yes) CC=gcc
3414 without_gcc=no;;
3415 *) CC=$withval
3416 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003417 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00003418else
Martin v. Löwis11437992002-04-12 09:54:03 +00003419
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003420 case $ac_sys_system in
Antoine Pitrou285cd162010-09-21 15:23:17 +00003421 AIX*) CC=${CC:-xlc_r}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003422 without_gcc=;;
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003423 BeOS*)
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003424 case $BE_HOST_CPU in
3425 ppc)
Fred Drake5790be12000-10-09 17:06:13 +00003426 CC=mwcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003427 without_gcc=yes
Skip Montanarodecc6a42003-01-01 20:07:49 +00003428 BASECFLAGS="$BASECFLAGS -export pragma"
3429 OPT="$OPT -O"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003430 LDFLAGS="$LDFLAGS -nodup"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003431 ;;
3432 x86)
Fred Drake5790be12000-10-09 17:06:13 +00003433 CC=gcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003434 without_gcc=no
Skip Montanarodecc6a42003-01-01 20:07:49 +00003435 OPT="$OPT -O"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003436 ;;
3437 *)
Georg Brandl71f4fbb2011-02-25 11:04:50 +00003438 as_fn_error $? "Unknown BeOS platform \"$BE_HOST_CPU\"" "$LINENO" 5
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003439 ;;
3440 esac
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003441 AR="\$(srcdir)/Modules/ar_beos"
3442 RANLIB=:
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003443 ;;
Martin v. Löwis130fb172001-07-19 11:00:41 +00003444 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00003445 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00003446fi
3447
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003448{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $without_gcc" >&5
3449$as_echo "$without_gcc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003450
Guido van Rossum8b131c51995-03-09 14:10:13 +00003451# If the user switches compilers, we can't believe the cache
3452if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
3453then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00003454 as_fn_error $? "cached CC is different -- throw away $cache_file
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003455(it is also a good idea to do 'make clean' before compiling)" "$LINENO" 5
Guido van Rossum8b131c51995-03-09 14:10:13 +00003456fi
3457
Trent Nelson15daa352012-12-13 06:46:39 +00003458if test "$MACHDEP" = "irix6" && test "$CC" != "gcc"; then
3459 # Normally, MIPSpro CC treats #error directives as warnings, which means
3460 # a successful exit code is returned (0). This is a problem because IRIX
3461 # has a bunch of system headers with this guard at the top:
3462 #
3463 # #ifndef __c99
3464 # #error This header file is to be used only for c99 mode compilations
3465 # #else
3466 #
3467 # When autoconf tests for such a header, like stdint.h, this happens:
3468 #
3469 # configure:4619: cc -c conftest.c >&5
3470 # cc-1035 cc: WARNING File = /usr/include/stdint.h, Line = 5
3471 # #error directive: This header file is to be used only for c99 mode
3472 # compilations
3473 #
3474 # #error This header file is to be used only for c99 mode compilations
3475 # ^
3476 #
3477 # configure:4619: $? = 0
3478 # configure:4619: result: yes
3479 #
3480 # Therefore, we use `-diag_error 1035` to have the compiler treat the
3481 # warning as an error, which causes cc to return a non-zero result,
3482 # which autoconf can interpret correctly.
3483 CFLAGS="$CFLAGS -diag_error 1035"
3484 # Whilst we're here, we might as well make sure CXX defaults to something
3485 # sensible if we're not using gcc.
3486 if test -z "$CXX"; then
3487 CXX="CC"
3488 fi
3489fi
3490
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00003491# If the user set CFLAGS, use this instead of the automatically
3492# determined setting
3493preset_cflags="$CFLAGS"
Martin v. Löwis11437992002-04-12 09:54:03 +00003494ac_ext=c
3495ac_cpp='$CPP $CPPFLAGS'
3496ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3497ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3498ac_compiler_gnu=$ac_cv_c_compiler_gnu
3499if test -n "$ac_tool_prefix"; then
3500 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3501set dummy ${ac_tool_prefix}gcc; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003502{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3503$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01003504if ${ac_cv_prog_CC+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003505 $as_echo_n "(cached) " >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003506else
3507 if test -n "$CC"; then
3508 ac_cv_prog_CC="$CC" # Let the user override the test.
3509else
Martin v. Löwis11437992002-04-12 09:54:03 +00003510as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3511for as_dir in $PATH
3512do
3513 IFS=$as_save_IFS
3514 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003515 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01003516 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003517 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003518 $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 +00003519 break 2
3520 fi
3521done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003522 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003523IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003524
Jack Jansendd19cf82001-12-06 22:36:17 +00003525fi
3526fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003527CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00003528if test -n "$CC"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003529 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3530$as_echo "$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003531else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003532 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3533$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003534fi
3535
Martin v. Löwiseba40652007-08-30 20:10:57 +00003536
Martin v. Löwis11437992002-04-12 09:54:03 +00003537fi
3538if test -z "$ac_cv_prog_CC"; then
3539 ac_ct_CC=$CC
3540 # Extract the first word of "gcc", so it can be a program name with args.
3541set dummy gcc; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003542{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3543$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01003544if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003545 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003546else
3547 if test -n "$ac_ct_CC"; then
3548 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3549else
3550as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3551for as_dir in $PATH
3552do
3553 IFS=$as_save_IFS
3554 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003555 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01003556 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003557 ac_cv_prog_ac_ct_CC="gcc"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003558 $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 +00003559 break 2
3560 fi
3561done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003562 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003563IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003564
3565fi
3566fi
3567ac_ct_CC=$ac_cv_prog_ac_ct_CC
3568if test -n "$ac_ct_CC"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003569 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3570$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003571else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003572 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3573$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003574fi
3575
Martin v. Löwiseba40652007-08-30 20:10:57 +00003576 if test "x$ac_ct_CC" = x; then
3577 CC=""
3578 else
3579 case $cross_compiling:$ac_tool_warned in
3580yes:)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003581{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3582$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00003583ac_tool_warned=yes ;;
3584esac
3585 CC=$ac_ct_CC
3586 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003587else
3588 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00003589fi
3590
Jack Jansendd19cf82001-12-06 22:36:17 +00003591if test -z "$CC"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00003592 if test -n "$ac_tool_prefix"; then
3593 # 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 +00003594set dummy ${ac_tool_prefix}cc; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003595{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3596$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01003597if ${ac_cv_prog_CC+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003598 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00003599else
3600 if test -n "$CC"; then
3601 ac_cv_prog_CC="$CC" # Let the user override the test.
3602else
Martin v. Löwis11437992002-04-12 09:54:03 +00003603as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3604for as_dir in $PATH
3605do
3606 IFS=$as_save_IFS
3607 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003608 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01003609 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003610 ac_cv_prog_CC="${ac_tool_prefix}cc"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003611 $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 +00003612 break 2
3613 fi
3614done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003615 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003616IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003617
3618fi
3619fi
3620CC=$ac_cv_prog_CC
3621if test -n "$CC"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003622 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3623$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003624else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003625 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3626$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003627fi
3628
Martin v. Löwiseba40652007-08-30 20:10:57 +00003629
Martin v. Löwis11437992002-04-12 09:54:03 +00003630 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003631fi
3632if test -z "$CC"; then
3633 # Extract the first word of "cc", so it can be a program name with args.
3634set dummy cc; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003635{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3636$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01003637if ${ac_cv_prog_CC+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003638 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003639else
3640 if test -n "$CC"; then
3641 ac_cv_prog_CC="$CC" # Let the user override the test.
3642else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003643 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003644as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3645for as_dir in $PATH
3646do
3647 IFS=$as_save_IFS
3648 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003649 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01003650 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003651 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3652 ac_prog_rejected=yes
3653 continue
3654 fi
3655 ac_cv_prog_CC="cc"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003656 $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 +00003657 break 2
3658 fi
3659done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003660 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003661IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003662
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003663if test $ac_prog_rejected = yes; then
3664 # We found a bogon in the path, so make sure we never use it.
3665 set dummy $ac_cv_prog_CC
3666 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00003667 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003668 # We chose a different compiler from the bogus one.
3669 # However, it has the same basename, so the bogon will be chosen
3670 # first if we set CC to just the basename; use the full file name.
3671 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00003672 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003673 fi
3674fi
3675fi
3676fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003677CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003678if test -n "$CC"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003679 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3680$as_echo "$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003681else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003682 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3683$as_echo "no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003684fi
3685
Martin v. Löwiseba40652007-08-30 20:10:57 +00003686
Martin v. Löwis11437992002-04-12 09:54:03 +00003687fi
3688if test -z "$CC"; then
3689 if test -n "$ac_tool_prefix"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00003690 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003691 do
3692 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3693set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003694{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3695$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01003696if ${ac_cv_prog_CC+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003697 $as_echo_n "(cached) " >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003698else
3699 if test -n "$CC"; then
3700 ac_cv_prog_CC="$CC" # Let the user override the test.
3701else
Martin v. Löwis11437992002-04-12 09:54:03 +00003702as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3703for as_dir in $PATH
3704do
3705 IFS=$as_save_IFS
3706 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003707 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01003708 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003709 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003710 $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 +00003711 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00003712 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003713done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003714 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003715IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003716
3717fi
3718fi
3719CC=$ac_cv_prog_CC
3720if test -n "$CC"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003721 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3722$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003723else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003724 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3725$as_echo "no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003726fi
3727
Martin v. Löwiseba40652007-08-30 20:10:57 +00003728
Martin v. Löwis11437992002-04-12 09:54:03 +00003729 test -n "$CC" && break
3730 done
3731fi
3732if test -z "$CC"; then
3733 ac_ct_CC=$CC
Martin v. Löwiseba40652007-08-30 20:10:57 +00003734 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003735do
3736 # Extract the first word of "$ac_prog", so it can be a program name with args.
3737set dummy $ac_prog; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003738{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3739$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01003740if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003741 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003742else
3743 if test -n "$ac_ct_CC"; then
3744 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3745else
3746as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3747for as_dir in $PATH
3748do
3749 IFS=$as_save_IFS
3750 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003751 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01003752 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003753 ac_cv_prog_ac_ct_CC="$ac_prog"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003754 $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 +00003755 break 2
3756 fi
3757done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003758 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003759IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00003760
Martin v. Löwis11437992002-04-12 09:54:03 +00003761fi
3762fi
3763ac_ct_CC=$ac_cv_prog_ac_ct_CC
3764if test -n "$ac_ct_CC"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003765 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3766$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003767else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003768 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3769$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003770fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003771
Martin v. Löwiseba40652007-08-30 20:10:57 +00003772
Martin v. Löwis11437992002-04-12 09:54:03 +00003773 test -n "$ac_ct_CC" && break
3774done
Michael W. Hudson54241132001-12-07 15:38:26 +00003775
Martin v. Löwiseba40652007-08-30 20:10:57 +00003776 if test "x$ac_ct_CC" = x; then
3777 CC=""
3778 else
3779 case $cross_compiling:$ac_tool_warned in
3780yes:)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003781{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3782$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00003783ac_tool_warned=yes ;;
3784esac
3785 CC=$ac_ct_CC
3786 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003787fi
3788
3789fi
3790
3791
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003792test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3793$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00003794as_fn_error $? "no acceptable C compiler found in \$PATH
Matthias Klose3cef2a92012-03-14 23:39:33 +01003795See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003796
3797# Provide some information about the compiler.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003798$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3799set X $ac_compile
3800ac_compiler=$2
3801for ac_option in --version -v -V -qversion; do
3802 { { ac_try="$ac_compiler $ac_option >&5"
Martin v. Löwiseba40652007-08-30 20:10:57 +00003803case "(($ac_try" in
3804 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3805 *) ac_try_echo=$ac_try;;
3806esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003807eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3808$as_echo "$ac_try_echo"; } >&5
3809 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003810 ac_status=$?
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003811 if test -s conftest.err; then
3812 sed '10a\
3813... rest of stderr output deleted ...
3814 10q' conftest.err >conftest.er1
3815 cat conftest.er1 >&5
3816 fi
3817 rm -f conftest.er1 conftest.err
3818 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3819 test $ac_status = 0; }
3820done
Martin v. Löwis11437992002-04-12 09:54:03 +00003821
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003822cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003823/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00003824
Martin v. Löwis11437992002-04-12 09:54:03 +00003825int
3826main ()
3827{
3828
3829 ;
3830 return 0;
3831}
3832_ACEOF
3833ac_clean_files_save=$ac_clean_files
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003834ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00003835# Try to create an executable without -o first, disregard a.out.
3836# It will help us diagnose broken compilers, and finding out an intuition
3837# of exeext.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003838{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3839$as_echo_n "checking whether the C compiler works... " >&6; }
3840ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3841
3842# The possible output files:
3843ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3844
Martin v. Löwiseba40652007-08-30 20:10:57 +00003845ac_rmfiles=
3846for ac_file in $ac_files
3847do
3848 case $ac_file in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003849 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00003850 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3851 esac
3852done
3853rm -f $ac_rmfiles
3854
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003855if { { ac_try="$ac_link_default"
Martin v. Löwiseba40652007-08-30 20:10:57 +00003856case "(($ac_try" in
3857 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3858 *) ac_try_echo=$ac_try;;
3859esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003860eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3861$as_echo "$ac_try_echo"; } >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003862 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003863 ac_status=$?
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003864 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3865 test $ac_status = 0; }; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00003866 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3867# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3868# in a Makefile. We should not override ac_cv_exeext if it was cached,
3869# so that the user can short-circuit this test for compilers unknown to
3870# Autoconf.
3871for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00003872do
3873 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00003874 case $ac_file in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003875 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
Skip Montanarof0d5f792004-08-15 14:08:23 +00003876 ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003877 [ab].out )
Skip Montanarof0d5f792004-08-15 14:08:23 +00003878 # We found the default executable, but exeext='' is most
3879 # certainly right.
3880 break;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003881 *.* )
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003882 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
Martin v. Löwiseba40652007-08-30 20:10:57 +00003883 then :; else
3884 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3885 fi
3886 # We set ac_cv_exeext here because the later test for it is not
3887 # safe: cross compilers may not add the suffix if given an `-o'
3888 # argument, so we may need to know it at that point already.
3889 # Even if this section looks crufty: it has the advantage of
3890 # actually working.
Skip Montanarof0d5f792004-08-15 14:08:23 +00003891 break;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003892 * )
Skip Montanarof0d5f792004-08-15 14:08:23 +00003893 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003894 esac
3895done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003896test "$ac_cv_exeext" = no && ac_cv_exeext=
3897
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003898else
Martin v. Löwiseba40652007-08-30 20:10:57 +00003899 ac_file=''
3900fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003901if test -z "$ac_file"; then :
3902 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3903$as_echo "no" >&6; }
3904$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003905sed 's/^/| /' conftest.$ac_ext >&5
3906
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003907{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3908$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00003909as_fn_error 77 "C compiler cannot create executables
Matthias Klose3cef2a92012-03-14 23:39:33 +01003910See \`config.log' for more details" "$LINENO" 5; }
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003911else
3912 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3913$as_echo "yes" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003914fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003915{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3916$as_echo_n "checking for C compiler default output file name... " >&6; }
3917{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3918$as_echo "$ac_file" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003919ac_exeext=$ac_cv_exeext
Michael W. Hudson54241132001-12-07 15:38:26 +00003920
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003921rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
Martin v. Löwis11437992002-04-12 09:54:03 +00003922ac_clean_files=$ac_clean_files_save
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003923{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3924$as_echo_n "checking for suffix of executables... " >&6; }
3925if { { ac_try="$ac_link"
Martin v. Löwiseba40652007-08-30 20:10:57 +00003926case "(($ac_try" in
3927 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3928 *) ac_try_echo=$ac_try;;
3929esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003930eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3931$as_echo "$ac_try_echo"; } >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003932 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003933 ac_status=$?
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003934 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3935 test $ac_status = 0; }; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00003936 # If both `conftest.exe' and `conftest' are `present' (well, observable)
3937# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
3938# work properly (i.e., refer to `conftest.exe'), while it won't with
3939# `rm'.
Skip Montanaro6dead952003-09-25 14:50:04 +00003940for ac_file in conftest.exe conftest conftest.*; do
3941 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00003942 case $ac_file in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003943 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003944 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
Skip Montanarof0d5f792004-08-15 14:08:23 +00003945 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003946 * ) break;;
3947 esac
3948done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003949else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003950 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3951$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00003952as_fn_error $? "cannot compute suffix of executables: cannot compile and link
Matthias Klose3cef2a92012-03-14 23:39:33 +01003953See \`config.log' for more details" "$LINENO" 5; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003954fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003955rm -f conftest conftest$ac_cv_exeext
3956{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3957$as_echo "$ac_cv_exeext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003958
3959rm -f conftest.$ac_ext
3960EXEEXT=$ac_cv_exeext
3961ac_exeext=$EXEEXT
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003962cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3963/* end confdefs.h. */
3964#include <stdio.h>
3965int
3966main ()
3967{
3968FILE *f = fopen ("conftest.out", "w");
3969 return ferror (f) || fclose (f) != 0;
3970
3971 ;
3972 return 0;
3973}
Skip Montanaro6dead952003-09-25 14:50:04 +00003974_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003975ac_clean_files="$ac_clean_files conftest.out"
3976# Check that the compiler produces executables we can run. If not, either
3977# the compiler is broken, or we cross compile.
3978{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
3979$as_echo_n "checking whether we are cross compiling... " >&6; }
3980if test "$cross_compiling" != yes; then
3981 { { ac_try="$ac_link"
3982case "(($ac_try" in
3983 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3984 *) ac_try_echo=$ac_try;;
3985esac
3986eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3987$as_echo "$ac_try_echo"; } >&5
3988 (eval "$ac_link") 2>&5
3989 ac_status=$?
3990 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3991 test $ac_status = 0; }
3992 if { ac_try='./conftest$ac_cv_exeext'
3993 { { case "(($ac_try" in
3994 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3995 *) ac_try_echo=$ac_try;;
3996esac
3997eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3998$as_echo "$ac_try_echo"; } >&5
3999 (eval "$ac_try") 2>&5
4000 ac_status=$?
4001 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4002 test $ac_status = 0; }; }; then
4003 cross_compiling=no
4004 else
4005 if test "$cross_compiling" = maybe; then
4006 cross_compiling=yes
4007 else
4008 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4009$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004010as_fn_error $? "cannot run C compiled programs.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004011If you meant to cross compile, use \`--host'.
Matthias Klose3cef2a92012-03-14 23:39:33 +01004012See \`config.log' for more details" "$LINENO" 5; }
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004013 fi
4014 fi
4015fi
4016{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
4017$as_echo "$cross_compiling" >&6; }
4018
4019rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
4020ac_clean_files=$ac_clean_files_save
4021{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
4022$as_echo_n "checking for suffix of object files... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01004023if ${ac_cv_objext+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004024 $as_echo_n "(cached) " >&6
4025else
4026 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004027/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004028
Martin v. Löwis11437992002-04-12 09:54:03 +00004029int
4030main ()
4031{
4032
4033 ;
4034 return 0;
4035}
4036_ACEOF
4037rm -f conftest.o conftest.obj
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004038if { { ac_try="$ac_compile"
Martin v. Löwiseba40652007-08-30 20:10:57 +00004039case "(($ac_try" in
4040 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4041 *) ac_try_echo=$ac_try;;
4042esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004043eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4044$as_echo "$ac_try_echo"; } >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00004045 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004046 ac_status=$?
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004047 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4048 test $ac_status = 0; }; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00004049 for ac_file in conftest.o conftest.obj conftest.*; do
4050 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00004051 case $ac_file in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004052 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004053 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4054 break;;
4055 esac
4056done
4057else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004058 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004059sed 's/^/| /' conftest.$ac_ext >&5
4060
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004061{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4062$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004063as_fn_error $? "cannot compute suffix of object files: cannot compile
Matthias Klose3cef2a92012-03-14 23:39:33 +01004064See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004065fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004066rm -f conftest.$ac_cv_objext conftest.$ac_ext
4067fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004068{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4069$as_echo "$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004070OBJEXT=$ac_cv_objext
4071ac_objext=$OBJEXT
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004072{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4073$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01004074if ${ac_cv_c_compiler_gnu+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004075 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004076else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004077 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004078/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004079
Martin v. Löwis11437992002-04-12 09:54:03 +00004080int
4081main ()
4082{
4083#ifndef __GNUC__
4084 choke me
4085#endif
4086
4087 ;
4088 return 0;
4089}
4090_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004091if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004092 ac_compiler_gnu=yes
4093else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004094 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00004095fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004096rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004097ac_cv_c_compiler_gnu=$ac_compiler_gnu
4098
4099fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004100{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4101$as_echo "$ac_cv_c_compiler_gnu" >&6; }
4102if test $ac_compiler_gnu = yes; then
4103 GCC=yes
4104else
4105 GCC=
4106fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004107ac_test_CFLAGS=${CFLAGS+set}
4108ac_save_CFLAGS=$CFLAGS
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004109{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4110$as_echo_n "checking whether $CC accepts -g... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01004111if ${ac_cv_prog_cc_g+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004112 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004113else
Martin v. Löwiseba40652007-08-30 20:10:57 +00004114 ac_save_c_werror_flag=$ac_c_werror_flag
4115 ac_c_werror_flag=yes
4116 ac_cv_prog_cc_g=no
4117 CFLAGS="-g"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004118 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004119/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004120
Martin v. Löwis11437992002-04-12 09:54:03 +00004121int
4122main ()
4123{
4124
4125 ;
4126 return 0;
4127}
4128_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004129if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumf78abae1997-01-21 22:02:36 +00004130 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004131else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004132 CFLAGS=""
4133 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +00004134/* end confdefs.h. */
4135
4136int
4137main ()
4138{
4139
4140 ;
4141 return 0;
4142}
4143_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004144if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00004145
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004146else
4147 ac_c_werror_flag=$ac_save_c_werror_flag
Martin v. Löwiseba40652007-08-30 20:10:57 +00004148 CFLAGS="-g"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004149 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +00004150/* end confdefs.h. */
4151
4152int
4153main ()
4154{
4155
4156 ;
4157 return 0;
4158}
4159_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004160if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00004161 ac_cv_prog_cc_g=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004162fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004163rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004164fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004165rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4166fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004167rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4168 ac_c_werror_flag=$ac_save_c_werror_flag
4169fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004170{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4171$as_echo "$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004172if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004173 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004174elif test $ac_cv_prog_cc_g = yes; then
4175 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00004176 CFLAGS="-g -O2"
4177 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004178 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004179 fi
4180else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004181 if test "$GCC" = yes; then
4182 CFLAGS="-O2"
4183 else
4184 CFLAGS=
4185 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004186fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004187{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4188$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01004189if ${ac_cv_prog_cc_c89+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004190 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004191else
Martin v. Löwiseba40652007-08-30 20:10:57 +00004192 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00004193ac_save_CC=$CC
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004194cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004195/* end confdefs.h. */
4196#include <stdarg.h>
4197#include <stdio.h>
Charles-François Natalibe2b9072013-01-08 19:47:00 +01004198struct stat;
Skip Montanaro6dead952003-09-25 14:50:04 +00004199/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4200struct buf { int x; };
4201FILE * (*rcsopen) (struct buf *, struct stat *, int);
4202static char *e (p, i)
4203 char **p;
4204 int i;
4205{
4206 return p[i];
4207}
4208static char *f (char * (*g) (char **, int), char **p, ...)
4209{
4210 char *s;
4211 va_list v;
4212 va_start (v,p);
4213 s = g (p, va_arg (v,int));
4214 va_end (v);
4215 return s;
4216}
Skip Montanarof0d5f792004-08-15 14:08:23 +00004217
4218/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
4219 function prototypes and stuff, but not '\xHH' hex character constants.
4220 These don't provoke an error unfortunately, instead are silently treated
Martin v. Löwiseba40652007-08-30 20:10:57 +00004221 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00004222 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
4223 array size at least. It's necessary to write '\x00'==0 to get something
Martin v. Löwiseba40652007-08-30 20:10:57 +00004224 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00004225int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4226
Martin v. Löwiseba40652007-08-30 20:10:57 +00004227/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4228 inside strings and character constants. */
4229#define FOO(x) 'x'
4230int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4231
Skip Montanaro6dead952003-09-25 14:50:04 +00004232int test (int i, double x);
4233struct s1 {int (*f) (int a);};
4234struct s2 {int (*f) (double a);};
4235int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4236int argc;
4237char **argv;
4238int
4239main ()
4240{
4241return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4242 ;
4243 return 0;
4244}
4245_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00004246for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4247 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00004248do
4249 CC="$ac_save_CC $ac_arg"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004250 if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00004251 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00004252fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004253rm -f core conftest.err conftest.$ac_objext
4254 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00004255done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004256rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004257CC=$ac_save_CC
4258
4259fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004260# AC_CACHE_VAL
4261case "x$ac_cv_prog_cc_c89" in
4262 x)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004263 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4264$as_echo "none needed" >&6; } ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00004265 xno)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004266 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4267$as_echo "unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004268 *)
Martin v. Löwiseba40652007-08-30 20:10:57 +00004269 CC="$CC $ac_cv_prog_cc_c89"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004270 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4271$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004272esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004273if test "x$ac_cv_prog_cc_c89" != xno; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004274
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004275fi
Skip Montanaro6dead952003-09-25 14:50:04 +00004276
Martin v. Löwis11437992002-04-12 09:54:03 +00004277ac_ext=c
4278ac_cpp='$CPP $CPPFLAGS'
4279ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4280ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4281ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004282
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00004283if test ! -z "$preset_cflags"
4284then
4285 CFLAGS=$preset_cflags
4286fi
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004287
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004288
4289
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004290{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-cxx-main=<compiler>" >&5
4291$as_echo_n "checking for --with-cxx-main=<compiler>... " >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004292
Martin v. Löwiseba40652007-08-30 20:10:57 +00004293# Check whether --with-cxx_main was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004294if test "${with_cxx_main+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00004295 withval=$with_cxx_main;
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004296
4297 case $withval in
4298 no) with_cxx_main=no
4299 MAINCC='$(CC)';;
4300 yes) with_cxx_main=yes
4301 MAINCC='$(CXX)';;
4302 *) with_cxx_main=yes
4303 MAINCC=$withval
4304 if test -z "$CXX"
4305 then
4306 CXX=$withval
4307 fi;;
4308 esac
4309else
4310
4311 with_cxx_main=no
4312 MAINCC='$(CC)'
4313
Martin v. Löwiseba40652007-08-30 20:10:57 +00004314fi
4315
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004316{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_cxx_main" >&5
4317$as_echo "$with_cxx_main" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004318
4319preset_cxx="$CXX"
4320if test -z "$CXX"
4321then
4322 case "$CC" in
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004323 gcc) if test -n "$ac_tool_prefix"; then
4324 # Extract the first word of "${ac_tool_prefix}g++", so it can be a program name with args.
4325set dummy ${ac_tool_prefix}g++; ac_word=$2
4326{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4327$as_echo_n "checking for $ac_word... " >&6; }
4328if ${ac_cv_path_CXX+:} false; then :
4329 $as_echo_n "(cached) " >&6
4330else
4331 case $CXX in
4332 [\\/]* | ?:[\\/]*)
4333 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4334 ;;
4335 *)
4336 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4337for as_dir in notfound
4338do
4339 IFS=$as_save_IFS
4340 test -z "$as_dir" && as_dir=.
4341 for ac_exec_ext in '' $ac_executable_extensions; do
4342 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4343 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4344 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4345 break 2
4346 fi
4347done
4348 done
4349IFS=$as_save_IFS
4350
4351 ;;
4352esac
4353fi
4354CXX=$ac_cv_path_CXX
4355if test -n "$CXX"; then
4356 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4357$as_echo "$CXX" >&6; }
4358else
4359 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4360$as_echo "no" >&6; }
4361fi
4362
4363
4364fi
4365if test -z "$ac_cv_path_CXX"; then
4366 ac_pt_CXX=$CXX
4367 # Extract the first word of "g++", so it can be a program name with args.
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004368set dummy g++; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004369{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4370$as_echo_n "checking for $ac_word... " >&6; }
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004371if ${ac_cv_path_ac_pt_CXX+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004372 $as_echo_n "(cached) " >&6
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004373else
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004374 case $ac_pt_CXX in
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004375 [\\/]* | ?:[\\/]*)
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004376 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 +00004377 ;;
4378 *)
4379 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4380for as_dir in notfound
4381do
4382 IFS=$as_save_IFS
4383 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004384 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01004385 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004386 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004387 $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 +00004388 break 2
4389 fi
4390done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004391 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004392IFS=$as_save_IFS
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004393
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004394 ;;
4395esac
4396fi
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004397ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4398if test -n "$ac_pt_CXX"; then
4399 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4400$as_echo "$ac_pt_CXX" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00004401else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004402 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4403$as_echo "no" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00004404fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004405
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004406 if test "x$ac_pt_CXX" = x; then
4407 CXX="g++"
4408 else
4409 case $cross_compiling:$ac_tool_warned in
4410yes:)
4411{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4412$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4413ac_tool_warned=yes ;;
4414esac
4415 CXX=$ac_pt_CXX
4416 fi
4417else
4418 CXX="$ac_cv_path_CXX"
4419fi
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004420 ;;
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004421 cc) if test -n "$ac_tool_prefix"; then
4422 # Extract the first word of "${ac_tool_prefix}c++", so it can be a program name with args.
4423set dummy ${ac_tool_prefix}c++; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004424{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4425$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01004426if ${ac_cv_path_CXX+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004427 $as_echo_n "(cached) " >&6
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004428else
4429 case $CXX in
4430 [\\/]* | ?:[\\/]*)
4431 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4432 ;;
4433 *)
4434 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4435for as_dir in notfound
4436do
4437 IFS=$as_save_IFS
4438 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004439 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01004440 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004441 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004442 $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 +00004443 break 2
4444 fi
4445done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004446 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004447IFS=$as_save_IFS
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004448
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004449 ;;
4450esac
4451fi
4452CXX=$ac_cv_path_CXX
Skip Montanaro89e975f2007-08-22 19:05:21 +00004453if test -n "$CXX"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004454 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4455$as_echo "$CXX" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00004456else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004457 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4458$as_echo "no" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00004459fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004460
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004461
4462fi
4463if test -z "$ac_cv_path_CXX"; then
4464 ac_pt_CXX=$CXX
4465 # Extract the first word of "c++", so it can be a program name with args.
4466set dummy c++; ac_word=$2
4467{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4468$as_echo_n "checking for $ac_word... " >&6; }
4469if ${ac_cv_path_ac_pt_CXX+:} false; then :
4470 $as_echo_n "(cached) " >&6
4471else
4472 case $ac_pt_CXX in
4473 [\\/]* | ?:[\\/]*)
4474 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4475 ;;
4476 *)
4477 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4478for as_dir in notfound
4479do
4480 IFS=$as_save_IFS
4481 test -z "$as_dir" && as_dir=.
4482 for ac_exec_ext in '' $ac_executable_extensions; do
4483 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4484 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4485 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4486 break 2
4487 fi
4488done
4489 done
4490IFS=$as_save_IFS
4491
4492 ;;
4493esac
4494fi
4495ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4496if test -n "$ac_pt_CXX"; then
4497 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4498$as_echo "$ac_pt_CXX" >&6; }
4499else
4500 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4501$as_echo "no" >&6; }
4502fi
4503
4504 if test "x$ac_pt_CXX" = x; then
4505 CXX="c++"
4506 else
4507 case $cross_compiling:$ac_tool_warned in
4508yes:)
4509{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4510$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4511ac_tool_warned=yes ;;
4512esac
4513 CXX=$ac_pt_CXX
4514 fi
4515else
4516 CXX="$ac_cv_path_CXX"
4517fi
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004518 ;;
4519 esac
4520 if test "$CXX" = "notfound"
4521 then
4522 CXX=""
4523 fi
4524fi
4525if test -z "$CXX"
4526then
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004527 if test -n "$ac_tool_prefix"; then
4528 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
4529 do
4530 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4531set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004532{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4533$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01004534if ${ac_cv_prog_CXX+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004535 $as_echo_n "(cached) " >&6
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004536else
4537 if test -n "$CXX"; then
4538 ac_cv_prog_CXX="$CXX" # Let the user override the test.
4539else
4540as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4541for as_dir in $PATH
4542do
4543 IFS=$as_save_IFS
4544 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004545 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01004546 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004547 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004548 $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 +00004549 break 2
4550 fi
4551done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004552 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004553IFS=$as_save_IFS
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004554
4555fi
4556fi
4557CXX=$ac_cv_prog_CXX
4558if test -n "$CXX"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004559 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4560$as_echo "$CXX" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004561else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004562 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4563$as_echo "no" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004564fi
4565
Martin v. Löwiseba40652007-08-30 20:10:57 +00004566
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004567 test -n "$CXX" && break
4568 done
4569fi
4570if test -z "$CXX"; then
4571 ac_ct_CXX=$CXX
4572 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
4573do
4574 # Extract the first word of "$ac_prog", so it can be a program name with args.
4575set dummy $ac_prog; ac_word=$2
4576{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4577$as_echo_n "checking for $ac_word... " >&6; }
4578if ${ac_cv_prog_ac_ct_CXX+:} false; then :
4579 $as_echo_n "(cached) " >&6
4580else
4581 if test -n "$ac_ct_CXX"; then
4582 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
4583else
4584as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4585for as_dir in $PATH
4586do
4587 IFS=$as_save_IFS
4588 test -z "$as_dir" && as_dir=.
4589 for ac_exec_ext in '' $ac_executable_extensions; do
4590 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4591 ac_cv_prog_ac_ct_CXX="$ac_prog"
4592 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4593 break 2
4594 fi
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004595done
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004596 done
4597IFS=$as_save_IFS
4598
4599fi
4600fi
4601ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
4602if test -n "$ac_ct_CXX"; then
4603 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
4604$as_echo "$ac_ct_CXX" >&6; }
4605else
4606 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4607$as_echo "no" >&6; }
4608fi
4609
4610
4611 test -n "$ac_ct_CXX" && break
4612done
4613
4614 if test "x$ac_ct_CXX" = x; then
4615 CXX="notfound"
4616 else
4617 case $cross_compiling:$ac_tool_warned in
4618yes:)
4619{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4620$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4621ac_tool_warned=yes ;;
4622esac
4623 CXX=$ac_ct_CXX
4624 fi
4625fi
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004626
4627 if test "$CXX" = "notfound"
4628 then
4629 CXX=""
4630 fi
4631fi
4632if test "$preset_cxx" != "$CXX"
4633then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004634 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004635
4636 By default, distutils will build C++ extension modules with \"$CXX\".
4637 If this is not intended, then set CXX on the configure command line.
4638 " >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004639$as_echo "$as_me: WARNING:
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004640
4641 By default, distutils will build C++ extension modules with \"$CXX\".
4642 If this is not intended, then set CXX on the configure command line.
4643 " >&2;}
4644fi
4645
doko@python.org4e63fbe2013-01-25 13:08:27 +01004646MULTIARCH=$($CC --print-multiarch 2>/dev/null)
4647
4648
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004649
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004650# checks for UNIX variants that set C preprocessor variables
Martin v. Löwis11437992002-04-12 09:54:03 +00004651
4652ac_ext=c
4653ac_cpp='$CPP $CPPFLAGS'
4654ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4655ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4656ac_compiler_gnu=$ac_cv_c_compiler_gnu
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004657{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4658$as_echo_n "checking how to run the C preprocessor... " >&6; }
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004659# On Suns, sometimes $CPP names a directory.
4660if test -n "$CPP" && test -d "$CPP"; then
4661 CPP=
4662fi
4663if test -z "$CPP"; then
Matthias Klose3cef2a92012-03-14 23:39:33 +01004664 if ${ac_cv_prog_CPP+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004665 $as_echo_n "(cached) " >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004666else
Martin v. Löwis11437992002-04-12 09:54:03 +00004667 # Double quotes because CPP needs to be expanded
4668 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4669 do
4670 ac_preproc_ok=false
4671for ac_c_preproc_warn_flag in '' yes
4672do
4673 # Use a header file that comes with gcc, so configuring glibc
4674 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00004675 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4676 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004677 # On the NeXT, cc -E runs the code through the compiler's parser,
Martin v. Löwis11437992002-04-12 09:54:03 +00004678 # not just through cpp. "Syntax error" is here to catch this case.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004679 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004680/* end confdefs.h. */
4681#ifdef __STDC__
4682# include <limits.h>
4683#else
4684# include <assert.h>
4685#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00004686 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00004687_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004688if ac_fn_c_try_cpp "$LINENO"; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004689
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004690else
Martin v. Löwis11437992002-04-12 09:54:03 +00004691 # Broken: fails on valid input.
4692continue
Jack Jansendd19cf82001-12-06 22:36:17 +00004693fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004694rm -f conftest.err conftest.i conftest.$ac_ext
Jack Jansendd19cf82001-12-06 22:36:17 +00004695
Martin v. Löwiseba40652007-08-30 20:10:57 +00004696 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00004697 # can be detected and how.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004698 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004699/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004700#include <ac_nonexistent.h>
4701_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004702if ac_fn_c_try_cpp "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004703 # Broken: success on invalid input.
4704continue
4705else
Martin v. Löwis11437992002-04-12 09:54:03 +00004706 # Passes both tests.
4707ac_preproc_ok=:
4708break
4709fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004710rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004711
4712done
4713# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004714rm -f conftest.i conftest.err conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004715if $ac_preproc_ok; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004716 break
4717fi
4718
4719 done
4720 ac_cv_prog_CPP=$CPP
4721
4722fi
4723 CPP=$ac_cv_prog_CPP
4724else
4725 ac_cv_prog_CPP=$CPP
4726fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004727{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4728$as_echo "$CPP" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004729ac_preproc_ok=false
4730for ac_c_preproc_warn_flag in '' yes
4731do
4732 # Use a header file that comes with gcc, so configuring glibc
4733 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00004734 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4735 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis11437992002-04-12 09:54:03 +00004736 # On the NeXT, cc -E runs the code through the compiler's parser,
4737 # not just through cpp. "Syntax error" is here to catch this case.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004738 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004739/* end confdefs.h. */
4740#ifdef __STDC__
4741# include <limits.h>
4742#else
4743# include <assert.h>
4744#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00004745 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00004746_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004747if ac_fn_c_try_cpp "$LINENO"; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004748
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004749else
Martin v. Löwis11437992002-04-12 09:54:03 +00004750 # Broken: fails on valid input.
4751continue
4752fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004753rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004754
Martin v. Löwiseba40652007-08-30 20:10:57 +00004755 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00004756 # can be detected and how.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004757 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004758/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004759#include <ac_nonexistent.h>
4760_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004761if ac_fn_c_try_cpp "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004762 # Broken: success on invalid input.
4763continue
4764else
Martin v. Löwis11437992002-04-12 09:54:03 +00004765 # Passes both tests.
4766ac_preproc_ok=:
4767break
4768fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004769rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004770
4771done
4772# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004773rm -f conftest.i conftest.err conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004774if $ac_preproc_ok; then :
4775
Martin v. Löwis11437992002-04-12 09:54:03 +00004776else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004777 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4778$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004779as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
Matthias Klose3cef2a92012-03-14 23:39:33 +01004780See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004781fi
4782
4783ac_ext=c
4784ac_cpp='$CPP $CPPFLAGS'
4785ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4786ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4787ac_compiler_gnu=$ac_cv_c_compiler_gnu
4788
4789
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004790{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4791$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01004792if ${ac_cv_path_GREP+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004793 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004794else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004795 if test -z "$GREP"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00004796 ac_path_GREP_found=false
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004797 # Loop through the user's path and test for each of PROGNAME-LIST
4798 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwiseba40652007-08-30 20:10:57 +00004799for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4800do
4801 IFS=$as_save_IFS
4802 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004803 for ac_prog in grep ggrep; do
4804 for ac_exec_ext in '' $ac_executable_extensions; do
4805 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
Charles-François Natalibe2b9072013-01-08 19:47:00 +01004806 as_fn_executable_p "$ac_path_GREP" || continue
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004807# Check for GNU ac_path_GREP and select it if it is found.
Martin v. Löwiseba40652007-08-30 20:10:57 +00004808 # Check for GNU $ac_path_GREP
4809case `"$ac_path_GREP" --version 2>&1` in
4810*GNU*)
4811 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4812*)
4813 ac_count=0
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004814 $as_echo_n 0123456789 >"conftest.in"
Martin v. Löwiseba40652007-08-30 20:10:57 +00004815 while :
4816 do
4817 cat "conftest.in" "conftest.in" >"conftest.tmp"
4818 mv "conftest.tmp" "conftest.in"
4819 cp "conftest.in" "conftest.nl"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004820 $as_echo 'GREP' >> "conftest.nl"
Martin v. Löwiseba40652007-08-30 20:10:57 +00004821 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4822 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004823 as_fn_arith $ac_count + 1 && ac_count=$as_val
Martin v. Löwiseba40652007-08-30 20:10:57 +00004824 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4825 # Best one so far, save it but keep looking for a better one
4826 ac_cv_path_GREP="$ac_path_GREP"
4827 ac_path_GREP_max=$ac_count
Skip Montanaro6dead952003-09-25 14:50:04 +00004828 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004829 # 10*(2^10) chars as input seems more than enough
4830 test $ac_count -gt 10 && break
4831 done
4832 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4833esac
4834
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004835 $ac_path_GREP_found && break 3
4836 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004837 done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004838 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004839IFS=$as_save_IFS
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004840 if test -z "$ac_cv_path_GREP"; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004841 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 +00004842 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004843else
4844 ac_cv_path_GREP=$GREP
4845fi
4846
Martin v. Löwiseba40652007-08-30 20:10:57 +00004847fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004848{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4849$as_echo "$ac_cv_path_GREP" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00004850 GREP="$ac_cv_path_GREP"
4851
4852
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004853{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
4854$as_echo_n "checking for egrep... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01004855if ${ac_cv_path_EGREP+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004856 $as_echo_n "(cached) " >&6
Martin v. Löwiseba40652007-08-30 20:10:57 +00004857else
4858 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
4859 then ac_cv_path_EGREP="$GREP -E"
4860 else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004861 if test -z "$EGREP"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00004862 ac_path_EGREP_found=false
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004863 # Loop through the user's path and test for each of PROGNAME-LIST
4864 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwiseba40652007-08-30 20:10:57 +00004865for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4866do
4867 IFS=$as_save_IFS
4868 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004869 for ac_prog in egrep; do
4870 for ac_exec_ext in '' $ac_executable_extensions; do
4871 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
Charles-François Natalibe2b9072013-01-08 19:47:00 +01004872 as_fn_executable_p "$ac_path_EGREP" || continue
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004873# Check for GNU ac_path_EGREP and select it if it is found.
Martin v. Löwiseba40652007-08-30 20:10:57 +00004874 # Check for GNU $ac_path_EGREP
4875case `"$ac_path_EGREP" --version 2>&1` in
4876*GNU*)
4877 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
4878*)
4879 ac_count=0
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004880 $as_echo_n 0123456789 >"conftest.in"
Martin v. Löwiseba40652007-08-30 20:10:57 +00004881 while :
4882 do
4883 cat "conftest.in" "conftest.in" >"conftest.tmp"
4884 mv "conftest.tmp" "conftest.in"
4885 cp "conftest.in" "conftest.nl"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004886 $as_echo 'EGREP' >> "conftest.nl"
Martin v. Löwiseba40652007-08-30 20:10:57 +00004887 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4888 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004889 as_fn_arith $ac_count + 1 && ac_count=$as_val
Martin v. Löwiseba40652007-08-30 20:10:57 +00004890 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
4891 # Best one so far, save it but keep looking for a better one
4892 ac_cv_path_EGREP="$ac_path_EGREP"
4893 ac_path_EGREP_max=$ac_count
4894 fi
4895 # 10*(2^10) chars as input seems more than enough
4896 test $ac_count -gt 10 && break
4897 done
4898 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4899esac
4900
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004901 $ac_path_EGREP_found && break 3
4902 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004903 done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004904 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004905IFS=$as_save_IFS
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004906 if test -z "$ac_cv_path_EGREP"; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004907 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 +00004908 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004909else
4910 ac_cv_path_EGREP=$EGREP
4911fi
4912
Martin v. Löwiseba40652007-08-30 20:10:57 +00004913 fi
4914fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004915{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
4916$as_echo "$ac_cv_path_EGREP" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00004917 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00004918
4919
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004920{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
4921$as_echo_n "checking for ANSI C header files... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01004922if ${ac_cv_header_stdc+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004923 $as_echo_n "(cached) " >&6
4924else
4925 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitrouf2caeed2009-05-24 20:23:57 +00004926/* end confdefs.h. */
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004927#include <stdlib.h>
4928#include <stdarg.h>
4929#include <string.h>
4930#include <float.h>
4931
4932int
4933main ()
4934{
4935
4936 ;
4937 return 0;
4938}
4939_ACEOF
4940if ac_fn_c_try_compile "$LINENO"; then :
4941 ac_cv_header_stdc=yes
4942else
4943 ac_cv_header_stdc=no
4944fi
4945rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4946
4947if test $ac_cv_header_stdc = yes; then
4948 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4949 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4950/* end confdefs.h. */
4951#include <string.h>
Antoine Pitrouf2caeed2009-05-24 20:23:57 +00004952
Antoine Pitrouf2caeed2009-05-24 20:23:57 +00004953_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004954if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004955 $EGREP "memchr" >/dev/null 2>&1; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004956
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004957else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004958 ac_cv_header_stdc=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004959fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00004960rm -f conftest*
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004961
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004962fi
4963
4964if test $ac_cv_header_stdc = yes; then
4965 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4966 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4967/* end confdefs.h. */
4968#include <stdlib.h>
4969
4970_ACEOF
4971if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4972 $EGREP "free" >/dev/null 2>&1; then :
4973
4974else
4975 ac_cv_header_stdc=no
4976fi
4977rm -f conftest*
4978
4979fi
4980
4981if test $ac_cv_header_stdc = yes; then
4982 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4983 if test "$cross_compiling" = yes; then :
4984 :
4985else
4986 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4987/* end confdefs.h. */
4988#include <ctype.h>
4989#include <stdlib.h>
4990#if ((' ' & 0x0FF) == 0x020)
4991# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4992# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4993#else
4994# define ISLOWER(c) \
4995 (('a' <= (c) && (c) <= 'i') \
4996 || ('j' <= (c) && (c) <= 'r') \
4997 || ('s' <= (c) && (c) <= 'z'))
4998# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4999#endif
5000
5001#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5002int
5003main ()
5004{
5005 int i;
5006 for (i = 0; i < 256; i++)
5007 if (XOR (islower (i), ISLOWER (i))
5008 || toupper (i) != TOUPPER (i))
5009 return 2;
5010 return 0;
5011}
5012_ACEOF
5013if ac_fn_c_try_run "$LINENO"; then :
5014
5015else
5016 ac_cv_header_stdc=no
5017fi
5018rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5019 conftest.$ac_objext conftest.beam conftest.$ac_ext
5020fi
5021
5022fi
5023fi
5024{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
5025$as_echo "$ac_cv_header_stdc" >&6; }
5026if test $ac_cv_header_stdc = yes; then
5027
5028$as_echo "#define STDC_HEADERS 1" >>confdefs.h
5029
5030fi
5031
5032# On IRIX 5.3, sys/types and inttypes.h are conflicting.
5033for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
5034 inttypes.h stdint.h unistd.h
5035do :
5036 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
5037ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
5038"
Georg Brandl71f4fbb2011-02-25 11:04:50 +00005039if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005040 cat >>confdefs.h <<_ACEOF
5041#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
5042_ACEOF
5043
5044fi
5045
5046done
5047
5048
5049
5050 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 +01005051if test "x$ac_cv_header_minix_config_h" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005052 MINIX=yes
5053else
5054 MINIX=
5055fi
5056
5057
5058 if test "$MINIX" = yes; then
5059
5060$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
5061
5062
5063$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
5064
5065
5066$as_echo "#define _MINIX 1" >>confdefs.h
5067
5068 fi
5069
5070
5071 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
5072$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01005073if ${ac_cv_safe_to_define___extensions__+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005074 $as_echo_n "(cached) " >&6
5075else
5076 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5077/* end confdefs.h. */
5078
Charles-François Natalibe2b9072013-01-08 19:47:00 +01005079# define __EXTENSIONS__ 1
5080 $ac_includes_default
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005081int
5082main ()
5083{
5084
5085 ;
5086 return 0;
5087}
5088_ACEOF
5089if ac_fn_c_try_compile "$LINENO"; then :
5090 ac_cv_safe_to_define___extensions__=yes
5091else
5092 ac_cv_safe_to_define___extensions__=no
5093fi
5094rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5095fi
5096{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
5097$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
5098 test $ac_cv_safe_to_define___extensions__ = yes &&
5099 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
5100
5101 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
5102
5103 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
5104
5105 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
5106
5107 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
5108
5109
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005110
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005111# Check for unsupported systems
5112case $ac_sys_system/$ac_sys_release in
5113atheos*|Linux*/1*)
5114 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
5115 echo See README for details.
5116 exit 1;;
5117esac
5118
5119
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005120{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-suffix" >&5
5121$as_echo_n "checking for --with-suffix... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005122
5123# Check whether --with-suffix was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005124if test "${with_suffix+set}" = set; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005125 withval=$with_suffix;
5126 case $withval in
5127 no) EXEEXT=;;
5128 yes) EXEEXT=.exe;;
5129 *) EXEEXT=$withval;;
5130 esac
5131fi
5132
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005133{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXEEXT" >&5
5134$as_echo "$EXEEXT" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005135
5136# Test whether we're running on a non-case-sensitive system, in which
5137# case we give a warning if no ext is given
5138
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005139{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for case-insensitive build directory" >&5
5140$as_echo_n "checking for case-insensitive build directory... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005141if test ! -d CaseSensitiveTestDir; then
5142mkdir CaseSensitiveTestDir
5143fi
5144
5145if test -d casesensitivetestdir
5146then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005147 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5148$as_echo "yes" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005149 BUILDEXEEXT=.exe
5150else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005151 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5152$as_echo "no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005153 BUILDEXEEXT=$EXEEXT
5154fi
5155rmdir CaseSensitiveTestDir
5156
5157case $MACHDEP in
5158bsdos*)
5159 case $CC in
5160 gcc) CC="$CC -D_HAVE_BSDI";;
5161 esac;;
5162esac
5163
5164case $ac_sys_system in
5165hp*|HP*)
5166 case $CC in
5167 cc|*/cc) CC="$CC -Ae";;
5168 esac;;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005169SunOS*)
5170 # Some functions have a prototype only with that define, e.g. confstr
5171
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005172$as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005173
5174 ;;
5175esac
5176
5177
5178
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005179{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBRARY" >&5
5180$as_echo_n "checking LIBRARY... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005181if test -z "$LIBRARY"
5182then
5183 LIBRARY='libpython$(VERSION).a'
5184fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005185{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBRARY" >&5
5186$as_echo "$LIBRARY" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005187
5188# LDLIBRARY is the name of the library to link against (as opposed to the
5189# name of the library into which to insert object files). BLDLIBRARY is also
5190# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
5191# is blank as the main program is not linked directly against LDLIBRARY.
5192# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
5193# systems without shared libraries, LDLIBRARY is the same as LIBRARY
5194# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
5195# DLLLIBRARY is the shared (i.e., DLL) library.
5196#
5197# RUNSHARED is used to run shared python without installed libraries
5198#
5199# INSTSONAME is the name of the shared library that will be use to install
5200# on the system - some systems like version suffix, others don't
5201
5202
5203
5204
5205
5206
5207LDLIBRARY="$LIBRARY"
5208BLDLIBRARY='$(LDLIBRARY)'
5209INSTSONAME='$(LDLIBRARY)'
5210DLLLIBRARY=''
5211LDLIBRARYDIR=''
5212RUNSHARED=''
5213
5214# LINKCC is the command that links the python executable -- default is $(CC).
5215# If CXX is set, and if it is needed to link a main function that was
5216# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
5217# python might then depend on the C++ runtime
5218# This is altered for AIX in order to build the export list before
5219# linking.
5220
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005221{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKCC" >&5
5222$as_echo_n "checking LINKCC... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005223if test -z "$LINKCC"
5224then
5225 LINKCC='$(PURIFY) $(MAINCC)'
5226 case $ac_sys_system in
5227 AIX*)
5228 exp_extra="\"\""
5229 if test $ac_sys_release -ge 5 -o \
5230 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
5231 exp_extra="."
5232 fi
5233 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005234 QNX*)
5235 # qcc must be used because the other compilers do not
5236 # support -N.
5237 LINKCC=qcc;;
5238 esac
5239fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005240{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKCC" >&5
5241$as_echo "$LINKCC" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005242
5243# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
5244# make sure we default having it set to "no": this is used by
5245# distutils.unixccompiler to know if it should add --enable-new-dtags
5246# to linker command lines, and failing to detect GNU ld simply results
5247# in the same bahaviour as before.
5248
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005249{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
5250$as_echo_n "checking for GNU ld... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005251ac_prog=ld
5252if test "$GCC" = yes; then
5253 ac_prog=`$CC -print-prog-name=ld`
5254fi
5255case `"$ac_prog" -V 2>&1 < /dev/null` in
5256 *GNU*)
5257 GNULD=yes;;
5258 *)
5259 GNULD=no;;
5260esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005261{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNULD" >&5
5262$as_echo "$GNULD" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005263
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005264{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-shared" >&5
5265$as_echo_n "checking for --enable-shared... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005266# Check whether --enable-shared was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005267if test "${enable_shared+set}" = set; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005268 enableval=$enable_shared;
5269fi
5270
5271
5272if test -z "$enable_shared"
5273then
5274 case $ac_sys_system in
5275 CYGWIN* | atheos*)
5276 enable_shared="yes";;
5277 *)
5278 enable_shared="no";;
5279 esac
5280fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005281{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
5282$as_echo "$enable_shared" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005283
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005284{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-profiling" >&5
5285$as_echo_n "checking for --enable-profiling... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005286# Check whether --enable-profiling was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005287if test "${enable_profiling+set}" = set; then :
doko@python.orgd65e2ba2013-01-31 23:52:03 +01005288 enableval=$enable_profiling;
5289fi
5290
5291if test "x$enable_profiling" = xyes; then
5292 ac_save_cc="$CC"
Benjamin Petersonb9be7bb2013-03-26 08:55:37 -04005293 CC="$CC -pg"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005294 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005295/* end confdefs.h. */
5296int main() { return 0; }
5297_ACEOF
doko@python.orgd65e2ba2013-01-31 23:52:03 +01005298if ac_fn_c_try_link "$LINENO"; then :
5299
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005300else
doko@python.orgd65e2ba2013-01-31 23:52:03 +01005301 enable_profiling=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005302fi
doko@python.orgd65e2ba2013-01-31 23:52:03 +01005303rm -f core conftest.err conftest.$ac_objext \
5304 conftest$ac_exeext conftest.$ac_ext
5305 CC="$ac_save_cc"
5306else
5307 enable_profiling=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005308fi
doko@python.orgd65e2ba2013-01-31 23:52:03 +01005309{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_profiling" >&5
5310$as_echo "$enable_profiling" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005311
doko@python.orgd65e2ba2013-01-31 23:52:03 +01005312if test "x$enable_profiling" = xyes; then
5313 BASECFLAGS="-pg $BASECFLAGS"
5314 LDFLAGS="-pg $LDFLAGS"
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005315fi
5316
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005317{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDLIBRARY" >&5
5318$as_echo_n "checking LDLIBRARY... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005319
5320# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
5321# library that we build, but we do not want to link against it (we
5322# will find it with a -framework option). For this reason there is an
5323# extra variable BLDLIBRARY against which Python and the extension
5324# modules are linked, BLDLIBRARY. This is normally the same as
5325# LDLIBRARY, but empty for MacOSX framework builds.
5326if test "$enable_framework"
5327then
5328 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
5329 RUNSHARED=DYLD_FRAMEWORK_PATH="`pwd`:$DYLD_FRAMEWORK_PATH"
5330 BLDLIBRARY=''
5331else
5332 BLDLIBRARY='$(LDLIBRARY)'
5333fi
5334
5335# Other platforms follow
5336if test $enable_shared = "yes"; then
5337
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005338$as_echo "#define Py_ENABLE_SHARED 1" >>confdefs.h
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005339
5340 case $ac_sys_system in
5341 BeOS*)
5342 LDLIBRARY='libpython$(VERSION).so'
5343 ;;
5344 CYGWIN*)
5345 LDLIBRARY='libpython$(VERSION).dll.a'
5346 DLLLIBRARY='libpython$(VERSION).dll'
5347 ;;
5348 SunOS*)
5349 LDLIBRARY='libpython$(VERSION).so'
5350 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(VERSION)'
5351 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
5352 INSTSONAME="$LDLIBRARY".$SOVERSION
5353 ;;
Charles-François Natali3de8c732011-07-24 22:33:35 +02005354 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*|OpenBSD*)
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005355 LDLIBRARY='libpython$(VERSION).so'
5356 BLDLIBRARY='-L. -lpython$(VERSION)'
5357 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
5358 case $ac_sys_system in
5359 FreeBSD*)
5360 SOVERSION=`echo $SOVERSION|cut -d "." -f 1`
5361 ;;
5362 esac
5363 INSTSONAME="$LDLIBRARY".$SOVERSION
5364 ;;
5365 hp*|HP*)
5366 case `uname -m` in
5367 ia64)
5368 LDLIBRARY='libpython$(VERSION).so'
5369 ;;
5370 *)
5371 LDLIBRARY='libpython$(VERSION).sl'
5372 ;;
5373 esac
5374 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(VERSION)'
5375 RUNSHARED=SHLIB_PATH=`pwd`:${SHLIB_PATH}
5376 ;;
5377 OSF*)
5378 LDLIBRARY='libpython$(VERSION).so'
5379 BLDLIBRARY='-rpath $(LIBDIR) -L. -lpython$(VERSION)'
5380 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
5381 ;;
5382 atheos*)
5383 LDLIBRARY='libpython$(VERSION).so'
5384 BLDLIBRARY='-L. -lpython$(VERSION)'
5385 RUNSHARED=DLL_PATH=`pwd`:${DLL_PATH:-/atheos/sys/libs:/atheos/autolnk/lib}
5386 ;;
5387 Darwin*)
5388 LDLIBRARY='libpython$(VERSION).dylib'
5389 BLDLIBRARY='-L. -lpython$(VERSION)'
5390 RUNSHARED='DYLD_LIBRARY_PATH=`pwd`:${DYLD_LIBRARY_PATH}'
5391 ;;
Antoine Pitrouaabdceb2010-09-10 20:03:17 +00005392 AIX*)
5393 LDLIBRARY='libpython$(VERSION).so'
5394 RUNSHARED=LIBPATH=`pwd`:${LIBPATH}
5395 ;;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005396
5397 esac
5398else # shared is disabled
5399 case $ac_sys_system in
5400 CYGWIN*)
5401 BLDLIBRARY='$(LIBRARY)'
5402 LDLIBRARY='libpython$(VERSION).dll.a'
5403 ;;
5404 esac
5405fi
5406
doko@python.orgd65e2ba2013-01-31 23:52:03 +01005407if test "$cross_compiling" = yes; then
5408 RUNSHARED=
5409fi
5410
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005411{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDLIBRARY" >&5
5412$as_echo "$LDLIBRARY" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005413
5414if test -n "$ac_tool_prefix"; then
5415 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
5416set dummy ${ac_tool_prefix}ranlib; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005417{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5418$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01005419if ${ac_cv_prog_RANLIB+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005420 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005421else
5422 if test -n "$RANLIB"; then
5423 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
5424else
5425as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5426for as_dir in $PATH
5427do
5428 IFS=$as_save_IFS
5429 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005430 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01005431 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005432 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005433 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005434 break 2
5435 fi
5436done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005437 done
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005438IFS=$as_save_IFS
5439
5440fi
5441fi
5442RANLIB=$ac_cv_prog_RANLIB
5443if test -n "$RANLIB"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005444 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
5445$as_echo "$RANLIB" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005446else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005447 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5448$as_echo "no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005449fi
5450
5451
5452fi
5453if test -z "$ac_cv_prog_RANLIB"; then
5454 ac_ct_RANLIB=$RANLIB
5455 # Extract the first word of "ranlib", so it can be a program name with args.
5456set dummy ranlib; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005457{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5458$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01005459if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005460 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005461else
5462 if test -n "$ac_ct_RANLIB"; then
5463 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
5464else
5465as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5466for as_dir in $PATH
5467do
5468 IFS=$as_save_IFS
5469 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005470 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01005471 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005472 ac_cv_prog_ac_ct_RANLIB="ranlib"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005473 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005474 break 2
5475 fi
5476done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005477 done
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005478IFS=$as_save_IFS
5479
5480fi
5481fi
5482ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
5483if test -n "$ac_ct_RANLIB"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005484 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
5485$as_echo "$ac_ct_RANLIB" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005486else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005487 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5488$as_echo "no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005489fi
5490
5491 if test "x$ac_ct_RANLIB" = x; then
5492 RANLIB=":"
5493 else
5494 case $cross_compiling:$ac_tool_warned in
5495yes:)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005496{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5497$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005498ac_tool_warned=yes ;;
5499esac
5500 RANLIB=$ac_ct_RANLIB
5501 fi
5502else
5503 RANLIB="$ac_cv_prog_RANLIB"
5504fi
5505
5506
doko@python.orgd65e2ba2013-01-31 23:52:03 +01005507if test -n "$ac_tool_prefix"; then
5508 for ac_prog in ar aal
5509 do
5510 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5511set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005512{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5513$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01005514if ${ac_cv_prog_AR+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005515 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005516else
5517 if test -n "$AR"; then
5518 ac_cv_prog_AR="$AR" # Let the user override the test.
5519else
5520as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5521for as_dir in $PATH
5522do
5523 IFS=$as_save_IFS
5524 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005525 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01005526 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@python.orgd65e2ba2013-01-31 23:52:03 +01005527 ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005528 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005529 break 2
5530 fi
5531done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005532 done
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005533IFS=$as_save_IFS
5534
5535fi
5536fi
5537AR=$ac_cv_prog_AR
5538if test -n "$AR"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005539 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
5540$as_echo "$AR" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005541else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005542 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5543$as_echo "no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005544fi
5545
5546
doko@python.orgd65e2ba2013-01-31 23:52:03 +01005547 test -n "$AR" && break
5548 done
5549fi
5550if test -z "$AR"; then
5551 ac_ct_AR=$AR
5552 for ac_prog in ar aal
5553do
5554 # Extract the first word of "$ac_prog", so it can be a program name with args.
5555set dummy $ac_prog; ac_word=$2
5556{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5557$as_echo_n "checking for $ac_word... " >&6; }
5558if ${ac_cv_prog_ac_ct_AR+:} false; then :
5559 $as_echo_n "(cached) " >&6
5560else
5561 if test -n "$ac_ct_AR"; then
5562 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
5563else
5564as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5565for as_dir in $PATH
5566do
5567 IFS=$as_save_IFS
5568 test -z "$as_dir" && as_dir=.
5569 for ac_exec_ext in '' $ac_executable_extensions; do
5570 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5571 ac_cv_prog_ac_ct_AR="$ac_prog"
5572 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5573 break 2
5574 fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005575done
doko@python.orgd65e2ba2013-01-31 23:52:03 +01005576 done
5577IFS=$as_save_IFS
5578
5579fi
5580fi
5581ac_ct_AR=$ac_cv_prog_ac_ct_AR
5582if test -n "$ac_ct_AR"; then
5583 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
5584$as_echo "$ac_ct_AR" >&6; }
5585else
5586 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5587$as_echo "no" >&6; }
5588fi
5589
5590
5591 test -n "$ac_ct_AR" && break
5592done
5593
5594 if test "x$ac_ct_AR" = x; then
5595 AR="ar"
5596 else
5597 case $cross_compiling:$ac_tool_warned in
5598yes:)
5599{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5600$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5601ac_tool_warned=yes ;;
5602esac
5603 AR=$ac_ct_AR
5604 fi
5605fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005606
5607
5608# tweak ARFLAGS only if the user didn't set it on the command line
5609
5610if test -z "$ARFLAGS"
5611then
5612 ARFLAGS="rc"
5613fi
5614
5615
5616# Extract the first word of "svnversion", so it can be a program name with args.
5617set dummy svnversion; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005618{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5619$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01005620if ${ac_cv_prog_SVNVERSION+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005621 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005622else
5623 if test -n "$SVNVERSION"; then
5624 ac_cv_prog_SVNVERSION="$SVNVERSION" # Let the user override the test.
5625else
5626as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5627for as_dir in $PATH
5628do
5629 IFS=$as_save_IFS
5630 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005631 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01005632 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005633 ac_cv_prog_SVNVERSION="found"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005634 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005635 break 2
5636 fi
5637done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005638 done
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005639IFS=$as_save_IFS
5640
5641 test -z "$ac_cv_prog_SVNVERSION" && ac_cv_prog_SVNVERSION="not-found"
5642fi
5643fi
5644SVNVERSION=$ac_cv_prog_SVNVERSION
5645if test -n "$SVNVERSION"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005646 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SVNVERSION" >&5
5647$as_echo "$SVNVERSION" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005648else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005649 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5650$as_echo "no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005651fi
5652
5653
5654if test $SVNVERSION = found
5655then
5656 SVNVERSION="svnversion \$(srcdir)"
5657else
5658 SVNVERSION="echo Unversioned directory"
5659fi
5660
Trent Nelsond86ceec2012-10-16 09:42:45 -04005661
Trent Nelsonabf20512012-10-17 04:32:49 -04005662if test "$abs_srcdir" != "$abs_builddir"; then
Trent Nelsond86ceec2012-10-16 09:42:45 -04005663 # If we're building out-of-tree make sure Include (in the current dir)
5664 # gets picked up before its $srcdir counterpart in order for Python-ast.h
5665 # and graminit.h to get picked up from the correct directory.
5666 # (A side effect of this is that these resources will automatically be
5667 # regenerated when building out-of-tree, regardless of whether or not
5668 # the $srcdir counterpart is up-to-date. This is an acceptable trade
5669 # off.)
5670 BASECPPFLAGS="-IInclude"
5671else
5672 BASECPPFLAGS=""
5673fi
5674
Georg Brandl3a5508e2011-03-06 10:42:21 +01005675
5676
5677
5678# Extract the first word of "hg", so it can be a program name with args.
5679set dummy hg; ac_word=$2
5680{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5681$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01005682if ${ac_cv_prog_HAS_HG+:} false; then :
Georg Brandl3a5508e2011-03-06 10:42:21 +01005683 $as_echo_n "(cached) " >&6
5684else
5685 if test -n "$HAS_HG"; then
5686 ac_cv_prog_HAS_HG="$HAS_HG" # Let the user override the test.
5687else
5688as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5689for as_dir in $PATH
5690do
5691 IFS=$as_save_IFS
5692 test -z "$as_dir" && as_dir=.
5693 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01005694 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Georg Brandl3a5508e2011-03-06 10:42:21 +01005695 ac_cv_prog_HAS_HG="found"
5696 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5697 break 2
5698 fi
5699done
5700 done
5701IFS=$as_save_IFS
5702
5703 test -z "$ac_cv_prog_HAS_HG" && ac_cv_prog_HAS_HG="not-found"
5704fi
5705fi
5706HAS_HG=$ac_cv_prog_HAS_HG
5707if test -n "$HAS_HG"; then
5708 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAS_HG" >&5
5709$as_echo "$HAS_HG" >&6; }
5710else
5711 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5712$as_echo "no" >&6; }
5713fi
5714
5715
5716if test $HAS_HG = found
5717then
5718 HGVERSION="hg id -i \$(srcdir)"
5719 HGTAG="hg id -t \$(srcdir)"
5720 HGBRANCH="hg id -b \$(srcdir)"
5721else
5722 HGVERSION=""
5723 HGTAG=""
5724 HGBRANCH=""
5725fi
5726
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005727case $MACHDEP in
5728bsdos*|hp*|HP*)
5729 # install -d does not work on BSDI or HP-UX
5730 if test -z "$INSTALL"
5731 then
5732 INSTALL="${srcdir}/install-sh -c"
5733 fi
5734esac
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005735# Find a good install program. We prefer a C program (faster),
5736# so one script is as good as another. But avoid the broken or
5737# incompatible versions:
5738# SysV /etc/install, /usr/sbin/install
5739# SunOS /usr/etc/install
5740# IRIX /sbin/install
5741# AIX /bin/install
5742# AmigaOS /C/install, which installs bootblocks on floppy discs
5743# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
5744# AFS /usr/afsws/bin/install, which mishandles nonexistent args
5745# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
5746# OS/2's system install, which has a completely different semantic
5747# ./install, which can be erroneously created by make from ./install.sh.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005748# Reject install programs that cannot install multiple files.
5749{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
5750$as_echo_n "checking for a BSD-compatible install... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005751if test -z "$INSTALL"; then
Matthias Klose3cef2a92012-03-14 23:39:33 +01005752if ${ac_cv_path_install+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005753 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005754else
5755 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5756for as_dir in $PATH
5757do
5758 IFS=$as_save_IFS
5759 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005760 # Account for people who put trailing slashes in PATH elements.
5761case $as_dir/ in #((
5762 ./ | .// | /[cC]/* | \
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005763 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005764 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005765 /usr/ucb/* ) ;;
5766 *)
5767 # OSF1 and SCO ODT 3.0 have their own names for install.
5768 # Don't use installbsd from OSF since it installs stuff as root
5769 # by default.
5770 for ac_prog in ginstall scoinst install; do
5771 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01005772 if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005773 if test $ac_prog = install &&
5774 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
5775 # AIX install. It has an incompatible calling convention.
5776 :
5777 elif test $ac_prog = install &&
5778 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
5779 # program-specific install script used by HP pwplus--don't use.
5780 :
5781 else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005782 rm -rf conftest.one conftest.two conftest.dir
5783 echo one > conftest.one
5784 echo two > conftest.two
5785 mkdir conftest.dir
5786 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
5787 test -s conftest.one && test -s conftest.two &&
5788 test -s conftest.dir/conftest.one &&
5789 test -s conftest.dir/conftest.two
5790 then
5791 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
5792 break 3
5793 fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005794 fi
5795 fi
5796 done
5797 done
5798 ;;
5799esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005800
5801 done
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005802IFS=$as_save_IFS
5803
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005804rm -rf conftest.one conftest.two conftest.dir
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005805
5806fi
5807 if test "${ac_cv_path_install+set}" = set; then
5808 INSTALL=$ac_cv_path_install
5809 else
5810 # As a last resort, use the slow shell script. Don't cache a
5811 # value for INSTALL within a source directory, because that will
5812 # break other packages using the cache if that directory is
5813 # removed, or if the value is a relative name.
5814 INSTALL=$ac_install_sh
5815 fi
5816fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005817{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
5818$as_echo "$INSTALL" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005819
5820# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
5821# It thinks the first close brace ends the variable substitution.
5822test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
5823
5824test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
5825
5826test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
5827
Trent Nelsonf6407a12012-08-30 14:56:13 +00005828{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
5829$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
5830if test -z "$MKDIR_P"; then
5831 if ${ac_cv_path_mkdir+:} false; then :
5832 $as_echo_n "(cached) " >&6
5833else
5834 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5835for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
5836do
5837 IFS=$as_save_IFS
5838 test -z "$as_dir" && as_dir=.
5839 for ac_prog in mkdir gmkdir; do
5840 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01005841 as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
Trent Nelsonf6407a12012-08-30 14:56:13 +00005842 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
5843 'mkdir (GNU coreutils) '* | \
5844 'mkdir (coreutils) '* | \
5845 'mkdir (fileutils) '4.1*)
5846 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
5847 break 3;;
5848 esac
5849 done
5850 done
5851 done
5852IFS=$as_save_IFS
5853
5854fi
5855
5856 test -d ./--version && rmdir ./--version
5857 if test "${ac_cv_path_mkdir+set}" = set; then
5858 MKDIR_P="$ac_cv_path_mkdir -p"
5859 else
5860 # As a last resort, use the slow shell script. Don't cache a
5861 # value for MKDIR_P within a source directory, because that will
5862 # break other packages using the cache if that directory is
5863 # removed, or if the value is a relative name.
5864 MKDIR_P="$ac_install_sh -d"
5865 fi
5866fi
5867{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
5868$as_echo "$MKDIR_P" >&6; }
5869
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005870
5871# Not every filesystem supports hard links
5872
5873if test -z "$LN" ; then
5874 case $ac_sys_system in
5875 BeOS*) LN="ln -s";;
5876 CYGWIN*) LN="ln -s";;
5877 atheos*) LN="ln -s";;
5878 *) LN=ln;;
5879 esac
5880fi
5881
5882# Check for --with-pydebug
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005883{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pydebug" >&5
5884$as_echo_n "checking for --with-pydebug... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005885
5886# Check whether --with-pydebug was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005887if test "${with_pydebug+set}" = set; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005888 withval=$with_pydebug;
5889if test "$withval" != no
5890then
5891
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005892$as_echo "#define Py_DEBUG 1" >>confdefs.h
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005893
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005894 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5895$as_echo "yes" >&6; };
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005896 Py_DEBUG='true'
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005897else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5898$as_echo "no" >&6; }; Py_DEBUG='false'
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005899fi
5900else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005901 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5902$as_echo "no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005903fi
5904
5905
5906# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
5907# merged with this chunk of code?
5908
5909# Optimizer/debugger flags
5910# ------------------------
5911# (The following bit of code is complicated enough - please keep things
5912# indented properly. Just pretend you're editing Python code. ;-)
5913
5914# There are two parallel sets of case statements below, one that checks to
5915# see if OPT was set and one that does BASECFLAGS setting based upon
5916# compiler and platform. BASECFLAGS tweaks need to be made even if the
5917# user set OPT.
5918
5919# tweak OPT based on compiler and platform, only if the user didn't set
5920# it on the command line
5921
Benjamin Petersond4b721b2010-03-23 20:58:37 +00005922if test "${OPT-unset}" = "unset"
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005923then
5924 case $GCC in
5925 yes)
5926 if test "$CC" != 'g++' ; then
5927 STRICT_PROTO="-Wstrict-prototypes"
5928 fi
5929 # For gcc 4.x we need to use -fwrapv so lets check if its supported
5930 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
5931 WRAP="-fwrapv"
5932 fi
Stefan Krah503e5e12011-09-14 15:19:42 +02005933
5934 # Clang also needs -fwrapv
Stefan Krah2bc1e8f2011-12-08 22:26:06 +01005935 case $CC in
5936 *clang*) WRAP="-fwrapv"
5937 ;;
5938 esac
Stefan Krah503e5e12011-09-14 15:19:42 +02005939
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005940 case $ac_cv_prog_cc_g in
5941 yes)
5942 if test "$Py_DEBUG" = 'true' ; then
5943 # Optimization messes up debuggers, so turn it off for
5944 # debug builds.
Mark Dickinsond2f3e3f2010-05-05 22:23:58 +00005945 OPT="-g -O0 -Wall $STRICT_PROTO"
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005946 else
5947 OPT="-g $WRAP -O3 -Wall $STRICT_PROTO"
5948 fi
5949 ;;
5950 *)
5951 OPT="-O3 -Wall $STRICT_PROTO"
5952 ;;
5953 esac
5954 case $ac_sys_system in
5955 SCO_SV*) OPT="$OPT -m486 -DSCO5"
5956 ;;
5957 esac
5958 ;;
5959
5960 *)
5961 OPT="-O"
5962 ;;
5963 esac
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005964fi
5965
5966
5967
5968# The -arch flags for universal builds on OSX
5969UNIVERSAL_ARCH_FLAGS=
5970
5971
5972# tweak BASECFLAGS based on compiler and platform
5973case $GCC in
5974yes)
5975 # Python violates C99 rules, by casting between incompatible
5976 # pointer types. GCC may generate bad code as a result of that,
5977 # so use -fno-strict-aliasing if supported.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005978 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -fno-strict-aliasing" >&5
5979$as_echo_n "checking whether $CC accepts -fno-strict-aliasing... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005980 ac_save_cc="$CC"
5981 CC="$CC -fno-strict-aliasing"
Matthias Klose3cef2a92012-03-14 23:39:33 +01005982 if ${ac_cv_no_strict_aliasing_ok+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005983 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00005984else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005985 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005986/* end confdefs.h. */
Gregory P. Smith373469a2009-11-01 21:03:38 +00005987
5988int
5989main ()
5990{
Mark Dickinson5e13e292010-05-11 08:55:06 +00005991
Gregory P. Smith373469a2009-11-01 21:03:38 +00005992 ;
5993 return 0;
5994}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005995_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005996if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005997 ac_cv_no_strict_aliasing_ok=yes
5998else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005999 ac_cv_no_strict_aliasing_ok=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006000fi
Gregory P. Smith373469a2009-11-01 21:03:38 +00006001rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00006002fi
6003
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006004 CC="$ac_save_cc"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006005 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_no_strict_aliasing_ok" >&5
6006$as_echo "$ac_cv_no_strict_aliasing_ok" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006007 if test $ac_cv_no_strict_aliasing_ok = yes
6008 then
6009 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
6010 fi
6011
6012 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
6013 # support. Without this, treatment of subnormals doesn't follow
6014 # the standard.
doko@python.orgd65e2ba2013-01-31 23:52:03 +01006015 case $host in
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006016 alpha*)
6017 BASECFLAGS="$BASECFLAGS -mieee"
6018 ;;
6019 esac
6020
6021 case $ac_sys_system in
6022 SCO_SV*)
6023 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
6024 ;;
6025 # is there any other compiler on Darwin besides gcc?
6026 Darwin*)
6027 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
6028 # used to be here, but non-Apple gcc doesn't accept them.
Ronald Oussorena55af9a2010-01-17 16:25:57 +00006029 if test "${CC}" = gcc
6030 then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006031 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which compiler should be used" >&5
6032$as_echo_n "checking which compiler should be used... " >&6; }
Ronald Oussorena55af9a2010-01-17 16:25:57 +00006033 case "${UNIVERSALSDK}" in
6034 */MacOSX10.4u.sdk)
6035 # Build using 10.4 SDK, force usage of gcc when the
6036 # compiler is gcc, otherwise the user will get very
6037 # confusing error messages when building on OSX 10.6
6038 CC=gcc-4.0
6039 CPP=cpp-4.0
6040 ;;
6041 esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006042 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
6043$as_echo "$CC" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006044 fi
6045
6046 # Calculate the right deployment target for this build.
6047 #
6048 cur_target=`sw_vers -productVersion | sed 's/\(10\.[0-9]*\).*/\1/'`
6049 if test ${cur_target} '>' 10.2; then
6050 cur_target=10.3
Ronald Oussoren25967582009-09-06 10:00:26 +00006051 if test ${enable_universalsdk}; then
6052 if test "${UNIVERSAL_ARCHS}" = "all"; then
6053 # Ensure that the default platform for a
6054 # 4-way universal build is OSX 10.5,
6055 # that's the first OS release where
6056 # 4-way builds make sense.
6057 cur_target='10.5'
Ronald Oussoren23d92532009-09-07 06:12:00 +00006058
6059 elif test "${UNIVERSAL_ARCHS}" = "3-way"; then
6060 cur_target='10.5'
6061
6062 elif test "${UNIVERSAL_ARCHS}" = "intel"; then
6063 cur_target='10.5'
6064
6065 elif test "${UNIVERSAL_ARCHS}" = "64-bit"; then
6066 cur_target='10.5'
Ronald Oussoren25967582009-09-06 10:00:26 +00006067 fi
6068 else
Ronald Oussorenbc0e83c2010-02-11 13:26:54 +00006069 if test `/usr/bin/arch` = "i386"; then
Ronald Oussoren25967582009-09-06 10:00:26 +00006070 # On Intel macs default to a deployment
6071 # target of 10.4, that's the first OSX
6072 # release with Intel support.
6073 cur_target="10.4"
6074 fi
6075 fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006076 fi
6077 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
6078
6079 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
6080 # environment with a value that is the same as what we'll use
6081 # in the Makefile to ensure that we'll get the same compiler
6082 # environment during configure and build time.
6083 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
6084 export MACOSX_DEPLOYMENT_TARGET
6085 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
6086
Ronald Oussorena55af9a2010-01-17 16:25:57 +00006087 if test "${enable_universalsdk}"; then
6088 UNIVERSAL_ARCH_FLAGS=""
6089 if test "$UNIVERSAL_ARCHS" = "32-bit" ; then
6090 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
6091 ARCH_RUN_32BIT=""
Ronald Oussoren75912852010-04-08 08:13:31 +00006092 LIPO_32BIT_FLAGS=""
Ronald Oussorena55af9a2010-01-17 16:25:57 +00006093
6094 elif test "$UNIVERSAL_ARCHS" = "64-bit" ; then
6095 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
6096 LIPO_32BIT_FLAGS=""
6097 ARCH_RUN_32BIT="true"
6098
6099 elif test "$UNIVERSAL_ARCHS" = "all" ; then
6100 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
6101 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Ronald Oussoren92397ce2010-01-17 19:32:00 +00006102 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
Ronald Oussorena55af9a2010-01-17 16:25:57 +00006103
6104 elif test "$UNIVERSAL_ARCHS" = "intel" ; then
6105 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
6106 LIPO_32BIT_FLAGS="-extract i386"
Ronald Oussoren92397ce2010-01-17 19:32:00 +00006107 ARCH_RUN_32BIT="/usr/bin/arch -i386"
Ronald Oussorena55af9a2010-01-17 16:25:57 +00006108
6109 elif test "$UNIVERSAL_ARCHS" = "3-way" ; then
6110 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
6111 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Ronald Oussoren9922f172010-02-11 13:19:34 +00006112 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
Ronald Oussorena55af9a2010-01-17 16:25:57 +00006113
6114 else
Georg Brandl71f4fbb2011-02-25 11:04:50 +00006115 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 +00006116
6117 fi
6118
6119
Ronald Oussoren974eb5e2010-04-18 17:59:37 +00006120 CFLAGS="${UNIVERSAL_ARCH_FLAGS} ${CFLAGS}"
6121 if test "${UNIVERSALSDK}" != "/"
6122 then
6123 CPPFLAGS="-isysroot ${UNIVERSALSDK} ${CPPFLAGS}"
6124 LDFLAGS="-isysroot ${UNIVERSALSDK} ${LDFLAGS}"
6125 CFLAGS="-isysroot ${UNIVERSALSDK} ${CFLAGS}"
Ronald Oussorena55af9a2010-01-17 16:25:57 +00006126 fi
6127
6128 fi
6129
6130
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006131 ;;
6132 OSF*)
6133 BASECFLAGS="$BASECFLAGS -mieee"
6134 ;;
6135 esac
6136 ;;
6137
6138*)
6139 case $ac_sys_system in
6140 OpenUNIX*|UnixWare*)
6141 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
6142 ;;
6143 OSF*)
6144 BASECFLAGS="$BASECFLAGS -ieee -std"
6145 ;;
6146 SCO_SV*)
6147 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
6148 ;;
6149 esac
6150 ;;
6151esac
6152
6153if test "$Py_DEBUG" = 'true'; then
6154 :
6155else
6156 OPT="-DNDEBUG $OPT"
6157fi
6158
6159if test "$ac_arch_flags"
6160then
6161 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
6162fi
6163
6164# disable check for icc since it seems to pass, but generates a warning
6165if test "$CC" = icc
6166then
6167 ac_cv_opt_olimit_ok=no
6168fi
6169
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006170{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -OPT:Olimit=0" >&5
6171$as_echo_n "checking whether $CC accepts -OPT:Olimit=0... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01006172if ${ac_cv_opt_olimit_ok+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006173 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006174else
6175 ac_save_cc="$CC"
6176CC="$CC -OPT:Olimit=0"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006177cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006178/* end confdefs.h. */
Gregory P. Smith373469a2009-11-01 21:03:38 +00006179
6180int
6181main ()
6182{
Mark Dickinson5e13e292010-05-11 08:55:06 +00006183
Gregory P. Smith373469a2009-11-01 21:03:38 +00006184 ;
6185 return 0;
6186}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006187_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006188if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006189 ac_cv_opt_olimit_ok=yes
6190else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006191 ac_cv_opt_olimit_ok=no
Matthias Klosec511b472010-05-08 11:01:39 +00006192
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006193fi
Gregory P. Smith373469a2009-11-01 21:03:38 +00006194rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006195CC="$ac_save_cc"
6196fi
6197
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006198{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_opt_olimit_ok" >&5
6199$as_echo "$ac_cv_opt_olimit_ok" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006200if test $ac_cv_opt_olimit_ok = yes; then
6201 case $ac_sys_system in
6202 # XXX is this branch needed? On MacOSX 10.2.2 the result of the
6203 # olimit_ok test is "no". Is it "yes" in some other Darwin-esque
6204 # environment?
6205 Darwin*)
6206 ;;
Trent Nelson34562e12012-10-17 18:01:12 -04006207 # XXX thankfully this useless troublemaker of a flag has been
6208 # eradicated in the 3.x line. For now, make sure it isn't picked
6209 # up by any of our other platforms that use CC.
6210 AIX*|SunOS*|HP-UX*|IRIX*)
6211 ;;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006212 *)
6213 BASECFLAGS="$BASECFLAGS -OPT:Olimit=0"
6214 ;;
6215 esac
6216else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006217 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Olimit 1500" >&5
6218$as_echo_n "checking whether $CC accepts -Olimit 1500... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01006219 if ${ac_cv_olimit_ok+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006220 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006221else
6222 ac_save_cc="$CC"
6223 CC="$CC -Olimit 1500"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006224 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006225/* end confdefs.h. */
Gregory P. Smith373469a2009-11-01 21:03:38 +00006226
6227int
6228main ()
6229{
Mark Dickinson5e13e292010-05-11 08:55:06 +00006230
Gregory P. Smith373469a2009-11-01 21:03:38 +00006231 ;
6232 return 0;
6233}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006234_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006235if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006236 ac_cv_olimit_ok=yes
6237else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006238 ac_cv_olimit_ok=no
Matthias Klosec511b472010-05-08 11:01:39 +00006239
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006240fi
Gregory P. Smith373469a2009-11-01 21:03:38 +00006241rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006242 CC="$ac_save_cc"
6243fi
6244
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006245 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_olimit_ok" >&5
6246$as_echo "$ac_cv_olimit_ok" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006247 if test $ac_cv_olimit_ok = yes; then
Stefan Krah67473262012-11-29 00:17:05 +01006248 case $ac_sys_system in
6249 # Issue #16534: On HP-UX ac_cv_olimit_ok=yes is a false positive.
6250 HP-UX*)
6251 ;;
6252 *)
6253 BASECFLAGS="$BASECFLAGS -Olimit 1500"
6254 ;;
6255 esac
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006256 fi
6257fi
6258
6259# Check whether GCC supports PyArg_ParseTuple format
6260if test "$GCC" = "yes"
6261then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006262 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc supports ParseTuple __format__" >&5
6263$as_echo_n "checking whether gcc supports ParseTuple __format__... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006264 save_CFLAGS=$CFLAGS
Benjamin Petersonc8759662013-05-11 13:00:05 -05006265 CFLAGS="$CFLAGS -Werror -Wformat"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006266 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006267/* end confdefs.h. */
6268
6269 void f(char*,...)__attribute((format(PyArg_ParseTuple, 1, 2)));
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006270int
6271main ()
6272{
6273
6274 ;
6275 return 0;
6276}
Matthias Klosec511b472010-05-08 11:01:39 +00006277
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006278_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006279if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006280
Matthias Klosec511b472010-05-08 11:01:39 +00006281
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006282$as_echo "#define HAVE_ATTRIBUTE_FORMAT_PARSETUPLE 1" >>confdefs.h
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006283
Matthias Klosec511b472010-05-08 11:01:39 +00006284 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006285$as_echo "yes" >&6; }
Matthias Klosec511b472010-05-08 11:01:39 +00006286
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006287else
Matthias Klosec511b472010-05-08 11:01:39 +00006288
6289 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006290$as_echo "no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006291
6292fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006293rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6294 CFLAGS=$save_CFLAGS
6295fi
6296
6297# On some compilers, pthreads are available without further options
6298# (e.g. MacOS X). On some of these systems, the compiler will not
6299# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
6300# So we have to see first whether pthreads are available without
6301# options before we can check whether -Kpthread improves anything.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006302{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads are available without options" >&5
6303$as_echo_n "checking whether pthreads are available without options... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01006304if ${ac_cv_pthread_is_default+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006305 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006306else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006307 if test "$cross_compiling" = yes; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006308 ac_cv_pthread_is_default=no
6309else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006310 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006311/* end confdefs.h. */
6312
Stefan Krahae66ca62012-11-22 22:36:57 +01006313#include <stdio.h>
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006314#include <pthread.h>
6315
6316void* routine(void* p){return NULL;}
6317
6318int main(){
6319 pthread_t p;
6320 if(pthread_create(&p,NULL,routine,NULL)!=0)
6321 return 1;
6322 (void)pthread_detach(p);
6323 return 0;
6324}
6325
6326_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006327if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006328
6329 ac_cv_pthread_is_default=yes
6330 ac_cv_kthread=no
6331 ac_cv_pthread=no
6332
6333else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006334 ac_cv_pthread_is_default=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006335fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006336rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6337 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006338fi
6339
6340
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006341fi
6342
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006343{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_is_default" >&5
6344$as_echo "$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006345
6346
6347if test $ac_cv_pthread_is_default = yes
6348then
6349 ac_cv_kpthread=no
6350else
6351# -Kpthread, if available, provides the right #defines
6352# and linker options to make pthread_create available
6353# Some compilers won't report that they do not support -Kpthread,
6354# so we need to run a program to see whether it really made the
6355# function available.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006356{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kpthread" >&5
6357$as_echo_n "checking whether $CC accepts -Kpthread... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01006358if ${ac_cv_kpthread+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006359 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006360else
6361 ac_save_cc="$CC"
6362CC="$CC -Kpthread"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006363if test "$cross_compiling" = yes; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006364 ac_cv_kpthread=no
6365else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006366 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006367/* end confdefs.h. */
6368
Stefan Krahae66ca62012-11-22 22:36:57 +01006369#include <stdio.h>
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006370#include <pthread.h>
6371
6372void* routine(void* p){return NULL;}
6373
6374int main(){
6375 pthread_t p;
6376 if(pthread_create(&p,NULL,routine,NULL)!=0)
6377 return 1;
6378 (void)pthread_detach(p);
6379 return 0;
6380}
6381
6382_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006383if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006384 ac_cv_kpthread=yes
6385else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006386 ac_cv_kpthread=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006387fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006388rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6389 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006390fi
6391
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006392CC="$ac_save_cc"
6393fi
6394
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006395{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kpthread" >&5
6396$as_echo "$ac_cv_kpthread" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006397fi
6398
6399if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
6400then
6401# -Kthread, if available, provides the right #defines
6402# and linker options to make pthread_create available
6403# Some compilers won't report that they do not support -Kthread,
6404# so we need to run a program to see whether it really made the
6405# function available.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006406{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kthread" >&5
6407$as_echo_n "checking whether $CC accepts -Kthread... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01006408if ${ac_cv_kthread+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006409 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006410else
6411 ac_save_cc="$CC"
6412CC="$CC -Kthread"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006413if test "$cross_compiling" = yes; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006414 ac_cv_kthread=no
6415else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006416 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006417/* end confdefs.h. */
6418
Stefan Krahae66ca62012-11-22 22:36:57 +01006419#include <stdio.h>
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006420#include <pthread.h>
6421
6422void* routine(void* p){return NULL;}
6423
6424int main(){
6425 pthread_t p;
6426 if(pthread_create(&p,NULL,routine,NULL)!=0)
6427 return 1;
6428 (void)pthread_detach(p);
6429 return 0;
6430}
6431
6432_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006433if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006434 ac_cv_kthread=yes
6435else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006436 ac_cv_kthread=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006437fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006438rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6439 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006440fi
6441
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006442CC="$ac_save_cc"
6443fi
6444
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006445{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kthread" >&5
6446$as_echo "$ac_cv_kthread" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006447fi
6448
6449if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
6450then
6451# -pthread, if available, provides the right #defines
6452# and linker options to make pthread_create available
6453# Some compilers won't report that they do not support -pthread,
6454# so we need to run a program to see whether it really made the
6455# function available.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006456{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -pthread" >&5
6457$as_echo_n "checking whether $CC accepts -pthread... " >&6; }
doko@python.orgfa3f9a32013-01-25 15:32:31 +01006458if ${ac_cv_pthread+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006459 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006460else
6461 ac_save_cc="$CC"
6462CC="$CC -pthread"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006463if test "$cross_compiling" = yes; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006464 ac_cv_pthread=no
6465else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006466 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006467/* end confdefs.h. */
6468
Stefan Krahae66ca62012-11-22 22:36:57 +01006469#include <stdio.h>
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006470#include <pthread.h>
6471
6472void* routine(void* p){return NULL;}
6473
6474int main(){
6475 pthread_t p;
6476 if(pthread_create(&p,NULL,routine,NULL)!=0)
6477 return 1;
6478 (void)pthread_detach(p);
6479 return 0;
6480}
6481
6482_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006483if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006484 ac_cv_pthread=yes
6485else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006486 ac_cv_pthread=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006487fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006488rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6489 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006490fi
6491
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006492CC="$ac_save_cc"
6493fi
6494
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006495{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread" >&5
6496$as_echo "$ac_cv_pthread" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006497fi
6498
6499# If we have set a CC compiler flag for thread support then
6500# check if it works for CXX, too.
6501ac_cv_cxx_thread=no
6502if test ! -z "$CXX"
6503then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006504{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX also accepts flags for thread support" >&5
6505$as_echo_n "checking whether $CXX also accepts flags for thread support... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006506ac_save_cxx="$CXX"
6507
6508if test "$ac_cv_kpthread" = "yes"
6509then
6510 CXX="$CXX -Kpthread"
6511 ac_cv_cxx_thread=yes
6512elif test "$ac_cv_kthread" = "yes"
6513then
6514 CXX="$CXX -Kthread"
6515 ac_cv_cxx_thread=yes
6516elif test "$ac_cv_pthread" = "yes"
6517then
6518 CXX="$CXX -pthread"
6519 ac_cv_cxx_thread=yes
6520fi
6521
6522if test $ac_cv_cxx_thread = yes
6523then
6524 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
6525 $CXX -c conftest.$ac_ext 2>&5
6526 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
6527 && test -s conftest$ac_exeext && ./conftest$ac_exeext
6528 then
6529 ac_cv_cxx_thread=yes
6530 else
6531 ac_cv_cxx_thread=no
6532 fi
6533 rm -fr conftest*
6534fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006535{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_thread" >&5
6536$as_echo "$ac_cv_cxx_thread" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006537fi
6538CXX="$ac_save_cxx"
6539
6540
6541# checks for header files
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006542{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
6543$as_echo_n "checking for ANSI C header files... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01006544if ${ac_cv_header_stdc+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006545 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006546else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006547 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006548/* end confdefs.h. */
6549#include <stdlib.h>
6550#include <stdarg.h>
6551#include <string.h>
6552#include <float.h>
6553
6554int
6555main ()
6556{
6557
6558 ;
6559 return 0;
6560}
6561_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006562if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006563 ac_cv_header_stdc=yes
6564else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006565 ac_cv_header_stdc=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006566fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006567rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6568
6569if test $ac_cv_header_stdc = yes; then
6570 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006571 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006572/* end confdefs.h. */
6573#include <string.h>
6574
6575_ACEOF
6576if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006577 $EGREP "memchr" >/dev/null 2>&1; then :
6578
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006579else
6580 ac_cv_header_stdc=no
6581fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00006582rm -f conftest*
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006583
6584fi
6585
6586if test $ac_cv_header_stdc = yes; then
6587 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006588 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006589/* end confdefs.h. */
6590#include <stdlib.h>
6591
6592_ACEOF
6593if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006594 $EGREP "free" >/dev/null 2>&1; then :
6595
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006596else
6597 ac_cv_header_stdc=no
6598fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00006599rm -f conftest*
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006600
6601fi
6602
6603if test $ac_cv_header_stdc = yes; then
6604 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006605 if test "$cross_compiling" = yes; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006606 :
6607else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006608 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006609/* end confdefs.h. */
6610#include <ctype.h>
6611#include <stdlib.h>
6612#if ((' ' & 0x0FF) == 0x020)
6613# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
6614# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
6615#else
6616# define ISLOWER(c) \
6617 (('a' <= (c) && (c) <= 'i') \
6618 || ('j' <= (c) && (c) <= 'r') \
6619 || ('s' <= (c) && (c) <= 'z'))
6620# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
6621#endif
6622
6623#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
6624int
6625main ()
6626{
6627 int i;
6628 for (i = 0; i < 256; i++)
6629 if (XOR (islower (i), ISLOWER (i))
6630 || toupper (i) != TOUPPER (i))
6631 return 2;
6632 return 0;
6633}
6634_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006635if ac_fn_c_try_run "$LINENO"; then :
6636
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006637else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006638 ac_cv_header_stdc=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006639fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006640rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6641 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006642fi
6643
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006644fi
6645fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006646{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
6647$as_echo "$ac_cv_header_stdc" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006648if test $ac_cv_header_stdc = yes; then
6649
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006650$as_echo "#define STDC_HEADERS 1" >>confdefs.h
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006651
6652fi
6653
Martin v. Löwis0e8bd7e2006-06-10 12:23:46 +00006654for ac_header in asm/types.h conio.h curses.h direct.h dlfcn.h errno.h \
6655fcntl.h grp.h \
Neal Norwitz9fdfaaf2008-03-28 05:34:59 +00006656ieeefp.h io.h langinfo.h libintl.h ncurses.h poll.h process.h pthread.h \
Martin v. Löwis40e9aed2006-10-02 15:20:37 +00006657shadow.h signal.h stdint.h stropts.h termios.h thread.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00006658unistd.h utime.h \
Christian Heimes0e9ab5f2008-03-21 23:49:44 +00006659sys/audioio.h sys/bsdtty.h sys/epoll.h sys/event.h sys/file.h sys/loadavg.h \
6660sys/lock.h sys/mkdev.h sys/modem.h \
Martin v. Löwis0e8bd7e2006-06-10 12:23:46 +00006661sys/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 +00006662sys/termio.h sys/time.h \
Martin v. Löwis0e8bd7e2006-06-10 12:23:46 +00006663sys/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 +00006664sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Christian Heimes3aa138f2013-06-18 13:25:24 +02006665bluetooth/bluetooth.h linux/tipc.h spawn.h util.h alloca.h
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006666do :
6667 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
6668ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
Georg Brandl71f4fbb2011-02-25 11:04:50 +00006669if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006670 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006671#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00006672_ACEOF
6673
6674fi
6675
Guido van Rossum627b2d71993-12-24 10:39:16 +00006676done
6677
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006678ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00006679for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006680 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
6681{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
6682$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01006683if eval \${$as_ac_Header+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006684 $as_echo_n "(cached) " >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00006685else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006686 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006687/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006688#include <sys/types.h>
6689#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00006690
Martin v. Löwis11437992002-04-12 09:54:03 +00006691int
6692main ()
6693{
6694if ((DIR *) 0)
6695return 0;
6696 ;
6697 return 0;
6698}
6699_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006700if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006701 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00006702else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006703 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006704fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006705rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006706fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006707eval ac_res=\$$as_ac_Header
6708 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
6709$as_echo "$ac_res" >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00006710if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006711 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006712#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00006713_ACEOF
6714
6715ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00006716fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006717
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006718done
6719# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
6720if test $ac_header_dirent = dirent.h; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006721 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
6722$as_echo_n "checking for library containing opendir... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01006723if ${ac_cv_search_opendir+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006724 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006725else
Martin v. Löwis11437992002-04-12 09:54:03 +00006726 ac_func_search_save_LIBS=$LIBS
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006727cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006728/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006729
Martin v. Löwiseba40652007-08-30 20:10:57 +00006730/* Override any GCC internal prototype to avoid an error.
6731 Use char because int might match the return type of a GCC
6732 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006733#ifdef __cplusplus
6734extern "C"
6735#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006736char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006737int
6738main ()
6739{
Martin v. Löwiseba40652007-08-30 20:10:57 +00006740return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006741 ;
6742 return 0;
6743}
6744_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00006745for ac_lib in '' dir; do
6746 if test -z "$ac_lib"; then
6747 ac_res="none required"
6748 else
6749 ac_res=-l$ac_lib
Skip Montanaro89e975f2007-08-22 19:05:21 +00006750 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Martin v. Löwiseba40652007-08-30 20:10:57 +00006751 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006752 if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00006753 ac_cv_search_opendir=$ac_res
Brett Cannon19fab762007-06-02 03:02:29 +00006754fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006755rm -f core conftest.err conftest.$ac_objext \
6756 conftest$ac_exeext
Matthias Klose3cef2a92012-03-14 23:39:33 +01006757 if ${ac_cv_search_opendir+:} false; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00006758 break
Skip Montanaro89e975f2007-08-22 19:05:21 +00006759fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006760done
Matthias Klose3cef2a92012-03-14 23:39:33 +01006761if ${ac_cv_search_opendir+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006762
Martin v. Löwiseba40652007-08-30 20:10:57 +00006763else
6764 ac_cv_search_opendir=no
6765fi
6766rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006767LIBS=$ac_func_search_save_LIBS
6768fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006769{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
6770$as_echo "$ac_cv_search_opendir" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006771ac_res=$ac_cv_search_opendir
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006772if test "$ac_res" != no; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00006773 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00006774
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006775fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006776
Michael W. Hudson54241132001-12-07 15:38:26 +00006777else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006778 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
6779$as_echo_n "checking for library containing opendir... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01006780if ${ac_cv_search_opendir+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006781 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006782else
6783 ac_func_search_save_LIBS=$LIBS
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006784cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006785/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006786
Martin v. Löwiseba40652007-08-30 20:10:57 +00006787/* Override any GCC internal prototype to avoid an error.
6788 Use char because int might match the return type of a GCC
6789 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006790#ifdef __cplusplus
6791extern "C"
6792#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006793char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006794int
6795main ()
6796{
Martin v. Löwiseba40652007-08-30 20:10:57 +00006797return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006798 ;
6799 return 0;
6800}
6801_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00006802for ac_lib in '' x; do
6803 if test -z "$ac_lib"; then
6804 ac_res="none required"
6805 else
6806 ac_res=-l$ac_lib
Skip Montanaro89e975f2007-08-22 19:05:21 +00006807 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Martin v. Löwiseba40652007-08-30 20:10:57 +00006808 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006809 if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00006810 ac_cv_search_opendir=$ac_res
Brett Cannon19fab762007-06-02 03:02:29 +00006811fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006812rm -f core conftest.err conftest.$ac_objext \
6813 conftest$ac_exeext
Matthias Klose3cef2a92012-03-14 23:39:33 +01006814 if ${ac_cv_search_opendir+:} false; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00006815 break
Skip Montanaro89e975f2007-08-22 19:05:21 +00006816fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006817done
Matthias Klose3cef2a92012-03-14 23:39:33 +01006818if ${ac_cv_search_opendir+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006819
Martin v. Löwiseba40652007-08-30 20:10:57 +00006820else
6821 ac_cv_search_opendir=no
6822fi
6823rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006824LIBS=$ac_func_search_save_LIBS
6825fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006826{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
6827$as_echo "$ac_cv_search_opendir" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006828ac_res=$ac_cv_search_opendir
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006829if test "$ac_res" != no; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00006830 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00006831
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006832fi
6833
6834fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00006835
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006836{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5
6837$as_echo_n "checking whether sys/types.h defines makedev... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01006838if ${ac_cv_header_sys_types_h_makedev+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006839 $as_echo_n "(cached) " >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006840else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006841 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006842/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006843#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006844int
6845main ()
6846{
6847return makedev(0, 0);
6848 ;
6849 return 0;
6850}
6851_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006852if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006853 ac_cv_header_sys_types_h_makedev=yes
6854else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006855 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006856fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006857rm -f core conftest.err conftest.$ac_objext \
6858 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006859
6860fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006861{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_types_h_makedev" >&5
6862$as_echo "$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006863
6864if test $ac_cv_header_sys_types_h_makedev = no; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006865ac_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 +01006866if test "x$ac_cv_header_sys_mkdev_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006867
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006868$as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006869
6870fi
6871
6872
6873
6874 if test $ac_cv_header_sys_mkdev_h = no; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006875 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 +01006876if test "x$ac_cv_header_sys_sysmacros_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006877
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006878$as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006879
6880fi
6881
6882
6883 fi
6884fi
6885
Michael W. Hudson54241132001-12-07 15:38:26 +00006886
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006887# On Solaris, term.h requires curses.h
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006888for ac_header in term.h
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006889do :
6890 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "
Martin v. Löwis5d52e782004-09-18 10:07:03 +00006891#ifdef HAVE_CURSES_H
6892#include <curses.h>
6893#endif
6894
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006895"
Matthias Klose3cef2a92012-03-14 23:39:33 +01006896if test "x$ac_cv_header_term_h" = xyes; then :
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006897 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006898#define HAVE_TERM_H 1
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006899_ACEOF
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006900
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006901fi
6902
6903done
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006904
6905
Martin v. Löwis11017b12006-01-14 18:12:57 +00006906# On Linux, netlink.h requires asm/types.h
Martin v. Löwis11017b12006-01-14 18:12:57 +00006907for ac_header in linux/netlink.h
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006908do :
6909 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 +00006910#ifdef HAVE_ASM_TYPES_H
6911#include <asm/types.h>
6912#endif
6913#ifdef HAVE_SYS_SOCKET_H
6914#include <sys/socket.h>
6915#endif
6916
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006917"
Matthias Klose3cef2a92012-03-14 23:39:33 +01006918if test "x$ac_cv_header_linux_netlink_h" = xyes; then :
Martin v. Löwis11017b12006-01-14 18:12:57 +00006919 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006920#define HAVE_LINUX_NETLINK_H 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00006921_ACEOF
6922
6923fi
6924
6925done
6926
6927
Guido van Rossum627b2d71993-12-24 10:39:16 +00006928# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00006929was_it_defined=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006930{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_t in time.h" >&5
6931$as_echo_n "checking for clock_t in time.h... " >&6; }
6932cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006933/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006934#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006935
6936_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006937if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006938 $EGREP "clock_t" >/dev/null 2>&1; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +00006939 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006940else
Martin v. Löwis11437992002-04-12 09:54:03 +00006941
6942
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006943$as_echo "#define clock_t long" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00006944
Martin v. Löwisc45929e2002-04-06 10:10:49 +00006945
Guido van Rossum627b2d71993-12-24 10:39:16 +00006946fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00006947rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00006948
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006949{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
6950$as_echo "$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00006951
Neal Norwitz11690112002-07-30 01:08:28 +00006952# Check whether using makedev requires defining _OSF_SOURCE
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006953{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for makedev" >&5
6954$as_echo_n "checking for makedev... " >&6; }
6955cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006956/* end confdefs.h. */
Jesus Cea616de772010-04-28 10:32:30 +00006957
6958#if defined(MAJOR_IN_MKDEV)
6959#include <sys/mkdev.h>
6960#elif defined(MAJOR_IN_SYSMACROS)
6961#include <sys/sysmacros.h>
6962#else
Neal Norwitz6eb37f02003-02-23 23:28:15 +00006963#include <sys/types.h>
Jesus Cea616de772010-04-28 10:32:30 +00006964#endif
Neal Norwitz11690112002-07-30 01:08:28 +00006965int
6966main ()
6967{
6968 makedev(0, 0)
6969 ;
6970 return 0;
6971}
6972_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006973if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00006974 ac_cv_has_makedev=yes
6975else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006976 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006977fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006978rm -f core conftest.err conftest.$ac_objext \
6979 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00006980if test "$ac_cv_has_makedev" = "no"; then
6981 # we didn't link, try if _OSF_SOURCE will allow us to link
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006982 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006983/* end confdefs.h. */
Neal Norwitz11690112002-07-30 01:08:28 +00006984
Neal Norwitz6eb37f02003-02-23 23:28:15 +00006985#define _OSF_SOURCE 1
6986#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00006987
Neal Norwitz11690112002-07-30 01:08:28 +00006988int
6989main ()
6990{
6991 makedev(0, 0)
6992 ;
6993 return 0;
6994}
6995_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006996if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00006997 ac_cv_has_makedev=yes
6998else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006999 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00007000fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007001rm -f core conftest.err conftest.$ac_objext \
7002 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00007003 if test "$ac_cv_has_makedev" = "yes"; then
7004
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007005$as_echo "#define _OSF_SOURCE 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00007006
7007 fi
7008fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007009{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_makedev" >&5
7010$as_echo "$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00007011if test "$ac_cv_has_makedev" = "yes"; then
7012
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007013$as_echo "#define HAVE_MAKEDEV 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00007014
7015fi
7016
Martin v. Löwis399a6892002-10-04 10:22:02 +00007017# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
7018# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
7019# defined, but the compiler does not support pragma redefine_extname,
7020# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
7021# structures (such as rlimit64) without declaring them. As a
7022# work-around, disable LFS on such configurations
7023
7024use_lfs=yes
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007025{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Solaris LFS bug" >&5
7026$as_echo_n "checking Solaris LFS bug... " >&6; }
7027cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007028/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00007029
7030#define _LARGEFILE_SOURCE 1
7031#define _FILE_OFFSET_BITS 64
7032#include <sys/resource.h>
7033
Martin v. Löwis399a6892002-10-04 10:22:02 +00007034int
7035main ()
7036{
7037struct rlimit foo;
7038 ;
7039 return 0;
7040}
7041_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007042if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis399a6892002-10-04 10:22:02 +00007043 sol_lfs_bug=no
7044else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007045 sol_lfs_bug=yes
Martin v. Löwis399a6892002-10-04 10:22:02 +00007046fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007047rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007048{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $sol_lfs_bug" >&5
7049$as_echo "$sol_lfs_bug" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00007050if test "$sol_lfs_bug" = "yes"; then
7051 use_lfs=no
7052fi
7053
7054if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00007055# Two defines needed to enable largefile support on various platforms
7056# These may affect some typedefs
Georg Brandl94800df2011-02-25 11:09:02 +00007057case $ac_sys_system/$ac_sys_release in
7058AIX*)
7059
7060$as_echo "#define _LARGE_FILES 1" >>confdefs.h
7061
7062 ;;
7063esac
Guido van Rossum810cc512001-09-09 23:51:39 +00007064
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007065$as_echo "#define _LARGEFILE_SOURCE 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007066
7067
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007068$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
Guido van Rossum810cc512001-09-09 23:51:39 +00007069
Martin v. Löwis399a6892002-10-04 10:22:02 +00007070fi
Michael W. Hudson54241132001-12-07 15:38:26 +00007071
Guido van Rossum84e7b241996-08-19 21:59:00 +00007072# Add some code to confdefs.h so that the test for off_t works on SCO
7073cat >> confdefs.h <<\EOF
7074#if defined(SCO_DS)
7075#undef _OFF_T
7076#endif
7077EOF
7078
Guido van Rossumef2255b2000-03-10 22:30:29 +00007079# Type availability checks
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007080ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
Matthias Klose3cef2a92012-03-14 23:39:33 +01007081if test "x$ac_cv_type_mode_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007082
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007083else
Martin v. Löwis11437992002-04-12 09:54:03 +00007084
7085cat >>confdefs.h <<_ACEOF
7086#define mode_t int
7087_ACEOF
7088
7089fi
7090
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007091ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
Matthias Klose3cef2a92012-03-14 23:39:33 +01007092if test "x$ac_cv_type_off_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007093
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007094else
Martin v. Löwis11437992002-04-12 09:54:03 +00007095
7096cat >>confdefs.h <<_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00007097#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00007098_ACEOF
7099
7100fi
7101
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007102ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
Matthias Klose3cef2a92012-03-14 23:39:33 +01007103if test "x$ac_cv_type_pid_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007104
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007105else
Martin v. Löwis11437992002-04-12 09:54:03 +00007106
7107cat >>confdefs.h <<_ACEOF
7108#define pid_t int
7109_ACEOF
7110
7111fi
7112
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00007113
Martin v. Löwis11437992002-04-12 09:54:03 +00007114cat >>confdefs.h <<_ACEOF
Matthias Klosecbf54b12010-05-08 11:04:18 +00007115#define RETSIGTYPE void
Martin v. Löwis11437992002-04-12 09:54:03 +00007116_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00007117
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007118ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
Matthias Klose3cef2a92012-03-14 23:39:33 +01007119if test "x$ac_cv_type_size_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007120
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007121else
Martin v. Löwis11437992002-04-12 09:54:03 +00007122
7123cat >>confdefs.h <<_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00007124#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00007125_ACEOF
7126
7127fi
7128
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007129{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
7130$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007131if ${ac_cv_type_uid_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007132 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007133else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007134 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007135/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007136#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007137
7138_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007139if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007140 $EGREP "uid_t" >/dev/null 2>&1; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007141 ac_cv_type_uid_t=yes
7142else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007143 ac_cv_type_uid_t=no
7144fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00007145rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00007146
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007147fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007148{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
7149$as_echo "$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00007150if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007151
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007152$as_echo "#define uid_t int" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007153
7154
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007155$as_echo "#define gid_t int" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007156
7157fi
7158
Mark Dickinson17c50cd2012-12-02 13:13:56 +00007159
7160# There are two separate checks for each of the exact-width integer types we
7161# need. First we check whether the type is available using the usual
7162# AC_CHECK_TYPE macro with the default includes (which includes <inttypes.h>
7163# and <stdint.h> where available). We then also use the special type checks of
7164# the form AC_TYPE_UINT32_T, which in the case that uint32_t is not available
7165# directly, #define's uint32_t to be a suitable type.
7166
7167ac_fn_c_check_type "$LINENO" "uint32_t" "ac_cv_type_uint32_t" "$ac_includes_default"
7168if test "x$ac_cv_type_uint32_t" = xyes; then :
7169
7170$as_echo "#define HAVE_UINT32_T 1" >>confdefs.h
7171
7172fi
7173
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007174ac_fn_c_find_uintX_t "$LINENO" "32" "ac_cv_c_uint32_t"
7175case $ac_cv_c_uint32_t in #(
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007176 no|yes) ;; #(
7177 *)
7178
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007179$as_echo "#define _UINT32_T 1" >>confdefs.h
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007180
7181
7182cat >>confdefs.h <<_ACEOF
7183#define uint32_t $ac_cv_c_uint32_t
7184_ACEOF
7185;;
7186 esac
7187
Mark Dickinson17c50cd2012-12-02 13:13:56 +00007188
7189ac_fn_c_check_type "$LINENO" "uint64_t" "ac_cv_type_uint64_t" "$ac_includes_default"
7190if test "x$ac_cv_type_uint64_t" = xyes; then :
7191
7192$as_echo "#define HAVE_UINT64_T 1" >>confdefs.h
7193
7194fi
7195
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007196ac_fn_c_find_uintX_t "$LINENO" "64" "ac_cv_c_uint64_t"
7197case $ac_cv_c_uint64_t in #(
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007198 no|yes) ;; #(
7199 *)
7200
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007201$as_echo "#define _UINT64_T 1" >>confdefs.h
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007202
7203
7204cat >>confdefs.h <<_ACEOF
7205#define uint64_t $ac_cv_c_uint64_t
7206_ACEOF
7207;;
7208 esac
7209
Mark Dickinson17c50cd2012-12-02 13:13:56 +00007210
7211ac_fn_c_check_type "$LINENO" "int32_t" "ac_cv_type_int32_t" "$ac_includes_default"
7212if test "x$ac_cv_type_int32_t" = xyes; then :
7213
7214$as_echo "#define HAVE_INT32_T 1" >>confdefs.h
7215
7216fi
7217
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007218ac_fn_c_find_intX_t "$LINENO" "32" "ac_cv_c_int32_t"
7219case $ac_cv_c_int32_t in #(
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007220 no|yes) ;; #(
7221 *)
7222
7223cat >>confdefs.h <<_ACEOF
7224#define int32_t $ac_cv_c_int32_t
7225_ACEOF
7226;;
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007227esac
7228
Mark Dickinson17c50cd2012-12-02 13:13:56 +00007229
7230ac_fn_c_check_type "$LINENO" "int64_t" "ac_cv_type_int64_t" "$ac_includes_default"
7231if test "x$ac_cv_type_int64_t" = xyes; then :
7232
7233$as_echo "#define HAVE_INT64_T 1" >>confdefs.h
7234
7235fi
7236
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007237ac_fn_c_find_intX_t "$LINENO" "64" "ac_cv_c_int64_t"
7238case $ac_cv_c_int64_t in #(
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007239 no|yes) ;; #(
7240 *)
7241
7242cat >>confdefs.h <<_ACEOF
7243#define int64_t $ac_cv_c_int64_t
7244_ACEOF
7245;;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00007246esac
Martin v. Löwis18e16552006-02-15 17:27:45 +00007247
Mark Dickinson17c50cd2012-12-02 13:13:56 +00007248
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007249ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
Matthias Klose3cef2a92012-03-14 23:39:33 +01007250if test "x$ac_cv_type_ssize_t" = xyes; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00007251
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007252$as_echo "#define HAVE_SSIZE_T 1" >>confdefs.h
Martin v. Löwis18e16552006-02-15 17:27:45 +00007253
7254fi
7255
Jack Jansendd19cf82001-12-06 22:36:17 +00007256
Michael W. Hudson54241132001-12-07 15:38:26 +00007257# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00007258# ANSI C requires sizeof(char) == 1, so no need to check it
Martin v. Löwiseba40652007-08-30 20:10:57 +00007259# The cast to long int works around a bug in the HP C Compiler
7260# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7261# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7262# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007263{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
7264$as_echo_n "checking size of int... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007265if ${ac_cv_sizeof_int+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007266 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007267else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007268 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 +00007269
Martin v. Löwis11437992002-04-12 09:54:03 +00007270else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007271 if test "$ac_cv_type_int" = yes; then
7272 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7273$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007274as_fn_error 77 "cannot compute sizeof (int)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007275See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007276 else
7277 ac_cv_sizeof_int=0
7278 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007279fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007280
Martin v. Löwis11437992002-04-12 09:54:03 +00007281fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007282{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
7283$as_echo "$ac_cv_sizeof_int" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007284
7285
7286
Martin v. Löwis11437992002-04-12 09:54:03 +00007287cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007288#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00007289_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007290
7291
Martin v. Löwiseba40652007-08-30 20:10:57 +00007292# The cast to long int works around a bug in the HP C Compiler
7293# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7294# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7295# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007296{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
7297$as_echo_n "checking size of long... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007298if ${ac_cv_sizeof_long+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007299 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007300else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007301 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 +00007302
Martin v. Löwis11437992002-04-12 09:54:03 +00007303else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007304 if test "$ac_cv_type_long" = yes; then
7305 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7306$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007307as_fn_error 77 "cannot compute sizeof (long)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007308See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007309 else
7310 ac_cv_sizeof_long=0
7311 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007312fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007313
Martin v. Löwis11437992002-04-12 09:54:03 +00007314fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007315{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
7316$as_echo "$ac_cv_sizeof_long" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007317
7318
7319
Martin v. Löwis11437992002-04-12 09:54:03 +00007320cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007321#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00007322_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007323
7324
Martin v. Löwiseba40652007-08-30 20:10:57 +00007325# The cast to long int works around a bug in the HP C Compiler
7326# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7327# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7328# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007329{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
7330$as_echo_n "checking size of void *... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007331if ${ac_cv_sizeof_void_p+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007332 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007333else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007334 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 +00007335
Martin v. Löwis11437992002-04-12 09:54:03 +00007336else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007337 if test "$ac_cv_type_void_p" = yes; then
7338 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7339$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007340as_fn_error 77 "cannot compute sizeof (void *)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007341See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007342 else
7343 ac_cv_sizeof_void_p=0
7344 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007345fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007346
Martin v. Löwis11437992002-04-12 09:54:03 +00007347fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007348{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
7349$as_echo "$ac_cv_sizeof_void_p" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007350
7351
7352
Martin v. Löwis11437992002-04-12 09:54:03 +00007353cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00007354#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00007355_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00007356
7357
Martin v. Löwiseba40652007-08-30 20:10:57 +00007358# The cast to long int works around a bug in the HP C Compiler
7359# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7360# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7361# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007362{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
7363$as_echo_n "checking size of short... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007364if ${ac_cv_sizeof_short+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007365 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007366else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007367 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 +00007368
Martin v. Löwis11437992002-04-12 09:54:03 +00007369else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007370 if test "$ac_cv_type_short" = yes; then
7371 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7372$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007373as_fn_error 77 "cannot compute sizeof (short)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007374See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007375 else
7376 ac_cv_sizeof_short=0
7377 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007378fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007379
Martin v. Löwis11437992002-04-12 09:54:03 +00007380fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007381{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
7382$as_echo "$ac_cv_sizeof_short" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007383
7384
7385
Martin v. Löwis11437992002-04-12 09:54:03 +00007386cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007387#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00007388_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007389
7390
Martin v. Löwiseba40652007-08-30 20:10:57 +00007391# The cast to long int works around a bug in the HP C Compiler
7392# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7393# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7394# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007395{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of float" >&5
7396$as_echo_n "checking size of float... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007397if ${ac_cv_sizeof_float+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007398 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007399else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007400 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 +00007401
Martin v. Löwis11437992002-04-12 09:54:03 +00007402else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007403 if test "$ac_cv_type_float" = yes; then
7404 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7405$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007406as_fn_error 77 "cannot compute sizeof (float)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007407See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007408 else
7409 ac_cv_sizeof_float=0
7410 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007411fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007412
Martin v. Löwis11437992002-04-12 09:54:03 +00007413fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007414{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_float" >&5
7415$as_echo "$ac_cv_sizeof_float" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007416
7417
7418
Martin v. Löwis11437992002-04-12 09:54:03 +00007419cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007420#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00007421_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007422
7423
Martin v. Löwiseba40652007-08-30 20:10:57 +00007424# The cast to long int works around a bug in the HP C Compiler
7425# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7426# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7427# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007428{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of double" >&5
7429$as_echo_n "checking size of double... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007430if ${ac_cv_sizeof_double+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007431 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007432else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007433 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 +00007434
Martin v. Löwis11437992002-04-12 09:54:03 +00007435else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007436 if test "$ac_cv_type_double" = yes; then
7437 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7438$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007439as_fn_error 77 "cannot compute sizeof (double)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007440See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007441 else
7442 ac_cv_sizeof_double=0
7443 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007444fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007445
Martin v. Löwis11437992002-04-12 09:54:03 +00007446fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007447{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5
7448$as_echo "$ac_cv_sizeof_double" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007449
7450
7451
Martin v. Löwis11437992002-04-12 09:54:03 +00007452cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007453#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00007454_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007455
7456
Martin v. Löwiseba40652007-08-30 20:10:57 +00007457# The cast to long int works around a bug in the HP C Compiler
7458# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7459# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7460# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007461{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of fpos_t" >&5
7462$as_echo_n "checking size of fpos_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007463if ${ac_cv_sizeof_fpos_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007464 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007465else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007466 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 +00007467
Martin v. Löwis11437992002-04-12 09:54:03 +00007468else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007469 if test "$ac_cv_type_fpos_t" = yes; then
7470 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7471$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007472as_fn_error 77 "cannot compute sizeof (fpos_t)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007473See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007474 else
7475 ac_cv_sizeof_fpos_t=0
7476 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007477fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007478
Martin v. Löwis11437992002-04-12 09:54:03 +00007479fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007480{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_fpos_t" >&5
7481$as_echo "$ac_cv_sizeof_fpos_t" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007482
7483
7484
Martin v. Löwis11437992002-04-12 09:54:03 +00007485cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007486#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007487_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007488
Michael W. Hudson54241132001-12-07 15:38:26 +00007489
Martin v. Löwiseba40652007-08-30 20:10:57 +00007490# The cast to long int works around a bug in the HP C Compiler
7491# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7492# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7493# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007494{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
7495$as_echo_n "checking size of size_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007496if ${ac_cv_sizeof_size_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007497 $as_echo_n "(cached) " >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00007498else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007499 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 +00007500
Martin v. Löwis18e16552006-02-15 17:27:45 +00007501else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007502 if test "$ac_cv_type_size_t" = yes; then
7503 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7504$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007505as_fn_error 77 "cannot compute sizeof (size_t)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007506See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007507 else
7508 ac_cv_sizeof_size_t=0
7509 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +00007510fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007511
Martin v. Löwis18e16552006-02-15 17:27:45 +00007512fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007513{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
7514$as_echo "$ac_cv_sizeof_size_t" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007515
7516
7517
Martin v. Löwis18e16552006-02-15 17:27:45 +00007518cat >>confdefs.h <<_ACEOF
7519#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
7520_ACEOF
7521
7522
Christian Heimes951cc0f2008-01-31 23:08:23 +00007523# The cast to long int works around a bug in the HP C Compiler
7524# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7525# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7526# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007527{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pid_t" >&5
7528$as_echo_n "checking size of pid_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007529if ${ac_cv_sizeof_pid_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007530 $as_echo_n "(cached) " >&6
Christian Heimes951cc0f2008-01-31 23:08:23 +00007531else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007532 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 +00007533
Christian Heimes951cc0f2008-01-31 23:08:23 +00007534else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007535 if test "$ac_cv_type_pid_t" = yes; then
7536 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7537$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007538as_fn_error 77 "cannot compute sizeof (pid_t)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007539See \`config.log' for more details" "$LINENO" 5; }
Christian Heimes951cc0f2008-01-31 23:08:23 +00007540 else
7541 ac_cv_sizeof_pid_t=0
7542 fi
7543fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007544
Christian Heimes951cc0f2008-01-31 23:08:23 +00007545fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007546{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pid_t" >&5
7547$as_echo "$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes951cc0f2008-01-31 23:08:23 +00007548
7549
7550
7551cat >>confdefs.h <<_ACEOF
7552#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
7553_ACEOF
7554
7555
Michael W. Hudson54241132001-12-07 15:38:26 +00007556
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007557{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support" >&5
7558$as_echo_n "checking for long long support... " >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007559have_long_long=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007560cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007561/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007562
Martin v. Löwis11437992002-04-12 09:54:03 +00007563int
7564main ()
7565{
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007566long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007567 ;
7568 return 0;
7569}
7570_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007571if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007572
7573
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007574$as_echo "#define HAVE_LONG_LONG 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007575
Martin v. Löwisc45929e2002-04-06 10:10:49 +00007576 have_long_long=yes
7577
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007578fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007579rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007580{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_long" >&5
7581$as_echo "$have_long_long" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +00007582if test "$have_long_long" = yes ; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00007583# The cast to long int works around a bug in the HP C Compiler
7584# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7585# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7586# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007587{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
7588$as_echo_n "checking size of long long... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007589if ${ac_cv_sizeof_long_long+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007590 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007591else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007592 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 +00007593
Martin v. Löwis11437992002-04-12 09:54:03 +00007594else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007595 if test "$ac_cv_type_long_long" = yes; then
7596 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7597$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007598as_fn_error 77 "cannot compute sizeof (long long)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007599See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007600 else
7601 ac_cv_sizeof_long_long=0
7602 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007603fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007604
Martin v. Löwis11437992002-04-12 09:54:03 +00007605fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007606{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
7607$as_echo "$ac_cv_sizeof_long_long" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007608
7609
7610
Martin v. Löwis11437992002-04-12 09:54:03 +00007611cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007612#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +00007613_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007614
Michael W. Hudson54241132001-12-07 15:38:26 +00007615
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007616fi
7617
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007618{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support" >&5
7619$as_echo_n "checking for long double support... " >&6; }
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007620have_long_double=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007621cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007622/* end confdefs.h. */
7623
7624int
7625main ()
7626{
Matthias Klosec511b472010-05-08 11:01:39 +00007627long double x; x = (long double)0;
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007628 ;
7629 return 0;
7630}
7631_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007632if ac_fn_c_try_compile "$LINENO"; then :
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007633
7634
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007635$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007636
7637 have_long_double=yes
7638
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007639fi
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007640rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007641{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_double" >&5
7642$as_echo "$have_long_double" >&6; }
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007643if test "$have_long_double" = yes ; then
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007644# The cast to long int works around a bug in the HP C Compiler
7645# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7646# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7647# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007648{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long double" >&5
7649$as_echo_n "checking size of long double... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007650if ${ac_cv_sizeof_long_double+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007651 $as_echo_n "(cached) " >&6
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007652else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007653 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 +00007654
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007655else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007656 if test "$ac_cv_type_long_double" = yes; then
7657 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7658$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007659as_fn_error 77 "cannot compute sizeof (long double)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007660See \`config.log' for more details" "$LINENO" 5; }
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007661 else
7662 ac_cv_sizeof_long_double=0
7663 fi
7664fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007665
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007666fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007667{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double" >&5
7668$as_echo "$ac_cv_sizeof_long_double" >&6; }
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007669
7670
7671
7672cat >>confdefs.h <<_ACEOF
7673#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
7674_ACEOF
7675
7676
7677fi
7678
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007679{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _Bool support" >&5
7680$as_echo_n "checking for _Bool support... " >&6; }
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007681have_c99_bool=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007682cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007683/* end confdefs.h. */
7684
7685int
7686main ()
7687{
7688_Bool x; x = (_Bool)0;
7689 ;
7690 return 0;
7691}
7692_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007693if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007694
7695
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007696$as_echo "#define HAVE_C99_BOOL 1" >>confdefs.h
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007697
7698 have_c99_bool=yes
7699
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007700fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007701rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007702{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_c99_bool" >&5
7703$as_echo "$have_c99_bool" >&6; }
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007704if test "$have_c99_bool" = yes ; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00007705# The cast to long int works around a bug in the HP C Compiler
7706# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7707# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7708# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007709{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of _Bool" >&5
7710$as_echo_n "checking size of _Bool... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007711if ${ac_cv_sizeof__Bool+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007712 $as_echo_n "(cached) " >&6
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007713else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007714 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 +00007715
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007716else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007717 if test "$ac_cv_type__Bool" = yes; then
7718 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7719$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007720as_fn_error 77 "cannot compute sizeof (_Bool)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007721See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007722 else
7723 ac_cv_sizeof__Bool=0
7724 fi
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007725fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007726
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007727fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007728{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof__Bool" >&5
7729$as_echo "$ac_cv_sizeof__Bool" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007730
7731
7732
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007733cat >>confdefs.h <<_ACEOF
7734#define SIZEOF__BOOL $ac_cv_sizeof__Bool
7735_ACEOF
7736
7737
7738fi
7739
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007740ac_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 +00007741 #include <stdint.h>
7742 #endif
Antoine Pitrou7be5a652010-10-10 08:14:41 +00007743 #ifdef HAVE_INTTYPES_H
7744 #include <inttypes.h>
7745 #endif
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007746"
Matthias Klose3cef2a92012-03-14 23:39:33 +01007747if test "x$ac_cv_type_uintptr_t" = xyes; then :
Martin v. Löwisebe26702006-10-02 14:55:51 +00007748
7749cat >>confdefs.h <<_ACEOF
7750#define HAVE_UINTPTR_T 1
7751_ACEOF
7752
Martin v. Löwiseba40652007-08-30 20:10:57 +00007753# The cast to long int works around a bug in the HP C Compiler
7754# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7755# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7756# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007757{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of uintptr_t" >&5
7758$as_echo_n "checking size of uintptr_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007759if ${ac_cv_sizeof_uintptr_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007760 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007761else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007762 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 +00007763
Martin v. Löwis11437992002-04-12 09:54:03 +00007764else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007765 if test "$ac_cv_type_uintptr_t" = yes; then
7766 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7767$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007768as_fn_error 77 "cannot compute sizeof (uintptr_t)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007769See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007770 else
7771 ac_cv_sizeof_uintptr_t=0
7772 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007773fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007774
Martin v. Löwis11437992002-04-12 09:54:03 +00007775fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007776{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uintptr_t" >&5
7777$as_echo "$ac_cv_sizeof_uintptr_t" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007778
7779
7780
Martin v. Löwis11437992002-04-12 09:54:03 +00007781cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007782#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007783_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007784
Michael W. Hudson54241132001-12-07 15:38:26 +00007785
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007786fi
7787
Martin v. Löwisebe26702006-10-02 14:55:51 +00007788
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007789# The cast to long int works around a bug in the HP C Compiler
7790# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7791# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7792# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007793{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
7794$as_echo_n "checking size of off_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007795if ${ac_cv_sizeof_off_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007796 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007797else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007798 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007799#ifdef HAVE_SYS_TYPES_H
7800#include <sys/types.h>
7801#endif
7802
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007803"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007804
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007805else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007806 if test "$ac_cv_type_off_t" = yes; then
7807 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7808$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007809as_fn_error 77 "cannot compute sizeof (off_t)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007810See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007811 else
7812 ac_cv_sizeof_off_t=0
7813 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007814fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007815
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007816fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007817{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
7818$as_echo "$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007819
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007820
7821
Martin v. Löwis11437992002-04-12 09:54:03 +00007822cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007823#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007824_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007825
Michael W. Hudson54241132001-12-07 15:38:26 +00007826
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007827
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007828{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable large file support" >&5
7829$as_echo_n "checking whether to enable large file support... " >&6; }
Mark Dickinson0ef0b912009-12-31 21:11:48 +00007830if test "$have_long_long" = yes
7831then
7832if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +00007833 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007834
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007835$as_echo "#define HAVE_LARGEFILE_SUPPORT 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007836
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007837 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7838$as_echo "yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007839else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007840 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7841$as_echo "no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007842fi
Mark Dickinson0ef0b912009-12-31 21:11:48 +00007843else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007844 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7845$as_echo "no" >&6; }
Mark Dickinson0ef0b912009-12-31 21:11:48 +00007846fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007847
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007848# The cast to long int works around a bug in the HP C Compiler
7849# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7850# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7851# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007852{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
7853$as_echo_n "checking size of time_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007854if ${ac_cv_sizeof_time_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007855 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007856else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007857 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007858#ifdef HAVE_SYS_TYPES_H
7859#include <sys/types.h>
7860#endif
7861#ifdef HAVE_TIME_H
7862#include <time.h>
7863#endif
7864
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007865"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007866
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007867else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007868 if test "$ac_cv_type_time_t" = yes; then
7869 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7870$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007871as_fn_error 77 "cannot compute sizeof (time_t)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007872See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007873 else
7874 ac_cv_sizeof_time_t=0
7875 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007876fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007877
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007878fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007879{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
7880$as_echo "$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007881
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007882
7883
Martin v. Löwis11437992002-04-12 09:54:03 +00007884cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007885#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007886_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007887
Michael W. Hudson54241132001-12-07 15:38:26 +00007888
7889
Trent Mick635f6fb2000-08-23 21:33:05 +00007890# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00007891ac_save_cc="$CC"
7892if test "$ac_cv_kpthread" = "yes"
7893then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00007894elif test "$ac_cv_kthread" = "yes"
7895then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00007896elif test "$ac_cv_pthread" = "yes"
7897then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00007898fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007899{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_t" >&5
7900$as_echo_n "checking for pthread_t... " >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00007901have_pthread_t=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007902cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007903/* end confdefs.h. */
Matthias Klosec511b472010-05-08 11:01:39 +00007904
7905 #include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007906int
7907main ()
7908{
Guido van Rossum12580492000-09-24 16:47:19 +00007909pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007910 ;
7911 return 0;
7912}
Matthias Klosec511b472010-05-08 11:01:39 +00007913
Martin v. Löwis11437992002-04-12 09:54:03 +00007914_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007915if ac_fn_c_try_compile "$LINENO"; then :
Trent Mick635f6fb2000-08-23 21:33:05 +00007916 have_pthread_t=yes
Trent Mick635f6fb2000-08-23 21:33:05 +00007917fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007918rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007919{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_pthread_t" >&5
7920$as_echo "$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00007921if test "$have_pthread_t" = yes ; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007922 # The cast to long int works around a bug in the HP C Compiler
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007923# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7924# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7925# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007926{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
7927$as_echo_n "checking size of pthread_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007928if ${ac_cv_sizeof_pthread_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007929 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007930else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007931 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t" "
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007932#ifdef HAVE_PTHREAD_H
7933#include <pthread.h>
7934#endif
7935
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007936"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007937
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007938else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007939 if test "$ac_cv_type_pthread_t" = yes; then
7940 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7941$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007942as_fn_error 77 "cannot compute sizeof (pthread_t)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007943See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007944 else
7945 ac_cv_sizeof_pthread_t=0
7946 fi
Trent Mick635f6fb2000-08-23 21:33:05 +00007947fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007948
Trent Mick635f6fb2000-08-23 21:33:05 +00007949fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007950{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
7951$as_echo "$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007952
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007953
7954
Martin v. Löwis11437992002-04-12 09:54:03 +00007955cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00007956#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007957_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00007958
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007959
Trent Mick635f6fb2000-08-23 21:33:05 +00007960fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00007961CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00007962
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007963{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-toolbox-glue" >&5
7964$as_echo_n "checking for --enable-toolbox-glue... " >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007965# Check whether --enable-toolbox-glue was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007966if test "${enable_toolbox_glue+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00007967 enableval=$enable_toolbox_glue;
7968fi
Jack Jansene578a632001-08-15 01:27:14 +00007969
7970
7971if test -z "$enable_toolbox_glue"
Martin v. Löwis11437992002-04-12 09:54:03 +00007972then
Jack Jansene578a632001-08-15 01:27:14 +00007973 case $ac_sys_system/$ac_sys_release in
7974 Darwin/*)
7975 enable_toolbox_glue="yes";;
7976 *)
7977 enable_toolbox_glue="no";;
7978 esac
7979fi
7980case "$enable_toolbox_glue" in
7981yes)
Jack Jansene578a632001-08-15 01:27:14 +00007982 extra_machdep_objs="Python/mactoolboxglue.o"
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00007983 extra_undefs="-u _PyMac_Error"
Martin v. Löwis11437992002-04-12 09:54:03 +00007984
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007985$as_echo "#define USE_TOOLBOX_OBJECT_GLUE 1" >>confdefs.h
Jack Jansene578a632001-08-15 01:27:14 +00007986
7987 ;;
7988*)
Jack Jansene578a632001-08-15 01:27:14 +00007989 extra_machdep_objs=""
Jack Jansen591cbed2001-08-15 13:55:15 +00007990 extra_undefs=""
Jack Jansene578a632001-08-15 01:27:14 +00007991 ;;
7992esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007993{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_toolbox_glue" >&5
7994$as_echo "$enable_toolbox_glue" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00007995
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007996
Ronald Oussoren0d236eb2008-06-06 21:31:33 +00007997
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007998case $ac_sys_system/$ac_sys_release in
Anthony Baxter82201742006-04-09 15:07:40 +00007999 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008000 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
8001 ;;
8002 Darwin/*)
8003 OTHER_LIBTOOL_OPT=""
8004 ;;
8005esac
8006
8007
Ronald Oussoren25967582009-09-06 10:00:26 +00008008
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008009case $ac_sys_system/$ac_sys_release in
Anthony Baxter82201742006-04-09 15:07:40 +00008010 Darwin/[01567]\..*)
Ronald Oussoren988117f2006-04-29 11:31:35 +00008011 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
8012 if test "${enable_universalsdk}"; then
8013 :
8014 else
Ronald Oussorenbc0e83c2010-02-11 13:26:54 +00008015 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Ronald Oussoren988117f2006-04-29 11:31:35 +00008016 fi
Jack Jansenb36687a2004-07-16 08:43:47 +00008017 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00008018 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00008019 Darwin/*)
Ronald Oussorena55af9a2010-01-17 16:25:57 +00008020 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008021 if test ${gcc_version} '<' 4.0
8022 then
8023 LIBTOOL_CRUFT="-lcc_dynamic"
8024 else
8025 LIBTOOL_CRUFT=""
8026 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008027 if test "$cross_compiling" = yes; then :
Ronald Oussoren23d92532009-09-07 06:12:00 +00008028 ac_osx_32bit=yes
Ronald Oussoren25967582009-09-06 10:00:26 +00008029else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008030 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren25967582009-09-06 10:00:26 +00008031/* end confdefs.h. */
Ronald Oussoren23d92532009-09-07 06:12:00 +00008032
Ronald Oussoren25967582009-09-06 10:00:26 +00008033 #include <unistd.h>
8034 int main(int argc, char*argv[])
8035 {
8036 if (sizeof(long) == 4) {
8037 return 0;
8038 } else {
8039 return 1;
8040 }
Ronald Oussoren84ddd722009-09-08 07:17:10 +00008041 }
Ronald Oussoren23d92532009-09-07 06:12:00 +00008042
Ronald Oussoren25967582009-09-06 10:00:26 +00008043_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008044if ac_fn_c_try_run "$LINENO"; then :
Ronald Oussoren25967582009-09-06 10:00:26 +00008045 ac_osx_32bit=yes
8046else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008047 ac_osx_32bit=no
Ronald Oussoren25967582009-09-06 10:00:26 +00008048fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008049rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8050 conftest.$ac_objext conftest.beam conftest.$ac_ext
Ronald Oussoren25967582009-09-06 10:00:26 +00008051fi
8052
8053
Ronald Oussoren25967582009-09-06 10:00:26 +00008054 if test "${ac_osx_32bit}" = "yes"; then
Ronald Oussorenbc0e83c2010-02-11 13:26:54 +00008055 case `/usr/bin/arch` in
Ronald Oussoren25967582009-09-06 10:00:26 +00008056 i386)
8057 MACOSX_DEFAULT_ARCH="i386"
8058 ;;
8059 ppc)
8060 MACOSX_DEFAULT_ARCH="ppc"
8061 ;;
8062 *)
Georg Brandl71f4fbb2011-02-25 11:04:50 +00008063 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren25967582009-09-06 10:00:26 +00008064 ;;
8065 esac
8066 else
Ronald Oussorenbc0e83c2010-02-11 13:26:54 +00008067 case `/usr/bin/arch` in
Ronald Oussoren25967582009-09-06 10:00:26 +00008068 i386)
8069 MACOSX_DEFAULT_ARCH="x86_64"
8070 ;;
8071 ppc)
8072 MACOSX_DEFAULT_ARCH="ppc64"
8073 ;;
8074 *)
Georg Brandl71f4fbb2011-02-25 11:04:50 +00008075 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren25967582009-09-06 10:00:26 +00008076 ;;
8077 esac
8078
8079 #ARCH_RUN_32BIT="true"
8080 fi
8081
8082 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +00008083 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00008084 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008085esac
8086
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008087{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-framework" >&5
8088$as_echo_n "checking for --enable-framework... " >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00008089if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008090then
Skip Montanarodecc6a42003-01-01 20:07:49 +00008091 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00008092 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00008093 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008094
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008095$as_echo "#define WITH_NEXT_FRAMEWORK 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008096
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008097 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8098$as_echo "yes" >&6; }
Ronald Oussoren450d5612009-06-08 21:12:41 +00008099 if test $enable_shared = "yes"
8100 then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00008101 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 +00008102 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008103else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008104 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8105$as_echo "no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008106fi
8107
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008108{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dyld" >&5
8109$as_echo_n "checking for dyld... " >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008110case $ac_sys_system/$ac_sys_release in
8111 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008112
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008113$as_echo "#define WITH_DYLD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008114
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008115 { $as_echo "$as_me:${as_lineno-$LINENO}: result: always on for Darwin" >&5
8116$as_echo "always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008117 ;;
8118 *)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008119 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8120$as_echo "no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00008121 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008122esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008123
Guido van Rossum0a516c91994-09-12 10:58:40 +00008124# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00008125
Michael W. Hudson54241132001-12-07 15:38:26 +00008126
8127
8128
8129
Ronald Oussoren75912852010-04-08 08:13:31 +00008130
Guido van Rossum0a516c91994-09-12 10:58:40 +00008131# SO is the extension of shared libraries `(including the dot!)
Guido van Rossumaef734b2001-01-10 21:09:12 +00008132# -- usually .so, .sl on HP-UX, .dll on Cygwin
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008133{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SO" >&5
8134$as_echo_n "checking SO... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008135if test -z "$SO"
8136then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008137 case $ac_sys_system in
Neal Norwitz58e28882006-05-19 07:00:58 +00008138 hp*|HP*)
8139 case `uname -m` in
8140 ia64) SO=.so;;
8141 *) SO=.sl;;
8142 esac
8143 ;;
Guido van Rossumaef734b2001-01-10 21:09:12 +00008144 CYGWIN*) SO=.dll;;
Guido van Rossum563e7081996-09-10 18:20:48 +00008145 *) SO=.so;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008146 esac
Martin v. Löwis368de8f2003-06-14 14:46:38 +00008147else
8148 # this might also be a termcap variable, see #610332
8149 echo
8150 echo '====================================================================='
8151 echo '+ +'
8152 echo '+ WARNING: You have set SO in your environment. +'
8153 echo '+ Do you really mean to change the extension for shared libraries? +'
8154 echo '+ Continuing in 10 seconds to let you to ponder. +'
8155 echo '+ +'
8156 echo '====================================================================='
8157 sleep 10
Guido van Rossum0a516c91994-09-12 10:58:40 +00008158fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008159{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SO" >&5
8160$as_echo "$SO" >&6; }
Neal Norwitz58e28882006-05-19 07:00:58 +00008161
Ronald Oussoren79f90492009-01-02 10:44:46 +00008162
Neal Norwitz58e28882006-05-19 07:00:58 +00008163cat >>confdefs.h <<_ACEOF
8164#define SHLIB_EXT "$SO"
8165_ACEOF
8166
Guido van Rossum0a516c91994-09-12 10:58:40 +00008167# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +00008168# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008169# (Shared libraries in this instance are shared modules to be loaded into
8170# Python, as opposed to building Python itself as a shared library.)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008171{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDSHARED" >&5
8172$as_echo_n "checking LDSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008173if test -z "$LDSHARED"
8174then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008175 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008176 AIX*)
Georg Brandl71f4fbb2011-02-25 11:04:50 +00008177 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:\$(srcdir)/Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +00008178 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008179 ;;
8180 BeOS*)
8181 BLDSHARED="\$(srcdir)/Modules/ld_so_beos $LDLIBRARY"
Guido van Rossumce608b02001-09-28 15:59:38 +00008182 LDSHARED="\$(BINLIBDEST)/config/ld_so_beos \$(LIBDIR)/$LDLIBRARY"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008183 ;;
Guido van Rossum07397971997-04-29 21:49:50 +00008184 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00008185 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +00008186 SunOS/5*)
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='$(CC) -G'
8192 LDCXXSHARED='$(CXX) -G'
Greg Ward57c9a662000-05-26 12:22:54 +00008193 fi ;;
Thomas Hellerdc96a772008-04-04 10:07:55 +00008194 hp*|HP*)
Ronald Oussoren75912852010-04-08 08:13:31 +00008195 if test "$GCC" = "yes" ; then
8196 LDSHARED='$(CC) -shared'
8197 LDCXXSHARED='$(CXX) -shared'
8198 else
8199 LDSHARED='ld -b'
Thomas Hellerdc96a772008-04-04 10:07:55 +00008200 fi ;;
Guido van Rossumda88dad1995-01-26 00:46:29 +00008201 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
Jack Jansen418c3b12001-11-14 10:59:57 +00008202 Darwin/1.3*)
Stefan Krah3a3e2032010-11-28 15:30:05 +00008203 LDSHARED='$(CC) -bundle'
8204 LDCXXSHARED='$(CXX) -bundle'
Jack Jansena3891ea2001-09-07 14:25:12 +00008205 if test "$enable_framework" ; then
8206 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00008207 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
8208 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Ronald Oussoren75912852010-04-08 08:13:31 +00008209 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00008210 else
8211 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00008212 LDSHARED="$LDSHARED -undefined suppress"
Ronald Oussoren75912852010-04-08 08:13:31 +00008213 LDCXXSHARED="$LDCXXSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00008214 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00008215 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Stefan Krah3a3e2032010-11-28 15:30:05 +00008216 LDSHARED='$(CC) -bundle'
8217 LDCXXSHARED='$(CXX) -bundle'
Jack Jansene578a632001-08-15 01:27:14 +00008218 if test "$enable_framework" ; then
8219 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00008220 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
8221 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Ronald Oussoren75912852010-04-08 08:13:31 +00008222 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00008223 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00008224 # No framework, use the Python app as bundle-loader
8225 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00008226 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Ronald Oussoren75912852010-04-08 08:13:31 +00008227 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008228 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00008229 Darwin/*)
8230 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
8231 # This allows an extension to be used in any Python
Ronald Oussoren38f1b982007-09-02 09:46:07 +00008232
Ronald Oussoren5640ce22008-06-05 12:58:24 +00008233 if test ${MACOSX_DEPLOYMENT_TARGET} '>' 10.2
Jack Jansen6b08a402004-06-03 12:41:45 +00008234 then
Ronald Oussoren988117f2006-04-29 11:31:35 +00008235 if test "${enable_universalsdk}"; then
Ronald Oussoren5640ce22008-06-05 12:58:24 +00008236 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Ronald Oussoren988117f2006-04-29 11:31:35 +00008237 fi
Stefan Krah3a3e2032010-11-28 15:30:05 +00008238 LDSHARED='$(CC) -bundle -undefined dynamic_lookup'
8239 LDCXXSHARED='$(CXX) -bundle -undefined dynamic_lookup'
Jack Jansen6b08a402004-06-03 12:41:45 +00008240 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +00008241 else
Stefan Krah3a3e2032010-11-28 15:30:05 +00008242 LDSHARED='$(CC) -bundle'
8243 LDCXXSHARED='$(CXX) -bundle'
Jack Jansen6b08a402004-06-03 12:41:45 +00008244 if test "$enable_framework" ; then
8245 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00008246 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
8247 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Ronald Oussoren75912852010-04-08 08:13:31 +00008248 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +00008249 else
8250 # No framework, use the Python app as bundle-loader
8251 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
8252 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Ronald Oussoren75912852010-04-08 08:13:31 +00008253 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Jack Jansen6b08a402004-06-03 12:41:45 +00008254 fi
8255 fi
8256 ;;
Ronald Oussoren75912852010-04-08 08:13:31 +00008257 Linux*|GNU*|QNX*)
8258 LDSHARED='$(CC) -shared'
8259 LDCXXSHARED='$(CXX) -shared';;
8260 BSD/OS*/4*)
8261 LDSHARED="gcc -shared"
8262 LDCXXSHARED="g++ -shared";;
Martin v. Löwis222c5152006-06-03 07:37:13 +00008263 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00008264 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00008265 then
Stefan Krah3a3e2032010-11-28 15:30:05 +00008266 LDSHARED='$(CC) -shared'
8267 LDCXXSHARED='$(CXX) -shared'
Guido van Rossum0286ae82000-08-29 15:06:49 +00008268 else
Stefan Krah3a3e2032010-11-28 15:30:05 +00008269 LDSHARED="ld -Bshareable"
Guido van Rossum0286ae82000-08-29 15:06:49 +00008270 fi;;
Martin v. Löwis222c5152006-06-03 07:37:13 +00008271 OpenBSD*)
8272 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
8273 then
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 else
8277 case `uname -r` in
8278 [01].* | 2.[0-7] | 2.[0-7].*)
8279 LDSHARED="ld -Bshareable ${LDFLAGS}"
8280 ;;
8281 *)
Stefan Krah3a3e2032010-11-28 15:30:05 +00008282 LDSHARED='$(CC) -shared $(CCSHARED)'
8283 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Martin v. Löwis222c5152006-06-03 07:37:13 +00008284 ;;
8285 esac
8286 fi;;
Ronald Oussoren75912852010-04-08 08:13:31 +00008287 NetBSD*|DragonFly*)
Antoine Pitroucb402772011-01-02 20:51:34 +00008288 LDSHARED='$(CC) -shared'
8289 LDCXXSHARED='$(CXX) -shared';;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00008290 OpenUNIX*|UnixWare*)
Ronald Oussoren75912852010-04-08 08:13:31 +00008291 if test "$GCC" = "yes" ; then
8292 LDSHARED='$(CC) -shared'
8293 LDCXXSHARED='$(CXX) -shared'
8294 else
8295 LDSHARED='$(CC) -G'
8296 LDCXXSHARED='$(CXX) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00008297 fi;;
Ronald Oussoren75912852010-04-08 08:13:31 +00008298 SCO_SV*)
8299 LDSHARED='$(CC) -Wl,-G,-Bexport'
8300 LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
8301 CYGWIN*)
8302 LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
8303 LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
8304 atheos*)
8305 LDSHARED="gcc -shared"
8306 LDCXXSHARED="g++ -shared";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008307 *) LDSHARED="ld";;
8308 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008309fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008310{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDSHARED" >&5
8311$as_echo "$LDSHARED" >&6; }
Ronald Oussoren75912852010-04-08 08:13:31 +00008312LDCXXSHARED=${LDCXXSHARED-$LDSHARED}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008313BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00008314# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008315# library (module) -- this is only needed for a few systems
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008316{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CCSHARED" >&5
8317$as_echo_n "checking CCSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008318if test -z "$CCSHARED"
8319then
Guido van Rossum07397971997-04-29 21:49:50 +00008320 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00008321 SunOS*) if test "$GCC" = yes;
Martin v. Löwiseb623572007-03-12 10:50:39 +00008322 then CCSHARED="-fPIC";
8323 elif test `uname -p` = sparc;
8324 then CCSHARED="-xcode=pic32";
8325 else CCSHARED="-Kpic";
8326 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00008327 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00008328 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00008329 else CCSHARED="+z";
8330 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008331 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00008332 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00008333 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00008334 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00008335 if test "$GCC" = "yes"
8336 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008337 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00008338 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00008339 SCO_SV*)
8340 if test "$GCC" = "yes"
8341 then CCSHARED="-fPIC"
8342 else CCSHARED="-Kpic -belf"
8343 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008344 IRIX*/6*) case $CC in
8345 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00008346 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008347 esac;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008348 atheos*) CCSHARED="-fPIC";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008349 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008350fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008351{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCSHARED" >&5
8352$as_echo "$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008353# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008354# the python executable -- this is only needed for a few systems
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008355{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKFORSHARED" >&5
8356$as_echo_n "checking LINKFORSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008357if test -z "$LINKFORSHARED"
8358then
Guido van Rossum07397971997-04-29 21:49:50 +00008359 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008360 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008361 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00008362 LINKFORSHARED="-Wl,-E -Wl,+s";;
8363# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00008364 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008365 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008366 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00008367 Darwin/*)
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00008368 # -u _PyMac_Error is needed to pull in the mac toolbox glue,
8369 # which is
Jack Jansene578a632001-08-15 01:27:14 +00008370 # not used by the core itself but which needs to be in the core so
8371 # that dynamically loaded extension modules have access to it.
Jack Jansen97e3f002003-02-23 22:59:01 +00008372 # -prebind is no longer used, because it actually seems to give a
8373 # slowdown in stead of a speedup, maybe due to the large number of
8374 # dynamic loads Python does.
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00008375
8376 LINKFORSHARED="$extra_undefs"
Jack Jansene578a632001-08-15 01:27:14 +00008377 if test "$enable_framework"
8378 then
Jack Jansenda49e192005-01-07 13:08:22 +00008379 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00008380 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00008381 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00008382 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00008383 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00008384 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00008385 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +00008386 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
8387 then
8388 LINKFORSHARED="-Wl,--export-dynamic"
8389 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008390 SunOS/5*) case $CC in
8391 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00008392 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00008393 then
8394 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008395 fi;;
8396 esac;;
Jason Tishler30765592003-09-04 11:04:06 +00008397 CYGWIN*)
8398 if test $enable_shared = "no"
8399 then
8400 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
8401 fi;;
Martin v. Löwis8c255e42008-05-23 15:06:50 +00008402 QNX*)
8403 # -Wl,-E causes the symbols to be added to the dynamic
8404 # symbol table so that they can be found when a module
8405 # is loaded. -N 2048K causes the stack size to be set
8406 # to 2048 kilobytes so that the stack doesn't overflow
8407 # when running test_compile.py.
8408 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008409 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008410fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008411{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKFORSHARED" >&5
8412$as_echo "$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008413
Michael W. Hudson54241132001-12-07 15:38:26 +00008414
Ronald Oussoren0d236eb2008-06-06 21:31:33 +00008415
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008416{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAGSFORSHARED" >&5
8417$as_echo_n "checking CFLAGSFORSHARED... " >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00008418if test ! "$LIBRARY" = "$LDLIBRARY"
8419then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00008420 case $ac_sys_system in
8421 CYGWIN*)
8422 # Cygwin needs CCSHARED when building extension DLLs
8423 # but not when building the interpreter DLL.
8424 CFLAGSFORSHARED='';;
8425 *)
8426 CFLAGSFORSHARED='$(CCSHARED)'
8427 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00008428fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008429{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CFLAGSFORSHARED" >&5
8430$as_echo "$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00008431
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008432# SHLIBS are libraries (except -lc and -lm) to link to the python shared
8433# library (with --enable-shared).
8434# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00008435# symbols, this must be set to $(LIBS) (expanded by make). We do this even
8436# if it is not required, since it creates a dependency of the shared library
8437# to LIBS. This, in turn, means that applications linking the shared libpython
8438# don't need to link LIBS explicitly. The default should be only changed
8439# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008440
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008441{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SHLIBS" >&5
8442$as_echo_n "checking SHLIBS... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008443case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008444 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00008445 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008446esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008447{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIBS" >&5
8448$as_echo "$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008449
8450
Guido van Rossum627b2d71993-12-24 10:39:16 +00008451# checks for libraries
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008452{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
8453$as_echo_n "checking for dlopen in -ldl... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008454if ${ac_cv_lib_dl_dlopen+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008455 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008456else
Martin v. Löwis11437992002-04-12 09:54:03 +00008457 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008458LIBS="-ldl $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008459cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008460/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008461
Martin v. Löwiseba40652007-08-30 20:10:57 +00008462/* Override any GCC internal prototype to avoid an error.
8463 Use char because int might match the return type of a GCC
8464 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008465#ifdef __cplusplus
8466extern "C"
8467#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008468char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008469int
8470main ()
8471{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008472return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008473 ;
8474 return 0;
8475}
8476_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008477if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008478 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008479else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008480 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008481fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008482rm -f core conftest.err conftest.$ac_objext \
8483 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008484LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00008485fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008486{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
8487$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008488if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008489 cat >>confdefs.h <<_ACEOF
8490#define HAVE_LIBDL 1
8491_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00008492
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008493 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00008494
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008495fi
8496 # Dynamic linking for SunOS/Solaris and SYSV
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008497{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
8498$as_echo_n "checking for shl_load in -ldld... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008499if ${ac_cv_lib_dld_shl_load+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008500 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008501else
Martin v. Löwis11437992002-04-12 09:54:03 +00008502 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008503LIBS="-ldld $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008504cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008505/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008506
Martin v. Löwiseba40652007-08-30 20:10:57 +00008507/* Override any GCC internal prototype to avoid an error.
8508 Use char because int might match the return type of a GCC
8509 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008510#ifdef __cplusplus
8511extern "C"
8512#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008513char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008514int
8515main ()
8516{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008517return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008518 ;
8519 return 0;
8520}
8521_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008522if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008523 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008524else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008525 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008526fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008527rm -f core conftest.err conftest.$ac_objext \
8528 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008529LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00008530fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008531{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
8532$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008533if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008534 cat >>confdefs.h <<_ACEOF
8535#define HAVE_LIBDLD 1
8536_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00008537
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008538 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008539
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008540fi
8541 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +00008542
Ronald Oussoren79f90492009-01-02 10:44:46 +00008543# only check for sem_init if thread support is requested
Martin v. Löwis519adae2003-09-20 10:47:47 +00008544if test "$with_threads" = "yes" -o -z "$with_threads"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008545 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
8546$as_echo_n "checking for library containing sem_init... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008547if ${ac_cv_search_sem_init+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008548 $as_echo_n "(cached) " >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00008549else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00008550 ac_func_search_save_LIBS=$LIBS
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008551cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008552/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008553
Martin v. Löwiseba40652007-08-30 20:10:57 +00008554/* Override any GCC internal prototype to avoid an error.
8555 Use char because int might match the return type of a GCC
8556 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008557#ifdef __cplusplus
8558extern "C"
8559#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008560char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008561int
8562main ()
8563{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008564return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008565 ;
8566 return 0;
8567}
8568_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00008569for ac_lib in '' pthread rt posix4; do
8570 if test -z "$ac_lib"; then
8571 ac_res="none required"
8572 else
8573 ac_res=-l$ac_lib
Skip Montanaro89e975f2007-08-22 19:05:21 +00008574 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Martin v. Löwiseba40652007-08-30 20:10:57 +00008575 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008576 if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00008577 ac_cv_search_sem_init=$ac_res
Brett Cannon19fab762007-06-02 03:02:29 +00008578fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008579rm -f core conftest.err conftest.$ac_objext \
8580 conftest$ac_exeext
Matthias Klose3cef2a92012-03-14 23:39:33 +01008581 if ${ac_cv_search_sem_init+:} false; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00008582 break
Skip Montanaro89e975f2007-08-22 19:05:21 +00008583fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008584done
Matthias Klose3cef2a92012-03-14 23:39:33 +01008585if ${ac_cv_search_sem_init+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008586
Martin v. Löwiseba40652007-08-30 20:10:57 +00008587else
8588 ac_cv_search_sem_init=no
8589fi
8590rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00008591LIBS=$ac_func_search_save_LIBS
8592fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008593{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
8594$as_echo "$ac_cv_search_sem_init" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008595ac_res=$ac_cv_search_sem_init
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008596if test "$ac_res" != no; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00008597 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00008598
Martin v. Löwis41933dd2002-03-21 15:10:58 +00008599fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +00008600 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +00008601 # posix4 on Solaris 2.6
8602 # pthread (first!) on Linux
8603fi
8604
Martin v. Löwis19d17342003-06-14 21:03:05 +00008605# check if we need libintl for locale functions
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008606{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for textdomain in -lintl" >&5
8607$as_echo_n "checking for textdomain in -lintl... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008608if ${ac_cv_lib_intl_textdomain+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008609 $as_echo_n "(cached) " >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +00008610else
8611 ac_check_lib_save_LIBS=$LIBS
8612LIBS="-lintl $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008613cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008614/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00008615
Martin v. Löwiseba40652007-08-30 20:10:57 +00008616/* Override any GCC internal prototype to avoid an error.
8617 Use char because int might match the return type of a GCC
8618 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00008619#ifdef __cplusplus
8620extern "C"
8621#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +00008622char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00008623int
8624main ()
8625{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008626return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00008627 ;
8628 return 0;
8629}
8630_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008631if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00008632 ac_cv_lib_intl_textdomain=yes
8633else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008634 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +00008635fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008636rm -f core conftest.err conftest.$ac_objext \
8637 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +00008638LIBS=$ac_check_lib_save_LIBS
8639fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008640{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_textdomain" >&5
8641$as_echo "$ac_cv_lib_intl_textdomain" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008642if test "x$ac_cv_lib_intl_textdomain" = xyes; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00008643
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008644$as_echo "#define WITH_LIBINTL 1" >>confdefs.h
Martin v. Löwis19d17342003-06-14 21:03:05 +00008645
8646fi
8647
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008648
8649# checks for system dependent C++ extensions support
8650case "$ac_sys_system" in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008651 AIX*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for genuine AIX C++ extensions support" >&5
8652$as_echo_n "checking for genuine AIX C++ extensions support... " >&6; }
8653 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008654/* end confdefs.h. */
Matthias Klosec511b472010-05-08 11:01:39 +00008655
Georg Brandl94800df2011-02-25 11:09:02 +00008656 #include <load.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008657int
8658main ()
8659{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008660loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00008661 ;
8662 return 0;
8663}
Matthias Klosec511b472010-05-08 11:01:39 +00008664
Martin v. Löwis11437992002-04-12 09:54:03 +00008665_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008666if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008667
Matthias Klosec511b472010-05-08 11:01:39 +00008668
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008669$as_echo "#define AIX_GENUINE_CPLUSPLUS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008670
Matthias Klosec511b472010-05-08 11:01:39 +00008671 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008672$as_echo "yes" >&6; }
Matthias Klosec511b472010-05-08 11:01:39 +00008673
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008674else
Matthias Klosec511b472010-05-08 11:01:39 +00008675
8676 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008677$as_echo "no" >&6; }
Matthias Klosec511b472010-05-08 11:01:39 +00008678
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008679fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008680rm -f core conftest.err conftest.$ac_objext \
8681 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008682 *) ;;
8683esac
8684
Guido van Rossum70c7f481998-03-26 18:44:10 +00008685# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008686# BeOS' sockets are stashed in libnet.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008687{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_open in -lnsl" >&5
8688$as_echo_n "checking for t_open in -lnsl... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008689if ${ac_cv_lib_nsl_t_open+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008690 $as_echo_n "(cached) " >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008691else
Martin v. Löwis11437992002-04-12 09:54:03 +00008692 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008693LIBS="-lnsl $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008694cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008695/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008696
Martin v. Löwiseba40652007-08-30 20:10:57 +00008697/* Override any GCC internal prototype to avoid an error.
8698 Use char because int might match the return type of a GCC
8699 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008700#ifdef __cplusplus
8701extern "C"
8702#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008703char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008704int
8705main ()
8706{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008707return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008708 ;
8709 return 0;
8710}
8711_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008712if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008713 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008714else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008715 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008716fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008717rm -f core conftest.err conftest.$ac_objext \
8718 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008719LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008720fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008721{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_t_open" >&5
8722$as_echo "$ac_cv_lib_nsl_t_open" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008723if test "x$ac_cv_lib_nsl_t_open" = xyes; then :
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008724 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008725fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00008726 # SVR4
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008727{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
8728$as_echo_n "checking for socket in -lsocket... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008729if ${ac_cv_lib_socket_socket+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008730 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008731else
Martin v. Löwis11437992002-04-12 09:54:03 +00008732 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008733LIBS="-lsocket $LIBS $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008734cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008735/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008736
Martin v. Löwiseba40652007-08-30 20:10:57 +00008737/* Override any GCC internal prototype to avoid an error.
8738 Use char because int might match the return type of a GCC
8739 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008740#ifdef __cplusplus
8741extern "C"
8742#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008743char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008744int
8745main ()
8746{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008747return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008748 ;
8749 return 0;
8750}
8751_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008752if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008753 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008754else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008755 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008756fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008757rm -f core conftest.err conftest.$ac_objext \
8758 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008759LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008760fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008761{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
8762$as_echo "$ac_cv_lib_socket_socket" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008763if test "x$ac_cv_lib_socket_socket" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +00008764 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +00008765fi
8766 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +00008767
Jeremy Hyltoncb25d5e2000-07-27 21:23:28 +00008768case "$ac_sys_system" in
8769BeOS*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008770{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lnet" >&5
8771$as_echo_n "checking for socket in -lnet... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008772if ${ac_cv_lib_net_socket+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008773 $as_echo_n "(cached) " >&6
Guido van Rossumad678af1998-10-02 14:42:15 +00008774else
Martin v. Löwis11437992002-04-12 09:54:03 +00008775 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +00008776LIBS="-lnet $LIBS $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008777cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008778/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008779
Martin v. Löwiseba40652007-08-30 20:10:57 +00008780/* Override any GCC internal prototype to avoid an error.
8781 Use char because int might match the return type of a GCC
8782 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008783#ifdef __cplusplus
8784extern "C"
8785#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008786char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008787int
8788main ()
8789{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008790return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008791 ;
8792 return 0;
8793}
8794_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008795if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008796 ac_cv_lib_net_socket=yes
Guido van Rossumad678af1998-10-02 14:42:15 +00008797else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008798 ac_cv_lib_net_socket=no
Guido van Rossumad678af1998-10-02 14:42:15 +00008799fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008800rm -f core conftest.err conftest.$ac_objext \
8801 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008802LIBS=$ac_check_lib_save_LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +00008803fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008804{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_net_socket" >&5
8805$as_echo "$ac_cv_lib_net_socket" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008806if test "x$ac_cv_lib_net_socket" = xyes; then :
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008807 LIBS="-lnet $LIBS"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008808fi
8809 # BeOS
8810;;
8811esac
Guido van Rossum70c7f481998-03-26 18:44:10 +00008812
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008813{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libs" >&5
8814$as_echo_n "checking for --with-libs... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008815
Martin v. Löwiseba40652007-08-30 20:10:57 +00008816# Check whether --with-libs was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008817if test "${with_libs+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00008818 withval=$with_libs;
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008819{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
8820$as_echo "$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +00008821LIBS="$withval $LIBS"
8822
8823else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008824 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8825$as_echo "no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008826fi
8827
Guido van Rossum7f43da71994-08-01 12:15:30 +00008828
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00008829if test -n "$ac_tool_prefix"; then
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008830 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
8831set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008832{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8833$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008834if ${ac_cv_path_PKG_CONFIG+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008835 $as_echo_n "(cached) " >&6
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008836else
8837 case $PKG_CONFIG in
8838 [\\/]* | ?:[\\/]*)
8839 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
8840 ;;
8841 *)
8842 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8843for as_dir in $PATH
8844do
8845 IFS=$as_save_IFS
8846 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008847 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01008848 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008849 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008850 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008851 break 2
8852 fi
8853done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008854 done
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008855IFS=$as_save_IFS
8856
8857 ;;
8858esac
8859fi
8860PKG_CONFIG=$ac_cv_path_PKG_CONFIG
8861if test -n "$PKG_CONFIG"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008862 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
8863$as_echo "$PKG_CONFIG" >&6; }
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008864else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008865 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8866$as_echo "no" >&6; }
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008867fi
8868
8869
8870fi
8871if test -z "$ac_cv_path_PKG_CONFIG"; then
8872 ac_pt_PKG_CONFIG=$PKG_CONFIG
8873 # Extract the first word of "pkg-config", so it can be a program name with args.
8874set dummy pkg-config; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008875{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8876$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008877if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008878 $as_echo_n "(cached) " >&6
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008879else
8880 case $ac_pt_PKG_CONFIG in
8881 [\\/]* | ?:[\\/]*)
8882 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
8883 ;;
8884 *)
8885 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8886for as_dir in $PATH
8887do
8888 IFS=$as_save_IFS
8889 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008890 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01008891 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008892 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008893 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008894 break 2
8895 fi
8896done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008897 done
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008898IFS=$as_save_IFS
8899
8900 ;;
8901esac
8902fi
8903ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
8904if test -n "$ac_pt_PKG_CONFIG"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008905 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
8906$as_echo "$ac_pt_PKG_CONFIG" >&6; }
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008907else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008908 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8909$as_echo "no" >&6; }
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008910fi
8911
8912 if test "x$ac_pt_PKG_CONFIG" = x; then
8913 PKG_CONFIG=""
8914 else
8915 case $cross_compiling:$ac_tool_warned in
8916yes:)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008917{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8918$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008919ac_tool_warned=yes ;;
8920esac
8921 PKG_CONFIG=$ac_pt_PKG_CONFIG
8922 fi
8923else
8924 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
8925fi
8926
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00008927
8928# Check for use of the system expat library
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008929{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-expat" >&5
8930$as_echo_n "checking for --with-system-expat... " >&6; }
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00008931
8932# Check whether --with-system_expat was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008933if test "${with_system_expat+set}" = set; then :
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00008934 withval=$with_system_expat;
Benjamin Petersonf2d1b2a2010-10-31 16:53:53 +00008935else
8936 with_system_expat="no"
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00008937fi
8938
8939
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008940{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_expat" >&5
8941$as_echo "$with_system_expat" >&6; }
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00008942
8943# Check for use of the system libffi library
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008944{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-ffi" >&5
8945$as_echo_n "checking for --with-system-ffi... " >&6; }
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00008946
8947# Check whether --with-system_ffi was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008948if test "${with_system_ffi+set}" = set; then :
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00008949 withval=$with_system_ffi;
Benjamin Petersonf2d1b2a2010-10-31 16:53:53 +00008950else
8951 with_system_ffi="no"
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00008952fi
8953
8954
8955if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008956 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
8957else
8958 LIBFFI_INCLUDEDIR=""
8959fi
8960
8961
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008962{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_ffi" >&5
8963$as_echo "$with_system_ffi" >&6; }
Martin v. Löwis9176fc12006-04-11 11:12:43 +00008964
Ned Deilya2a9f572013-10-25 00:30:10 -07008965# Check for --with-tcltk-includes=path and --with-tcltk-libs=path
8966
8967
8968{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-includes" >&5
8969$as_echo_n "checking for --with-tcltk-includes... " >&6; }
8970
8971# Check whether --with-tcltk-includes was given.
8972if test "${with_tcltk_includes+set}" = set; then :
8973 withval=$with_tcltk_includes;
8974else
8975 with_tcltk_includes="default"
8976fi
8977
8978{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_includes" >&5
8979$as_echo "$with_tcltk_includes" >&6; }
8980{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-libs" >&5
8981$as_echo_n "checking for --with-tcltk-libs... " >&6; }
8982
8983# Check whether --with-tcltk-libs was given.
8984if test "${with_tcltk_libs+set}" = set; then :
8985 withval=$with_tcltk_libs;
8986else
8987 with_tcltk_libs="default"
8988fi
8989
8990{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_libs" >&5
8991$as_echo "$with_tcltk_libs" >&6; }
8992if test "x$with_tcltk_includes" = xdefault || test "x$with_tcltk_libs" = xdefault
8993then
8994 if test "x$with_tcltk_includes" != "x$with_tcltk_libs"
8995 then
8996 as_fn_error $? "use both --with-tcltk-includes='...' and --with-tcltk-libs='...' or neither" "$LINENO" 5
8997 fi
8998 TCLTK_INCLUDES=""
8999 TCLTK_LIBS=""
9000else
9001 TCLTK_INCLUDES="$with_tcltk_includes"
9002 TCLTK_LIBS="$with_tcltk_libs"
9003fi
9004
Benjamin Peterson867475c2009-04-29 20:36:25 +00009005# Check for --with-dbmliborder
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009006{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dbmliborder" >&5
9007$as_echo_n "checking for --with-dbmliborder... " >&6; }
Benjamin Peterson867475c2009-04-29 20:36:25 +00009008
9009# Check whether --with-dbmliborder was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009010if test "${with_dbmliborder+set}" = set; then :
Benjamin Peterson867475c2009-04-29 20:36:25 +00009011 withval=$with_dbmliborder;
9012if test x$with_dbmliborder = xyes
9013then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00009014as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Benjamin Peterson867475c2009-04-29 20:36:25 +00009015else
9016 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
9017 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
9018 then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00009019 as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Benjamin Peterson867475c2009-04-29 20:36:25 +00009020 fi
9021 done
9022fi
9023fi
9024
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009025{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dbmliborder" >&5
9026$as_echo "$with_dbmliborder" >&6; }
Benjamin Peterson867475c2009-04-29 20:36:25 +00009027
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00009028# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009029
9030
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009031{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-signal-module" >&5
9032$as_echo_n "checking for --with-signal-module... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009033
Martin v. Löwiseba40652007-08-30 20:10:57 +00009034# Check whether --with-signal-module was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009035if test "${with_signal_module+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00009036 withval=$with_signal_module;
9037fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009038
9039
9040if test -z "$with_signal_module"
9041then with_signal_module="yes"
9042fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009043{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_signal_module" >&5
9044$as_echo "$with_signal_module" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009045
9046if test "${with_signal_module}" = "yes"; then
9047 USE_SIGNAL_MODULE=""
9048 SIGNAL_OBJS=""
9049else
9050 USE_SIGNAL_MODULE="#"
9051 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
9052fi
9053
Guido van Rossum3d15bd82001-01-10 18:53:48 +00009054# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +00009055
Barry Warsawc0d24d82000-06-29 16:12:00 +00009056USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +00009057
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009058{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dec-threads" >&5
9059$as_echo_n "checking for --with-dec-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009060
Guido van Rossumec2f0731997-01-22 20:54:01 +00009061
Martin v. Löwiseba40652007-08-30 20:10:57 +00009062# Check whether --with-dec-threads was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009063if test "${with_dec_threads+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00009064 withval=$with_dec_threads;
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009065{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9066$as_echo "$withval" >&6; }
Guido van Rossumec2f0731997-01-22 20:54:01 +00009067LDLAST=-threads
Guido van Rossumf78abae1997-01-21 22:02:36 +00009068if test "${with_thread+set}" != set; then
Guido van Rossumec2f0731997-01-22 20:54:01 +00009069 with_thread="$withval";
Guido van Rossumf78abae1997-01-21 22:02:36 +00009070fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00009071else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009072 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9073$as_echo "no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009074fi
9075
Martin v. Löwis11437992002-04-12 09:54:03 +00009076
9077# Templates for things AC_DEFINEd more than once.
9078# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +00009079
9080
Martin v. Löwis11437992002-04-12 09:54:03 +00009081
9082
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009083{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-threads" >&5
9084$as_echo_n "checking for --with-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009085
Martin v. Löwiseba40652007-08-30 20:10:57 +00009086# Check whether --with-threads was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009087if test "${with_threads+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00009088 withval=$with_threads;
9089fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00009090
9091
Barry Warsawc0d24d82000-06-29 16:12:00 +00009092# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +00009093
Martin v. Löwiseba40652007-08-30 20:10:57 +00009094# Check whether --with-thread was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009095if test "${with_thread+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00009096 withval=$with_thread; with_threads=$with_thread
9097fi
9098
Barry Warsawc0d24d82000-06-29 16:12:00 +00009099
9100if test -z "$with_threads"
9101then with_threads="yes"
9102fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009103{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_threads" >&5
9104$as_echo "$with_threads" >&6; }
Barry Warsawc0d24d82000-06-29 16:12:00 +00009105
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009106
Barry Warsawc0d24d82000-06-29 16:12:00 +00009107if test "$with_threads" = "no"
9108then
9109 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009110elif test "$ac_cv_pthread_is_default" = yes
9111then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009112 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009113
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009114 # Defining _REENTRANT on system with POSIX threads should not hurt.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009115 $as_echo "#define _REENTRANT 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009116
9117 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +00009118 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009119elif test "$ac_cv_kpthread" = "yes"
9120then
9121 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00009122 if test "$ac_cv_cxx_thread" = "yes"; then
9123 CXX="$CXX -Kpthread"
9124 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009125 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum2242f2f2001-04-11 20:58:20 +00009126
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009127 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009128 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00009129elif test "$ac_cv_kthread" = "yes"
9130then
9131 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00009132 if test "$ac_cv_cxx_thread" = "yes"; then
9133 CXX="$CXX -Kthread"
9134 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009135 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis5f433f02003-05-05 05:05:30 +00009136
9137 posix_threads=yes
9138 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009139elif test "$ac_cv_pthread" = "yes"
9140then
9141 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00009142 if test "$ac_cv_cxx_thread" = "yes"; then
9143 CXX="$CXX -pthread"
9144 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009145 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009146
9147 posix_threads=yes
9148 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009149else
9150 if test ! -z "$with_threads" -a -d "$with_threads"
9151 then LDFLAGS="$LDFLAGS -L$with_threads"
9152 fi
9153 if test ! -z "$withval" -a -d "$withval"
9154 then LDFLAGS="$LDFLAGS -L$withval"
9155 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009156
9157 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +00009158 # define _POSIX_THREADS in unistd.h. Some apparently don't
9159 # (e.g. gnu pth with pthread emulation)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009160 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _POSIX_THREADS in unistd.h" >&5
9161$as_echo_n "checking for _POSIX_THREADS in unistd.h... " >&6; }
9162 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009163/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +00009164
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009165#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +00009166#ifdef _POSIX_THREADS
9167yes
9168#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009169
9170_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009171if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009172 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009173 unistd_defines_pthreads=yes
9174else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009175 unistd_defines_pthreads=no
9176fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00009177rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009178
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009179 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $unistd_defines_pthreads" >&5
9180$as_echo "$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009181
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009182 $as_echo "#define _REENTRANT 1" >>confdefs.h
Guido van Rossum9caf77a1996-08-01 00:52:26 +00009183
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009184 ac_fn_c_check_header_mongrel "$LINENO" "cthreads.h" "ac_cv_header_cthreads_h" "$ac_includes_default"
Matthias Klose3cef2a92012-03-14 23:39:33 +01009185if test "x$ac_cv_header_cthreads_h" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009186 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +00009187
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009188 $as_echo "#define C_THREADS 1" >>confdefs.h
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009189
Martin v. Löwis11437992002-04-12 09:54:03 +00009190
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009191$as_echo "#define HURD_C_THREADS 1" >>confdefs.h
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009192
9193 LIBS="$LIBS -lthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009194 THREADOBJ="Python/thread.o"
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009195else
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009196
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009197 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 +01009198if test "x$ac_cv_header_mach_cthreads_h" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009199 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +00009200
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009201 $as_echo "#define C_THREADS 1" >>confdefs.h
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009202
Martin v. Löwis11437992002-04-12 09:54:03 +00009203
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009204$as_echo "#define MACH_C_THREADS 1" >>confdefs.h
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009205
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009206 THREADOBJ="Python/thread.o"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009207else
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009208
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009209 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pth" >&5
9210$as_echo_n "checking for --with-pth... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009211
Martin v. Löwiseba40652007-08-30 20:10:57 +00009212# Check whether --with-pth was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009213if test "${with_pth+set}" = set; then :
9214 withval=$with_pth; { $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9215$as_echo "$withval" >&6; }
9216 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009217
9218
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009219$as_echo "#define HAVE_PTH 1" >>confdefs.h
Guido van Rossum9e8181b2000-09-19 00:46:46 +00009220
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00009221 LIBS="-lpth $LIBS"
9222 THREADOBJ="Python/thread.o"
Guido van Rossum9e8181b2000-09-19 00:46:46 +00009223else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009224 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9225$as_echo "no" >&6; }
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009226
9227 # Just looking for pthread_create in libpthread is not enough:
9228 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
9229 # So we really have to include pthread.h, and then link.
9230 _libs=$LIBS
9231 LIBS="$LIBS -lpthread"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009232 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
9233$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
9234 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009235/* end confdefs.h. */
Stefan Krahae66ca62012-11-22 22:36:57 +01009236
9237#include <stdio.h>
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009238#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +00009239
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009240void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +00009241int
9242main ()
9243{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009244
9245pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +00009246 ;
9247 return 0;
9248}
9249_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009250if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009251
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009252 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9253$as_echo "yes" >&6; }
9254 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum02a1c402000-02-25 19:26:31 +00009255
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009256 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009257 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +00009258else
Martin v. Löwis11437992002-04-12 09:54:03 +00009259
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009260 LIBS=$_libs
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009261 ac_fn_c_check_func "$LINENO" "pthread_detach" "ac_cv_func_pthread_detach"
Matthias Klose3cef2a92012-03-14 23:39:33 +01009262if test "x$ac_cv_func_pthread_detach" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009263 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumad678af1998-10-02 14:42:15 +00009264
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009265 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009266 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +00009267else
Guido van Rossumad678af1998-10-02 14:42:15 +00009268
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009269 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 +01009270if test "x$ac_cv_header_atheos_threads_h" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009271 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009272
9273
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009274$as_echo "#define ATHEOS_THREADS 1" >>confdefs.h
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009275
9276 THREADOBJ="Python/thread.o"
9277else
9278
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009279 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 +01009280if test "x$ac_cv_header_kernel_OS_h" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009281 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009282
9283
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009284$as_echo "#define BEOS_THREADS 1" >>confdefs.h
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009285
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009286 THREADOBJ="Python/thread.o"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009287else
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009288
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009289 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5
9290$as_echo_n "checking for pthread_create in -lpthreads... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009291if ${ac_cv_lib_pthreads_pthread_create+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009292 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009293else
Martin v. Löwis11437992002-04-12 09:54:03 +00009294 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009295LIBS="-lpthreads $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009296cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009297/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009298
Martin v. Löwiseba40652007-08-30 20:10:57 +00009299/* Override any GCC internal prototype to avoid an error.
9300 Use char because int might match the return type of a GCC
9301 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009302#ifdef __cplusplus
9303extern "C"
9304#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009305char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009306int
9307main ()
9308{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009309return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009310 ;
9311 return 0;
9312}
9313_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009314if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009315 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +00009316else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009317 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +00009318fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009319rm -f core conftest.err conftest.$ac_objext \
9320 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009321LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00009322fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009323{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5
9324$as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009325if test "x$ac_cv_lib_pthreads_pthread_create" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009326 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Greg Steinadf63d62000-07-05 10:38:09 +00009327
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009328 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00009329 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009330 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +00009331else
Greg Steinadf63d62000-07-05 10:38:09 +00009332
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009333 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5
9334$as_echo_n "checking for pthread_create in -lc_r... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009335if ${ac_cv_lib_c_r_pthread_create+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009336 $as_echo_n "(cached) " >&6
Greg Steinadf63d62000-07-05 10:38:09 +00009337else
Martin v. Löwis11437992002-04-12 09:54:03 +00009338 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00009339LIBS="-lc_r $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009340cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009341/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009342
Martin v. Löwiseba40652007-08-30 20:10:57 +00009343/* Override any GCC internal prototype to avoid an error.
9344 Use char because int might match the return type of a GCC
9345 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009346#ifdef __cplusplus
9347extern "C"
9348#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009349char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009350int
9351main ()
9352{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009353return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009354 ;
9355 return 0;
9356}
9357_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009358if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009359 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +00009360else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009361 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +00009362fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009363rm -f core conftest.err conftest.$ac_objext \
9364 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009365LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +00009366fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009367{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5
9368$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009369if test "x$ac_cv_lib_c_r_pthread_create" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009370 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum49545951997-12-02 19:28:29 +00009371
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009372 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00009373 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009374 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +00009375else
Guido van Rossum07bd90e2000-05-08 13:41:38 +00009376
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009377 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_create_system in -lpthread" >&5
9378$as_echo_n "checking for __pthread_create_system in -lpthread... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009379if ${ac_cv_lib_pthread___pthread_create_system+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009380 $as_echo_n "(cached) " >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009381else
Martin v. Löwis11437992002-04-12 09:54:03 +00009382 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009383LIBS="-lpthread $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009384cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009385/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009386
Martin v. Löwiseba40652007-08-30 20:10:57 +00009387/* Override any GCC internal prototype to avoid an error.
9388 Use char because int might match the return type of a GCC
9389 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009390#ifdef __cplusplus
9391extern "C"
9392#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009393char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009394int
9395main ()
9396{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009397return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009398 ;
9399 return 0;
9400}
9401_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009402if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009403 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009404else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009405 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009406fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009407rm -f core conftest.err conftest.$ac_objext \
9408 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009409LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009410fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009411{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_create_system" >&5
9412$as_echo "$ac_cv_lib_pthread___pthread_create_system" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009413if test "x$ac_cv_lib_pthread___pthread_create_system" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009414 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009415
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009416 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00009417 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009418 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009419else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009420
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009421 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lcma" >&5
9422$as_echo_n "checking for pthread_create in -lcma... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009423if ${ac_cv_lib_cma_pthread_create+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009424 $as_echo_n "(cached) " >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +00009425else
Martin v. Löwis11437992002-04-12 09:54:03 +00009426 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00009427LIBS="-lcma $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009428cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009429/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009430
Martin v. Löwiseba40652007-08-30 20:10:57 +00009431/* Override any GCC internal prototype to avoid an error.
9432 Use char because int might match the return type of a GCC
9433 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009434#ifdef __cplusplus
9435extern "C"
9436#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009437char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009438int
9439main ()
9440{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009441return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009442 ;
9443 return 0;
9444}
9445_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009446if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009447 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +00009448else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009449 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +00009450fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009451rm -f core conftest.err conftest.$ac_objext \
9452 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009453LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00009454fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009455{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cma_pthread_create" >&5
9456$as_echo "$ac_cv_lib_cma_pthread_create" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009457if test "x$ac_cv_lib_cma_pthread_create" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009458 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumb93a8621998-05-07 13:27:32 +00009459
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009460 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00009461 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009462 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +00009463else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +00009464
Martin v. Löwis130fb172001-07-19 11:00:41 +00009465 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +00009466fi
9467
Guido van Rossum627b2d71993-12-24 10:39:16 +00009468
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009469fi
9470
Guido van Rossum0be3e491997-05-22 20:33:33 +00009471fi
9472
Guido van Rossum49545951997-12-02 19:28:29 +00009473fi
9474
Guido van Rossumb93a8621998-05-07 13:27:32 +00009475fi
9476
Guido van Rossum07bd90e2000-05-08 13:41:38 +00009477
Michael W. Hudson54241132001-12-07 15:38:26 +00009478fi
9479
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009480
9481fi
9482
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009483fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009484rm -f core conftest.err conftest.$ac_objext \
9485 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009486fi
9487
Martin v. Löwis11437992002-04-12 09:54:03 +00009488fi
9489
9490
9491fi
9492
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009493
Michael W. Hudson54241132001-12-07 15:38:26 +00009494
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009495 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usconfig in -lmpc" >&5
9496$as_echo_n "checking for usconfig in -lmpc... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009497if ${ac_cv_lib_mpc_usconfig+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009498 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009499else
Martin v. Löwis11437992002-04-12 09:54:03 +00009500 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009501LIBS="-lmpc $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009502cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009503/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009504
Martin v. Löwiseba40652007-08-30 20:10:57 +00009505/* Override any GCC internal prototype to avoid an error.
9506 Use char because int might match the return type of a GCC
9507 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009508#ifdef __cplusplus
9509extern "C"
9510#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009511char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009512int
9513main ()
9514{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009515return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009516 ;
9517 return 0;
9518}
9519_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009520if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009521 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009522else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009523 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009524fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009525rm -f core conftest.err conftest.$ac_objext \
9526 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009527LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009528fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009529{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpc_usconfig" >&5
9530$as_echo "$ac_cv_lib_mpc_usconfig" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009531if test "x$ac_cv_lib_mpc_usconfig" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009532 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00009533
Martin v. Löwis130fb172001-07-19 11:00:41 +00009534 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009535 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009536 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +00009537fi
9538
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00009539
Neal Norwitza978ab02002-11-02 16:58:05 +00009540 if test "$posix_threads" != "yes"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009541 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thr_create in -lthread" >&5
9542$as_echo_n "checking for thr_create in -lthread... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009543if ${ac_cv_lib_thread_thr_create+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009544 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009545else
Martin v. Löwis11437992002-04-12 09:54:03 +00009546 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009547LIBS="-lthread $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009548cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009549/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009550
Martin v. Löwiseba40652007-08-30 20:10:57 +00009551/* Override any GCC internal prototype to avoid an error.
9552 Use char because int might match the return type of a GCC
9553 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009554#ifdef __cplusplus
9555extern "C"
9556#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009557char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009558int
9559main ()
9560{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009561return thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009562 ;
9563 return 0;
9564}
9565_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009566if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009567 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009568else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009569 ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009570fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009571rm -f core conftest.err conftest.$ac_objext \
9572 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009573LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009574fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009575{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_thread_thr_create" >&5
9576$as_echo "$ac_cv_lib_thread_thr_create" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009577if test "x$ac_cv_lib_thread_thr_create" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009578 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00009579
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00009580 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009581 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00009582 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +00009583fi
9584
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00009585 fi
Michael W. Hudson54241132001-12-07 15:38:26 +00009586
Martin v. Löwis130fb172001-07-19 11:00:41 +00009587 if test "$USE_THREAD_MODULE" != "#"
9588 then
9589 # If the above checks didn't disable threads, (at least) OSF1
9590 # needs this '-threads' argument during linking.
9591 case $ac_sys_system in
9592 OSF1) LDLAST=-threads;;
9593 esac
Jeremy Hylton1a2ca862000-10-16 16:59:12 +00009594 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009595fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00009596
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009597if test "$posix_threads" = "yes"; then
9598 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00009599
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009600$as_echo "#define _POSIX_THREADS 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009601
9602 fi
9603
9604 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
9605 case $ac_sys_system/$ac_sys_release in
Charles-François Natali4929eb92011-07-21 19:41:04 +02009606 SunOS/5.6)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009607$as_echo "#define HAVE_PTHREAD_DESTRUCTOR 1" >>confdefs.h
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00009608
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009609 ;;
9610 SunOS/5.8)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009611$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009612
9613 ;;
Charles-François Natali4929eb92011-07-21 19:41:04 +02009614 AIX/*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009615$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Christian Heimescba36bb2008-01-30 22:54:18 +00009616
9617 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009618 esac
9619
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009620 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
9621$as_echo_n "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009622 if ${ac_cv_pthread_system_supported+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009623 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009624else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009625 if test "$cross_compiling" = yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009626 ac_cv_pthread_system_supported=no
9627else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009628 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009629/* end confdefs.h. */
Stefan Krahae66ca62012-11-22 22:36:57 +01009630
9631 #include <stdio.h>
9632 #include <pthread.h>
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009633 void *foo(void *parm) {
9634 return NULL;
9635 }
9636 main() {
9637 pthread_attr_t attr;
9638 pthread_t id;
9639 if (pthread_attr_init(&attr)) exit(-1);
9640 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
9641 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
9642 exit(0);
9643 }
9644_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009645if ac_fn_c_try_run "$LINENO"; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009646 ac_cv_pthread_system_supported=yes
9647else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009648 ac_cv_pthread_system_supported=no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009649fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009650rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9651 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009652fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00009653
Martin v. Löwiseba40652007-08-30 20:10:57 +00009654
Guido van Rossum627b2d71993-12-24 10:39:16 +00009655fi
9656
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009657 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_system_supported" >&5
9658$as_echo "$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009659 if test "$ac_cv_pthread_system_supported" = "yes"; then
9660
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009661$as_echo "#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009662
9663 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009664 for ac_func in pthread_sigmask
9665do :
9666 ac_fn_c_check_func "$LINENO" "pthread_sigmask" "ac_cv_func_pthread_sigmask"
Matthias Klose3cef2a92012-03-14 23:39:33 +01009667if test "x$ac_cv_func_pthread_sigmask" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009668 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009669#define HAVE_PTHREAD_SIGMASK 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009670_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +00009671 case $ac_sys_system in
9672 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009673
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009674$as_echo "#define HAVE_BROKEN_PTHREAD_SIGMASK 1" >>confdefs.h
Jason Tishlerfac083d2003-07-22 15:20:49 +00009675
9676 ;;
9677 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009678fi
9679done
9680
Christian Heimes0d604cf2013-08-21 13:26:05 +02009681 for ac_func in pthread_atfork
9682do :
9683 ac_fn_c_check_func "$LINENO" "pthread_atfork" "ac_cv_func_pthread_atfork"
9684if test "x$ac_cv_func_pthread_atfork" = xyes; then :
9685 cat >>confdefs.h <<_ACEOF
9686#define HAVE_PTHREAD_ATFORK 1
9687_ACEOF
9688
9689fi
9690done
9691
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009692fi
9693
9694
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009695# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +00009696
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009697{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if --enable-ipv6 is specified" >&5
9698$as_echo_n "checking if --enable-ipv6 is specified... " >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009699# Check whether --enable-ipv6 was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009700if test "${enable_ipv6+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00009701 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009702 no)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009703 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9704$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009705 ipv6=no
9706 ;;
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009707 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9708$as_echo "yes" >&6; }
9709 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009710
9711 ipv6=yes
9712 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009713 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009714else
Martin v. Löwis11437992002-04-12 09:54:03 +00009715
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009716 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009717/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009718 /* AF_INET6 available check */
9719#include <sys/types.h>
9720#include <sys/socket.h>
Charles-François Natalibe2b9072013-01-08 19:47:00 +01009721int
9722main ()
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009723{
Charles-François Natalibe2b9072013-01-08 19:47:00 +01009724int domain = AF_INET6;
9725 ;
9726 return 0;
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009727}
Martin v. Löwis11437992002-04-12 09:54:03 +00009728_ACEOF
Charles-François Natalibe2b9072013-01-08 19:47:00 +01009729if ac_fn_c_try_compile "$LINENO"; then :
Matthias Klosec511b472010-05-08 11:01:39 +00009730
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009731 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9732$as_echo "yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009733 ipv6=yes
Matthias Klosec511b472010-05-08 11:01:39 +00009734
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009735else
Matthias Klosec511b472010-05-08 11:01:39 +00009736
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009737 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9738$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009739 ipv6=no
Matthias Klosec511b472010-05-08 11:01:39 +00009740
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009741fi
Charles-François Natalibe2b9072013-01-08 19:47:00 +01009742rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009743
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009744if test "$ipv6" = "yes"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009745 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RFC2553 API is available" >&5
9746$as_echo_n "checking if RFC2553 API is available... " >&6; }
9747 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009748/* end confdefs.h. */
Matthias Klosec511b472010-05-08 11:01:39 +00009749
9750 #include <sys/types.h>
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009751#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009752int
9753main ()
9754{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009755struct sockaddr_in6 x;
Matthias Klosec511b472010-05-08 11:01:39 +00009756 x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +00009757 ;
9758 return 0;
9759}
Matthias Klosec511b472010-05-08 11:01:39 +00009760
Martin v. Löwis11437992002-04-12 09:54:03 +00009761_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009762if ac_fn_c_try_compile "$LINENO"; then :
Matthias Klosec511b472010-05-08 11:01:39 +00009763
9764 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009765$as_echo "yes" >&6; }
Matthias Klosec511b472010-05-08 11:01:39 +00009766 ipv6=yes
9767
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009768else
Matthias Klosec511b472010-05-08 11:01:39 +00009769
9770 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009771$as_echo "no" >&6; }
Matthias Klosec511b472010-05-08 11:01:39 +00009772 ipv6=no
9773
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009774fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009775rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009776fi
9777
9778if test "$ipv6" = "yes"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009779 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009780
9781fi
9782
Martin v. Löwiseba40652007-08-30 20:10:57 +00009783fi
9784
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009785
9786ipv6type=unknown
9787ipv6lib=none
9788ipv6trylibc=no
9789
9790if test "$ipv6" = "yes"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009791 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5
9792$as_echo_n "checking ipv6 stack type... " >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +00009793 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
9794 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009795 case $i in
9796 inria)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009797 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009798/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009799
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009800#include <netinet/in.h>
9801#ifdef IPV6_INRIA_VERSION
9802yes
9803#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009804_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009805if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009806 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00009807 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009808fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00009809rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009810
9811 ;;
9812 kame)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009813 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009814/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009815
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009816#include <netinet/in.h>
9817#ifdef __KAME__
9818yes
9819#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009820_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009821if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009822 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009823 ipv6type=$i;
9824 ipv6lib=inet6
9825 ipv6libdir=/usr/local/v6/lib
9826 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009827fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00009828rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009829
9830 ;;
9831 linux-glibc)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009832 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009833/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009834
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009835#include <features.h>
9836#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
9837yes
9838#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009839_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009840if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009841 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009842 ipv6type=$i;
9843 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009844fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00009845rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009846
9847 ;;
9848 linux-inet6)
9849 if test -d /usr/inet6; then
9850 ipv6type=$i
9851 ipv6lib=inet6
9852 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +00009853 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009854 fi
9855 ;;
9856 solaris)
9857 if test -f /etc/netconfig; then
Antoine Pitrou31e85952011-01-03 18:57:14 +00009858 if $GREP -q tcp6 /etc/netconfig; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009859 ipv6type=$i
9860 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009861 fi
9862 fi
9863 ;;
9864 toshiba)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009865 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009866/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009867
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009868#include <sys/param.h>
9869#ifdef _TOSHIBA_INET6
9870yes
9871#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009872_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009873if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009874 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009875 ipv6type=$i;
9876 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00009877 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009878fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00009879rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009880
9881 ;;
9882 v6d)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009883 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009884/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009885
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009886#include </usr/local/v6/include/sys/v6config.h>
9887#ifdef __V6D__
9888yes
9889#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009890_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009891if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009892 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009893 ipv6type=$i;
9894 ipv6lib=v6;
9895 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +00009896 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009897fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00009898rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009899
9900 ;;
9901 zeta)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009902 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009903/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009904
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009905#include <sys/param.h>
9906#ifdef _ZETA_MINAMI_INET6
9907yes
9908#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009909_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009910if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009911 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009912 ipv6type=$i;
9913 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00009914 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009915fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00009916rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009917
9918 ;;
9919 esac
9920 if test "$ipv6type" != "unknown"; then
9921 break
9922 fi
9923 done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009924 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5
9925$as_echo "$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009926fi
9927
9928if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
9929 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
9930 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
9931 echo "using lib$ipv6lib"
9932 else
9933 if test $ipv6trylibc = "yes"; then
9934 echo "using libc"
9935 else
9936 echo 'Fatal: no $ipv6lib library found. cannot continue.'
9937 echo "You need to fetch lib$ipv6lib.a from appropriate"
9938 echo 'ipv6 kit and compile beforehand.'
9939 exit 1
9940 fi
9941 fi
9942fi
9943
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009944{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for OSX 10.5 SDK or later" >&5
9945$as_echo_n "checking for OSX 10.5 SDK or later... " >&6; }
9946cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren0d236eb2008-06-06 21:31:33 +00009947/* end confdefs.h. */
Matthias Klosec511b472010-05-08 11:01:39 +00009948
9949 #include <Carbon/Carbon.h>
Ronald Oussoren0d236eb2008-06-06 21:31:33 +00009950int
9951main ()
9952{
9953FSIORefNum fRef = 0
9954 ;
9955 return 0;
9956}
Mark Dickinson0712b562010-05-08 19:13:21 +00009957
Ronald Oussoren0d236eb2008-06-06 21:31:33 +00009958_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009959if ac_fn_c_try_compile "$LINENO"; then :
Matthias Klosec511b472010-05-08 11:01:39 +00009960
Ronald Oussoren0d236eb2008-06-06 21:31:33 +00009961
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009962$as_echo "#define HAVE_OSX105_SDK 1" >>confdefs.h
Ronald Oussoren0d236eb2008-06-06 21:31:33 +00009963
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009964 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9965$as_echo "yes" >&6; }
Ronald Oussoren0d236eb2008-06-06 21:31:33 +00009966
Mark Dickinson0712b562010-05-08 19:13:21 +00009967else
9968
9969 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9970$as_echo "no" >&6; }
9971
Ronald Oussoren0d236eb2008-06-06 21:31:33 +00009972fi
Ronald Oussoren0d236eb2008-06-06 21:31:33 +00009973rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9974
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009975# Check for --with-doc-strings
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009976{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-doc-strings" >&5
9977$as_echo_n "checking for --with-doc-strings... " >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009978
Martin v. Löwiseba40652007-08-30 20:10:57 +00009979# Check whether --with-doc-strings was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009980if test "${with_doc_strings+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00009981 withval=$with_doc_strings;
9982fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009983
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009984
9985if test -z "$with_doc_strings"
9986then with_doc_strings="yes"
9987fi
9988if test "$with_doc_strings" != "no"
9989then
9990
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009991$as_echo "#define WITH_DOC_STRINGS 1" >>confdefs.h
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009992
9993fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009994{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_doc_strings" >&5
9995$as_echo "$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009996
Neil Schemenauera35c6882001-02-27 04:45:05 +00009997# Check for Python-specific malloc support
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009998{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tsc" >&5
9999$as_echo_n "checking for --with-tsc... " >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010000
Martin v. Löwiseba40652007-08-30 20:10:57 +000010001# Check whether --with-tsc was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010002if test "${with_tsc+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +000010003 withval=$with_tsc;
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010004if test "$withval" != no
10005then
10006
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010007$as_echo "#define WITH_TSC 1" >>confdefs.h
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010008
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010009 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10010$as_echo "yes" >&6; }
10011else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10012$as_echo "no" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010013fi
10014else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010015 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10016$as_echo "no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000010017fi
10018
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010019
10020# Check for Python-specific malloc support
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010021{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pymalloc" >&5
10022$as_echo_n "checking for --with-pymalloc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010023
Martin v. Löwiseba40652007-08-30 20:10:57 +000010024# Check whether --with-pymalloc was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010025if test "${with_pymalloc+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +000010026 withval=$with_pymalloc;
10027fi
Michael W. Hudson54241132001-12-07 15:38:26 +000010028
Neil Schemenauera35c6882001-02-27 04:45:05 +000010029
Neil Schemenauer16c22972002-03-22 15:34:49 +000010030if test -z "$with_pymalloc"
10031then with_pymalloc="yes"
10032fi
10033if test "$with_pymalloc" != "no"
10034then
Martin v. Löwis11437992002-04-12 09:54:03 +000010035
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010036$as_echo "#define WITH_PYMALLOC 1" >>confdefs.h
Neil Schemenauer16c22972002-03-22 15:34:49 +000010037
10038fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010039{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pymalloc" >&5
10040$as_echo "$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +000010041
Benjamin Peterson91c12eb2009-12-03 02:52:39 +000010042# Check for Valgrind support
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010043{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-valgrind" >&5
10044$as_echo_n "checking for --with-valgrind... " >&6; }
Benjamin Peterson91c12eb2009-12-03 02:52:39 +000010045
10046# Check whether --with-valgrind was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010047if test "${with_valgrind+set}" = set; then :
Benjamin Peterson91c12eb2009-12-03 02:52:39 +000010048 withval=$with_valgrind;
10049else
10050 with_valgrind=no
10051fi
10052
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010053{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_valgrind" >&5
10054$as_echo "$with_valgrind" >&6; }
Benjamin Peterson91c12eb2009-12-03 02:52:39 +000010055if test "$with_valgrind" != no; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010056 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 +010010057if test "x$ac_cv_header_valgrind_valgrind_h" = xyes; then :
Benjamin Peterson91c12eb2009-12-03 02:52:39 +000010058
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010059$as_echo "#define WITH_VALGRIND 1" >>confdefs.h
Benjamin Peterson91c12eb2009-12-03 02:52:39 +000010060
10061else
Georg Brandl71f4fbb2011-02-25 11:04:50 +000010062 as_fn_error $? "Valgrind support requested but headers not available" "$LINENO" 5
Benjamin Peterson91c12eb2009-12-03 02:52:39 +000010063
10064fi
10065
10066
10067fi
10068
Barry Warsawef82cd72000-06-30 16:21:01 +000010069# Check for --with-wctype-functions
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010070{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-wctype-functions" >&5
10071$as_echo_n "checking for --with-wctype-functions... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010072
Martin v. Löwiseba40652007-08-30 20:10:57 +000010073# Check whether --with-wctype-functions was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010074if test "${with_wctype_functions+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +000010075 withval=$with_wctype_functions;
Barry Warsawef82cd72000-06-30 16:21:01 +000010076if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000010077then
10078
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010079$as_echo "#define WANT_WCTYPE_FUNCTIONS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000010080
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010081 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10082$as_echo "yes" >&6; }
10083else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10084$as_echo "no" >&6; }
Barry Warsawef82cd72000-06-30 16:21:01 +000010085fi
10086else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010087 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10088$as_echo "no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000010089fi
10090
Barry Warsawef82cd72000-06-30 16:21:01 +000010091
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010092# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000010093
Guido van Rossum98935bf2001-09-05 19:13:16 +000010094DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000010095
Guido van Rossume97ee181999-12-20 21:27:22 +000010096# the dlopen() function means we might want to use dynload_shlib.o. some
10097# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +000010098for ac_func in dlopen
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010099do :
10100 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
Matthias Klose3cef2a92012-03-14 23:39:33 +010010101if test "x$ac_cv_func_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010102 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010103#define HAVE_DLOPEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010104_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000010105
Guido van Rossume97ee181999-12-20 21:27:22 +000010106fi
Thomas Wouters3a584202000-08-05 23:28:51 +000010107done
Guido van Rossume97ee181999-12-20 21:27:22 +000010108
Michael W. Hudson54241132001-12-07 15:38:26 +000010109
Guido van Rossume97ee181999-12-20 21:27:22 +000010110# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
10111# loading of modules.
10112
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010113{ $as_echo "$as_me:${as_lineno-$LINENO}: checking DYNLOADFILE" >&5
10114$as_echo_n "checking DYNLOADFILE... " >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000010115if test -z "$DYNLOADFILE"
10116then
10117 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000010118 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
10119 if test "$ac_cv_func_dlopen" = yes
10120 then DYNLOADFILE="dynload_shlib.o"
10121 else DYNLOADFILE="dynload_aix.o"
10122 fi
10123 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000010124 BeOS*) DYNLOADFILE="dynload_beos.o";;
10125 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Anthony Baxter82201742006-04-09 15:07:40 +000010126 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
10127 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010128 atheos*) DYNLOADFILE="dynload_atheos.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000010129 *)
10130 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
10131 # out any dynamic loading
10132 if test "$ac_cv_func_dlopen" = yes
10133 then DYNLOADFILE="dynload_shlib.o"
10134 else DYNLOADFILE="dynload_stub.o"
10135 fi
10136 ;;
10137 esac
10138fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010139{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DYNLOADFILE" >&5
10140$as_echo "$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000010141if test "$DYNLOADFILE" != "dynload_stub.o"
10142then
Martin v. Löwis11437992002-04-12 09:54:03 +000010143
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010144$as_echo "#define HAVE_DYNAMIC_LOADING 1" >>confdefs.h
Guido van Rossume97ee181999-12-20 21:27:22 +000010145
10146fi
10147
Neil Schemenauer4e425612001-06-19 15:44:15 +000010148# MACHDEP_OBJS can be set to platform-specific object files needed by Python
10149
Michael W. Hudson54241132001-12-07 15:38:26 +000010150
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010151{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP_OBJS" >&5
10152$as_echo_n "checking MACHDEP_OBJS... " >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000010153if test -z "$MACHDEP_OBJS"
10154then
Jack Jansene578a632001-08-15 01:27:14 +000010155 MACHDEP_OBJS=$extra_machdep_objs
10156else
10157 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000010158fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010159{ $as_echo "$as_me:${as_lineno-$LINENO}: result: MACHDEP_OBJS" >&5
10160$as_echo "MACHDEP_OBJS" >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000010161
Guido van Rossum627b2d71993-12-24 10:39:16 +000010162# checks for library functions
Martin v. Löwisaef18b12008-03-24 13:31:16 +000010163for ac_func in alarm setitimer getitimer bind_textdomain_codeset chown \
10164 clock confstr ctermid execv fchmod fchown fork fpathconf ftime ftruncate \
Martin v. Löwis438b5342002-12-27 10:16:42 +000010165 gai_strerror getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwis50ea4562009-11-27 13:56:01 +000010166 getpriority getresuid getresgid getpwent getspnam getspent getsid getwd \
Antoine Pitrou30b3b352009-12-02 20:37:54 +000010167 initgroups kill killpg lchmod lchown lstat mkfifo mknod mktime \
Martin v. Löwisa5f09072002-10-11 05:37:59 +000010168 mremap nice pathconf pause plock poll pthread_init \
Guido van Rossum162e38c2003-02-19 15:25:10 +000010169 putenv readlink realpath \
Jesse Noller355b1262009-04-02 00:03:28 +000010170 select sem_open sem_timedwait sem_getvalue sem_unlink setegid seteuid \
10171 setgid \
Martin v. Löwis4daacb12003-03-28 18:37:01 +000010172 setlocale setregid setreuid setsid setpgid setpgrp setuid setvbuf snprintf \
Martin v. Löwis50ea4562009-11-27 13:56:01 +000010173 setlocale setregid setreuid setresuid setresgid \
10174 setsid setpgid setpgrp setuid setvbuf snprintf \
Skip Montanaro7e11a012004-02-07 12:55:46 +000010175 sigaction siginterrupt sigrelse strftime \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000010176 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Neal Norwitz05a45592006-03-20 06:30:08 +000010177 truncate uname unsetenv utimes waitpid wait3 wait4 wcscoll _getpty
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010178do :
10179 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10180ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Georg Brandl71f4fbb2011-02-25 11:04:50 +000010181if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010182 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010183#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010184_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000010185
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010186fi
10187done
10188
Michael W. Hudson54241132001-12-07 15:38:26 +000010189
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010190# For some functions, having a definition is not sufficient, since
10191# we want to take their address.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010192{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chroot" >&5
10193$as_echo_n "checking for chroot... " >&6; }
10194cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010195/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010196#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010197int
10198main ()
10199{
10200void *x=chroot
10201 ;
10202 return 0;
10203}
10204_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010205if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010206
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010207$as_echo "#define HAVE_CHROOT 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010208
Matthias Klosec511b472010-05-08 11:01:39 +000010209 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010210$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010211else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010212 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10213$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010214
10215fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010216rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010217{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for link" >&5
10218$as_echo_n "checking for link... " >&6; }
10219cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010220/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010221#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010222int
10223main ()
10224{
10225void *x=link
10226 ;
10227 return 0;
10228}
10229_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010230if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010231
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010232$as_echo "#define HAVE_LINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010233
Matthias Klosec511b472010-05-08 11:01:39 +000010234 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010235$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010236else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010237 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10238$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010239
10240fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010241rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010242{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for symlink" >&5
10243$as_echo_n "checking for symlink... " >&6; }
10244cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010245/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010246#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010247int
10248main ()
10249{
10250void *x=symlink
10251 ;
10252 return 0;
10253}
10254_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010255if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010256
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010257$as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010258
Matthias Klosec511b472010-05-08 11:01:39 +000010259 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010260$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010261else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010262 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10263$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010264
10265fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010266rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010267{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fchdir" >&5
10268$as_echo_n "checking for fchdir... " >&6; }
10269cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010270/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010271#include <unistd.h>
10272int
10273main ()
10274{
10275void *x=fchdir
10276 ;
10277 return 0;
10278}
10279_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010280if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010281
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010282$as_echo "#define HAVE_FCHDIR 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010283
Matthias Klosec511b472010-05-08 11:01:39 +000010284 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010285$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010286else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010287 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10288$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010289
10290fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010291rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010292{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fsync" >&5
10293$as_echo_n "checking for fsync... " >&6; }
10294cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010295/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010296#include <unistd.h>
10297int
10298main ()
10299{
10300void *x=fsync
10301 ;
10302 return 0;
10303}
10304_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010305if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010306
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010307$as_echo "#define HAVE_FSYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010308
Matthias Klosec511b472010-05-08 11:01:39 +000010309 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010310$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010311else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010312 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10313$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010314
10315fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010316rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010317{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fdatasync" >&5
10318$as_echo_n "checking for fdatasync... " >&6; }
10319cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010320/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010321#include <unistd.h>
10322int
10323main ()
10324{
10325void *x=fdatasync
10326 ;
10327 return 0;
10328}
10329_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010330if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010331
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010332$as_echo "#define HAVE_FDATASYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010333
Matthias Klosec511b472010-05-08 11:01:39 +000010334 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010335$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010336else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010337 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10338$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010339
10340fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010341rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010342{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll" >&5
10343$as_echo_n "checking for epoll... " >&6; }
10344cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000010345/* end confdefs.h. */
10346#include <sys/epoll.h>
10347int
10348main ()
10349{
10350void *x=epoll_create
10351 ;
10352 return 0;
10353}
10354_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010355if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010356
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010357$as_echo "#define HAVE_EPOLL 1" >>confdefs.h
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000010358
Matthias Klosec511b472010-05-08 11:01:39 +000010359 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010360$as_echo "yes" >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000010361else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010362 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10363$as_echo "no" >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000010364
10365fi
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000010366rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010367{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kqueue" >&5
10368$as_echo_n "checking for kqueue... " >&6; }
10369cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000010370/* end confdefs.h. */
10371
10372#include <sys/types.h>
10373#include <sys/event.h>
10374
10375int
10376main ()
10377{
10378int x=kqueue()
10379 ;
10380 return 0;
10381}
10382_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010383if ac_fn_c_try_compile "$LINENO"; then :
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000010384
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010385$as_echo "#define HAVE_KQUEUE 1" >>confdefs.h
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000010386
Matthias Klosec511b472010-05-08 11:01:39 +000010387 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010388$as_echo "yes" >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000010389else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010390 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10391$as_echo "no" >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000010392
10393fi
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000010394rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000010395# On some systems (eg. FreeBSD 5), we would find a definition of the
10396# functions ctermid_r, setgroups in the library, but no prototype
10397# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
10398# address to avoid compiler warnings and potential miscompilations
10399# because of the missing prototypes.
10400
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010401{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ctermid_r" >&5
10402$as_echo_n "checking for ctermid_r... " >&6; }
10403cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010404/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000010405
Martin v. Löwisd5843682002-11-21 20:41:28 +000010406#include <stdio.h>
10407
Martin v. Löwisd5843682002-11-21 20:41:28 +000010408int
10409main ()
10410{
10411void* p = ctermid_r
10412 ;
10413 return 0;
10414}
10415_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010416if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000010417
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010418$as_echo "#define HAVE_CTERMID_R 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000010419
Matthias Klosec511b472010-05-08 11:01:39 +000010420 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010421$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010422else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010423 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10424$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010425
10426fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010427rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10428
Antoine Pitroub170f172010-09-10 18:47:36 +000010429{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock declaration" >&5
10430$as_echo_n "checking for flock declaration... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010431if ${ac_cv_flock_decl+:} false; then :
Antoine Pitroub170f172010-09-10 18:47:36 +000010432 $as_echo_n "(cached) " >&6
10433else
10434 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010435/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010436#include <sys/file.h>
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010437int
10438main ()
10439{
10440void* p = flock
Antoine Pitroub170f172010-09-10 18:47:36 +000010441
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010442 ;
10443 return 0;
10444}
10445_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010446if ac_fn_c_try_compile "$LINENO"; then :
Antoine Pitroub170f172010-09-10 18:47:36 +000010447 ac_cv_flock_decl=yes
10448else
10449 ac_cv_flock_decl=no
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010450
10451fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010452rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitrou85729812010-09-07 14:55:24 +000010453
Antoine Pitroub170f172010-09-10 18:47:36 +000010454fi
10455{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_flock_decl" >&5
10456$as_echo "$ac_cv_flock_decl" >&6; }
10457if test "x${ac_cv_flock_decl}" = xyes; then
10458 for ac_func in flock
10459do :
10460 ac_fn_c_check_func "$LINENO" "flock" "ac_cv_func_flock"
Matthias Klose3cef2a92012-03-14 23:39:33 +010010461if test "x$ac_cv_func_flock" = xyes; then :
Antoine Pitroub170f172010-09-10 18:47:36 +000010462 cat >>confdefs.h <<_ACEOF
10463#define HAVE_FLOCK 1
Antoine Pitrou85729812010-09-07 14:55:24 +000010464_ACEOF
Antoine Pitroub170f172010-09-10 18:47:36 +000010465
Antoine Pitrou85729812010-09-07 14:55:24 +000010466else
Antoine Pitroub170f172010-09-10 18:47:36 +000010467 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock in -lbsd" >&5
Antoine Pitrou85729812010-09-07 14:55:24 +000010468$as_echo_n "checking for flock in -lbsd... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010469if ${ac_cv_lib_bsd_flock+:} false; then :
Antoine Pitrou85729812010-09-07 14:55:24 +000010470 $as_echo_n "(cached) " >&6
10471else
10472 ac_check_lib_save_LIBS=$LIBS
10473LIBS="-lbsd $LIBS"
10474cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10475/* end confdefs.h. */
10476
10477/* Override any GCC internal prototype to avoid an error.
10478 Use char because int might match the return type of a GCC
10479 builtin and then its argument prototype would still apply. */
10480#ifdef __cplusplus
10481extern "C"
10482#endif
10483char flock ();
10484int
10485main ()
10486{
10487return flock ();
10488 ;
10489 return 0;
10490}
10491_ACEOF
10492if ac_fn_c_try_link "$LINENO"; then :
10493 ac_cv_lib_bsd_flock=yes
10494else
10495 ac_cv_lib_bsd_flock=no
10496fi
10497rm -f core conftest.err conftest.$ac_objext \
10498 conftest$ac_exeext conftest.$ac_ext
10499LIBS=$ac_check_lib_save_LIBS
10500fi
10501{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_flock" >&5
10502$as_echo "$ac_cv_lib_bsd_flock" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010503if test "x$ac_cv_lib_bsd_flock" = xyes; then :
Antoine Pitroub170f172010-09-10 18:47:36 +000010504 $as_echo "#define HAVE_FLOCK 1" >>confdefs.h
Antoine Pitrou85729812010-09-07 14:55:24 +000010505
10506
10507$as_echo "#define FLOCK_NEEDS_LIBBSD 1" >>confdefs.h
10508
10509
10510fi
10511
10512
10513fi
Antoine Pitroub170f172010-09-10 18:47:36 +000010514done
10515
Antoine Pitrou85729812010-09-07 14:55:24 +000010516fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010517
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010518{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
10519$as_echo_n "checking for getpagesize... " >&6; }
10520cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010521/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010522
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010523#include <unistd.h>
10524
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010525int
10526main ()
10527{
10528void* p = getpagesize
10529 ;
10530 return 0;
10531}
10532_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010533if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010534
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010535$as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010536
Matthias Klosec511b472010-05-08 11:01:39 +000010537 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010538$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010539else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010540 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10541$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010542
10543fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010544rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010545
Charles-François Natali93a11752011-11-27 13:01:35 +010010546{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken unsetenv" >&5
10547$as_echo_n "checking for broken unsetenv... " >&6; }
10548cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10549/* end confdefs.h. */
10550
10551#include <stdlib.h>
10552
10553int
10554main ()
10555{
10556int res = unsetenv("DUMMY")
10557 ;
10558 return 0;
10559}
10560_ACEOF
10561if ac_fn_c_try_compile "$LINENO"; then :
10562 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10563$as_echo "no" >&6; }
10564else
10565
10566$as_echo "#define HAVE_BROKEN_UNSETENV 1" >>confdefs.h
10567
10568 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10569$as_echo "yes" >&6; }
10570
10571fi
10572rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10573
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010574for ac_prog in true
10575do
10576 # Extract the first word of "$ac_prog", so it can be a program name with args.
10577set dummy $ac_prog; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010578{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10579$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010580if ${ac_cv_prog_TRUE+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010581 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010582else
10583 if test -n "$TRUE"; then
10584 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
10585else
10586as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10587for as_dir in $PATH
10588do
10589 IFS=$as_save_IFS
10590 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010591 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +010010592 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010593 ac_cv_prog_TRUE="$ac_prog"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010594 $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 +000010595 break 2
10596 fi
10597done
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010598 done
Martin v. Löwiseba40652007-08-30 20:10:57 +000010599IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010600
10601fi
10602fi
10603TRUE=$ac_cv_prog_TRUE
10604if test -n "$TRUE"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010605 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TRUE" >&5
10606$as_echo "$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010607else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010608 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10609$as_echo "no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010610fi
10611
Martin v. Löwiseba40652007-08-30 20:10:57 +000010612
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010613 test -n "$TRUE" && break
10614done
10615test -n "$TRUE" || TRUE="/bin/true"
10616
10617
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010618{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lc" >&5
10619$as_echo_n "checking for inet_aton in -lc... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010620if ${ac_cv_lib_c_inet_aton+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010621 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010622else
10623 ac_check_lib_save_LIBS=$LIBS
10624LIBS="-lc $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010625cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010626/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010627
Martin v. Löwiseba40652007-08-30 20:10:57 +000010628/* Override any GCC internal prototype to avoid an error.
10629 Use char because int might match the return type of a GCC
10630 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010631#ifdef __cplusplus
10632extern "C"
10633#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010634char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010635int
10636main ()
10637{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010638return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010639 ;
10640 return 0;
10641}
10642_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010643if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010644 ac_cv_lib_c_inet_aton=yes
10645else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010646 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010647fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010648rm -f core conftest.err conftest.$ac_objext \
10649 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010650LIBS=$ac_check_lib_save_LIBS
10651fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010652{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_inet_aton" >&5
10653$as_echo "$ac_cv_lib_c_inet_aton" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010654if test "x$ac_cv_lib_c_inet_aton" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010655 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010656else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010657 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5
10658$as_echo_n "checking for inet_aton in -lresolv... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010659if ${ac_cv_lib_resolv_inet_aton+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010660 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010661else
10662 ac_check_lib_save_LIBS=$LIBS
10663LIBS="-lresolv $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010664cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010665/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010666
Martin v. Löwiseba40652007-08-30 20:10:57 +000010667/* Override any GCC internal prototype to avoid an error.
10668 Use char because int might match the return type of a GCC
10669 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010670#ifdef __cplusplus
10671extern "C"
10672#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010673char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010674int
10675main ()
10676{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010677return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010678 ;
10679 return 0;
10680}
10681_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010682if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010683 ac_cv_lib_resolv_inet_aton=yes
10684else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010685 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010686fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010687rm -f core conftest.err conftest.$ac_objext \
10688 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010689LIBS=$ac_check_lib_save_LIBS
10690fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010691{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5
10692$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010693if test "x$ac_cv_lib_resolv_inet_aton" = xyes; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010694 cat >>confdefs.h <<_ACEOF
10695#define HAVE_LIBRESOLV 1
10696_ACEOF
10697
10698 LIBS="-lresolv $LIBS"
10699
10700fi
10701
10702
10703fi
10704
10705
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010706# On Tru64, chflags seems to be present, but calling it will
10707# exit Python
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010708{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chflags" >&5
10709$as_echo_n "checking for chflags... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010710if ${ac_cv_have_chflags+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010711 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010712else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010713 if test "$cross_compiling" = yes; then :
Gregory P. Smith49437c22009-11-02 01:38:35 +000010714 ac_cv_have_chflags=cross
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010715else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010716 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010717/* end confdefs.h. */
Ned Deily43e10542011-06-27 23:41:53 -070010718
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010719#include <sys/stat.h>
10720#include <unistd.h>
10721int main(int argc, char*argv[])
10722{
10723 if(chflags(argv[0], 0) != 0)
10724 return 1;
10725 return 0;
10726}
Ned Deily43e10542011-06-27 23:41:53 -070010727
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010728_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010729if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010730 ac_cv_have_chflags=yes
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010731else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010732 ac_cv_have_chflags=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010733fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010734rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10735 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +000010736fi
10737
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010738
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010739fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010740{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_chflags" >&5
10741$as_echo "$ac_cv_have_chflags" >&6; }
Gregory P. Smith49437c22009-11-02 01:38:35 +000010742if test "$ac_cv_have_chflags" = cross ; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010743 ac_fn_c_check_func "$LINENO" "chflags" "ac_cv_func_chflags"
Matthias Klose3cef2a92012-03-14 23:39:33 +010010744if test "x$ac_cv_func_chflags" = xyes; then :
Gregory P. Smith49437c22009-11-02 01:38:35 +000010745 ac_cv_have_chflags="yes"
10746else
10747 ac_cv_have_chflags="no"
10748fi
10749
10750fi
10751if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010752
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010753$as_echo "#define HAVE_CHFLAGS 1" >>confdefs.h
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010754
10755fi
10756
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010757{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lchflags" >&5
10758$as_echo_n "checking for lchflags... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010759if ${ac_cv_have_lchflags+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010760 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010761else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010762 if test "$cross_compiling" = yes; then :
Gregory P. Smith49437c22009-11-02 01:38:35 +000010763 ac_cv_have_lchflags=cross
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010764else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010765 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010766/* end confdefs.h. */
Ned Deily43e10542011-06-27 23:41:53 -070010767
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010768#include <sys/stat.h>
10769#include <unistd.h>
10770int main(int argc, char*argv[])
10771{
10772 if(lchflags(argv[0], 0) != 0)
10773 return 1;
10774 return 0;
10775}
Ned Deily43e10542011-06-27 23:41:53 -070010776
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010777_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010778if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010779 ac_cv_have_lchflags=yes
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010780else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010781 ac_cv_have_lchflags=no
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010782fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010783rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10784 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010785fi
10786
10787
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010788fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010789{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lchflags" >&5
10790$as_echo "$ac_cv_have_lchflags" >&6; }
Gregory P. Smith49437c22009-11-02 01:38:35 +000010791if test "$ac_cv_have_lchflags" = cross ; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010792 ac_fn_c_check_func "$LINENO" "lchflags" "ac_cv_func_lchflags"
Matthias Klose3cef2a92012-03-14 23:39:33 +010010793if test "x$ac_cv_func_lchflags" = xyes; then :
Gregory P. Smith49437c22009-11-02 01:38:35 +000010794 ac_cv_have_lchflags="yes"
10795else
10796 ac_cv_have_lchflags="no"
10797fi
10798
10799fi
10800if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010801
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010802$as_echo "#define HAVE_LCHFLAGS 1" >>confdefs.h
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010803
10804fi
10805
Ronald Oussorenf8752642006-07-06 10:13:35 +000010806case $ac_sys_system/$ac_sys_release in
10807Darwin/*)
10808 _CUR_CFLAGS="${CFLAGS}"
10809 _CUR_LDFLAGS="${LDFLAGS}"
10810 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
10811 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
10812 ;;
10813esac
10814
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010815{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5
10816$as_echo_n "checking for inflateCopy in -lz... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010817if ${ac_cv_lib_z_inflateCopy+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010818 $as_echo_n "(cached) " >&6
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000010819else
10820 ac_check_lib_save_LIBS=$LIBS
10821LIBS="-lz $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010822cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000010823/* end confdefs.h. */
10824
Martin v. Löwiseba40652007-08-30 20:10:57 +000010825/* Override any GCC internal prototype to avoid an error.
10826 Use char because int might match the return type of a GCC
10827 builtin and then its argument prototype would still apply. */
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000010828#ifdef __cplusplus
10829extern "C"
10830#endif
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000010831char inflateCopy ();
10832int
10833main ()
10834{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010835return inflateCopy ();
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000010836 ;
10837 return 0;
10838}
10839_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010840if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000010841 ac_cv_lib_z_inflateCopy=yes
10842else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010843 ac_cv_lib_z_inflateCopy=no
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000010844fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010845rm -f core conftest.err conftest.$ac_objext \
10846 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000010847LIBS=$ac_check_lib_save_LIBS
10848fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010849{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5
10850$as_echo "$ac_cv_lib_z_inflateCopy" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010851if test "x$ac_cv_lib_z_inflateCopy" = xyes; then :
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000010852
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010853$as_echo "#define HAVE_ZLIB_COPY 1" >>confdefs.h
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000010854
10855fi
10856
10857
Ronald Oussorenf8752642006-07-06 10:13:35 +000010858case $ac_sys_system/$ac_sys_release in
10859Darwin/*)
10860 CFLAGS="${_CUR_CFLAGS}"
10861 LDFLAGS="${_CUR_LDFLAGS}"
10862 ;;
10863esac
10864
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010865{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hstrerror" >&5
10866$as_echo_n "checking for hstrerror... " >&6; }
10867cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010868/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000010869
Martin v. Löwise9416172003-05-03 10:12:45 +000010870#include <netdb.h>
10871
Martin v. Löwise9416172003-05-03 10:12:45 +000010872int
10873main ()
10874{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010875void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000010876 ;
10877 return 0;
10878}
10879_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010880if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000010881
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010882$as_echo "#define HAVE_HSTRERROR 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000010883
Matthias Klosec511b472010-05-08 11:01:39 +000010884 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010885$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010886else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010887 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10888$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010889
10890fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010891rm -f core conftest.err conftest.$ac_objext \
10892 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010893
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010894{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5
10895$as_echo_n "checking for inet_aton... " >&6; }
10896cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010897/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000010898
Martin v. Löwis86d66262006-02-17 08:40:11 +000010899#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000010900#include <sys/socket.h>
10901#include <netinet/in.h>
10902#include <arpa/inet.h>
10903
Martin v. Löwise9416172003-05-03 10:12:45 +000010904int
10905main ()
10906{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010907void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000010908 ;
10909 return 0;
10910}
10911_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010912if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000010913
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010914$as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000010915
Matthias Klosec511b472010-05-08 11:01:39 +000010916 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010917$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010918else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010919 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10920$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010921
10922fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010923rm -f core conftest.err conftest.$ac_objext \
10924 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010925
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010926{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_pton" >&5
10927$as_echo_n "checking for inet_pton... " >&6; }
10928cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010929/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000010930
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000010931#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000010932#include <sys/socket.h>
10933#include <netinet/in.h>
10934#include <arpa/inet.h>
10935
Martin v. Löwise9416172003-05-03 10:12:45 +000010936int
10937main ()
10938{
10939void* p = inet_pton
10940 ;
10941 return 0;
10942}
10943_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010944if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000010945
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010946$as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000010947
Matthias Klosec511b472010-05-08 11:01:39 +000010948 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010949$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010950else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010951 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10952$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010953
10954fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010955rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000010956
Martin v. Löwisd6640d42003-07-06 09:29:52 +000010957# On some systems, setgroups is in unistd.h, on others, in grp.h
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010958{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for setgroups" >&5
10959$as_echo_n "checking for setgroups... " >&6; }
10960cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010961/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000010962
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000010963#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000010964#ifdef HAVE_GRP_H
10965#include <grp.h>
10966#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000010967
Martin v. Löwisd5843682002-11-21 20:41:28 +000010968int
10969main ()
10970{
10971void* p = setgroups
10972 ;
10973 return 0;
10974}
10975_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010976if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000010977
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010978$as_echo "#define HAVE_SETGROUPS 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000010979
Matthias Klosec511b472010-05-08 11:01:39 +000010980 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010981$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010982else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010983 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10984$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010985
10986fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010987rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000010988
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010989# check for openpty and forkpty
10990
10991for ac_func in openpty
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010992do :
10993 ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty"
Matthias Klose3cef2a92012-03-14 23:39:33 +010010994if test "x$ac_cv_func_openpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010995 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010996#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010997_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010998
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010999else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011000 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5
11001$as_echo_n "checking for openpty in -lutil... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011002if ${ac_cv_lib_util_openpty+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011003 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000011004else
Martin v. Löwis11437992002-04-12 09:54:03 +000011005 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011006LIBS="-lutil $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011007cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011008/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011009
Martin v. Löwiseba40652007-08-30 20:10:57 +000011010/* Override any GCC internal prototype to avoid an error.
11011 Use char because int might match the return type of a GCC
11012 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011013#ifdef __cplusplus
11014extern "C"
11015#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011016char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011017int
11018main ()
11019{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011020return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011021 ;
11022 return 0;
11023}
11024_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011025if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011026 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000011027else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011028 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011029fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011030rm -f core conftest.err conftest.$ac_objext \
11031 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011032LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011033fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011034{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5
11035$as_echo "$ac_cv_lib_util_openpty" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011036if test "x$ac_cv_lib_util_openpty" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011037 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000011038 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011039else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011040 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lbsd" >&5
11041$as_echo_n "checking for openpty in -lbsd... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011042if ${ac_cv_lib_bsd_openpty+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011043 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011044else
11045 ac_check_lib_save_LIBS=$LIBS
11046LIBS="-lbsd $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011047cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011048/* end confdefs.h. */
11049
Martin v. Löwiseba40652007-08-30 20:10:57 +000011050/* Override any GCC internal prototype to avoid an error.
11051 Use char because int might match the return type of a GCC
11052 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011053#ifdef __cplusplus
11054extern "C"
11055#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011056char openpty ();
11057int
11058main ()
11059{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011060return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011061 ;
11062 return 0;
11063}
11064_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011065if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011066 ac_cv_lib_bsd_openpty=yes
11067else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011068 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011069fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011070rm -f core conftest.err conftest.$ac_objext \
11071 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011072LIBS=$ac_check_lib_save_LIBS
11073fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011074{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_openpty" >&5
11075$as_echo "$ac_cv_lib_bsd_openpty" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011076if test "x$ac_cv_lib_bsd_openpty" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011077 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011078 LIBS="$LIBS -lbsd"
11079fi
11080
11081
11082fi
11083
Fred Drake8cef4cf2000-06-28 16:40:38 +000011084
11085fi
11086done
11087
11088for ac_func in forkpty
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011089do :
11090 ac_fn_c_check_func "$LINENO" "forkpty" "ac_cv_func_forkpty"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011091if test "x$ac_cv_func_forkpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011092 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011093#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011094_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011095
Fred Drake8cef4cf2000-06-28 16:40:38 +000011096else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011097 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5
11098$as_echo_n "checking for forkpty in -lutil... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011099if ${ac_cv_lib_util_forkpty+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011100 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000011101else
Martin v. Löwis11437992002-04-12 09:54:03 +000011102 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011103LIBS="-lutil $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011104cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011105/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011106
Martin v. Löwiseba40652007-08-30 20:10:57 +000011107/* Override any GCC internal prototype to avoid an error.
11108 Use char because int might match the return type of a GCC
11109 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011110#ifdef __cplusplus
11111extern "C"
11112#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011113char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011114int
11115main ()
11116{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011117return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011118 ;
11119 return 0;
11120}
11121_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011122if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011123 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000011124else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011125 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011126fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011127rm -f core conftest.err conftest.$ac_objext \
11128 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011129LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011130fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011131{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5
11132$as_echo "$ac_cv_lib_util_forkpty" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011133if test "x$ac_cv_lib_util_forkpty" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011134 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000011135 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011136else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011137 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lbsd" >&5
11138$as_echo_n "checking for forkpty in -lbsd... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011139if ${ac_cv_lib_bsd_forkpty+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011140 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011141else
11142 ac_check_lib_save_LIBS=$LIBS
11143LIBS="-lbsd $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011144cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011145/* end confdefs.h. */
11146
Martin v. Löwiseba40652007-08-30 20:10:57 +000011147/* Override any GCC internal prototype to avoid an error.
11148 Use char because int might match the return type of a GCC
11149 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011150#ifdef __cplusplus
11151extern "C"
11152#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011153char forkpty ();
11154int
11155main ()
11156{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011157return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011158 ;
11159 return 0;
11160}
11161_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011162if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011163 ac_cv_lib_bsd_forkpty=yes
11164else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011165 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011166fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011167rm -f core conftest.err conftest.$ac_objext \
11168 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011169LIBS=$ac_check_lib_save_LIBS
11170fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011171{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_forkpty" >&5
11172$as_echo "$ac_cv_lib_bsd_forkpty" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011173if test "x$ac_cv_lib_bsd_forkpty" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011174 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011175 LIBS="$LIBS -lbsd"
11176fi
11177
11178
11179fi
11180
Fred Drake8cef4cf2000-06-28 16:40:38 +000011181
11182fi
11183done
11184
Jack Jansendd19cf82001-12-06 22:36:17 +000011185
Brett Cannonaa5778d2008-03-18 04:09:00 +000011186# Stuff for expat.
Brett Cannonaa5778d2008-03-18 04:09:00 +000011187for ac_func in memmove
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011188do :
11189 ac_fn_c_check_func "$LINENO" "memmove" "ac_cv_func_memmove"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011190if test "x$ac_cv_func_memmove" = xyes; then :
Brett Cannonaa5778d2008-03-18 04:09:00 +000011191 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011192#define HAVE_MEMMOVE 1
Brett Cannonaa5778d2008-03-18 04:09:00 +000011193_ACEOF
11194
11195fi
11196done
11197
11198
Michael W. Hudson54241132001-12-07 15:38:26 +000011199# check for long file support functions
Fred Drake8cef4cf2000-06-28 16:40:38 +000011200for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011201do :
11202 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11203ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Georg Brandl71f4fbb2011-02-25 11:04:50 +000011204if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011205 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011206#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011207_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000011208
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011209fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000011210done
11211
Michael W. Hudson54241132001-12-07 15:38:26 +000011212
Georg Brandl71f4fbb2011-02-25 11:04:50 +000011213ac_fn_c_check_func "$LINENO" "dup2" "ac_cv_func_dup2"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011214if test "x$ac_cv_func_dup2" = xyes; then :
Georg Brandl71f4fbb2011-02-25 11:04:50 +000011215 $as_echo "#define HAVE_DUP2 1" >>confdefs.h
Martin v. Löwis1142de32002-03-29 16:28:31 +000011216
Martin v. Löwis1142de32002-03-29 16:28:31 +000011217else
Martin v. Löwiseba40652007-08-30 20:10:57 +000011218 case " $LIBOBJS " in
Georg Brandl71f4fbb2011-02-25 11:04:50 +000011219 *" dup2.$ac_objext "* ) ;;
11220 *) LIBOBJS="$LIBOBJS dup2.$ac_objext"
Martin v. Löwiseba40652007-08-30 20:10:57 +000011221 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000011222esac
11223
Martin v. Löwis1142de32002-03-29 16:28:31 +000011224fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +000011225
11226ac_fn_c_check_func "$LINENO" "getcwd" "ac_cv_func_getcwd"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011227if test "x$ac_cv_func_getcwd" = xyes; then :
Georg Brandl71f4fbb2011-02-25 11:04:50 +000011228 $as_echo "#define HAVE_GETCWD 1" >>confdefs.h
11229
11230else
11231 case " $LIBOBJS " in
11232 *" getcwd.$ac_objext "* ) ;;
11233 *) LIBOBJS="$LIBOBJS getcwd.$ac_objext"
11234 ;;
11235esac
11236
11237fi
11238
11239ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011240if test "x$ac_cv_func_strdup" = xyes; then :
Georg Brandl71f4fbb2011-02-25 11:04:50 +000011241 $as_echo "#define HAVE_STRDUP 1" >>confdefs.h
11242
11243else
11244 case " $LIBOBJS " in
11245 *" strdup.$ac_objext "* ) ;;
11246 *) LIBOBJS="$LIBOBJS strdup.$ac_objext"
11247 ;;
11248esac
11249
11250fi
Martin v. Löwis1142de32002-03-29 16:28:31 +000011251
11252
11253for ac_func in getpgrp
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011254do :
11255 ac_fn_c_check_func "$LINENO" "getpgrp" "ac_cv_func_getpgrp"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011256if test "x$ac_cv_func_getpgrp" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011257 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011258#define HAVE_GETPGRP 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011259_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011260 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011261/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011262#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011263int
11264main ()
11265{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011266getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000011267 ;
11268 return 0;
11269}
11270_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011271if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011272
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011273$as_echo "#define GETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000011274
Guido van Rossum627b2d71993-12-24 10:39:16 +000011275fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011276rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011277
Guido van Rossum627b2d71993-12-24 10:39:16 +000011278fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011279done
Guido van Rossum627b2d71993-12-24 10:39:16 +000011280
Jack Jansen150753c2003-03-29 22:07:47 +000011281for ac_func in setpgrp
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011282do :
11283 ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011284if test "x$ac_cv_func_setpgrp" = xyes; then :
Jack Jansen150753c2003-03-29 22:07:47 +000011285 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011286#define HAVE_SETPGRP 1
Jack Jansen150753c2003-03-29 22:07:47 +000011287_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011288 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011289/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000011290#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000011291int
11292main ()
11293{
11294setpgrp(0,0);
11295 ;
11296 return 0;
11297}
11298_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011299if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011300
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011301$as_echo "#define SETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000011302
Guido van Rossum8eee56f1994-10-20 22:18:37 +000011303fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011304rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000011305
11306fi
11307done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000011308
Thomas Wouters3a584202000-08-05 23:28:51 +000011309for ac_func in gettimeofday
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011310do :
11311 ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011312if test "x$ac_cv_func_gettimeofday" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011313 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011314#define HAVE_GETTIMEOFDAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011315_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011316 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011317/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000011318#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011319int
11320main ()
11321{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011322gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000011323 ;
11324 return 0;
11325}
11326_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011327if ac_fn_c_try_compile "$LINENO"; then :
11328
Guido van Rossum627b2d71993-12-24 10:39:16 +000011329else
Skip Montanaro6dead952003-09-25 14:50:04 +000011330
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011331$as_echo "#define GETTIMEOFDAY_NO_TZ 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000011332
Martin v. Löwis11437992002-04-12 09:54:03 +000011333
Guido van Rossum627b2d71993-12-24 10:39:16 +000011334fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011335rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011336
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011337fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011338done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011339
Michael W. Hudson54241132001-12-07 15:38:26 +000011340
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011341{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for major" >&5
11342$as_echo_n "checking for major... " >&6; }
11343cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011344/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011345
Neal Norwitz6eb37f02003-02-23 23:28:15 +000011346#if defined(MAJOR_IN_MKDEV)
11347#include <sys/mkdev.h>
11348#elif defined(MAJOR_IN_SYSMACROS)
11349#include <sys/sysmacros.h>
11350#else
11351#include <sys/types.h>
11352#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011353
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011354int
11355main ()
11356{
11357
11358 makedev(major(0),minor(0));
11359
11360 ;
11361 return 0;
11362}
11363_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011364if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011365
11366
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011367$as_echo "#define HAVE_DEVICE_MACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011368
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011369 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11370$as_echo "yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011371
11372else
Skip Montanaro6dead952003-09-25 14:50:04 +000011373
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011374 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11375$as_echo "no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011376
11377fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011378rm -f core conftest.err conftest.$ac_objext \
11379 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000011380
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011381# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000011382# for [no]getaddrinfo in netdb.h.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011383{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
11384$as_echo_n "checking for getaddrinfo... " >&6; }
11385cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011386/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011387
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000011388#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011389#include <sys/socket.h>
11390#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000011391#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011392
Martin v. Löwis11437992002-04-12 09:54:03 +000011393int
11394main ()
11395{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011396getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000011397 ;
11398 return 0;
11399}
11400_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011401if ac_fn_c_try_link "$LINENO"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011402 have_getaddrinfo=yes
11403else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011404 have_getaddrinfo=no
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011405fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011406rm -f core conftest.err conftest.$ac_objext \
11407 conftest$ac_exeext conftest.$ac_ext
11408{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getaddrinfo" >&5
11409$as_echo "$have_getaddrinfo" >&6; }
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011410if test $have_getaddrinfo = yes
11411then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011412 { $as_echo "$as_me:${as_lineno-$LINENO}: checking getaddrinfo bug" >&5
11413$as_echo_n "checking getaddrinfo bug... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011414 if ${ac_cv_buggy_getaddrinfo+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011415 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011416else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011417 if test "$cross_compiling" = yes; then :
doko@python.orgd65e2ba2013-01-31 23:52:03 +010011418
11419if test "${enable_ipv6+set}" = set; then
11420 ac_cv_buggy_getaddrinfo="no -- configured with --(en|dis)able-ipv6"
11421else
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011422 ac_cv_buggy_getaddrinfo=yes
doko@python.orgd65e2ba2013-01-31 23:52:03 +010011423fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011424else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011425 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011426/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011427
Stefan Krah0afe4e42012-11-22 23:56:51 +010011428#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011429#include <sys/types.h>
11430#include <netdb.h>
11431#include <string.h>
11432#include <sys/socket.h>
11433#include <netinet/in.h>
11434
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011435int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011436{
11437 int passive, gaierr, inet4 = 0, inet6 = 0;
11438 struct addrinfo hints, *ai, *aitop;
11439 char straddr[INET6_ADDRSTRLEN], strport[16];
11440
11441 for (passive = 0; passive <= 1; passive++) {
11442 memset(&hints, 0, sizeof(hints));
11443 hints.ai_family = AF_UNSPEC;
11444 hints.ai_flags = passive ? AI_PASSIVE : 0;
11445 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000011446 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011447 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
11448 (void)gai_strerror(gaierr);
11449 goto bad;
11450 }
11451 for (ai = aitop; ai; ai = ai->ai_next) {
11452 if (ai->ai_addr == NULL ||
11453 ai->ai_addrlen == 0 ||
11454 getnameinfo(ai->ai_addr, ai->ai_addrlen,
11455 straddr, sizeof(straddr), strport, sizeof(strport),
11456 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
11457 goto bad;
11458 }
11459 switch (ai->ai_family) {
11460 case AF_INET:
11461 if (strcmp(strport, "54321") != 0) {
11462 goto bad;
11463 }
11464 if (passive) {
11465 if (strcmp(straddr, "0.0.0.0") != 0) {
11466 goto bad;
11467 }
11468 } else {
11469 if (strcmp(straddr, "127.0.0.1") != 0) {
11470 goto bad;
11471 }
11472 }
11473 inet4++;
11474 break;
11475 case AF_INET6:
11476 if (strcmp(strport, "54321") != 0) {
11477 goto bad;
11478 }
11479 if (passive) {
11480 if (strcmp(straddr, "::") != 0) {
11481 goto bad;
11482 }
11483 } else {
11484 if (strcmp(straddr, "::1") != 0) {
11485 goto bad;
11486 }
11487 }
11488 inet6++;
11489 break;
11490 case AF_UNSPEC:
11491 goto bad;
11492 break;
11493 default:
11494 /* another family support? */
11495 break;
11496 }
11497 }
11498 }
11499
11500 if (!(inet4 == 0 || inet4 == 2))
11501 goto bad;
11502 if (!(inet6 == 0 || inet6 == 2))
11503 goto bad;
11504
11505 if (aitop)
11506 freeaddrinfo(aitop);
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011507 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011508
11509 bad:
11510 if (aitop)
11511 freeaddrinfo(aitop);
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011512 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011513}
11514
Martin v. Löwis11437992002-04-12 09:54:03 +000011515_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011516if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011517 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011518else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011519 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011520fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011521rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11522 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011523fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011524
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011525fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011526
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011527fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011528
Benjamin Peterson75fed812010-11-01 01:47:19 +000011529{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_buggy_getaddrinfo" >&5
11530$as_echo "$ac_cv_buggy_getaddrinfo" >&6; }
11531
Mark Dickinson0ef0b912009-12-31 21:11:48 +000011532if test $have_getaddrinfo = no -o "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011533then
11534 if test $ipv6 = yes
11535 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011536 echo 'Fatal: You must get working getaddrinfo() function.'
11537 echo ' or you can specify "--disable-ipv6"'.
11538 exit 1
11539 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011540else
Martin v. Löwis11437992002-04-12 09:54:03 +000011541
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011542$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011543
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011544fi
Benjamin Peterson75fed812010-11-01 01:47:19 +000011545
Jack Jansen9a66b6d2001-08-08 13:56:14 +000011546for ac_func in getnameinfo
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011547do :
11548 ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011549if test "x$ac_cv_func_getnameinfo" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011550 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011551#define HAVE_GETNAMEINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011552_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011553
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011554fi
11555done
11556
Michael W. Hudson54241132001-12-07 15:38:26 +000011557
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011558# checks for structures
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011559{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
11560$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011561if ${ac_cv_header_time+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011562 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011563else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011564 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011565/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011566#include <sys/types.h>
11567#include <sys/time.h>
11568#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011569
Martin v. Löwis11437992002-04-12 09:54:03 +000011570int
11571main ()
11572{
11573if ((struct tm *) 0)
11574return 0;
11575 ;
11576 return 0;
11577}
11578_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011579if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011580 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000011581else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011582 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011583fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011584rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011585fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011586{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
11587$as_echo "$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000011588if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011589
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011590$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011591
11592fi
11593
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011594{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
11595$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011596if ${ac_cv_struct_tm+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011597 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011598else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011599 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011600/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011601#include <sys/types.h>
11602#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011603
Martin v. Löwis11437992002-04-12 09:54:03 +000011604int
11605main ()
11606{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011607struct tm tm;
11608 int *p = &tm.tm_sec;
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011609 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000011610 ;
11611 return 0;
11612}
11613_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011614if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011615 ac_cv_struct_tm=time.h
11616else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011617 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011618fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011619rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011620fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011621{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
11622$as_echo "$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000011623if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011624
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011625$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011626
11627fi
11628
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011629ac_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 +000011630#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000011631
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011632"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011633if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011634
11635cat >>confdefs.h <<_ACEOF
11636#define HAVE_STRUCT_TM_TM_ZONE 1
11637_ACEOF
11638
11639
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011640fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011641
Martin v. Löwis11437992002-04-12 09:54:03 +000011642if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
11643
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011644$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011645
11646else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011647 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
11648"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011649if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011650 ac_have_decl=1
Martin v. Löwiseba40652007-08-30 20:10:57 +000011651else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011652 ac_have_decl=0
Martin v. Löwiseba40652007-08-30 20:10:57 +000011653fi
11654
Martin v. Löwiseba40652007-08-30 20:10:57 +000011655cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011656#define HAVE_DECL_TZNAME $ac_have_decl
Martin v. Löwiseba40652007-08-30 20:10:57 +000011657_ACEOF
11658
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011659 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
11660$as_echo_n "checking for tzname... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011661if ${ac_cv_var_tzname+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011662 $as_echo_n "(cached) " >&6
Martin v. Löwiseba40652007-08-30 20:10:57 +000011663else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011664 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011665/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000011666#include <time.h>
Martin v. Löwiseba40652007-08-30 20:10:57 +000011667#if !HAVE_DECL_TZNAME
11668extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000011669#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011670
Martin v. Löwis11437992002-04-12 09:54:03 +000011671int
11672main ()
11673{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011674return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000011675 ;
11676 return 0;
11677}
11678_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011679if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011680 ac_cv_var_tzname=yes
11681else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011682 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011683fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011684rm -f core conftest.err conftest.$ac_objext \
11685 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000011686fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011687{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
11688$as_echo "$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000011689 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011690
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011691$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000011692
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011693 fi
11694fi
11695
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011696ac_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 +010011697if test "x$ac_cv_member_struct_stat_st_rdev" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011698
11699cat >>confdefs.h <<_ACEOF
11700#define HAVE_STRUCT_STAT_ST_RDEV 1
11701_ACEOF
11702
11703
Guido van Rossum98bf58f2001-10-18 20:34:25 +000011704fi
11705
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011706ac_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 +010011707if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000011708
Martin v. Löwis11437992002-04-12 09:54:03 +000011709cat >>confdefs.h <<_ACEOF
11710#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
11711_ACEOF
11712
11713
Guido van Rossum98bf58f2001-10-18 20:34:25 +000011714fi
11715
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011716ac_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 +010011717if test "x$ac_cv_member_struct_stat_st_flags" = xyes; then :
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000011718
11719cat >>confdefs.h <<_ACEOF
11720#define HAVE_STRUCT_STAT_ST_FLAGS 1
11721_ACEOF
11722
11723
11724fi
11725
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011726ac_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 +010011727if test "x$ac_cv_member_struct_stat_st_gen" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000011728
11729cat >>confdefs.h <<_ACEOF
11730#define HAVE_STRUCT_STAT_ST_GEN 1
11731_ACEOF
11732
11733
11734fi
11735
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011736ac_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 +010011737if test "x$ac_cv_member_struct_stat_st_birthtime" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000011738
11739cat >>confdefs.h <<_ACEOF
11740#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
11741_ACEOF
11742
11743
11744fi
11745
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011746ac_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 +010011747if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000011748
Martin v. Löwis11437992002-04-12 09:54:03 +000011749cat >>confdefs.h <<_ACEOF
11750#define HAVE_STRUCT_STAT_ST_BLOCKS 1
11751_ACEOF
11752
11753
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011754$as_echo "#define HAVE_ST_BLOCKS 1" >>confdefs.h
Guido van Rossum98bf58f2001-10-18 20:34:25 +000011755
11756else
Martin v. Löwiseba40652007-08-30 20:10:57 +000011757 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000011758 *" fileblocks.$ac_objext "* ) ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000011759 *) LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
11760 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000011761esac
11762
Guido van Rossum98bf58f2001-10-18 20:34:25 +000011763fi
11764
Michael W. Hudson54241132001-12-07 15:38:26 +000011765
Martin v. Löwis11437992002-04-12 09:54:03 +000011766
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011767{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5
11768$as_echo_n "checking for time.h that defines altzone... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011769if ${ac_cv_header_time_altzone+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011770 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011771else
Matthias Klosec511b472010-05-08 11:01:39 +000011772
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011773 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011774/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000011775#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011776int
11777main ()
11778{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011779return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000011780 ;
11781 return 0;
11782}
11783_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011784if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011785 ac_cv_header_time_altzone=yes
11786else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011787 ac_cv_header_time_altzone=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011788fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011789rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosec511b472010-05-08 11:01:39 +000011790
Martin v. Löwiseba40652007-08-30 20:10:57 +000011791fi
11792
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011793{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5
11794$as_echo "$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011795if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011796
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011797$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011798
11799fi
11800
Guido van Rossumda88dad1995-01-26 00:46:29 +000011801was_it_defined=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011802{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
11803$as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
11804cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011805/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000011806
11807#include <sys/types.h>
11808#include <sys/select.h>
11809#include <sys/time.h>
11810
Martin v. Löwis11437992002-04-12 09:54:03 +000011811int
11812main ()
11813{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011814;
Martin v. Löwis11437992002-04-12 09:54:03 +000011815 ;
11816 return 0;
11817}
11818_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011819if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011820
11821
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011822$as_echo "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011823
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011824 was_it_defined=yes
11825
Martin v. Löwiseba40652007-08-30 20:10:57 +000011826fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011827rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011828{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
11829$as_echo "$was_it_defined" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000011830
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011831{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for addrinfo" >&5
11832$as_echo_n "checking for addrinfo... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011833if ${ac_cv_struct_addrinfo+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011834 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011835else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011836 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011837/* end confdefs.h. */
Matthias Klosec511b472010-05-08 11:01:39 +000011838#include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011839int
11840main ()
11841{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011842struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000011843 ;
11844 return 0;
11845}
11846_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011847if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011848 ac_cv_struct_addrinfo=yes
11849else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011850 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011851fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011852rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11853fi
11854
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011855{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5
11856$as_echo "$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011857if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011858
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011859$as_echo "#define HAVE_ADDRINFO 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011860
11861fi
11862
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011863{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5
11864$as_echo_n "checking for sockaddr_storage... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011865if ${ac_cv_struct_sockaddr_storage+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011866 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011867else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011868 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011869/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011870
11871# include <sys/types.h>
11872# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011873int
11874main ()
11875{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011876struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000011877 ;
11878 return 0;
11879}
11880_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011881if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011882 ac_cv_struct_sockaddr_storage=yes
11883else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011884 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011885fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011886rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11887fi
11888
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011889{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5
11890$as_echo "$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011891if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011892
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011893$as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011894
11895fi
11896
Guido van Rossum627b2d71993-12-24 10:39:16 +000011897# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000011898
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011899{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
11900$as_echo_n "checking whether char is unsigned... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011901if ${ac_cv_c_char_unsigned+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011902 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000011903else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011904 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011905/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011906$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000011907int
11908main ()
11909{
11910static int test_array [1 - 2 * !(((char) -1) < 0)];
Charles-François Natalibe2b9072013-01-08 19:47:00 +010011911test_array [0] = 0;
11912return test_array [0];
Martin v. Löwis11437992002-04-12 09:54:03 +000011913
11914 ;
11915 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000011916}
Martin v. Löwis11437992002-04-12 09:54:03 +000011917_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011918if ac_fn_c_try_compile "$LINENO"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000011919 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000011920else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011921 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011922fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011923rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000011924fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011925{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
11926$as_echo "$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011927if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011928 $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011929
11930fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000011931
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011932{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
11933$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011934if ${ac_cv_c_const+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011935 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000011936else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011937 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011938/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011939
Martin v. Löwis11437992002-04-12 09:54:03 +000011940int
11941main ()
11942{
Charles-François Natalibe2b9072013-01-08 19:47:00 +010011943
Martin v. Löwis11437992002-04-12 09:54:03 +000011944#ifndef __cplusplus
Charles-François Natalibe2b9072013-01-08 19:47:00 +010011945 /* Ultrix mips cc rejects this sort of thing. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011946 typedef int charset[2];
Charles-François Natalibe2b9072013-01-08 19:47:00 +010011947 const charset cs = { 0, 0 };
Martin v. Löwis11437992002-04-12 09:54:03 +000011948 /* SunOS 4.1.1 cc rejects this. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000011949 char const *const *pcpcc;
11950 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000011951 /* NEC SVR4.0.2 mips cc rejects this. */
11952 struct point {int x, y;};
11953 static struct point const zero = {0,0};
11954 /* AIX XL C 1.02.0.0 rejects this.
11955 It does not let you subtract one const X* pointer from another in
11956 an arm of an if-expression whose if-part is not a constant
11957 expression */
11958 const char *g = "string";
Martin v. Löwiseba40652007-08-30 20:10:57 +000011959 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000011960 /* HPUX 7.0 cc rejects these. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000011961 ++pcpcc;
11962 ppc = (char**) pcpcc;
11963 pcpcc = (char const *const *) ppc;
Charles-François Natalibe2b9072013-01-08 19:47:00 +010011964 { /* SCO 3.2v4 cc rejects this sort of thing. */
11965 char tx;
11966 char *t = &tx;
Martin v. Löwis11437992002-04-12 09:54:03 +000011967 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011968
Martin v. Löwis11437992002-04-12 09:54:03 +000011969 *t++ = 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +000011970 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011971 }
11972 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
11973 int x[] = {25, 17};
11974 const int *foo = &x[0];
11975 ++foo;
11976 }
11977 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
11978 typedef const int *iptr;
11979 iptr p = 0;
11980 ++p;
11981 }
Charles-François Natalibe2b9072013-01-08 19:47:00 +010011982 { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
Martin v. Löwis11437992002-04-12 09:54:03 +000011983 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
Charles-François Natalibe2b9072013-01-08 19:47:00 +010011984 struct s { int j; const int *ap[3]; } bx;
11985 struct s *b = &bx; b->j = 5;
Martin v. Löwis11437992002-04-12 09:54:03 +000011986 }
11987 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
11988 const int foo = 10;
Martin v. Löwiseba40652007-08-30 20:10:57 +000011989 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011990 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000011991 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000011992#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000011993
Martin v. Löwis11437992002-04-12 09:54:03 +000011994 ;
11995 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000011996}
Martin v. Löwis11437992002-04-12 09:54:03 +000011997_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011998if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011999 ac_cv_c_const=yes
12000else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012001 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012002fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012003rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012004fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012005{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
12006$as_echo "$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012007if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012008
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012009$as_echo "#define const /**/" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012010
12011fi
12012
Michael W. Hudson54241132001-12-07 15:38:26 +000012013
Guido van Rossumda88dad1995-01-26 00:46:29 +000012014works=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012015{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5
12016$as_echo_n "checking for working volatile... " >&6; }
12017cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012018/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000012019
Martin v. Löwis11437992002-04-12 09:54:03 +000012020int
12021main ()
12022{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012023volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012024 ;
12025 return 0;
12026}
12027_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012028if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000012029 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000012030else
Skip Montanaro6dead952003-09-25 14:50:04 +000012031
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012032$as_echo "#define volatile /**/" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000012033
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012034
Guido van Rossum627b2d71993-12-24 10:39:16 +000012035fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012036rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012037{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
12038$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000012039
Guido van Rossumda88dad1995-01-26 00:46:29 +000012040works=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012041{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working signed char" >&5
12042$as_echo_n "checking for working signed char... " >&6; }
12043cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012044/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000012045
Martin v. Löwis11437992002-04-12 09:54:03 +000012046int
12047main ()
12048{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012049signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000012050 ;
12051 return 0;
12052}
12053_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012054if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000012055 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000012056else
Skip Montanaro6dead952003-09-25 14:50:04 +000012057
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012058$as_echo "#define signed /**/" >>confdefs.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000012059
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012060
Guido van Rossum7f43da71994-08-01 12:15:30 +000012061fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012062rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012063{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
12064$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000012065
Guido van Rossumda88dad1995-01-26 00:46:29 +000012066have_prototypes=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012067{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototypes" >&5
12068$as_echo_n "checking for prototypes... " >&6; }
12069cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012070/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012071int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012072int
12073main ()
12074{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012075return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000012076 ;
12077 return 0;
12078}
12079_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012080if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012081
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012082$as_echo "#define HAVE_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012083
Matthias Klosec511b472010-05-08 11:01:39 +000012084 have_prototypes=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000012085fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012086rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012087{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_prototypes" >&5
12088$as_echo "$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012089
Guido van Rossumda88dad1995-01-26 00:46:29 +000012090works=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012091{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for variable length prototypes and stdarg.h" >&5
12092$as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; }
12093cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012094/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012095
12096#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000012097int foo(int x, ...) {
12098 va_list va;
12099 va_start(va, x);
12100 va_arg(va, int);
12101 va_arg(va, char *);
12102 va_arg(va, double);
12103 return 0;
12104}
Guido van Rossum7f43da71994-08-01 12:15:30 +000012105
Martin v. Löwis11437992002-04-12 09:54:03 +000012106int
12107main ()
12108{
Guido van Rossum90eea071996-08-30 20:58:57 +000012109return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000012110 ;
12111 return 0;
12112}
12113_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012114if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012115
12116
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012117$as_echo "#define HAVE_STDARG_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012118
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012119 works=yes
12120
Guido van Rossum627b2d71993-12-24 10:39:16 +000012121fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012122rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012123{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
12124$as_echo "$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012125
Martin v. Löwisd6320502004-08-12 13:45:08 +000012126# check for socketpair
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012127{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair" >&5
12128$as_echo_n "checking for socketpair... " >&6; }
12129cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000012130/* end confdefs.h. */
12131
12132#include <sys/types.h>
12133#include <sys/socket.h>
12134
12135int
12136main ()
12137{
12138void *x=socketpair
12139 ;
12140 return 0;
12141}
12142_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012143if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd6320502004-08-12 13:45:08 +000012144
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012145$as_echo "#define HAVE_SOCKETPAIR 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +000012146
Matthias Klosec511b472010-05-08 11:01:39 +000012147 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012148$as_echo "yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000012149else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012150 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12151$as_echo "no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000012152
12153fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012154rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000012155
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012156# check if sockaddr has sa_len member
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012157{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr has sa_len member" >&5
12158$as_echo_n "checking if sockaddr has sa_len member... " >&6; }
12159cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012160/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012161#include <sys/types.h>
12162#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012163int
12164main ()
12165{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012166struct sockaddr x;
12167x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012168 ;
12169 return 0;
12170}
12171_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012172if ac_fn_c_try_compile "$LINENO"; then :
12173 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12174$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012175
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012176$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012177
12178else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012179 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12180$as_echo "no" >&6; }
Matthias Klosec511b472010-05-08 11:01:39 +000012181
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012182fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012183rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012184
Guido van Rossumda88dad1995-01-26 00:46:29 +000012185va_list_is_array=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012186{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether va_list is an array" >&5
12187$as_echo_n "checking whether va_list is an array... " >&6; }
12188cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012189/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012190
12191#ifdef HAVE_STDARG_PROTOTYPES
12192#include <stdarg.h>
12193#else
12194#include <varargs.h>
12195#endif
12196
Martin v. Löwis11437992002-04-12 09:54:03 +000012197int
12198main ()
12199{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012200va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000012201 ;
12202 return 0;
12203}
12204_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012205if ac_fn_c_try_compile "$LINENO"; then :
12206
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012207else
Skip Montanaro6dead952003-09-25 14:50:04 +000012208
Martin v. Löwis11437992002-04-12 09:54:03 +000012209
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012210$as_echo "#define VA_LIST_IS_ARRAY 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012211
Guido van Rossumda88dad1995-01-26 00:46:29 +000012212 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012213
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012214fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012215rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012216{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $va_list_is_array" >&5
12217$as_echo "$va_list_is_array" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012218
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012219# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000012220
12221
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012222ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r"
Matthias Klose3cef2a92012-03-14 23:39:33 +010012223if test "x$ac_cv_func_gethostbyname_r" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012224
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012225 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000012226
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012227 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 6 args" >&5
12228$as_echo_n "checking gethostbyname_r with 6 args... " >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012229 OLD_CFLAGS=$CFLAGS
12230 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012231 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012232/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012233
12234# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012235
Martin v. Löwis11437992002-04-12 09:54:03 +000012236int
12237main ()
12238{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012239
12240 char *name;
12241 struct hostent *he, *res;
12242 char buffer[2048];
12243 int buflen = 2048;
12244 int h_errnop;
12245
12246 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000012247
12248 ;
12249 return 0;
12250}
12251_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012252if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012253
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012254 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000012255
Martin v. Löwis11437992002-04-12 09:54:03 +000012256
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012257$as_echo "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012258
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012259 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12260$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012261
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012262else
Skip Montanaro6dead952003-09-25 14:50:04 +000012263
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012264 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12265$as_echo "no" >&6; }
12266 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 5 args" >&5
12267$as_echo_n "checking gethostbyname_r with 5 args... " >&6; }
12268 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012269/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012270
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012271# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012272
Martin v. Löwis11437992002-04-12 09:54:03 +000012273int
12274main ()
12275{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012276
12277 char *name;
12278 struct hostent *he;
Matthias Klosec511b472010-05-08 11:01:39 +000012279 char buffer[2048];
12280 int buflen = 2048;
12281 int h_errnop;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012282
Matthias Klosec511b472010-05-08 11:01:39 +000012283 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000012284
12285 ;
12286 return 0;
12287}
12288_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012289if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012290
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012291 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000012292
Martin v. Löwis11437992002-04-12 09:54:03 +000012293
Matthias Klosec511b472010-05-08 11:01:39 +000012294$as_echo "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012295
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012296 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12297$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012298
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012299else
Skip Montanaro6dead952003-09-25 14:50:04 +000012300
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012301 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12302$as_echo "no" >&6; }
Matthias Klosec511b472010-05-08 11:01:39 +000012303 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 3 args" >&5
12304$as_echo_n "checking gethostbyname_r with 3 args... " >&6; }
12305 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12306/* end confdefs.h. */
12307
12308# include <netdb.h>
12309
12310int
12311main ()
12312{
12313
12314 char *name;
12315 struct hostent *he;
12316 struct hostent_data data;
12317
12318 (void) gethostbyname_r(name, he, &data);
12319
12320 ;
12321 return 0;
12322}
12323_ACEOF
12324if ac_fn_c_try_compile "$LINENO"; then :
12325
12326 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
12327
12328
12329$as_echo "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h
12330
12331 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12332$as_echo "yes" >&6; }
12333
12334else
12335
12336 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12337$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012338
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012339fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012340rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012341
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012342fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012343rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012344
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012345fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012346rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012347 CFLAGS=$OLD_CFLAGS
12348
12349else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012350
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012351 for ac_func in gethostbyname
12352do :
12353 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
Matthias Klose3cef2a92012-03-14 23:39:33 +010012354if test "x$ac_cv_func_gethostbyname" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012355 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012356#define HAVE_GETHOSTBYNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012357_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012358
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012359fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012360done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012361
Michael W. Hudson54241132001-12-07 15:38:26 +000012362
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012363fi
12364
Michael W. Hudson54241132001-12-07 15:38:26 +000012365
12366
12367
12368
12369
12370
Guido van Rossum627b2d71993-12-24 10:39:16 +000012371# checks for system services
12372# (none yet)
12373
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012374# Linux requires this for correct f.p. operations
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012375ac_fn_c_check_func "$LINENO" "__fpu_control" "ac_cv_func___fpu_control"
Matthias Klose3cef2a92012-03-14 23:39:33 +010012376if test "x$ac_cv_func___fpu_control" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012377
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000012378else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012379 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5
12380$as_echo_n "checking for __fpu_control in -lieee... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012381if ${ac_cv_lib_ieee___fpu_control+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012382 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012383else
Martin v. Löwis11437992002-04-12 09:54:03 +000012384 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012385LIBS="-lieee $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012386cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012387/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012388
Martin v. Löwiseba40652007-08-30 20:10:57 +000012389/* Override any GCC internal prototype to avoid an error.
12390 Use char because int might match the return type of a GCC
12391 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012392#ifdef __cplusplus
12393extern "C"
12394#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012395char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012396int
12397main ()
12398{
Martin v. Löwiseba40652007-08-30 20:10:57 +000012399return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012400 ;
12401 return 0;
12402}
12403_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012404if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012405 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000012406else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012407 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012408fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012409rm -f core conftest.err conftest.$ac_objext \
12410 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012411LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012412fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012413{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee___fpu_control" >&5
12414$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012415if test "x$ac_cv_lib_ieee___fpu_control" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012416 cat >>confdefs.h <<_ACEOF
12417#define HAVE_LIBIEEE 1
12418_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012419
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012420 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012421
Guido van Rossum627b2d71993-12-24 10:39:16 +000012422fi
12423
Michael W. Hudson54241132001-12-07 15:38:26 +000012424
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000012425fi
12426
Michael W. Hudson54241132001-12-07 15:38:26 +000012427
Guido van Rossum7f253911997-05-09 02:42:48 +000012428# Check for --with-fpectl
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012429{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-fpectl" >&5
12430$as_echo_n "checking for --with-fpectl... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012431
Martin v. Löwiseba40652007-08-30 20:10:57 +000012432# Check whether --with-fpectl was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012433if test "${with_fpectl+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +000012434 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000012435if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000012436then
12437
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012438$as_echo "#define WANT_SIGFPE_HANDLER 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012439
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012440 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12441$as_echo "yes" >&6; }
12442else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12443$as_echo "no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000012444fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000012445else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012446 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12447$as_echo "no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012448fi
12449
Guido van Rossum7f253911997-05-09 02:42:48 +000012450
Guido van Rossum7f43da71994-08-01 12:15:30 +000012451# check for --with-libm=...
12452
Guido van Rossum563e7081996-09-10 18:20:48 +000012453case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000012454Darwin) ;;
Guido van Rossumec95c7b1998-08-04 17:59:56 +000012455BeOS) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000012456*) LIBM=-lm
12457esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012458{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libm=STRING" >&5
12459$as_echo_n "checking for --with-libm=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012460
Martin v. Löwiseba40652007-08-30 20:10:57 +000012461# Check whether --with-libm was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012462if test "${with_libm+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +000012463 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000012464if test "$withval" = no
12465then LIBM=
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012466 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBM empty" >&5
12467$as_echo "force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000012468elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000012469then LIBM=$withval
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012470 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBM=\"$withval\"" >&5
12471$as_echo "set LIBM=\"$withval\"" >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +000012472else as_fn_error $? "proper usage is --with-libm=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000012473fi
Guido van Rossum7f253911997-05-09 02:42:48 +000012474else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012475 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBM=\"$LIBM\"" >&5
12476$as_echo "default LIBM=\"$LIBM\"" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012477fi
12478
Guido van Rossum7f43da71994-08-01 12:15:30 +000012479
12480# check for --with-libc=...
12481
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012482{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libc=STRING" >&5
12483$as_echo_n "checking for --with-libc=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012484
Martin v. Löwiseba40652007-08-30 20:10:57 +000012485# Check whether --with-libc was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012486if test "${with_libc+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +000012487 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000012488if test "$withval" = no
12489then LIBC=
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012490 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBC empty" >&5
12491$as_echo "force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000012492elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000012493then LIBC=$withval
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012494 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBC=\"$withval\"" >&5
12495$as_echo "set LIBC=\"$withval\"" >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +000012496else as_fn_error $? "proper usage is --with-libc=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000012497fi
Guido van Rossum7f253911997-05-09 02:42:48 +000012498else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012499 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBC=\"$LIBC\"" >&5
12500$as_echo "default LIBC=\"$LIBC\"" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012501fi
12502
Guido van Rossum7f43da71994-08-01 12:15:30 +000012503
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012504# **************************************************
12505# * Check for various properties of floating point *
12506# **************************************************
Mark Dickinson265d7382008-04-21 22:32:24 +000012507
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012508{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are little-endian IEEE 754 binary64" >&5
12509$as_echo_n "checking whether C doubles are little-endian IEEE 754 binary64... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012510if ${ac_cv_little_endian_double+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012511 $as_echo_n "(cached) " >&6
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012512else
12513
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012514if test "$cross_compiling" = yes; then :
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012515 ac_cv_little_endian_double=no
12516else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012517 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012518/* end confdefs.h. */
12519
12520#include <string.h>
12521int main() {
12522 double x = 9006104071832581.0;
12523 if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
12524 return 0;
12525 else
12526 return 1;
12527}
12528
12529_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012530if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012531 ac_cv_little_endian_double=yes
12532else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012533 ac_cv_little_endian_double=no
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012534fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012535rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12536 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012537fi
12538
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012539fi
12540
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012541{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_little_endian_double" >&5
12542$as_echo "$ac_cv_little_endian_double" >&6; }
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012543if test "$ac_cv_little_endian_double" = yes
12544then
12545
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012546$as_echo "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012547
12548fi
12549
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012550{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are big-endian IEEE 754 binary64" >&5
12551$as_echo_n "checking whether C doubles are big-endian IEEE 754 binary64... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012552if ${ac_cv_big_endian_double+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012553 $as_echo_n "(cached) " >&6
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012554else
12555
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012556if test "$cross_compiling" = yes; then :
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012557 ac_cv_big_endian_double=no
12558else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012559 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012560/* end confdefs.h. */
12561
12562#include <string.h>
12563int main() {
12564 double x = 9006104071832581.0;
12565 if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
12566 return 0;
12567 else
12568 return 1;
12569}
12570
12571_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012572if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012573 ac_cv_big_endian_double=yes
12574else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012575 ac_cv_big_endian_double=no
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012576fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012577rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12578 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012579fi
12580
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012581fi
12582
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012583{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_big_endian_double" >&5
12584$as_echo "$ac_cv_big_endian_double" >&6; }
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012585if test "$ac_cv_big_endian_double" = yes
12586then
12587
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012588$as_echo "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012589
12590fi
12591
12592# Some ARM platforms use a mixed-endian representation for doubles.
12593# While Python doesn't currently have full support for these platforms
12594# (see e.g., issue 1762561), we can at least make sure that float <-> string
12595# conversions work.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012596{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5
12597$as_echo_n "checking whether C doubles are ARM mixed-endian IEEE 754 binary64... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012598if ${ac_cv_mixed_endian_double+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012599 $as_echo_n "(cached) " >&6
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012600else
12601
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012602if test "$cross_compiling" = yes; then :
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012603 ac_cv_mixed_endian_double=no
12604else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012605 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012606/* end confdefs.h. */
12607
12608#include <string.h>
12609int main() {
12610 double x = 9006104071832581.0;
12611 if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
12612 return 0;
12613 else
12614 return 1;
12615}
12616
12617_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012618if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012619 ac_cv_mixed_endian_double=yes
12620else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012621 ac_cv_mixed_endian_double=no
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012622fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012623rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12624 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012625fi
12626
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012627fi
12628
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012629{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mixed_endian_double" >&5
12630$as_echo "$ac_cv_mixed_endian_double" >&6; }
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012631if test "$ac_cv_mixed_endian_double" = yes
12632then
12633
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012634$as_echo "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012635
12636fi
12637
12638# The short float repr introduced in Python 3.1 requires the
12639# correctly-rounded string <-> double conversion functions from
12640# Python/dtoa.c, which in turn require that the FPU uses 53-bit
12641# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsona548dee2009-11-15 13:12:43 +000012642# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012643# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsona548dee2009-11-15 13:12:43 +000012644
12645# This inline assembler syntax may also work for suncc and icc,
12646# so we try it on all platforms.
12647
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012648{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
12649$as_echo_n "checking whether we can use gcc inline assembler to get and set x87 control word... " >&6; }
12650cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012651/* end confdefs.h. */
12652
12653int
12654main ()
12655{
12656
Mark Dickinsona548dee2009-11-15 13:12:43 +000012657 unsigned short cw;
12658 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
12659 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012660
12661 ;
12662 return 0;
12663}
12664_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012665if ac_fn_c_try_compile "$LINENO"; then :
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012666 have_gcc_asm_for_x87=yes
12667else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012668 have_gcc_asm_for_x87=no
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012669fi
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012670rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012671{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x87" >&5
12672$as_echo "$have_gcc_asm_for_x87" >&6; }
Mark Dickinsona548dee2009-11-15 13:12:43 +000012673if test "$have_gcc_asm_for_x87" = yes
12674then
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012675
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012676$as_echo "#define HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012677
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012678fi
Mark Dickinson7a3d8642008-04-22 00:54:27 +000012679
Mark Dickinson04b27232009-01-04 12:29:36 +000012680# Detect whether system arithmetic is subject to x87-style double
12681# rounding issues. The result of this test has little meaning on non
12682# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
12683# mode is round-to-nearest and double rounding issues are present, and
12684# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012685{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x87-style double rounding" >&5
12686$as_echo_n "checking for x87-style double rounding... " >&6; }
Mark Dickinson99abd142009-10-24 13:44:16 +000012687# $BASECFLAGS may affect the result
12688ac_save_cc="$CC"
12689CC="$CC $BASECFLAGS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012690if test "$cross_compiling" = yes; then :
Mark Dickinson04b27232009-01-04 12:29:36 +000012691 ac_cv_x87_double_rounding=no
12692else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012693 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson04b27232009-01-04 12:29:36 +000012694/* end confdefs.h. */
12695
12696#include <stdlib.h>
12697#include <math.h>
12698int main() {
12699 volatile double x, y, z;
12700 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
12701 x = 0.99999999999999989; /* 1-2**-53 */
12702 y = 1./x;
12703 if (y != 1.)
12704 exit(0);
12705 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
12706 x = 1e16;
12707 y = 2.99999;
12708 z = x + y;
12709 if (z != 1e16+4.)
12710 exit(0);
12711 /* both tests show evidence of double rounding */
12712 exit(1);
12713}
12714
12715_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012716if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson04b27232009-01-04 12:29:36 +000012717 ac_cv_x87_double_rounding=no
12718else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012719 ac_cv_x87_double_rounding=yes
Mark Dickinson04b27232009-01-04 12:29:36 +000012720fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012721rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12722 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson04b27232009-01-04 12:29:36 +000012723fi
12724
Mark Dickinson99abd142009-10-24 13:44:16 +000012725CC="$ac_save_cc"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012726{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5
12727$as_echo "$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson04b27232009-01-04 12:29:36 +000012728if test "$ac_cv_x87_double_rounding" = yes
12729then
12730
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012731$as_echo "#define X87_DOUBLE_ROUNDING 1" >>confdefs.h
Mark Dickinson04b27232009-01-04 12:29:36 +000012732
12733fi
12734
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012735# ************************************
12736# * Check for mathematical functions *
12737# ************************************
12738
12739LIBS_SAVE=$LIBS
12740LIBS="$LIBS $LIBM"
12741
Mark Dickinson265d7382008-04-21 22:32:24 +000012742# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
12743# -0. on some architectures.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012744{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether tanh preserves the sign of zero" >&5
12745$as_echo_n "checking whether tanh preserves the sign of zero... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012746if ${ac_cv_tanh_preserves_zero_sign+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012747 $as_echo_n "(cached) " >&6
Mark Dickinson265d7382008-04-21 22:32:24 +000012748else
12749
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012750if test "$cross_compiling" = yes; then :
Mark Dickinson265d7382008-04-21 22:32:24 +000012751 ac_cv_tanh_preserves_zero_sign=no
12752else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012753 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson265d7382008-04-21 22:32:24 +000012754/* end confdefs.h. */
12755
12756#include <math.h>
Mark Dickinson7a3d8642008-04-22 00:54:27 +000012757#include <stdlib.h>
Mark Dickinson265d7382008-04-21 22:32:24 +000012758int main() {
12759 /* return 0 if either negative zeros don't exist
12760 on this platform or if negative zeros exist
12761 and tanh(-0.) == -0. */
12762 if (atan2(0., -1.) == atan2(-0., -1.) ||
12763 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
12764 else exit(1);
12765}
12766
12767_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012768if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson265d7382008-04-21 22:32:24 +000012769 ac_cv_tanh_preserves_zero_sign=yes
12770else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012771 ac_cv_tanh_preserves_zero_sign=no
Mark Dickinson265d7382008-04-21 22:32:24 +000012772fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012773rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12774 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson265d7382008-04-21 22:32:24 +000012775fi
12776
Mark Dickinson265d7382008-04-21 22:32:24 +000012777fi
12778
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012779{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_tanh_preserves_zero_sign" >&5
12780$as_echo "$ac_cv_tanh_preserves_zero_sign" >&6; }
Mark Dickinson265d7382008-04-21 22:32:24 +000012781if test "$ac_cv_tanh_preserves_zero_sign" = yes
12782then
12783
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012784$as_echo "#define TANH_PRESERVES_ZERO_SIGN 1" >>confdefs.h
Mark Dickinson265d7382008-04-21 22:32:24 +000012785
12786fi
12787
Mark Dickinson65898e02009-09-05 10:27:00 +000012788for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012789do :
12790 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12791ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Georg Brandl71f4fbb2011-02-25 11:04:50 +000012792if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinson65898e02009-09-05 10:27:00 +000012793 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012794#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Mark Dickinson65898e02009-09-05 10:27:00 +000012795_ACEOF
12796
12797fi
12798done
12799
Mark Dickinson65898e02009-09-05 10:27:00 +000012800for ac_func in hypot lgamma log1p round tgamma
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012801do :
12802 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12803ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Georg Brandl71f4fbb2011-02-25 11:04:50 +000012804if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Christian Heimes0a8143f2007-12-18 23:22:54 +000012805 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012806#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Christian Heimes0a8143f2007-12-18 23:22:54 +000012807_ACEOF
12808
12809fi
12810done
12811
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012812ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
12813"
Matthias Klose3cef2a92012-03-14 23:39:33 +010012814if test "x$ac_cv_have_decl_isinf" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012815 ac_have_decl=1
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012816else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012817 ac_have_decl=0
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012818fi
12819
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012820cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012821#define HAVE_DECL_ISINF $ac_have_decl
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012822_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012823ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h>
12824"
Matthias Klose3cef2a92012-03-14 23:39:33 +010012825if test "x$ac_cv_have_decl_isnan" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012826 ac_have_decl=1
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012827else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012828 ac_have_decl=0
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012829fi
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012830
12831cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012832#define HAVE_DECL_ISNAN $ac_have_decl
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012833_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012834ac_fn_c_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include <math.h>
12835"
Matthias Klose3cef2a92012-03-14 23:39:33 +010012836if test "x$ac_cv_have_decl_isfinite" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012837 ac_have_decl=1
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012838else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012839 ac_have_decl=0
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012840fi
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012841
12842cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012843#define HAVE_DECL_ISFINITE $ac_have_decl
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012844_ACEOF
12845
12846
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000012847LIBS=$LIBS_SAVE
12848
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012849# For multiprocessing module, check that sem_open
12850# actually works. For FreeBSD versions <= 7.2,
12851# the kernel module that provides POSIX semaphores
12852# isn't loaded by default, so an attempt to call
12853# sem_open results in a 'Signal 12' error.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012854{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX semaphores are enabled" >&5
12855$as_echo_n "checking whether POSIX semaphores are enabled... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012856if ${ac_cv_posix_semaphores_enabled+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012857 $as_echo_n "(cached) " >&6
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012858else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012859 if test "$cross_compiling" = yes; then :
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012860 ac_cv_posix_semaphores_enabled=yes
12861else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012862 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012863/* end confdefs.h. */
12864
12865#include <unistd.h>
12866#include <fcntl.h>
12867#include <stdio.h>
12868#include <semaphore.h>
12869#include <sys/stat.h>
12870
12871int main(void) {
12872 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
12873 if (a == SEM_FAILED) {
12874 perror("sem_open");
12875 return 1;
12876 }
12877 sem_close(a);
Mark Dickinson59dc89e2009-12-13 21:06:06 +000012878 sem_unlink("/autoconf");
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012879 return 0;
12880}
12881
12882_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012883if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012884 ac_cv_posix_semaphores_enabled=yes
12885else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012886 ac_cv_posix_semaphores_enabled=no
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012887fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012888rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12889 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012890fi
12891
12892
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012893fi
12894
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012895{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_semaphores_enabled" >&5
12896$as_echo "$ac_cv_posix_semaphores_enabled" >&6; }
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012897if test $ac_cv_posix_semaphores_enabled = no
12898then
12899
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012900$as_echo "#define POSIX_SEMAPHORES_NOT_ENABLED 1" >>confdefs.h
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012901
12902fi
12903
12904# Multiprocessing check for broken sem_getvalue
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012905{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken sem_getvalue" >&5
12906$as_echo_n "checking for broken sem_getvalue... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012907if ${ac_cv_broken_sem_getvalue+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012908 $as_echo_n "(cached) " >&6
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012909else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012910 if test "$cross_compiling" = yes; then :
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012911 ac_cv_broken_sem_getvalue=yes
12912else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012913 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012914/* end confdefs.h. */
12915
12916#include <unistd.h>
12917#include <fcntl.h>
12918#include <stdio.h>
12919#include <semaphore.h>
12920#include <sys/stat.h>
12921
12922int main(void){
Mark Dickinson59dc89e2009-12-13 21:06:06 +000012923 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012924 int count;
12925 int res;
12926 if(a==SEM_FAILED){
12927 perror("sem_open");
12928 return 1;
12929
12930 }
12931 res = sem_getvalue(a, &count);
12932 sem_close(a);
Mark Dickinson59dc89e2009-12-13 21:06:06 +000012933 sem_unlink("/autocftw");
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012934 return res==-1 ? 1 : 0;
12935}
12936
12937_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012938if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012939 ac_cv_broken_sem_getvalue=no
12940else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012941 ac_cv_broken_sem_getvalue=yes
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012942fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012943rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12944 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012945fi
12946
12947
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012948fi
12949
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012950{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_sem_getvalue" >&5
12951$as_echo "$ac_cv_broken_sem_getvalue" >&6; }
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012952if test $ac_cv_broken_sem_getvalue = yes
12953then
12954
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012955$as_echo "#define HAVE_BROKEN_SEM_GETVALUE 1" >>confdefs.h
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012956
12957fi
12958
Mark Dickinsonefc82f72009-03-20 15:51:55 +000012959# determine what size digit to use for Python's longs
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012960{ $as_echo "$as_me:${as_lineno-$LINENO}: checking digit size for Python's longs" >&5
12961$as_echo_n "checking digit size for Python's longs... " >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +000012962# Check whether --enable-big-digits was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012963if test "${enable_big_digits+set}" = set; then :
Mark Dickinsonefc82f72009-03-20 15:51:55 +000012964 enableval=$enable_big_digits; case $enable_big_digits in
12965yes)
12966 enable_big_digits=30 ;;
12967no)
12968 enable_big_digits=15 ;;
1296915|30)
12970 ;;
12971*)
Matthias Klose3cef2a92012-03-14 23:39:33 +010012972 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 +000012973esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012974{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_big_digits" >&5
12975$as_echo "$enable_big_digits" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +000012976
12977cat >>confdefs.h <<_ACEOF
12978#define PYLONG_BITS_IN_DIGIT $enable_big_digits
12979_ACEOF
12980
12981
12982else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012983 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
12984$as_echo "no value specified" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +000012985fi
12986
12987
Guido van Rossumef2255b2000-03-10 22:30:29 +000012988# check for wchar.h
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012989ac_fn_c_check_header_mongrel "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
Matthias Klose3cef2a92012-03-14 23:39:33 +010012990if test "x$ac_cv_header_wchar_h" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012991
12992
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012993$as_echo "#define HAVE_WCHAR_H 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012994
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012995 wchar_h="yes"
12996
Guido van Rossumef2255b2000-03-10 22:30:29 +000012997else
Martin v. Löwis11437992002-04-12 09:54:03 +000012998 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000012999
13000fi
13001
Michael W. Hudson54241132001-12-07 15:38:26 +000013002
Martin v. Löwis11437992002-04-12 09:54:03 +000013003
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013004# determine wchar_t size
13005if test "$wchar_h" = yes
13006then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013007 # The cast to long int works around a bug in the HP C Compiler
Martin v. Löwiseba40652007-08-30 20:10:57 +000013008# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
13009# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
13010# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013011{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
13012$as_echo_n "checking size of wchar_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013013if ${ac_cv_sizeof_wchar_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013014 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000013015else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013016 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "#include <wchar.h>
13017"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013018
Martin v. Löwis11437992002-04-12 09:54:03 +000013019else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013020 if test "$ac_cv_type_wchar_t" = yes; then
13021 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
13022$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +000013023as_fn_error 77 "cannot compute sizeof (wchar_t)
Matthias Klose3cef2a92012-03-14 23:39:33 +010013024See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000013025 else
13026 ac_cv_sizeof_wchar_t=0
13027 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013028fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013029
Martin v. Löwis11437992002-04-12 09:54:03 +000013030fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013031{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
13032$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000013033
13034
13035
Martin v. Löwis11437992002-04-12 09:54:03 +000013036cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013037#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000013038_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013039
Michael W. Hudson54241132001-12-07 15:38:26 +000013040
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013041fi
13042
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013043{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UCS-4 tcl" >&5
13044$as_echo_n "checking for UCS-4 tcl... " >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013045have_ucs4_tcl=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013046cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013047/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013048
13049#include <tcl.h>
13050#if TCL_UTF_MAX != 6
13051# error "NOT UCS4_TCL"
13052#endif
13053int
13054main ()
13055{
13056
13057 ;
13058 return 0;
13059}
13060_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013061if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013062
13063
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013064$as_echo "#define HAVE_UCS4_TCL 1" >>confdefs.h
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013065
13066 have_ucs4_tcl=yes
13067
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013068fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013069rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013070{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ucs4_tcl" >&5
13071$as_echo "$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013072
Skip Montanaro6dead952003-09-25 14:50:04 +000013073# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013074if test "$wchar_h" = yes
13075then
13076 # check whether wchar_t is signed or not
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013077 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is signed" >&5
13078$as_echo_n "checking whether wchar_t is signed... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013079 if ${ac_cv_wchar_t_signed+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013080 $as_echo_n "(cached) " >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013081else
13082
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013083 if test "$cross_compiling" = yes; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013084 ac_cv_wchar_t_signed=yes
13085else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013086 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013087/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013088
13089 #include <wchar.h>
13090 int main()
13091 {
Martin v. Löwis44fe0e42006-04-11 07:15:30 +000013092 /* Success: exit code 0 */
13093 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013094 }
13095
13096_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013097if ac_fn_c_try_run "$LINENO"; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013098 ac_cv_wchar_t_signed=yes
13099else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013100 ac_cv_wchar_t_signed=no
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013101fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013102rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13103 conftest.$ac_objext conftest.beam conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013104fi
13105
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013106fi
13107
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013108 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wchar_t_signed" >&5
13109$as_echo "$ac_cv_wchar_t_signed" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000013110fi
13111
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013112{ $as_echo "$as_me:${as_lineno-$LINENO}: checking what type to use for unicode" >&5
13113$as_echo_n "checking what type to use for unicode... " >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000013114# Check whether --enable-unicode was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013115if test "${enable_unicode+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +000013116 enableval=$enable_unicode;
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013117else
13118 enable_unicode=yes
Martin v. Löwiseba40652007-08-30 20:10:57 +000013119fi
13120
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013121
13122if test $enable_unicode = yes
13123then
Martin v. Löwisfd917792001-06-27 20:22:04 +000013124 # Without any arguments, Py_UNICODE defaults to two-byte mode
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013125 case "$have_ucs4_tcl" in
13126 yes) enable_unicode="ucs4"
13127 ;;
13128 *) enable_unicode="ucs2"
13129 ;;
13130 esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013131fi
13132
Martin v. Löwis0036cba2002-04-12 09:58:45 +000013133
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013134case "$enable_unicode" in
13135ucs2) unicode_size="2"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013136 $as_echo "#define Py_UNICODE_SIZE 2" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013137
13138 ;;
13139ucs4) unicode_size="4"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013140 $as_echo "#define Py_UNICODE_SIZE 4" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013141
13142 ;;
Martin v. Löwised11a5d2012-05-20 10:42:17 +020013143no) ;; # To allow --disable-unicode
Matthias Klose3cef2a92012-03-14 23:39:33 +010013144*) 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 +000013145esac
13146
Michael W. Hudson54241132001-12-07 15:38:26 +000013147
Martin v. Löwis11437992002-04-12 09:54:03 +000013148
13149
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013150if test "$enable_unicode" = "no"
13151then
Martin v. Löwis339d0f72001-08-17 18:39:25 +000013152 UNICODE_OBJS=""
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013153 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not used" >&5
13154$as_echo "not used" >&6; }
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013155else
Martin v. Löwis339d0f72001-08-17 18:39:25 +000013156 UNICODE_OBJS="Objects/unicodeobject.o Objects/unicodectype.o"
Martin v. Löwis11437992002-04-12 09:54:03 +000013157
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013158$as_echo "#define Py_USING_UNICODE 1" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013159
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013160
13161 # wchar_t is only usable if it maps to an unsigned type
13162 if test "$unicode_size" = "$ac_cv_sizeof_wchar_t" \
Matthias Klose7dbeed72004-12-24 08:22:17 +000013163 -a "$ac_cv_wchar_t_signed" = "no"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013164 then
13165 PY_UNICODE_TYPE="wchar_t"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013166
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013167$as_echo "#define HAVE_USABLE_WCHAR_T 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013168
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013169 $as_echo "#define PY_UNICODE_TYPE wchar_t" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013170
13171 elif test "$ac_cv_sizeof_short" = "$unicode_size"
13172 then
13173 PY_UNICODE_TYPE="unsigned short"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013174 $as_echo "#define PY_UNICODE_TYPE unsigned short" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013175
13176 elif test "$ac_cv_sizeof_long" = "$unicode_size"
13177 then
13178 PY_UNICODE_TYPE="unsigned long"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013179 $as_echo "#define PY_UNICODE_TYPE unsigned long" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013180
13181 else
13182 PY_UNICODE_TYPE="no type found"
13183 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013184 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PY_UNICODE_TYPE" >&5
13185$as_echo "$PY_UNICODE_TYPE" >&6; }
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013186fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000013187
13188# check for endianness
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013189 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
13190$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013191if ${ac_cv_c_bigendian+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013192 $as_echo_n "(cached) " >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000013193else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013194 ac_cv_c_bigendian=unknown
13195 # See if we're dealing with a universal compiler.
13196 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13197/* end confdefs.h. */
13198#ifndef __APPLE_CC__
13199 not a universal capable compiler
13200 #endif
13201 typedef int dummy;
13202
Skip Montanaro6dead952003-09-25 14:50:04 +000013203_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013204if ac_fn_c_try_compile "$LINENO"; then :
13205
13206 # Check for potential -arch flags. It is not universal unless
13207 # there are at least two -arch flags with different values.
13208 ac_arch=
13209 ac_prev=
13210 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
13211 if test -n "$ac_prev"; then
13212 case $ac_word in
13213 i?86 | x86_64 | ppc | ppc64)
13214 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
13215 ac_arch=$ac_word
13216 else
13217 ac_cv_c_bigendian=universal
13218 break
13219 fi
13220 ;;
13221 esac
13222 ac_prev=
13223 elif test "x$ac_word" = "x-arch"; then
13224 ac_prev=arch
13225 fi
13226 done
13227fi
13228rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13229 if test $ac_cv_c_bigendian = unknown; then
13230 # See if sys/param.h defines the BYTE_ORDER macro.
13231 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013232/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000013233#include <sys/types.h>
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013234 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000013235
Martin v. Löwis11437992002-04-12 09:54:03 +000013236int
13237main ()
13238{
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013239#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
13240 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
13241 && LITTLE_ENDIAN)
13242 bogus endian macros
13243 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013244
13245 ;
13246 return 0;
13247}
13248_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013249if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000013250 # It does; now see whether it defined to BIG_ENDIAN or not.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013251 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013252/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000013253#include <sys/types.h>
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013254 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000013255
Martin v. Löwis11437992002-04-12 09:54:03 +000013256int
13257main ()
13258{
Guido van Rossumef2255b2000-03-10 22:30:29 +000013259#if BYTE_ORDER != BIG_ENDIAN
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013260 not big endian
13261 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013262
13263 ;
13264 return 0;
13265}
13266_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013267if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000013268 ac_cv_c_bigendian=yes
13269else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013270 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000013271fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013272rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013273fi
13274rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13275 fi
13276 if test $ac_cv_c_bigendian = unknown; then
13277 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
13278 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013279/* end confdefs.h. */
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013280#include <limits.h>
13281
Martin v. Löwis11437992002-04-12 09:54:03 +000013282int
13283main ()
13284{
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013285#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
13286 bogus endian macros
13287 #endif
13288
Martin v. Löwis11437992002-04-12 09:54:03 +000013289 ;
13290 return 0;
13291}
13292_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013293if ac_fn_c_try_compile "$LINENO"; then :
13294 # It does; now see whether it defined to _BIG_ENDIAN or not.
13295 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13296/* end confdefs.h. */
13297#include <limits.h>
13298
13299int
13300main ()
13301{
13302#ifndef _BIG_ENDIAN
13303 not big endian
13304 #endif
13305
13306 ;
13307 return 0;
13308}
13309_ACEOF
13310if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013311 ac_cv_c_bigendian=yes
Alexandre Vassalottia2db6872009-07-17 07:46:46 +000013312else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013313 ac_cv_c_bigendian=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013314fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013315rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13316fi
13317rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13318 fi
13319 if test $ac_cv_c_bigendian = unknown; then
13320 # Compile a test program.
13321 if test "$cross_compiling" = yes; then :
13322 # Try to guess by grepping values from an object file.
13323 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13324/* end confdefs.h. */
13325short int ascii_mm[] =
13326 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
13327 short int ascii_ii[] =
13328 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
13329 int use_ascii (int i) {
13330 return ascii_mm[i] + ascii_ii[i];
13331 }
13332 short int ebcdic_ii[] =
13333 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
13334 short int ebcdic_mm[] =
13335 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
13336 int use_ebcdic (int i) {
13337 return ebcdic_mm[i] + ebcdic_ii[i];
13338 }
13339 extern int foo;
Martin v. Löwiseba40652007-08-30 20:10:57 +000013340
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013341int
13342main ()
13343{
13344return use_ascii (foo) == use_ebcdic (foo);
13345 ;
13346 return 0;
13347}
13348_ACEOF
13349if ac_fn_c_try_compile "$LINENO"; then :
13350 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
13351 ac_cv_c_bigendian=yes
13352 fi
13353 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
13354 if test "$ac_cv_c_bigendian" = unknown; then
13355 ac_cv_c_bigendian=no
13356 else
13357 # finding both strings is unlikely to happen, but who knows?
13358 ac_cv_c_bigendian=unknown
13359 fi
13360 fi
13361fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013362rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013363else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013364 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013365/* end confdefs.h. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000013366$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000013367int
13368main ()
13369{
Martin v. Löwiseba40652007-08-30 20:10:57 +000013370
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013371 /* Are we little or big endian? From Harbison&Steele. */
13372 union
13373 {
13374 long int l;
13375 char c[sizeof (long int)];
13376 } u;
13377 u.l = 1;
13378 return u.c[sizeof (long int) - 1] == 1;
Martin v. Löwiseba40652007-08-30 20:10:57 +000013379
13380 ;
13381 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000013382}
Martin v. Löwis11437992002-04-12 09:54:03 +000013383_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013384if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000013385 ac_cv_c_bigendian=no
13386else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013387 ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000013388fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013389rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13390 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000013391fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013392
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013393 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013394fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013395{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
13396$as_echo "$ac_cv_c_bigendian" >&6; }
13397 case $ac_cv_c_bigendian in #(
13398 yes)
13399 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
13400;; #(
13401 no)
13402 ;; #(
13403 universal)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013404
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013405$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Alexandre Vassalottia2db6872009-07-17 07:46:46 +000013406
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013407 ;; #(
13408 *)
Georg Brandl71f4fbb2011-02-25 11:04:50 +000013409 as_fn_error $? "unknown endianness
Matthias Klose3cef2a92012-03-14 23:39:33 +010013410 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013411 esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000013412
Michael W. Hudson54241132001-12-07 15:38:26 +000013413
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013414# Check whether right shifting a negative integer extends the sign bit
13415# or fills with zeros (like the Cray J90, according to Tim Peters).
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013416{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether right shift extends the sign bit" >&5
13417$as_echo_n "checking whether right shift extends the sign bit... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013418if ${ac_cv_rshift_extends_sign+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013419 $as_echo_n "(cached) " >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000013420else
Martin v. Löwis11437992002-04-12 09:54:03 +000013421
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013422if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000013423 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013424else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013425 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013426/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013427
13428int main()
13429{
Vladimir Marangozova6180282000-07-12 05:05:06 +000013430 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013431}
13432
Martin v. Löwis11437992002-04-12 09:54:03 +000013433_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013434if ac_fn_c_try_run "$LINENO"; then :
Vladimir Marangozova6180282000-07-12 05:05:06 +000013435 ac_cv_rshift_extends_sign=yes
13436else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013437 ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000013438fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013439rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13440 conftest.$ac_objext conftest.beam conftest.$ac_ext
Vladimir Marangozova6180282000-07-12 05:05:06 +000013441fi
13442
Martin v. Löwiseba40652007-08-30 20:10:57 +000013443fi
13444
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013445{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rshift_extends_sign" >&5
13446$as_echo "$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000013447if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013448then
Martin v. Löwis11437992002-04-12 09:54:03 +000013449
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013450$as_echo "#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1" >>confdefs.h
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013451
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013452fi
13453
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013454# check for getc_unlocked and related locking functions
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013455{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getc_unlocked() and friends" >&5
13456$as_echo_n "checking for getc_unlocked() and friends... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013457if ${ac_cv_have_getc_unlocked+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013458 $as_echo_n "(cached) " >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013459else
Martin v. Löwis11437992002-04-12 09:54:03 +000013460
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013461cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013462/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013463#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013464int
13465main ()
13466{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013467
13468 FILE *f = fopen("/dev/null", "r");
13469 flockfile(f);
13470 getc_unlocked(f);
13471 funlockfile(f);
13472
Martin v. Löwis11437992002-04-12 09:54:03 +000013473 ;
13474 return 0;
13475}
13476_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013477if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013478 ac_cv_have_getc_unlocked=yes
13479else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013480 ac_cv_have_getc_unlocked=no
13481fi
13482rm -f core conftest.err conftest.$ac_objext \
13483 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013484fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013485
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013486{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getc_unlocked" >&5
13487$as_echo "$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013488if test "$ac_cv_have_getc_unlocked" = yes
13489then
Martin v. Löwis11437992002-04-12 09:54:03 +000013490
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013491$as_echo "#define HAVE_GETC_UNLOCKED 1" >>confdefs.h
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013492
13493fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013494
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013495# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000013496# save the value of LIBS so we don't actually link Python with readline
13497LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013498
Gregory P. Smithcc023f12008-09-07 05:15:58 +000013499# On some systems we need to link readline to a termcap compatible
13500# library. NOTE: Keep the precedence of listed libraries synchronised
13501# with setup.py.
13502py_cv_lib_readline=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013503{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link readline libs" >&5
13504$as_echo_n "checking how to link readline libs... " >&6; }
Gregory P. Smithcc023f12008-09-07 05:15:58 +000013505for py_libtermcap in "" ncursesw ncurses curses termcap; do
13506 if test -z "$py_libtermcap"; then
13507 READLINE_LIBS="-lreadline"
13508 else
13509 READLINE_LIBS="-lreadline -l$py_libtermcap"
13510 fi
13511 LIBS="$READLINE_LIBS $LIBS_no_readline"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013512 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitzfe8e3d92006-01-07 21:07:20 +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. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013518#ifdef __cplusplus
13519extern "C"
13520#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013521char readline ();
13522int
13523main ()
13524{
Martin v. Löwiseba40652007-08-30 20:10:57 +000013525return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013526 ;
13527 return 0;
13528}
13529_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013530if ac_fn_c_try_link "$LINENO"; then :
Gregory P. Smithcc023f12008-09-07 05:15:58 +000013531 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013532fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013533rm -f core conftest.err conftest.$ac_objext \
13534 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smithcc023f12008-09-07 05:15:58 +000013535 if test $py_cv_lib_readline = yes; then
13536 break
13537 fi
13538done
13539# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
13540#AC_SUBST([READLINE_LIBS])
Gregory P. Smithe080cdf2008-09-07 19:19:04 +000013541if test $py_cv_lib_readline = no; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013542 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
13543$as_echo "none" >&6; }
Gregory P. Smithcc023f12008-09-07 05:15:58 +000013544else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013545 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_LIBS" >&5
13546$as_echo "$READLINE_LIBS" >&6; }
Gregory P. Smithcc023f12008-09-07 05:15:58 +000013547
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013548$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013549
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013550fi
13551
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013552# check for readline 2.1
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013553{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_callback_handler_install in -lreadline" >&5
13554$as_echo_n "checking for rl_callback_handler_install in -lreadline... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013555if ${ac_cv_lib_readline_rl_callback_handler_install+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013556 $as_echo_n "(cached) " >&6
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013557else
13558 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000013559LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013560cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013561/* end confdefs.h. */
13562
Martin v. Löwiseba40652007-08-30 20:10:57 +000013563/* Override any GCC internal prototype to avoid an error.
13564 Use char because int might match the return type of a GCC
13565 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013566#ifdef __cplusplus
13567extern "C"
13568#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013569char rl_callback_handler_install ();
13570int
13571main ()
13572{
Martin v. Löwiseba40652007-08-30 20:10:57 +000013573return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013574 ;
13575 return 0;
13576}
13577_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013578if ac_fn_c_try_link "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013579 ac_cv_lib_readline_rl_callback_handler_install=yes
13580else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013581 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013582fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013583rm -f core conftest.err conftest.$ac_objext \
13584 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013585LIBS=$ac_check_lib_save_LIBS
13586fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013587{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
13588$as_echo "$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013589if test "x$ac_cv_lib_readline_rl_callback_handler_install" = xyes; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013590
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013591$as_echo "#define HAVE_RL_CALLBACK 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013592
13593fi
13594
13595
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013596# check for readline 2.2
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013597cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013598/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013599#include <readline/readline.h>
13600_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013601if ac_fn_c_try_cpp "$LINENO"; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013602 have_readline=yes
13603else
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013604 have_readline=no
Matthias Klosec511b472010-05-08 11:01:39 +000013605
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013606fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +000013607rm -f conftest.err conftest.i conftest.$ac_ext
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013608if test $have_readline = yes
13609then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013610 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013611/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013612#include <readline/readline.h>
13613
13614_ACEOF
13615if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013616 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013617
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013618$as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013619
13620fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +000013621rm -f conftest*
Antoine Pitroud9ff74e2009-10-26 19:16:46 +000013622
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013623 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroud9ff74e2009-10-26 19:16:46 +000013624/* end confdefs.h. */
13625#include <readline/readline.h>
13626
13627_ACEOF
13628if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013629 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then :
Antoine Pitroud9ff74e2009-10-26 19:16:46 +000013630
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013631$as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h
Antoine Pitroud9ff74e2009-10-26 19:16:46 +000013632
13633fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +000013634rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013635
13636fi
13637
Martin v. Löwis0daad592001-09-30 21:09:59 +000013638# check for readline 4.0
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013639{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -lreadline" >&5
13640$as_echo_n "checking for rl_pre_input_hook in -lreadline... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013641if ${ac_cv_lib_readline_rl_pre_input_hook+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013642 $as_echo_n "(cached) " >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000013643else
Martin v. Löwis11437992002-04-12 09:54:03 +000013644 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000013645LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013646cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013647/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013648
Martin v. Löwiseba40652007-08-30 20:10:57 +000013649/* Override any GCC internal prototype to avoid an error.
13650 Use char because int might match the return type of a GCC
13651 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013652#ifdef __cplusplus
13653extern "C"
13654#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013655char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013656int
13657main ()
13658{
Martin v. Löwiseba40652007-08-30 20:10:57 +000013659return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013660 ;
13661 return 0;
13662}
13663_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013664if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013665 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000013666else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013667 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000013668fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013669rm -f core conftest.err conftest.$ac_objext \
13670 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013671LIBS=$ac_check_lib_save_LIBS
13672fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013673{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
13674$as_echo "$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013675if test "x$ac_cv_lib_readline_rl_pre_input_hook" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000013676
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013677$as_echo "#define HAVE_RL_PRE_INPUT_HOOK 1" >>confdefs.h
Martin v. Löwis0daad592001-09-30 21:09:59 +000013678
Martin v. Löwis0daad592001-09-30 21:09:59 +000013679fi
13680
Michael W. Hudson54241132001-12-07 15:38:26 +000013681
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000013682# also in 4.0
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013683{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -lreadline" >&5
13684$as_echo_n "checking for rl_completion_display_matches_hook in -lreadline... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013685if ${ac_cv_lib_readline_rl_completion_display_matches_hook+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013686 $as_echo_n "(cached) " >&6
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000013687else
13688 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000013689LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013690cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000013691/* end confdefs.h. */
13692
13693/* Override any GCC internal prototype to avoid an error.
13694 Use char because int might match the return type of a GCC
13695 builtin and then its argument prototype would still apply. */
13696#ifdef __cplusplus
13697extern "C"
13698#endif
13699char rl_completion_display_matches_hook ();
13700int
13701main ()
13702{
13703return rl_completion_display_matches_hook ();
13704 ;
13705 return 0;
13706}
13707_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013708if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000013709 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
13710else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013711 ac_cv_lib_readline_rl_completion_display_matches_hook=no
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000013712fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013713rm -f core conftest.err conftest.$ac_objext \
13714 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000013715LIBS=$ac_check_lib_save_LIBS
13716fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013717{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
13718$as_echo "$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013719if test "x$ac_cv_lib_readline_rl_completion_display_matches_hook" = xyes; then :
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000013720
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013721$as_echo "#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000013722
13723fi
13724
13725
Martin v. Löwis0daad592001-09-30 21:09:59 +000013726# check for readline 4.2
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013727{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5
13728$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013729if ${ac_cv_lib_readline_rl_completion_matches+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013730 $as_echo_n "(cached) " >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000013731else
Martin v. Löwis11437992002-04-12 09:54:03 +000013732 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000013733LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013734cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013735/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013736
Martin v. Löwiseba40652007-08-30 20:10:57 +000013737/* Override any GCC internal prototype to avoid an error.
13738 Use char because int might match the return type of a GCC
13739 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013740#ifdef __cplusplus
13741extern "C"
13742#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013743char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013744int
13745main ()
13746{
Martin v. Löwiseba40652007-08-30 20:10:57 +000013747return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013748 ;
13749 return 0;
13750}
13751_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013752if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013753 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000013754else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013755 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000013756fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013757rm -f core conftest.err conftest.$ac_objext \
13758 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013759LIBS=$ac_check_lib_save_LIBS
13760fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013761{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_matches" >&5
13762$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013763if test "x$ac_cv_lib_readline_rl_completion_matches" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000013764
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013765$as_echo "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h
Guido van Rossum353ae582001-07-10 16:45:32 +000013766
Guido van Rossum353ae582001-07-10 16:45:32 +000013767fi
13768
Jack Jansendd19cf82001-12-06 22:36:17 +000013769
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013770# also in readline 4.2
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013771cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013772/* end confdefs.h. */
13773#include <readline/readline.h>
13774_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013775if ac_fn_c_try_cpp "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013776 have_readline=yes
13777else
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013778 have_readline=no
Matthias Klosec511b472010-05-08 11:01:39 +000013779
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013780fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +000013781rm -f conftest.err conftest.i conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013782if test $have_readline = yes
13783then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013784 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013785/* end confdefs.h. */
13786#include <readline/readline.h>
13787
13788_ACEOF
13789if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013790 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013791
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013792$as_echo "#define HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013793
13794fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +000013795rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013796
13797fi
13798
Martin v. Löwis82bca632006-02-10 20:49:30 +000013799# End of readline checks: restore LIBS
13800LIBS=$LIBS_no_readline
13801
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013802{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken nice()" >&5
13803$as_echo_n "checking for broken nice()... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013804if ${ac_cv_broken_nice+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013805 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000013806else
Martin v. Löwis11437992002-04-12 09:54:03 +000013807
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013808if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000013809 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013810else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013811 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013812/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013813
13814int main()
13815{
13816 int val1 = nice(1);
13817 if (val1 != -1 && val1 == nice(2))
13818 exit(0);
13819 exit(1);
13820}
13821
Martin v. Löwis11437992002-04-12 09:54:03 +000013822_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013823if ac_fn_c_try_run "$LINENO"; then :
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013824 ac_cv_broken_nice=yes
13825else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013826 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013827fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013828rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13829 conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013830fi
13831
Martin v. Löwiseba40652007-08-30 20:10:57 +000013832fi
13833
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013834{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_nice" >&5
13835$as_echo "$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013836if test "$ac_cv_broken_nice" = yes
13837then
Martin v. Löwis11437992002-04-12 09:54:03 +000013838
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013839$as_echo "#define HAVE_BROKEN_NICE 1" >>confdefs.h
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013840
13841fi
13842
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013843{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken poll()" >&5
13844$as_echo_n "checking for broken poll()... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013845if ${ac_cv_broken_poll+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013846 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013847else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013848 if test "$cross_compiling" = yes; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013849 ac_cv_broken_poll=no
13850else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013851 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013852/* end confdefs.h. */
13853
13854#include <poll.h>
13855
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013856int main()
13857{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013858 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013859 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013860
13861 close (42);
13862
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013863 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013864 if (poll_test < 0)
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013865 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013866 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013867 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013868 else
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013869 return 1;
13870}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013871
13872_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013873if ac_fn_c_try_run "$LINENO"; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013874 ac_cv_broken_poll=yes
13875else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013876 ac_cv_broken_poll=no
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013877fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013878rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13879 conftest.$ac_objext conftest.beam conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013880fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013881
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013882fi
13883
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013884{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_poll" >&5
13885$as_echo "$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013886if test "$ac_cv_broken_poll" = yes
13887then
13888
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013889$as_echo "#define HAVE_BROKEN_POLL 1" >>confdefs.h
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013890
13891fi
13892
Brett Cannon43802422005-02-10 20:48:03 +000013893# 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 +000013894# (which is not required by ISO C or UNIX spec) and/or if we support
13895# tzname[]
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013896ac_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 +000013897#include <$ac_cv_struct_tm>
13898
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013899"
Matthias Klose3cef2a92012-03-14 23:39:33 +010013900if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Brett Cannon43802422005-02-10 20:48:03 +000013901
13902cat >>confdefs.h <<_ACEOF
13903#define HAVE_STRUCT_TM_TM_ZONE 1
13904_ACEOF
13905
13906
13907fi
13908
13909if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
13910
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013911$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000013912
13913else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013914 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
13915"
Matthias Klose3cef2a92012-03-14 23:39:33 +010013916if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013917 ac_have_decl=1
Martin v. Löwiseba40652007-08-30 20:10:57 +000013918else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013919 ac_have_decl=0
Martin v. Löwiseba40652007-08-30 20:10:57 +000013920fi
13921
Martin v. Löwiseba40652007-08-30 20:10:57 +000013922cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013923#define HAVE_DECL_TZNAME $ac_have_decl
Martin v. Löwiseba40652007-08-30 20:10:57 +000013924_ACEOF
13925
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013926 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
13927$as_echo_n "checking for tzname... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013928if ${ac_cv_var_tzname+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013929 $as_echo_n "(cached) " >&6
Martin v. Löwiseba40652007-08-30 20:10:57 +000013930else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013931 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000013932/* end confdefs.h. */
13933#include <time.h>
Martin v. Löwiseba40652007-08-30 20:10:57 +000013934#if !HAVE_DECL_TZNAME
13935extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000013936#endif
13937
13938int
13939main ()
13940{
Martin v. Löwiseba40652007-08-30 20:10:57 +000013941return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000013942 ;
13943 return 0;
13944}
13945_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013946if ac_fn_c_try_link "$LINENO"; then :
Brett Cannon43802422005-02-10 20:48:03 +000013947 ac_cv_var_tzname=yes
13948else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013949 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000013950fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013951rm -f core conftest.err conftest.$ac_objext \
13952 conftest$ac_exeext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000013953fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013954{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
13955$as_echo "$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000013956 if test $ac_cv_var_tzname = yes; then
13957
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013958$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000013959
13960 fi
13961fi
13962
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013963
Martin v. Löwis1d459062005-03-14 21:23:33 +000013964# check tzset(3) exists and works like we expect it to
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013965{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working tzset()" >&5
13966$as_echo_n "checking for working tzset()... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013967if ${ac_cv_working_tzset+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013968 $as_echo_n "(cached) " >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013969else
13970
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013971if test "$cross_compiling" = yes; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013972 ac_cv_working_tzset=no
13973else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013974 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013975/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013976
13977#include <stdlib.h>
13978#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000013979#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000013980
13981#if HAVE_TZNAME
13982extern char *tzname[];
13983#endif
13984
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013985int main()
13986{
Brett Cannon18367812003-09-19 00:59:16 +000013987 /* Note that we need to ensure that not only does tzset(3)
13988 do 'something' with localtime, but it works as documented
13989 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000013990 This includes making sure that tzname is set properly if
13991 tm->tm_zone does not exist since it is the alternative way
13992 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000013993
13994 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000013995 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000013996 */
13997
Martin v. Löwis1d459062005-03-14 21:23:33 +000013998 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000013999 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
14000
Neal Norwitz7f2588c2003-04-11 15:35:53 +000014001 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014002 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000014003 if (localtime(&groundhogday)->tm_hour != 0)
14004 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000014005#if HAVE_TZNAME
14006 /* For UTC, tzname[1] is sometimes "", sometimes " " */
14007 if (strcmp(tzname[0], "UTC") ||
14008 (tzname[1][0] != 0 && tzname[1][0] != ' '))
14009 exit(1);
14010#endif
Brett Cannon18367812003-09-19 00:59:16 +000014011
Neal Norwitz7f2588c2003-04-11 15:35:53 +000014012 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014013 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000014014 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014015 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000014016#if HAVE_TZNAME
14017 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
14018 exit(1);
14019#endif
Brett Cannon18367812003-09-19 00:59:16 +000014020
14021 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
14022 tzset();
14023 if (localtime(&groundhogday)->tm_hour != 11)
14024 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000014025#if HAVE_TZNAME
14026 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
14027 exit(1);
14028#endif
14029
14030#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000014031 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
14032 exit(1);
14033 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
14034 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000014035#endif
Brett Cannon18367812003-09-19 00:59:16 +000014036
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014037 exit(0);
14038}
14039
14040_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014041if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014042 ac_cv_working_tzset=yes
14043else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014044 ac_cv_working_tzset=no
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014045fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014046rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14047 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014048fi
14049
Martin v. Löwiseba40652007-08-30 20:10:57 +000014050fi
14051
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014052{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_tzset" >&5
14053$as_echo "$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014054if test "$ac_cv_working_tzset" = yes
14055then
14056
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014057$as_echo "#define HAVE_WORKING_TZSET 1" >>confdefs.h
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014058
14059fi
14060
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014061# Look for subsecond timestamps in struct stat
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014062{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec in struct stat" >&5
14063$as_echo_n "checking for tv_nsec in struct stat... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010014064if ${ac_cv_stat_tv_nsec+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014065 $as_echo_n "(cached) " >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014066else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014067 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014068/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014069#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014070int
14071main ()
14072{
14073
14074struct stat st;
14075st.st_mtim.tv_nsec = 1;
14076
14077 ;
14078 return 0;
14079}
14080_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014081if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa32c9942002-09-09 16:17:47 +000014082 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014083else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014084 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014085fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014086rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14087fi
14088
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014089{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec" >&5
14090$as_echo "$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014091if test "$ac_cv_stat_tv_nsec" = yes
14092then
14093
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014094$as_echo "#define HAVE_STAT_TV_NSEC 1" >>confdefs.h
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014095
14096fi
14097
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014098# Look for BSD style subsecond timestamps in struct stat
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014099{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec2 in struct stat" >&5
14100$as_echo_n "checking for tv_nsec2 in struct stat... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010014101if ${ac_cv_stat_tv_nsec2+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014102 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014103else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014104 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014105/* end confdefs.h. */
14106#include <sys/stat.h>
14107int
14108main ()
14109{
14110
14111struct stat st;
14112st.st_mtimespec.tv_nsec = 1;
14113
14114 ;
14115 return 0;
14116}
14117_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014118if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014119 ac_cv_stat_tv_nsec2=yes
14120else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014121 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014122fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014123rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14124fi
14125
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014126{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec2" >&5
14127$as_echo "$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014128if test "$ac_cv_stat_tv_nsec2" = yes
14129then
14130
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014131$as_echo "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014132
14133fi
14134
Jack Jansen666b1e72001-10-31 12:11:48 +000014135# On HP/UX 11.0, mvwdelch is a block with a return statement
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014136{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mvwdelch is an expression" >&5
14137$as_echo_n "checking whether mvwdelch is an expression... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010014138if ${ac_cv_mvwdelch_is_expression+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014139 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000014140else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014141 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014142/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000014143#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014144int
14145main ()
14146{
Jack Jansen666b1e72001-10-31 12:11:48 +000014147
14148 int rtn;
14149 rtn = mvwdelch(0,0,0);
14150
Martin v. Löwis11437992002-04-12 09:54:03 +000014151 ;
14152 return 0;
14153}
14154_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014155if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000014156 ac_cv_mvwdelch_is_expression=yes
14157else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014158 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000014159fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014160rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14161fi
14162
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014163{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mvwdelch_is_expression" >&5
14164$as_echo "$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000014165
14166if test "$ac_cv_mvwdelch_is_expression" = yes
14167then
Martin v. Löwis11437992002-04-12 09:54:03 +000014168
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014169$as_echo "#define MVWDELCH_IS_EXPRESSION 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000014170
14171fi
14172
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014173{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WINDOW has _flags" >&5
14174$as_echo_n "checking whether WINDOW has _flags... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010014175if ${ac_cv_window_has_flags+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014176 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000014177else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014178 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014179/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000014180#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014181int
14182main ()
14183{
Jack Jansen666b1e72001-10-31 12:11:48 +000014184
14185 WINDOW *w;
14186 w->_flags = 0;
14187
Martin v. Löwis11437992002-04-12 09:54:03 +000014188 ;
14189 return 0;
14190}
14191_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014192if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000014193 ac_cv_window_has_flags=yes
14194else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014195 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000014196fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014197rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14198fi
14199
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014200{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_window_has_flags" >&5
14201$as_echo "$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000014202
Jack Jansen666b1e72001-10-31 12:11:48 +000014203
14204if test "$ac_cv_window_has_flags" = yes
14205then
Martin v. Löwis11437992002-04-12 09:54:03 +000014206
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014207$as_echo "#define WINDOW_HAS_FLAGS 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000014208
14209fi
14210
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014211{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_term_resized" >&5
14212$as_echo_n "checking for is_term_resized... " >&6; }
14213cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Walter Dörwald4994d952006-06-19 08:07:50 +000014214/* end confdefs.h. */
14215#include <curses.h>
14216int
14217main ()
14218{
14219void *x=is_term_resized
14220 ;
14221 return 0;
14222}
14223_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014224if ac_fn_c_try_compile "$LINENO"; then :
Walter Dörwald4994d952006-06-19 08:07:50 +000014225
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014226$as_echo "#define HAVE_CURSES_IS_TERM_RESIZED 1" >>confdefs.h
Walter Dörwald4994d952006-06-19 08:07:50 +000014227
Matthias Klosec511b472010-05-08 11:01:39 +000014228 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014229$as_echo "yes" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000014230else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014231 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14232$as_echo "no" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000014233
14234fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014235rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14236
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014237{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resize_term" >&5
14238$as_echo_n "checking for resize_term... " >&6; }
14239cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Walter Dörwald4994d952006-06-19 08:07:50 +000014240/* end confdefs.h. */
14241#include <curses.h>
14242int
14243main ()
14244{
14245void *x=resize_term
14246 ;
14247 return 0;
14248}
14249_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014250if ac_fn_c_try_compile "$LINENO"; then :
Walter Dörwald4994d952006-06-19 08:07:50 +000014251
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014252$as_echo "#define HAVE_CURSES_RESIZE_TERM 1" >>confdefs.h
Walter Dörwald4994d952006-06-19 08:07:50 +000014253
Matthias Klosec511b472010-05-08 11:01:39 +000014254 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014255$as_echo "yes" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000014256else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014257 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14258$as_echo "no" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000014259
14260fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014261rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14262
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014263{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resizeterm" >&5
14264$as_echo_n "checking for resizeterm... " >&6; }
14265cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Walter Dörwald4994d952006-06-19 08:07:50 +000014266/* end confdefs.h. */
14267#include <curses.h>
14268int
14269main ()
14270{
14271void *x=resizeterm
14272 ;
14273 return 0;
14274}
14275_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014276if ac_fn_c_try_compile "$LINENO"; then :
Walter Dörwald4994d952006-06-19 08:07:50 +000014277
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014278$as_echo "#define HAVE_CURSES_RESIZETERM 1" >>confdefs.h
Walter Dörwald4994d952006-06-19 08:07:50 +000014279
Matthias Klosec511b472010-05-08 11:01:39 +000014280 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014281$as_echo "yes" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000014282else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014283 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14284$as_echo "no" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000014285
14286fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014287rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14288
doko@python.orgd65e2ba2013-01-31 23:52:03 +010014289{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for device files" >&5
14290$as_echo "$as_me: checking for device files" >&6;}
14291
14292if test "x$cross_compiling" = xyes; then
14293 if test "${ac_cv_file__dev_ptmx+set}" != set; then
14294 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
14295$as_echo_n "checking for /dev/ptmx... " >&6; }
14296 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
14297$as_echo "not set" >&6; }
14298 as_fn_error $? "set ac_cv_file__dev_ptmx to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
14299 fi
14300 if test "${ac_cv_file__dev_ptc+set}" != set; then
14301 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
14302$as_echo_n "checking for /dev/ptc... " >&6; }
14303 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
14304$as_echo "not set" >&6; }
14305 as_fn_error $? "set ac_cv_file__dev_ptc to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
14306 fi
14307fi
14308
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014309{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
14310$as_echo_n "checking for /dev/ptmx... " >&6; }
doko@python.orgd65e2ba2013-01-31 23:52:03 +010014311if ${ac_cv_file__dev_ptmx+:} false; then :
14312 $as_echo_n "(cached) " >&6
14313else
14314 test "$cross_compiling" = yes &&
14315 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
14316if test -r "/dev/ptmx"; then
14317 ac_cv_file__dev_ptmx=yes
14318else
14319 ac_cv_file__dev_ptmx=no
14320fi
14321fi
14322{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptmx" >&5
14323$as_echo "$ac_cv_file__dev_ptmx" >&6; }
14324if test "x$ac_cv_file__dev_ptmx" = xyes; then :
Martin v. Löwisfefbc202006-10-17 18:59:23 +000014325
doko@python.orgd65e2ba2013-01-31 23:52:03 +010014326fi
14327
14328if test "x$ac_cv_file__dev_ptmx" = xyes; then
Martin v. Löwis24a880b2002-12-31 12:55:15 +000014329
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014330$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
Martin v. Löwis24a880b2002-12-31 12:55:15 +000014331
Martin v. Löwis24a880b2002-12-31 12:55:15 +000014332fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014333{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
14334$as_echo_n "checking for /dev/ptc... " >&6; }
doko@python.orgd65e2ba2013-01-31 23:52:03 +010014335if ${ac_cv_file__dev_ptc+:} false; then :
14336 $as_echo_n "(cached) " >&6
14337else
14338 test "$cross_compiling" = yes &&
14339 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
14340if test -r "/dev/ptc"; then
14341 ac_cv_file__dev_ptc=yes
14342else
14343 ac_cv_file__dev_ptc=no
14344fi
14345fi
14346{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptc" >&5
14347$as_echo "$ac_cv_file__dev_ptc" >&6; }
14348if test "x$ac_cv_file__dev_ptc" = xyes; then :
Martin v. Löwisfefbc202006-10-17 18:59:23 +000014349
doko@python.orgd65e2ba2013-01-31 23:52:03 +010014350fi
14351
14352if test "x$ac_cv_file__dev_ptc" = xyes; then
Neal Norwitz865400f2003-03-21 01:42:58 +000014353
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014354$as_echo "#define HAVE_DEV_PTC 1" >>confdefs.h
Neal Norwitz865400f2003-03-21 01:42:58 +000014355
Neal Norwitz865400f2003-03-21 01:42:58 +000014356fi
14357
Mark Dickinson82864d12009-11-15 16:18:58 +000014358if test "$have_long_long" = yes
14359then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014360 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for %lld and %llu printf() format support" >&5
14361$as_echo_n "checking for %lld and %llu printf() format support... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010014362 if ${ac_cv_have_long_long_format+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014363 $as_echo_n "(cached) " >&6
Mark Dickinson82864d12009-11-15 16:18:58 +000014364else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014365 if test "$cross_compiling" = yes; then :
doko@python.orgd65e2ba2013-01-31 23:52:03 +010014366 ac_cv_have_long_long_format="cross -- assuming no"
14367 if test x$GCC = xyes; then
14368 save_CFLAGS=$CFLAGS
14369 CFLAGS="$CFLAGS -Werror -Wformat"
14370 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14371/* end confdefs.h. */
14372
14373 #include <stdio.h>
14374 #include <stddef.h>
14375
14376int
14377main ()
14378{
14379
14380 char *buffer;
14381 sprintf(buffer, "%lld", (long long)123);
14382 sprintf(buffer, "%lld", (long long)-123);
14383 sprintf(buffer, "%llu", (unsigned long long)123);
14384
14385 ;
14386 return 0;
14387}
14388_ACEOF
14389if ac_fn_c_try_compile "$LINENO"; then :
14390 ac_cv_have_long_long_format=yes
14391
14392fi
14393rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14394 CFLAGS=$save_CFLAGS
14395 fi
Mark Dickinson82864d12009-11-15 16:18:58 +000014396else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014397 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson82864d12009-11-15 16:18:58 +000014398/* end confdefs.h. */
14399
14400 #include <stdio.h>
14401 #include <stddef.h>
14402 #include <string.h>
14403
14404 #ifdef HAVE_SYS_TYPES_H
14405 #include <sys/types.h>
14406 #endif
14407
14408 int main()
14409 {
14410 char buffer[256];
14411
14412 if (sprintf(buffer, "%lld", (long long)123) < 0)
14413 return 1;
14414 if (strcmp(buffer, "123"))
14415 return 1;
14416
14417 if (sprintf(buffer, "%lld", (long long)-123) < 0)
14418 return 1;
14419 if (strcmp(buffer, "-123"))
14420 return 1;
14421
14422 if (sprintf(buffer, "%llu", (unsigned long long)123) < 0)
14423 return 1;
14424 if (strcmp(buffer, "123"))
14425 return 1;
14426
14427 return 0;
14428 }
14429
14430_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014431if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson82864d12009-11-15 16:18:58 +000014432 ac_cv_have_long_long_format=yes
14433else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014434 ac_cv_have_long_long_format=no
Mark Dickinson82864d12009-11-15 16:18:58 +000014435fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014436rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14437 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson82864d12009-11-15 16:18:58 +000014438fi
14439
14440
Mark Dickinson82864d12009-11-15 16:18:58 +000014441fi
14442
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014443 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_long_long_format" >&5
14444$as_echo "$ac_cv_have_long_long_format" >&6; }
Mark Dickinson82864d12009-11-15 16:18:58 +000014445fi
14446
Mark Dickinson5ce84742009-12-31 20:48:04 +000014447if test "$ac_cv_have_long_long_format" = yes
Mark Dickinson82864d12009-11-15 16:18:58 +000014448then
14449
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014450$as_echo "#define PY_FORMAT_LONG_LONG \"ll\"" >>confdefs.h
Mark Dickinson82864d12009-11-15 16:18:58 +000014451
14452fi
14453
Ronald Oussoren315cd0c2009-11-19 16:25:21 +000014454if test $ac_sys_system = Darwin
14455then
14456 LIBS="$LIBS -framework CoreFoundation"
14457fi
14458
Mark Dickinson82864d12009-11-15 16:18:58 +000014459
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014460{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for %zd printf() format support" >&5
14461$as_echo_n "checking for %zd printf() format support... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010014462if ${ac_cv_have_size_t_format+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014463 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014464else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014465 if test "$cross_compiling" = yes; then :
Gregory P. Smithc9ff3a72009-11-02 02:03:16 +000014466 ac_cv_have_size_t_format="cross -- assuming yes"
14467
Brett Cannon09d12362006-05-11 05:11:33 +000014468else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014469 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Brett Cannon09d12362006-05-11 05:11:33 +000014470/* end confdefs.h. */
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014471
Brett Cannon09d12362006-05-11 05:11:33 +000014472#include <stdio.h>
14473#include <stddef.h>
14474#include <string.h>
14475
Christian Heimesdb3d6cb2007-12-16 21:39:43 +000014476#ifdef HAVE_SYS_TYPES_H
14477#include <sys/types.h>
14478#endif
Neal Norwitz4a8fbdb2006-09-22 08:16:26 +000014479
14480#ifdef HAVE_SSIZE_T
14481typedef ssize_t Py_ssize_t;
14482#elif SIZEOF_VOID_P == SIZEOF_LONG
14483typedef long Py_ssize_t;
14484#else
14485typedef int Py_ssize_t;
14486#endif
Brett Cannon09d12362006-05-11 05:11:33 +000014487
Christian Heimesdb3d6cb2007-12-16 21:39:43 +000014488int main()
14489{
14490 char buffer[256];
14491
Brett Cannon09d12362006-05-11 05:11:33 +000014492 if(sprintf(buffer, "%zd", (size_t)123) < 0)
14493 return 1;
14494
Neal Norwitz4a8fbdb2006-09-22 08:16:26 +000014495 if (strcmp(buffer, "123"))
14496 return 1;
14497
14498 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
14499 return 1;
14500
14501 if (strcmp(buffer, "-123"))
Brett Cannon09d12362006-05-11 05:11:33 +000014502 return 1;
14503
14504 return 0;
14505}
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014506
Brett Cannon09d12362006-05-11 05:11:33 +000014507_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014508if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014509 ac_cv_have_size_t_format=yes
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014510else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014511 ac_cv_have_size_t_format=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014512fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014513rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14514 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +000014515fi
14516
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014517fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014518{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t_format" >&5
14519$as_echo "$ac_cv_have_size_t_format" >&6; }
Gregory P. Smithc9ff3a72009-11-02 02:03:16 +000014520if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014521
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014522$as_echo "#define PY_FORMAT_SIZE_T \"z\"" >>confdefs.h
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014523
14524fi
14525
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014526ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
Martin v. Löwis01c04012002-11-11 14:58:44 +000014527#ifdef HAVE_SYS_TYPES_H
14528#include <sys/types.h>
14529#endif
14530#ifdef HAVE_SYS_SOCKET_H
14531#include <sys/socket.h>
14532#endif
14533
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014534"
Matthias Klose3cef2a92012-03-14 23:39:33 +010014535if test "x$ac_cv_type_socklen_t" = xyes; then :
Martin v. Löwis01c04012002-11-11 14:58:44 +000014536
Martin v. Löwis11437992002-04-12 09:54:03 +000014537else
Guido van Rossum95713eb2000-05-18 20:53:31 +000014538
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014539$as_echo "#define socklen_t int" >>confdefs.h
Guido van Rossum95713eb2000-05-18 20:53:31 +000014540
14541fi
14542
Michael W. Hudson54241132001-12-07 15:38:26 +000014543
Benjamin Peterson7497e912010-10-16 00:53:39 +000014544case $ac_sys_system in
14545AIX*)
14546
14547$as_echo "#define HAVE_BROKEN_PIPE_BUF 1" >>confdefs.h
14548 ;;
14549esac
14550
14551
Michael W. Hudson54241132001-12-07 15:38:26 +000014552
14553
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000014554for h in `(cd $srcdir;echo Python/thread_*.h)`
14555do
14556 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
14557done
14558
Michael W. Hudson54241132001-12-07 15:38:26 +000014559
Neal Norwitzd24499d2005-12-18 21:36:39 +000014560SRCDIRS="Parser Grammar Objects Python Modules Mac"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014561{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5
14562$as_echo_n "checking for build directories... " >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000014563for dir in $SRCDIRS; do
14564 if test ! -d $dir; then
14565 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000014566 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000014567done
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014568{ $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
14569$as_echo "done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000014570
Guido van Rossum627b2d71993-12-24 10:39:16 +000014571# generate output files
Antoine Pitrouf2caeed2009-05-24 20:23:57 +000014572ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config Misc/python.pc"
Martin v. Löwis88afe662002-10-26 13:47:44 +000014573
Antoine Pitrouaabdceb2010-09-10 20:03:17 +000014574ac_config_files="$ac_config_files Modules/ld_so_aix"
14575
Martin v. Löwis11437992002-04-12 09:54:03 +000014576cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014577# This file is a shell script that caches the results of configure
14578# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000014579# scripts and configure runs, see configure's option --config-cache.
14580# It is not useful on other systems. If it contains results you don't
14581# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014582#
Martin v. Löwis11437992002-04-12 09:54:03 +000014583# config.status only pays attention to the cache file if you give it
14584# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014585#
Skip Montanaro6dead952003-09-25 14:50:04 +000014586# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000014587# loading this file, other *unset* `ac_cv_foo' will be assigned the
14588# following values.
14589
14590_ACEOF
14591
Guido van Rossumf78abae1997-01-21 22:02:36 +000014592# The following way of writing the cache mishandles newlines in values,
14593# but we know of no workaround that is simple, portable, and efficient.
Martin v. Löwiseba40652007-08-30 20:10:57 +000014594# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014595# Ultrix sh set writes to stderr and can't be redirected directly,
14596# and sets the high bit in the cache file unless we assign to the vars.
Martin v. Löwiseba40652007-08-30 20:10:57 +000014597(
14598 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
14599 eval ac_val=\$$ac_var
14600 case $ac_val in #(
14601 *${as_nl}*)
14602 case $ac_var in #(
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014603 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
14604$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000014605 esac
14606 case $ac_var in #(
14607 _ | IFS | as_nl) ;; #(
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014608 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
14609 *) { eval $ac_var=; unset $ac_var;} ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000014610 esac ;;
14611 esac
14612 done
14613
Martin v. Löwis11437992002-04-12 09:54:03 +000014614 (set) 2>&1 |
Martin v. Löwiseba40652007-08-30 20:10:57 +000014615 case $as_nl`(ac_space=' '; set) 2>&1` in #(
14616 *${as_nl}ac_space=\ *)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014617 # `set' does not quote correctly, so add quotes: double-quote
14618 # substitution turns \\\\ into \\, and sed turns \\ into \.
Martin v. Löwis11437992002-04-12 09:54:03 +000014619 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014620 "s/'/'\\\\''/g;
14621 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Martin v. Löwiseba40652007-08-30 20:10:57 +000014622 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000014623 *)
14624 # `set' quotes correctly as required by POSIX, so do not add quotes.
Martin v. Löwiseba40652007-08-30 20:10:57 +000014625 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000014626 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000014627 esac |
14628 sort
14629) |
Martin v. Löwis11437992002-04-12 09:54:03 +000014630 sed '
Martin v. Löwiseba40652007-08-30 20:10:57 +000014631 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000014632 t clear
Martin v. Löwiseba40652007-08-30 20:10:57 +000014633 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000014634 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
14635 t end
Martin v. Löwiseba40652007-08-30 20:10:57 +000014636 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
14637 :end' >>confcache
14638if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
14639 if test -w "$cache_file"; then
Matthias Klose3cef2a92012-03-14 23:39:33 +010014640 if test "x$cache_file" != "x/dev/null"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014641 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
14642$as_echo "$as_me: updating cache $cache_file" >&6;}
Matthias Klose3cef2a92012-03-14 23:39:33 +010014643 if test ! -f "$cache_file" || test -h "$cache_file"; then
14644 cat confcache >"$cache_file"
14645 else
14646 case $cache_file in #(
14647 */* | ?:*)
14648 mv -f confcache "$cache_file"$$ &&
14649 mv -f "$cache_file"$$ "$cache_file" ;; #(
14650 *)
14651 mv -f confcache "$cache_file" ;;
14652 esac
14653 fi
14654 fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014655 else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014656 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
14657$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014658 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014659fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014660rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000014661
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014662test "x$prefix" = xNONE && prefix=$ac_default_prefix
14663# Let make expand exec_prefix.
14664test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000014665
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014666DEFS=-DHAVE_CONFIG_H
14667
Skip Montanaro6dead952003-09-25 14:50:04 +000014668ac_libobjs=
14669ac_ltlibobjs=
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014670U=
Skip Montanaro6dead952003-09-25 14:50:04 +000014671for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
14672 # 1. Remove the extension, and $U if already installed.
Martin v. Löwiseba40652007-08-30 20:10:57 +000014673 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014674 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
Martin v. Löwiseba40652007-08-30 20:10:57 +000014675 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
14676 # will be set to the directory where LIBOBJS objects are built.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014677 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
14678 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000014679done
14680LIBOBJS=$ac_libobjs
14681
14682LTLIBOBJS=$ac_ltlibobjs
14683
14684
Martin v. Löwis11437992002-04-12 09:54:03 +000014685
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014686
Matthias Klose3cef2a92012-03-14 23:39:33 +010014687: "${CONFIG_STATUS=./config.status}"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014688ac_write_fail=0
Martin v. Löwis11437992002-04-12 09:54:03 +000014689ac_clean_files_save=$ac_clean_files
14690ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014691{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
14692$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
14693as_write_fail=0
14694cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014695#! $SHELL
14696# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000014697# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014698# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000014699# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000014700
Martin v. Löwis11437992002-04-12 09:54:03 +000014701debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000014702ac_cs_recheck=false
14703ac_cs_silent=false
Jack Jansendd19cf82001-12-06 22:36:17 +000014704
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014705SHELL=\${CONFIG_SHELL-$SHELL}
14706export SHELL
14707_ASEOF
14708cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
14709## -------------------- ##
14710## M4sh Initialization. ##
14711## -------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000014712
Martin v. Löwiseba40652007-08-30 20:10:57 +000014713# Be more Bourne compatible
14714DUALCASE=1; export DUALCASE # for MKS sh
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014715if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014716 emulate sh
14717 NULLCMD=:
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014718 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000014719 # is contrary to our usage. Disable this feature.
14720 alias -g '${1+"$@"}'='"$@"'
Martin v. Löwiseba40652007-08-30 20:10:57 +000014721 setopt NO_GLOB_SUBST
Skip Montanaro89e975f2007-08-22 19:05:21 +000014722else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014723 case `(set -o) 2>/dev/null` in #(
14724 *posix*) :
14725 set -o posix ;; #(
14726 *) :
14727 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000014728esac
Martin v. Löwis11437992002-04-12 09:54:03 +000014729fi
Michael W. Hudson54241132001-12-07 15:38:26 +000014730
Skip Montanaro6dead952003-09-25 14:50:04 +000014731
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014732as_nl='
14733'
14734export as_nl
14735# Printing a long string crashes Solaris 7 /usr/bin/printf.
14736as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
14737as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
14738as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
14739# Prefer a ksh shell builtin over an external printf program on Solaris,
14740# but without wasting forks for bash or zsh.
14741if test -z "$BASH_VERSION$ZSH_VERSION" \
14742 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
14743 as_echo='print -r --'
14744 as_echo_n='print -rn --'
14745elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
14746 as_echo='printf %s\n'
14747 as_echo_n='printf %s'
14748else
14749 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
14750 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
14751 as_echo_n='/usr/ucb/echo -n'
14752 else
14753 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
14754 as_echo_n_body='eval
14755 arg=$1;
14756 case $arg in #(
14757 *"$as_nl"*)
14758 expr "X$arg" : "X\\(.*\\)$as_nl";
14759 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
14760 esac;
14761 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
14762 '
14763 export as_echo_n_body
14764 as_echo_n='sh -c $as_echo_n_body as_echo'
14765 fi
14766 export as_echo_body
14767 as_echo='sh -c $as_echo_body as_echo'
14768fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014769
14770# The user is always right.
14771if test "${PATH_SEPARATOR+set}" != set; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014772 PATH_SEPARATOR=:
14773 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
14774 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
14775 PATH_SEPARATOR=';'
14776 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000014777fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014778
Martin v. Löwiseba40652007-08-30 20:10:57 +000014779
14780# IFS
14781# We need space, tab and new line, in precisely that order. Quoting is
14782# there to prevent editors from complaining about space-tab.
14783# (If _AS_PATH_WALK were called with IFS unset, it would disable word
14784# splitting by setting IFS to empty value.)
Martin v. Löwiseba40652007-08-30 20:10:57 +000014785IFS=" "" $as_nl"
14786
14787# Find who we are. Look in the path if we contain no directory separator.
Matthias Klose3cef2a92012-03-14 23:39:33 +010014788as_myself=
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014789case $0 in #((
Martin v. Löwiseba40652007-08-30 20:10:57 +000014790 *[\\/]* ) as_myself=$0 ;;
14791 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000014792for as_dir in $PATH
14793do
14794 IFS=$as_save_IFS
14795 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014796 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
14797 done
Martin v. Löwiseba40652007-08-30 20:10:57 +000014798IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000014799
Martin v. Löwiseba40652007-08-30 20:10:57 +000014800 ;;
14801esac
14802# We did not find ourselves, most probably we were run as `sh COMMAND'
14803# in which case we are not to be found in the path.
14804if test "x$as_myself" = x; then
14805 as_myself=$0
14806fi
14807if test ! -f "$as_myself"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014808 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
14809 exit 1
Martin v. Löwiseba40652007-08-30 20:10:57 +000014810fi
14811
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014812# Unset variables that we do not need and which cause bugs (e.g. in
14813# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
14814# suppresses any "Segmentation fault" message there. '((' could
14815# trigger a bug in pdksh 5.2.14.
14816for as_var in BASH_ENV ENV MAIL MAILPATH
14817do eval test x\${$as_var+set} = xset \
14818 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Martin v. Löwiseba40652007-08-30 20:10:57 +000014819done
14820PS1='$ '
14821PS2='> '
14822PS4='+ '
14823
14824# NLS nuisances.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014825LC_ALL=C
14826export LC_ALL
14827LANGUAGE=C
14828export LANGUAGE
Martin v. Löwiseba40652007-08-30 20:10:57 +000014829
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014830# CDPATH.
14831(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
14832
14833
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014834# as_fn_error STATUS ERROR [LINENO LOG_FD]
14835# ----------------------------------------
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014836# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
14837# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014838# script with STATUS, using 1 if that was 0.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014839as_fn_error ()
14840{
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014841 as_status=$1; test $as_status -eq 0 && as_status=1
14842 if test "$4"; then
14843 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
14844 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014845 fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014846 $as_echo "$as_me: error: $2" >&2
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014847 as_fn_exit $as_status
14848} # as_fn_error
14849
14850
14851# as_fn_set_status STATUS
14852# -----------------------
14853# Set $? to STATUS, without forking.
14854as_fn_set_status ()
14855{
14856 return $1
14857} # as_fn_set_status
14858
14859# as_fn_exit STATUS
14860# -----------------
14861# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
14862as_fn_exit ()
14863{
14864 set +e
14865 as_fn_set_status $1
14866 exit $1
14867} # as_fn_exit
14868
14869# as_fn_unset VAR
14870# ---------------
14871# Portably unset VAR.
14872as_fn_unset ()
14873{
14874 { eval $1=; unset $1;}
14875}
14876as_unset=as_fn_unset
14877# as_fn_append VAR VALUE
14878# ----------------------
14879# Append the text in VALUE to the end of the definition contained in VAR. Take
14880# advantage of any shell optimizations that allow amortized linear growth over
14881# repeated appends, instead of the typical quadratic growth present in naive
14882# implementations.
14883if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
14884 eval 'as_fn_append ()
14885 {
14886 eval $1+=\$2
14887 }'
14888else
14889 as_fn_append ()
14890 {
14891 eval $1=\$$1\$2
14892 }
14893fi # as_fn_append
14894
14895# as_fn_arith ARG...
14896# ------------------
14897# Perform arithmetic evaluation on the ARGs, and store the result in the
14898# global $as_val. Take advantage of shells that can avoid forks. The arguments
14899# must be portable across $(()) and expr.
14900if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
14901 eval 'as_fn_arith ()
14902 {
14903 as_val=$(( $* ))
14904 }'
14905else
14906 as_fn_arith ()
14907 {
14908 as_val=`expr "$@" || test $? -eq 1`
14909 }
14910fi # as_fn_arith
14911
14912
Martin v. Löwiseba40652007-08-30 20:10:57 +000014913if expr a : '\(a\)' >/dev/null 2>&1 &&
14914 test "X`expr 00001 : '.*\(...\)'`" = X001; then
14915 as_expr=expr
14916else
14917 as_expr=false
14918fi
14919
14920if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
14921 as_basename=basename
14922else
14923 as_basename=false
14924fi
14925
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014926if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
14927 as_dirname=dirname
14928else
14929 as_dirname=false
14930fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014931
Martin v. Löwiseba40652007-08-30 20:10:57 +000014932as_me=`$as_basename -- "$0" ||
14933$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
14934 X"$0" : 'X\(//\)$' \| \
14935 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014936$as_echo X/"$0" |
Martin v. Löwiseba40652007-08-30 20:10:57 +000014937 sed '/^.*\/\([^/][^/]*\)\/*$/{
14938 s//\1/
14939 q
14940 }
14941 /^X\/\(\/\/\)$/{
14942 s//\1/
14943 q
14944 }
14945 /^X\/\(\/\).*/{
14946 s//\1/
14947 q
14948 }
14949 s/.*/./; q'`
14950
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014951# Avoid depending upon Character Ranges.
14952as_cr_letters='abcdefghijklmnopqrstuvwxyz'
14953as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
14954as_cr_Letters=$as_cr_letters$as_cr_LETTERS
14955as_cr_digits='0123456789'
14956as_cr_alnum=$as_cr_Letters$as_cr_digits
Martin v. Löwiseba40652007-08-30 20:10:57 +000014957
14958ECHO_C= ECHO_N= ECHO_T=
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014959case `echo -n x` in #(((((
Martin v. Löwiseba40652007-08-30 20:10:57 +000014960-n*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014961 case `echo 'xy\c'` in
Martin v. Löwiseba40652007-08-30 20:10:57 +000014962 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014963 xy) ECHO_C='\c';;
14964 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
14965 ECHO_T=' ';;
Martin v. Löwiseba40652007-08-30 20:10:57 +000014966 esac;;
14967*)
14968 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000014969esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014970
Martin v. Löwis11437992002-04-12 09:54:03 +000014971rm -f conf$$ conf$$.exe conf$$.file
Martin v. Löwiseba40652007-08-30 20:10:57 +000014972if test -d conf$$.dir; then
14973 rm -f conf$$.dir/conf$$.file
14974else
14975 rm -f conf$$.dir
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014976 mkdir conf$$.dir 2>/dev/null
Martin v. Löwiseba40652007-08-30 20:10:57 +000014977fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014978if (echo >conf$$.file) 2>/dev/null; then
14979 if ln -s conf$$.file conf$$ 2>/dev/null; then
14980 as_ln_s='ln -s'
14981 # ... but there are two gotchas:
14982 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
14983 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
Charles-François Natalibe2b9072013-01-08 19:47:00 +010014984 # In both cases, we have to default to `cp -pR'.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014985 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Charles-François Natalibe2b9072013-01-08 19:47:00 +010014986 as_ln_s='cp -pR'
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014987 elif ln conf$$.file conf$$ 2>/dev/null; then
14988 as_ln_s=ln
14989 else
Charles-François Natalibe2b9072013-01-08 19:47:00 +010014990 as_ln_s='cp -pR'
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014991 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014992else
Charles-François Natalibe2b9072013-01-08 19:47:00 +010014993 as_ln_s='cp -pR'
Martin v. Löwis11437992002-04-12 09:54:03 +000014994fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014995rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
14996rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000014997
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014998
14999# as_fn_mkdir_p
15000# -------------
15001# Create "$as_dir" as a directory, including parents if necessary.
15002as_fn_mkdir_p ()
15003{
15004
15005 case $as_dir in #(
15006 -*) as_dir=./$as_dir;;
15007 esac
15008 test -d "$as_dir" || eval $as_mkdir_p || {
15009 as_dirs=
15010 while :; do
15011 case $as_dir in #(
15012 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
15013 *) as_qdir=$as_dir;;
15014 esac
15015 as_dirs="'$as_qdir' $as_dirs"
15016 as_dir=`$as_dirname -- "$as_dir" ||
15017$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
15018 X"$as_dir" : 'X\(//\)[^/]' \| \
15019 X"$as_dir" : 'X\(//\)$' \| \
15020 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
15021$as_echo X"$as_dir" |
15022 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
15023 s//\1/
15024 q
15025 }
15026 /^X\(\/\/\)[^/].*/{
15027 s//\1/
15028 q
15029 }
15030 /^X\(\/\/\)$/{
15031 s//\1/
15032 q
15033 }
15034 /^X\(\/\).*/{
15035 s//\1/
15036 q
15037 }
15038 s/.*/./; q'`
15039 test -d "$as_dir" && break
15040 done
15041 test -z "$as_dirs" || eval "mkdir $as_dirs"
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015042 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015043
15044
15045} # as_fn_mkdir_p
Skip Montanaro6dead952003-09-25 14:50:04 +000015046if mkdir -p . 2>/dev/null; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015047 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +000015048else
Skip Montanarof0d5f792004-08-15 14:08:23 +000015049 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000015050 as_mkdir_p=false
15051fi
15052
Charles-François Natalibe2b9072013-01-08 19:47:00 +010015053
15054# as_fn_executable_p FILE
15055# -----------------------
15056# Test if FILE is an executable regular file.
15057as_fn_executable_p ()
15058{
15059 test -f "$1" && test -x "$1"
15060} # as_fn_executable_p
15061as_test_x='test -x'
15062as_executable_p=as_fn_executable_p
Martin v. Löwis11437992002-04-12 09:54:03 +000015063
15064# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000015065as_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 +000015066
15067# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000015068as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000015069
15070
Martin v. Löwis11437992002-04-12 09:54:03 +000015071exec 6>&1
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015072## ----------------------------------- ##
15073## Main body of $CONFIG_STATUS script. ##
15074## ----------------------------------- ##
15075_ASEOF
15076test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015077
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015078cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15079# Save the log message, to keep $0 and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000015080# report actual input values of CONFIG_FILES etc. instead of their
Martin v. Löwiseba40652007-08-30 20:10:57 +000015081# values after options handling.
15082ac_log="
Martin v. Löwis174440b2008-10-03 08:59:41 +000015083This file was extended by python $as_me 2.7, which was
Charles-François Natalibe2b9072013-01-08 19:47:00 +010015084generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000015085
15086 CONFIG_FILES = $CONFIG_FILES
15087 CONFIG_HEADERS = $CONFIG_HEADERS
15088 CONFIG_LINKS = $CONFIG_LINKS
15089 CONFIG_COMMANDS = $CONFIG_COMMANDS
15090 $ $0 $@
15091
Martin v. Löwiseba40652007-08-30 20:10:57 +000015092on `(hostname || uname -n) 2>/dev/null | sed 1q`
15093"
15094
Martin v. Löwis11437992002-04-12 09:54:03 +000015095_ACEOF
15096
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015097case $ac_config_files in *"
15098"*) set x $ac_config_files; shift; ac_config_files=$*;;
15099esac
15100
15101case $ac_config_headers in *"
15102"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
15103esac
15104
15105
15106cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015107# Files that config.status was made for.
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015108config_files="$ac_config_files"
15109config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000015110
Martin v. Löwiseba40652007-08-30 20:10:57 +000015111_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000015112
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015113cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015114ac_cs_usage="\
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015115\`$as_me' instantiates files and other configuration actions
15116from templates according to the current configuration. Unless the files
15117and actions are specified as TAGs, all are instantiated by default.
Martin v. Löwis11437992002-04-12 09:54:03 +000015118
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015119Usage: $0 [OPTION]... [TAG]...
Martin v. Löwis11437992002-04-12 09:54:03 +000015120
15121 -h, --help print this help, then exit
Martin v. Löwiseba40652007-08-30 20:10:57 +000015122 -V, --version print version number and configuration settings, then exit
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015123 --config print configuration, then exit
15124 -q, --quiet, --silent
15125 do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000015126 -d, --debug don't remove temporary files
15127 --recheck update $as_me by reconfiguring in the same conditions
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015128 --file=FILE[:TEMPLATE]
15129 instantiate the configuration file FILE
15130 --header=FILE[:TEMPLATE]
15131 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000015132
15133Configuration files:
15134$config_files
15135
15136Configuration headers:
15137$config_headers
15138
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015139Report bugs to <http://bugs.python.org/>."
Skip Montanaro89e975f2007-08-22 19:05:21 +000015140
Martin v. Löwiseba40652007-08-30 20:10:57 +000015141_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015142cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15143ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
Martin v. Löwis11437992002-04-12 09:54:03 +000015144ac_cs_version="\\
Martin v. Löwis174440b2008-10-03 08:59:41 +000015145python config.status 2.7
Charles-François Natalibe2b9072013-01-08 19:47:00 +010015146configured by $0, generated by GNU Autoconf 2.69,
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015147 with options \\"\$ac_cs_config\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000015148
Charles-François Natalibe2b9072013-01-08 19:47:00 +010015149Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000015150This config.status script is free software; the Free Software Foundation
15151gives unlimited permission to copy, distribute and modify it."
Martin v. Löwiseba40652007-08-30 20:10:57 +000015152
15153ac_pwd='$ac_pwd'
15154srcdir='$srcdir'
15155INSTALL='$INSTALL'
Trent Nelsonf6407a12012-08-30 14:56:13 +000015156MKDIR_P='$MKDIR_P'
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015157test -n "\$AWK" || AWK=awk
Martin v. Löwis11437992002-04-12 09:54:03 +000015158_ACEOF
15159
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015160cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15161# The default lists apply if the user does not specify any file.
Martin v. Löwis11437992002-04-12 09:54:03 +000015162ac_need_defaults=:
15163while test $# != 0
15164do
15165 case $1 in
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015166 --*=?*)
Martin v. Löwiseba40652007-08-30 20:10:57 +000015167 ac_option=`expr "X$1" : 'X\([^=]*\)='`
15168 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000015169 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000015170 ;;
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015171 --*=)
15172 ac_option=`expr "X$1" : 'X\([^=]*\)='`
15173 ac_optarg=
15174 ac_shift=:
15175 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015176 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000015177 ac_option=$1
15178 ac_optarg=$2
15179 ac_shift=shift
15180 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015181 esac
15182
Skip Montanaro6dead952003-09-25 14:50:04 +000015183 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000015184 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000015185 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
15186 ac_cs_recheck=: ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015187 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015188 $as_echo "$ac_cs_version"; exit ;;
15189 --config | --confi | --conf | --con | --co | --c )
15190 $as_echo "$ac_cs_config"; exit ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015191 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000015192 debug=: ;;
15193 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000015194 $ac_shift
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015195 case $ac_optarg in
15196 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015197 '') as_fn_error $? "missing file argument" ;;
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015198 esac
15199 as_fn_append CONFIG_FILES " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000015200 ac_need_defaults=false;;
15201 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000015202 $ac_shift
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015203 case $ac_optarg in
15204 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
15205 esac
15206 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000015207 ac_need_defaults=false;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015208 --he | --h)
15209 # Conflict between --help and --header
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015210 as_fn_error $? "ambiguous option: \`$1'
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015211Try \`$0 --help' for more information.";;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015212 --help | --hel | -h )
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015213 $as_echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000015214 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
15215 | -silent | --silent | --silen | --sile | --sil | --si | --s)
15216 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015217
15218 # This is an error.
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015219 -*) as_fn_error $? "unrecognized option: \`$1'
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015220Try \`$0 --help' for more information." ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015221
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015222 *) as_fn_append ac_config_targets " $1"
Martin v. Löwiseba40652007-08-30 20:10:57 +000015223 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015224
15225 esac
15226 shift
15227done
15228
Skip Montanaro6dead952003-09-25 14:50:04 +000015229ac_configure_extra_args=
15230
15231if $ac_cs_silent; then
15232 exec 6>/dev/null
15233 ac_configure_extra_args="$ac_configure_extra_args --silent"
15234fi
15235
15236_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015237cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Skip Montanaro6dead952003-09-25 14:50:04 +000015238if \$ac_cs_recheck; then
Charles-François Natalibe2b9072013-01-08 19:47:00 +010015239 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015240 shift
15241 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
15242 CONFIG_SHELL='$SHELL'
Martin v. Löwiseba40652007-08-30 20:10:57 +000015243 export CONFIG_SHELL
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015244 exec "\$@"
Skip Montanaro6dead952003-09-25 14:50:04 +000015245fi
15246
Martin v. Löwis11437992002-04-12 09:54:03 +000015247_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015248cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwiseba40652007-08-30 20:10:57 +000015249exec 5>>config.log
15250{
15251 echo
15252 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
15253## Running $as_me. ##
15254_ASBOX
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015255 $as_echo "$ac_log"
Martin v. Löwiseba40652007-08-30 20:10:57 +000015256} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015257
Martin v. Löwiseba40652007-08-30 20:10:57 +000015258_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015259cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwiseba40652007-08-30 20:10:57 +000015260_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000015261
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015262cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwiseba40652007-08-30 20:10:57 +000015263
15264# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000015265for ac_config_target in $ac_config_targets
15266do
Martin v. Löwiseba40652007-08-30 20:10:57 +000015267 case $ac_config_target in
15268 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
15269 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
15270 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
15271 "Mac/IDLE/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/IDLE/Makefile" ;;
Ronald Oussoren580c7fe2008-05-02 19:45:11 +000015272 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
15273 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015274 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
15275 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
Antoine Pitrouf2caeed2009-05-24 20:23:57 +000015276 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
Antoine Pitrouaabdceb2010-09-10 20:03:17 +000015277 "Modules/ld_so_aix") CONFIG_FILES="$CONFIG_FILES Modules/ld_so_aix" ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015278
Matthias Klose3cef2a92012-03-14 23:39:33 +010015279 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015280 esac
15281done
15282
Martin v. Löwiseba40652007-08-30 20:10:57 +000015283
Martin v. Löwis11437992002-04-12 09:54:03 +000015284# If the user did not use the arguments to specify the items to instantiate,
15285# then the envvar interface is used. Set only those that are not.
15286# We use the long form for the default assignment because of an extremely
15287# bizarre bug on SunOS 4.1.3.
15288if $ac_need_defaults; then
15289 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
15290 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
15291fi
15292
Skip Montanaro6dead952003-09-25 14:50:04 +000015293# Have a temporary directory for convenience. Make it in the build tree
Martin v. Löwiseba40652007-08-30 20:10:57 +000015294# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000015295# creating and moving files from /tmp can sometimes cause problems.
Martin v. Löwiseba40652007-08-30 20:10:57 +000015296# Hook for its removal unless debugging.
15297# Note that there is a small window in which the directory will not be cleaned:
15298# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000015299$debug ||
15300{
Matthias Klose3cef2a92012-03-14 23:39:33 +010015301 tmp= ac_tmp=
Martin v. Löwiseba40652007-08-30 20:10:57 +000015302 trap 'exit_status=$?
Matthias Klose3cef2a92012-03-14 23:39:33 +010015303 : "${ac_tmp:=$tmp}"
15304 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
Martin v. Löwiseba40652007-08-30 20:10:57 +000015305' 0
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015306 trap 'as_fn_exit 1' 1 2 13 15
Martin v. Löwis11437992002-04-12 09:54:03 +000015307}
Martin v. Löwis11437992002-04-12 09:54:03 +000015308# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000015309
Martin v. Löwis11437992002-04-12 09:54:03 +000015310{
Martin v. Löwiseba40652007-08-30 20:10:57 +000015311 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Matthias Klose3cef2a92012-03-14 23:39:33 +010015312 test -d "$tmp"
Martin v. Löwis11437992002-04-12 09:54:03 +000015313} ||
15314{
Martin v. Löwiseba40652007-08-30 20:10:57 +000015315 tmp=./conf$$-$RANDOM
15316 (umask 077 && mkdir "$tmp")
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015317} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
Matthias Klose3cef2a92012-03-14 23:39:33 +010015318ac_tmp=$tmp
Martin v. Löwis11437992002-04-12 09:54:03 +000015319
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015320# Set up the scripts for CONFIG_FILES section.
15321# No need to generate them if there are no CONFIG_FILES.
15322# This happens for instance with `./config.status config.h'.
Martin v. Löwiseba40652007-08-30 20:10:57 +000015323if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015324
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015325
15326ac_cr=`echo X | tr X '\015'`
15327# On cygwin, bash can eat \r inside `` if the user requested igncr.
15328# But we know of no other shell where ac_cr would be empty at this
15329# point, so we can use a bashism as a fallback.
15330if test "x$ac_cr" = x; then
15331 eval ac_cr=\$\'\\r\'
15332fi
15333ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
15334if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015335 ac_cs_awk_cr='\\r'
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015336else
15337 ac_cs_awk_cr=$ac_cr
15338fi
15339
Matthias Klose3cef2a92012-03-14 23:39:33 +010015340echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
Martin v. Löwis11437992002-04-12 09:54:03 +000015341_ACEOF
15342
Martin v. Löwiseba40652007-08-30 20:10:57 +000015343
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015344{
15345 echo "cat >conf$$subs.awk <<_ACEOF" &&
15346 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
15347 echo "_ACEOF"
15348} >conf$$subs.sh ||
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015349 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
15350ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
Martin v. Löwiseba40652007-08-30 20:10:57 +000015351ac_delim='%!_!# '
15352for ac_last_try in false false false false false :; do
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015353 . ./conf$$subs.sh ||
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015354 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015355
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015356 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
15357 if test $ac_delim_n = $ac_delim_num; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015358 break
15359 elif $ac_last_try; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015360 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015361 else
15362 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000015363 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015364done
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015365rm -f conf$$subs.sh
Martin v. Löwiseba40652007-08-30 20:10:57 +000015366
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015367cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Matthias Klose3cef2a92012-03-14 23:39:33 +010015368cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
Martin v. Löwiseba40652007-08-30 20:10:57 +000015369_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015370sed -n '
15371h
15372s/^/S["/; s/!.*/"]=/
15373p
15374g
15375s/^[^!]*!//
15376:repl
15377t repl
15378s/'"$ac_delim"'$//
15379t delim
15380:nl
15381h
15382s/\(.\{148\}\)..*/\1/
15383t more1
15384s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
15385p
15386n
15387b repl
15388:more1
15389s/["\\]/\\&/g; s/^/"/; s/$/"\\/
15390p
15391g
15392s/.\{148\}//
15393t nl
15394:delim
15395h
15396s/\(.\{148\}\)..*/\1/
15397t more2
15398s/["\\]/\\&/g; s/^/"/; s/$/"/
15399p
15400b
15401:more2
15402s/["\\]/\\&/g; s/^/"/; s/$/"\\/
15403p
15404g
15405s/.\{148\}//
15406t delim
15407' <conf$$subs.awk | sed '
15408/^[^""]/{
15409 N
15410 s/\n//
15411}
15412' >>$CONFIG_STATUS || ac_write_fail=1
15413rm -f conf$$subs.awk
15414cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15415_ACAWK
Matthias Klose3cef2a92012-03-14 23:39:33 +010015416cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015417 for (key in S) S_is_set[key] = 1
15418 FS = ""
15419
15420}
15421{
15422 line = $ 0
15423 nfields = split(line, field, "@")
15424 substed = 0
15425 len = length(field[1])
15426 for (i = 2; i < nfields; i++) {
15427 key = field[i]
15428 keylen = length(key)
15429 if (S_is_set[key]) {
15430 value = S[key]
15431 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
15432 len += length(value) + length(field[++i])
15433 substed = 1
15434 } else
15435 len += 1 + keylen
15436 }
15437
15438 print line
15439}
15440
15441_ACAWK
Martin v. Löwiseba40652007-08-30 20:10:57 +000015442_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015443cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15444if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
15445 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
15446else
15447 cat
Matthias Klose3cef2a92012-03-14 23:39:33 +010015448fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015449 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015450_ACEOF
15451
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015452# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
15453# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
Martin v. Löwiseba40652007-08-30 20:10:57 +000015454# trailing colons and then remove the whole line if VPATH becomes empty
15455# (actually we leave an empty line to preserve line numbers).
15456if test "x$srcdir" = x.; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015457 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
15458h
15459s///
15460s/^/:/
15461s/[ ]*$/:/
15462s/:\$(srcdir):/:/g
15463s/:\${srcdir}:/:/g
15464s/:@srcdir@:/:/g
15465s/^:*//
Martin v. Löwiseba40652007-08-30 20:10:57 +000015466s/:*$//
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015467x
15468s/\(=[ ]*\).*/\1/
15469G
15470s/\n//
Martin v. Löwiseba40652007-08-30 20:10:57 +000015471s/^[^=]*=[ ]*$//
15472}'
15473fi
15474
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015475cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015476fi # test -n "$CONFIG_FILES"
15477
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015478# Set up the scripts for CONFIG_HEADERS section.
15479# No need to generate them if there are no CONFIG_HEADERS.
15480# This happens for instance with `./config.status Makefile'.
15481if test -n "$CONFIG_HEADERS"; then
Matthias Klose3cef2a92012-03-14 23:39:33 +010015482cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015483BEGIN {
15484_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000015485
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015486# Transform confdefs.h into an awk script `defines.awk', embedded as
15487# here-document in config.status, that substitutes the proper values into
15488# config.h.in to produce config.h.
15489
15490# Create a delimiter string that does not exist in confdefs.h, to ease
15491# handling of long lines.
15492ac_delim='%!_!# '
15493for ac_last_try in false false :; do
Matthias Klose3cef2a92012-03-14 23:39:33 +010015494 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
15495 if test -z "$ac_tt"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015496 break
15497 elif $ac_last_try; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015498 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015499 else
15500 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
15501 fi
15502done
15503
15504# For the awk script, D is an array of macro values keyed by name,
15505# likewise P contains macro parameters if any. Preserve backslash
15506# newline sequences.
15507
15508ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
15509sed -n '
15510s/.\{148\}/&'"$ac_delim"'/g
15511t rset
15512:rset
15513s/^[ ]*#[ ]*define[ ][ ]*/ /
15514t def
15515d
15516:def
15517s/\\$//
15518t bsnl
15519s/["\\]/\\&/g
15520s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
15521D["\1"]=" \3"/p
15522s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
15523d
15524:bsnl
15525s/["\\]/\\&/g
15526s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
15527D["\1"]=" \3\\\\\\n"\\/p
15528t cont
15529s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
15530t cont
15531d
15532:cont
15533n
15534s/.\{148\}/&'"$ac_delim"'/g
15535t clear
15536:clear
15537s/\\$//
15538t bsnlc
15539s/["\\]/\\&/g; s/^/"/; s/$/"/p
15540d
15541:bsnlc
15542s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
15543b cont
15544' <confdefs.h | sed '
15545s/'"$ac_delim"'/"\\\
15546"/g' >>$CONFIG_STATUS || ac_write_fail=1
15547
15548cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15549 for (key in D) D_is_set[key] = 1
15550 FS = ""
15551}
15552/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
15553 line = \$ 0
15554 split(line, arg, " ")
15555 if (arg[1] == "#") {
15556 defundef = arg[2]
15557 mac1 = arg[3]
15558 } else {
15559 defundef = substr(arg[1], 2)
15560 mac1 = arg[2]
15561 }
15562 split(mac1, mac2, "(") #)
15563 macro = mac2[1]
15564 prefix = substr(line, 1, index(line, defundef) - 1)
15565 if (D_is_set[macro]) {
15566 # Preserve the white space surrounding the "#".
15567 print prefix "define", macro P[macro] D[macro]
15568 next
15569 } else {
15570 # Replace #undef with comments. This is necessary, for example,
15571 # in the case of _POSIX_SOURCE, which is predefined and required
15572 # on some systems where configure will not decide to define it.
15573 if (defundef == "undef") {
15574 print "/*", prefix defundef, macro, "*/"
15575 next
15576 }
15577 }
15578}
15579{ print }
15580_ACAWK
15581_ACEOF
15582cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015583 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015584fi # test -n "$CONFIG_HEADERS"
15585
15586
15587eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
15588shift
15589for ac_tag
Martin v. Löwiseba40652007-08-30 20:10:57 +000015590do
15591 case $ac_tag in
15592 :[FHLC]) ac_mode=$ac_tag; continue;;
15593 esac
15594 case $ac_mode$ac_tag in
15595 :[FHL]*:*);;
Matthias Klose3cef2a92012-03-14 23:39:33 +010015596 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015597 :[FH]-) ac_tag=-:-;;
15598 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
15599 esac
15600 ac_save_IFS=$IFS
15601 IFS=:
15602 set x $ac_tag
15603 IFS=$ac_save_IFS
15604 shift
15605 ac_file=$1
15606 shift
15607
15608 case $ac_mode in
15609 :L) ac_source=$1;;
15610 :[FH])
15611 ac_file_inputs=
15612 for ac_f
15613 do
15614 case $ac_f in
Matthias Klose3cef2a92012-03-14 23:39:33 +010015615 -) ac_f="$ac_tmp/stdin";;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015616 *) # Look for the file first in the build tree, then in the source tree
15617 # (if the path is not absolute). The absolute path cannot be DOS-style,
15618 # because $ac_f cannot contain `:'.
15619 test -f "$ac_f" ||
15620 case $ac_f in
15621 [\\/$]*) false;;
15622 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
15623 esac ||
Matthias Klose3cef2a92012-03-14 23:39:33 +010015624 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015625 esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015626 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
15627 as_fn_append ac_file_inputs " '$ac_f'"
Martin v. Löwiseba40652007-08-30 20:10:57 +000015628 done
15629
15630 # Let's still pretend it is `configure' which instantiates (i.e., don't
15631 # use $as_me), people would be surprised to read:
15632 # /* config.h. Generated by config.status. */
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015633 configure_input='Generated from '`
15634 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
15635 `' by configure.'
Martin v. Löwiseba40652007-08-30 20:10:57 +000015636 if test x"$ac_file" != x-; then
15637 configure_input="$ac_file. $configure_input"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015638 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
15639$as_echo "$as_me: creating $ac_file" >&6;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000015640 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015641 # Neutralize special characters interpreted by sed in replacement strings.
15642 case $configure_input in #(
15643 *\&* | *\|* | *\\* )
15644 ac_sed_conf_input=`$as_echo "$configure_input" |
15645 sed 's/[\\\\&|]/\\\\&/g'`;; #(
15646 *) ac_sed_conf_input=$configure_input;;
15647 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000015648
15649 case $ac_tag in
Matthias Klose3cef2a92012-03-14 23:39:33 +010015650 *:-:* | *:-) cat >"$ac_tmp/stdin" \
15651 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015652 esac
15653 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015654 esac
15655
Martin v. Löwiseba40652007-08-30 20:10:57 +000015656 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000015657$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015658 X"$ac_file" : 'X\(//\)[^/]' \| \
15659 X"$ac_file" : 'X\(//\)$' \| \
Martin v. Löwiseba40652007-08-30 20:10:57 +000015660 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015661$as_echo X"$ac_file" |
Martin v. Löwiseba40652007-08-30 20:10:57 +000015662 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
15663 s//\1/
15664 q
15665 }
15666 /^X\(\/\/\)[^/].*/{
15667 s//\1/
15668 q
15669 }
15670 /^X\(\/\/\)$/{
15671 s//\1/
15672 q
15673 }
15674 /^X\(\/\).*/{
15675 s//\1/
15676 q
15677 }
15678 s/.*/./; q'`
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015679 as_dir="$ac_dir"; as_fn_mkdir_p
Martin v. Löwis11437992002-04-12 09:54:03 +000015680 ac_builddir=.
15681
Martin v. Löwiseba40652007-08-30 20:10:57 +000015682case "$ac_dir" in
15683.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
15684*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015685 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Martin v. Löwiseba40652007-08-30 20:10:57 +000015686 # A ".." for each directory in $ac_dir_suffix.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015687 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Martin v. Löwiseba40652007-08-30 20:10:57 +000015688 case $ac_top_builddir_sub in
15689 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
15690 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
15691 esac ;;
15692esac
15693ac_abs_top_builddir=$ac_pwd
15694ac_abs_builddir=$ac_pwd$ac_dir_suffix
15695# for backward compatibility:
15696ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000015697
15698case $srcdir in
Martin v. Löwiseba40652007-08-30 20:10:57 +000015699 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000015700 ac_srcdir=.
Martin v. Löwiseba40652007-08-30 20:10:57 +000015701 ac_top_srcdir=$ac_top_builddir_sub
15702 ac_abs_top_srcdir=$ac_pwd ;;
15703 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000015704 ac_srcdir=$srcdir$ac_dir_suffix;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015705 ac_top_srcdir=$srcdir
15706 ac_abs_top_srcdir=$srcdir ;;
15707 *) # Relative name.
15708 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
15709 ac_top_srcdir=$ac_top_build_prefix$srcdir
15710 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015711esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000015712ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000015713
Martin v. Löwis11437992002-04-12 09:54:03 +000015714
Martin v. Löwiseba40652007-08-30 20:10:57 +000015715 case $ac_mode in
15716 :F)
15717 #
15718 # CONFIG_FILE
15719 #
Martin v. Löwis11437992002-04-12 09:54:03 +000015720
15721 case $INSTALL in
15722 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015723 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015724 esac
Trent Nelsonf6407a12012-08-30 14:56:13 +000015725 ac_MKDIR_P=$MKDIR_P
15726 case $MKDIR_P in
15727 [\\/$]* | ?:[\\/]* ) ;;
15728 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
15729 esac
Brett Cannon19fab762007-06-02 03:02:29 +000015730_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000015731
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015732cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwiseba40652007-08-30 20:10:57 +000015733# If the template does not know about datarootdir, expand it.
15734# FIXME: This hack should be removed a few years after 2.60.
15735ac_datarootdir_hack=; ac_datarootdir_seen=
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015736ac_sed_dataroot='
15737/datarootdir/ {
Martin v. Löwiseba40652007-08-30 20:10:57 +000015738 p
15739 q
15740}
15741/@datadir@/p
15742/@docdir@/p
15743/@infodir@/p
15744/@localedir@/p
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015745/@mandir@/p'
15746case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
Martin v. Löwiseba40652007-08-30 20:10:57 +000015747*datarootdir*) ac_datarootdir_seen=yes;;
15748*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015749 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
15750$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000015751_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015752cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwiseba40652007-08-30 20:10:57 +000015753 ac_datarootdir_hack='
15754 s&@datadir@&$datadir&g
15755 s&@docdir@&$docdir&g
15756 s&@infodir@&$infodir&g
15757 s&@localedir@&$localedir&g
15758 s&@mandir@&$mandir&g
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015759 s&\\\${datarootdir}&$datarootdir&g' ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015760esac
15761_ACEOF
15762
15763# Neutralize VPATH when `$srcdir' = `.'.
15764# Shell code in configure.ac might set extrasub.
15765# FIXME: do we really want to maintain this feature?
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015766cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15767ac_sed_extra="$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000015768$extrasub
15769_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015770cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015771:t
15772/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015773s|@configure_input@|$ac_sed_conf_input|;t t
Martin v. Löwiseba40652007-08-30 20:10:57 +000015774s&@top_builddir@&$ac_top_builddir_sub&;t t
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015775s&@top_build_prefix@&$ac_top_build_prefix&;t t
Martin v. Löwiseba40652007-08-30 20:10:57 +000015776s&@srcdir@&$ac_srcdir&;t t
15777s&@abs_srcdir@&$ac_abs_srcdir&;t t
15778s&@top_srcdir@&$ac_top_srcdir&;t t
15779s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
15780s&@builddir@&$ac_builddir&;t t
15781s&@abs_builddir@&$ac_abs_builddir&;t t
15782s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
15783s&@INSTALL@&$ac_INSTALL&;t t
Trent Nelsonf6407a12012-08-30 14:56:13 +000015784s&@MKDIR_P@&$ac_MKDIR_P&;t t
Martin v. Löwiseba40652007-08-30 20:10:57 +000015785$ac_datarootdir_hack
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015786"
Matthias Klose3cef2a92012-03-14 23:39:33 +010015787eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
15788 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015789
Martin v. Löwiseba40652007-08-30 20:10:57 +000015790test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
Matthias Klose3cef2a92012-03-14 23:39:33 +010015791 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
15792 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
15793 "$ac_tmp/out"`; test -z "$ac_out"; } &&
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015794 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015795which seems to be undefined. Please make sure it is defined" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015796$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015797which seems to be undefined. Please make sure it is defined" >&2;}
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015798
Matthias Klose3cef2a92012-03-14 23:39:33 +010015799 rm -f "$ac_tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000015800 case $ac_file in
Matthias Klose3cef2a92012-03-14 23:39:33 +010015801 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
15802 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015803 esac \
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015804 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015805 ;;
15806 :H)
15807 #
15808 # CONFIG_HEADER
15809 #
Martin v. Löwis11437992002-04-12 09:54:03 +000015810 if test x"$ac_file" != x-; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015811 {
15812 $as_echo "/* $configure_input */" \
Matthias Klose3cef2a92012-03-14 23:39:33 +010015813 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
15814 } >"$ac_tmp/config.h" \
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015815 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Matthias Klose3cef2a92012-03-14 23:39:33 +010015816 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015817 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
15818$as_echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000015819 else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015820 rm -f "$ac_file"
Matthias Klose3cef2a92012-03-14 23:39:33 +010015821 mv "$ac_tmp/config.h" "$ac_file" \
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015822 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000015823 fi
15824 else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015825 $as_echo "/* $configure_input */" \
Matthias Klose3cef2a92012-03-14 23:39:33 +010015826 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015827 || as_fn_error $? "could not create -" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000015828 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015829 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000015830
Martin v. Löwiseba40652007-08-30 20:10:57 +000015831
15832 esac
15833
Antoine Pitrouaabdceb2010-09-10 20:03:17 +000015834
15835 case $ac_file$ac_mode in
15836 "Modules/ld_so_aix":F) chmod +x Modules/ld_so_aix ;;
15837
15838 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000015839done # for ac_tag
15840
Guido van Rossum627b2d71993-12-24 10:39:16 +000015841
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015842as_fn_exit 0
Martin v. Löwis11437992002-04-12 09:54:03 +000015843_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000015844ac_clean_files=$ac_clean_files_save
15845
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015846test $ac_write_fail = 0 ||
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015847 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015848
Martin v. Löwis11437992002-04-12 09:54:03 +000015849
15850# configure is writing to config.log, and then calls config.status.
15851# config.status does its own redirection, appending to config.log.
15852# Unfortunately, on DOS this fails, as config.log is still kept open
15853# by configure, so config.status won't be able to write to it; its
15854# output is simply discarded. So we exec the FD to /dev/null,
15855# effectively closing config.log, so it can be properly (re)opened and
15856# appended to by config.status. When coming back to configure, we
15857# need to make the FD available again.
15858if test "$no_create" != yes; then
15859 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000015860 ac_config_status_args=
15861 test "$silent" = yes &&
15862 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000015863 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000015864 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000015865 exec 5>>config.log
15866 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
15867 # would make configure fail if this is the last instruction.
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015868 $ac_cs_success || as_fn_exit 1
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015869fi
15870if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
15871 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
15872$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000015873fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000015874
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000015875
Martin v. Löwisf7afe952006-04-14 15:16:15 +000015876echo "creating Modules/Setup"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000015877if test ! -f Modules/Setup
15878then
15879 cp $srcdir/Modules/Setup.dist Modules/Setup
15880fi
15881
Martin v. Löwisf7afe952006-04-14 15:16:15 +000015882echo "creating Modules/Setup.local"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000015883if test ! -f Modules/Setup.local
15884then
15885 echo "# Edit this file for local setup changes" >Modules/Setup.local
15886fi
15887
15888echo "creating Makefile"
15889$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
15890 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000015891 Modules/Setup.local Modules/Setup
Skip Montanaro89e975f2007-08-22 19:05:21 +000015892
15893case $ac_sys_system in
15894BeOS)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015895 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
Skip Montanaro89e975f2007-08-22 19:05:21 +000015896
15897 Support for BeOS is deprecated as of Python 2.6.
15898 See PEP 11 for the gory details.
15899 " >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015900$as_echo "$as_me: WARNING:
Skip Montanaro89e975f2007-08-22 19:05:21 +000015901
15902 Support for BeOS is deprecated as of Python 2.6.
15903 See PEP 11 for the gory details.
15904 " >&2;}
15905 ;;
15906*) ;;
15907esac
15908
Neil Schemenauerc761fc82001-02-19 04:50:49 +000015909mv config.c Modules