blob: 2e32be29635ed90adf8e8856e49438caada393b9 [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)'
doko@ubuntu.com9ba90c92014-05-07 04:41:26 +02005329 RUNSHARED=DYLD_FRAMEWORK_PATH=`pwd`${DYLD_FRAMEWORK_PATH:+:${DYLD_FRAMEWORK_PATH}}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005330 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)'
doko@ubuntu.com9ba90c92014-05-07 04:41:26 +02005351 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005352 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)'
doko@ubuntu.com9ba90c92014-05-07 04:41:26 +02005357 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005358 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)'
doko@ubuntu.com9ba90c92014-05-07 04:41:26 +02005375 RUNSHARED=SHLIB_PATH=`pwd`${SHLIB_PATH:+:${SHLIB_PATH}}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005376 ;;
5377 OSF*)
5378 LDLIBRARY='libpython$(VERSION).so'
5379 BLDLIBRARY='-rpath $(LIBDIR) -L. -lpython$(VERSION)'
doko@ubuntu.com9ba90c92014-05-07 04:41:26 +02005380 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005381 ;;
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)'
doko@ubuntu.com9ba90c92014-05-07 04:41:26 +02005390 RUNSHARED=DYLD_LIBRARY_PATH=`pwd`${DYLD_LIBRARY_PATH:+:${DYLD_LIBRARY_PATH}}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005391 ;;
Antoine Pitrouaabdceb2010-09-10 20:03:17 +00005392 AIX*)
5393 LDLIBRARY='libpython$(VERSION).so'
doko@ubuntu.com9ba90c92014-05-07 04:41:26 +02005394 RUNSHARED=LIBPATH=`pwd`${LIBPATH:+:${LIBPATH}}
Antoine Pitrouaabdceb2010-09-10 20:03:17 +00005395 ;;
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
doko@ubuntu.comf27ec3e2014-04-17 20:11:19 +02006654for ac_header in asm/types.h conio.h direct.h dlfcn.h errno.h \
Martin v. Löwis0e8bd7e2006-06-10 12:23:46 +00006655fcntl.h grp.h \
doko@ubuntu.comf27ec3e2014-04-17 20:11:19 +02006656ieeefp.h io.h langinfo.h libintl.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öwis11017b12006-01-14 18:12:57 +00006887# On Linux, netlink.h requires asm/types.h
Martin v. Löwis11017b12006-01-14 18:12:57 +00006888for ac_header in linux/netlink.h
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006889do :
6890 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 +00006891#ifdef HAVE_ASM_TYPES_H
6892#include <asm/types.h>
6893#endif
6894#ifdef HAVE_SYS_SOCKET_H
6895#include <sys/socket.h>
6896#endif
6897
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006898"
Matthias Klose3cef2a92012-03-14 23:39:33 +01006899if test "x$ac_cv_header_linux_netlink_h" = xyes; then :
Martin v. Löwis11017b12006-01-14 18:12:57 +00006900 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006901#define HAVE_LINUX_NETLINK_H 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00006902_ACEOF
6903
6904fi
6905
6906done
6907
6908
Guido van Rossum627b2d71993-12-24 10:39:16 +00006909# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00006910was_it_defined=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006911{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_t in time.h" >&5
6912$as_echo_n "checking for clock_t in time.h... " >&6; }
6913cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006914/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006915#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006916
6917_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006918if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006919 $EGREP "clock_t" >/dev/null 2>&1; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +00006920 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006921else
Martin v. Löwis11437992002-04-12 09:54:03 +00006922
6923
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006924$as_echo "#define clock_t long" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00006925
Martin v. Löwisc45929e2002-04-06 10:10:49 +00006926
Guido van Rossum627b2d71993-12-24 10:39:16 +00006927fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00006928rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00006929
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006930{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
6931$as_echo "$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00006932
Neal Norwitz11690112002-07-30 01:08:28 +00006933# Check whether using makedev requires defining _OSF_SOURCE
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006934{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for makedev" >&5
6935$as_echo_n "checking for makedev... " >&6; }
6936cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006937/* end confdefs.h. */
Jesus Cea616de772010-04-28 10:32:30 +00006938
6939#if defined(MAJOR_IN_MKDEV)
6940#include <sys/mkdev.h>
6941#elif defined(MAJOR_IN_SYSMACROS)
6942#include <sys/sysmacros.h>
6943#else
Neal Norwitz6eb37f02003-02-23 23:28:15 +00006944#include <sys/types.h>
Jesus Cea616de772010-04-28 10:32:30 +00006945#endif
Neal Norwitz11690112002-07-30 01:08:28 +00006946int
6947main ()
6948{
6949 makedev(0, 0)
6950 ;
6951 return 0;
6952}
6953_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006954if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00006955 ac_cv_has_makedev=yes
6956else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006957 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006958fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006959rm -f core conftest.err conftest.$ac_objext \
6960 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00006961if test "$ac_cv_has_makedev" = "no"; then
6962 # we didn't link, try if _OSF_SOURCE will allow us to link
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006963 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006964/* end confdefs.h. */
Neal Norwitz11690112002-07-30 01:08:28 +00006965
Neal Norwitz6eb37f02003-02-23 23:28:15 +00006966#define _OSF_SOURCE 1
6967#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00006968
Neal Norwitz11690112002-07-30 01:08:28 +00006969int
6970main ()
6971{
6972 makedev(0, 0)
6973 ;
6974 return 0;
6975}
6976_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006977if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00006978 ac_cv_has_makedev=yes
6979else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006980 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006981fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006982rm -f core conftest.err conftest.$ac_objext \
6983 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00006984 if test "$ac_cv_has_makedev" = "yes"; then
6985
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006986$as_echo "#define _OSF_SOURCE 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00006987
6988 fi
6989fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006990{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_makedev" >&5
6991$as_echo "$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00006992if test "$ac_cv_has_makedev" = "yes"; then
6993
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006994$as_echo "#define HAVE_MAKEDEV 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00006995
6996fi
6997
Martin v. Löwis399a6892002-10-04 10:22:02 +00006998# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
6999# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
7000# defined, but the compiler does not support pragma redefine_extname,
7001# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
7002# structures (such as rlimit64) without declaring them. As a
7003# work-around, disable LFS on such configurations
7004
7005use_lfs=yes
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007006{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Solaris LFS bug" >&5
7007$as_echo_n "checking Solaris LFS bug... " >&6; }
7008cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007009/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00007010
7011#define _LARGEFILE_SOURCE 1
7012#define _FILE_OFFSET_BITS 64
7013#include <sys/resource.h>
7014
Martin v. Löwis399a6892002-10-04 10:22:02 +00007015int
7016main ()
7017{
7018struct rlimit foo;
7019 ;
7020 return 0;
7021}
7022_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007023if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis399a6892002-10-04 10:22:02 +00007024 sol_lfs_bug=no
7025else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007026 sol_lfs_bug=yes
Martin v. Löwis399a6892002-10-04 10:22:02 +00007027fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007028rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007029{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $sol_lfs_bug" >&5
7030$as_echo "$sol_lfs_bug" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00007031if test "$sol_lfs_bug" = "yes"; then
7032 use_lfs=no
7033fi
7034
7035if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00007036# Two defines needed to enable largefile support on various platforms
7037# These may affect some typedefs
Georg Brandl94800df2011-02-25 11:09:02 +00007038case $ac_sys_system/$ac_sys_release in
7039AIX*)
7040
7041$as_echo "#define _LARGE_FILES 1" >>confdefs.h
7042
7043 ;;
7044esac
Guido van Rossum810cc512001-09-09 23:51:39 +00007045
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007046$as_echo "#define _LARGEFILE_SOURCE 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007047
7048
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007049$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
Guido van Rossum810cc512001-09-09 23:51:39 +00007050
Martin v. Löwis399a6892002-10-04 10:22:02 +00007051fi
Michael W. Hudson54241132001-12-07 15:38:26 +00007052
Guido van Rossum84e7b241996-08-19 21:59:00 +00007053# Add some code to confdefs.h so that the test for off_t works on SCO
7054cat >> confdefs.h <<\EOF
7055#if defined(SCO_DS)
7056#undef _OFF_T
7057#endif
7058EOF
7059
Guido van Rossumef2255b2000-03-10 22:30:29 +00007060# Type availability checks
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007061ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
Matthias Klose3cef2a92012-03-14 23:39:33 +01007062if test "x$ac_cv_type_mode_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007063
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007064else
Martin v. Löwis11437992002-04-12 09:54:03 +00007065
7066cat >>confdefs.h <<_ACEOF
7067#define mode_t int
7068_ACEOF
7069
7070fi
7071
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007072ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
Matthias Klose3cef2a92012-03-14 23:39:33 +01007073if test "x$ac_cv_type_off_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007074
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007075else
Martin v. Löwis11437992002-04-12 09:54:03 +00007076
7077cat >>confdefs.h <<_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00007078#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00007079_ACEOF
7080
7081fi
7082
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007083ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
Matthias Klose3cef2a92012-03-14 23:39:33 +01007084if test "x$ac_cv_type_pid_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007085
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007086else
Martin v. Löwis11437992002-04-12 09:54:03 +00007087
7088cat >>confdefs.h <<_ACEOF
7089#define pid_t int
7090_ACEOF
7091
7092fi
7093
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00007094
Martin v. Löwis11437992002-04-12 09:54:03 +00007095cat >>confdefs.h <<_ACEOF
Matthias Klosecbf54b12010-05-08 11:04:18 +00007096#define RETSIGTYPE void
Martin v. Löwis11437992002-04-12 09:54:03 +00007097_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00007098
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007099ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
Matthias Klose3cef2a92012-03-14 23:39:33 +01007100if test "x$ac_cv_type_size_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007101
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007102else
Martin v. Löwis11437992002-04-12 09:54:03 +00007103
7104cat >>confdefs.h <<_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00007105#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00007106_ACEOF
7107
7108fi
7109
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007110{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
7111$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007112if ${ac_cv_type_uid_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007113 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007114else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007115 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007116/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007117#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007118
7119_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007120if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007121 $EGREP "uid_t" >/dev/null 2>&1; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007122 ac_cv_type_uid_t=yes
7123else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007124 ac_cv_type_uid_t=no
7125fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00007126rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00007127
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007128fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007129{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
7130$as_echo "$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00007131if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007132
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007133$as_echo "#define uid_t int" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007134
7135
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007136$as_echo "#define gid_t int" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007137
7138fi
7139
Mark Dickinson17c50cd2012-12-02 13:13:56 +00007140
7141# There are two separate checks for each of the exact-width integer types we
7142# need. First we check whether the type is available using the usual
7143# AC_CHECK_TYPE macro with the default includes (which includes <inttypes.h>
7144# and <stdint.h> where available). We then also use the special type checks of
7145# the form AC_TYPE_UINT32_T, which in the case that uint32_t is not available
7146# directly, #define's uint32_t to be a suitable type.
7147
7148ac_fn_c_check_type "$LINENO" "uint32_t" "ac_cv_type_uint32_t" "$ac_includes_default"
7149if test "x$ac_cv_type_uint32_t" = xyes; then :
7150
7151$as_echo "#define HAVE_UINT32_T 1" >>confdefs.h
7152
7153fi
7154
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007155ac_fn_c_find_uintX_t "$LINENO" "32" "ac_cv_c_uint32_t"
7156case $ac_cv_c_uint32_t in #(
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007157 no|yes) ;; #(
7158 *)
7159
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007160$as_echo "#define _UINT32_T 1" >>confdefs.h
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007161
7162
7163cat >>confdefs.h <<_ACEOF
7164#define uint32_t $ac_cv_c_uint32_t
7165_ACEOF
7166;;
7167 esac
7168
Mark Dickinson17c50cd2012-12-02 13:13:56 +00007169
7170ac_fn_c_check_type "$LINENO" "uint64_t" "ac_cv_type_uint64_t" "$ac_includes_default"
7171if test "x$ac_cv_type_uint64_t" = xyes; then :
7172
7173$as_echo "#define HAVE_UINT64_T 1" >>confdefs.h
7174
7175fi
7176
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007177ac_fn_c_find_uintX_t "$LINENO" "64" "ac_cv_c_uint64_t"
7178case $ac_cv_c_uint64_t in #(
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007179 no|yes) ;; #(
7180 *)
7181
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007182$as_echo "#define _UINT64_T 1" >>confdefs.h
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007183
7184
7185cat >>confdefs.h <<_ACEOF
7186#define uint64_t $ac_cv_c_uint64_t
7187_ACEOF
7188;;
7189 esac
7190
Mark Dickinson17c50cd2012-12-02 13:13:56 +00007191
7192ac_fn_c_check_type "$LINENO" "int32_t" "ac_cv_type_int32_t" "$ac_includes_default"
7193if test "x$ac_cv_type_int32_t" = xyes; then :
7194
7195$as_echo "#define HAVE_INT32_T 1" >>confdefs.h
7196
7197fi
7198
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007199ac_fn_c_find_intX_t "$LINENO" "32" "ac_cv_c_int32_t"
7200case $ac_cv_c_int32_t in #(
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007201 no|yes) ;; #(
7202 *)
7203
7204cat >>confdefs.h <<_ACEOF
7205#define int32_t $ac_cv_c_int32_t
7206_ACEOF
7207;;
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007208esac
7209
Mark Dickinson17c50cd2012-12-02 13:13:56 +00007210
7211ac_fn_c_check_type "$LINENO" "int64_t" "ac_cv_type_int64_t" "$ac_includes_default"
7212if test "x$ac_cv_type_int64_t" = xyes; then :
7213
7214$as_echo "#define HAVE_INT64_T 1" >>confdefs.h
7215
7216fi
7217
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007218ac_fn_c_find_intX_t "$LINENO" "64" "ac_cv_c_int64_t"
7219case $ac_cv_c_int64_t in #(
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007220 no|yes) ;; #(
7221 *)
7222
7223cat >>confdefs.h <<_ACEOF
7224#define int64_t $ac_cv_c_int64_t
7225_ACEOF
7226;;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00007227esac
Martin v. Löwis18e16552006-02-15 17:27:45 +00007228
Mark Dickinson17c50cd2012-12-02 13:13:56 +00007229
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007230ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
Matthias Klose3cef2a92012-03-14 23:39:33 +01007231if test "x$ac_cv_type_ssize_t" = xyes; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00007232
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007233$as_echo "#define HAVE_SSIZE_T 1" >>confdefs.h
Martin v. Löwis18e16552006-02-15 17:27:45 +00007234
7235fi
7236
Jack Jansendd19cf82001-12-06 22:36:17 +00007237
Michael W. Hudson54241132001-12-07 15:38:26 +00007238# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00007239# ANSI C requires sizeof(char) == 1, so no need to check it
Martin v. Löwiseba40652007-08-30 20:10:57 +00007240# The cast to long int works around a bug in the HP C Compiler
7241# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7242# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7243# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007244{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
7245$as_echo_n "checking size of int... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007246if ${ac_cv_sizeof_int+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007247 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007248else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007249 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 +00007250
Martin v. Löwis11437992002-04-12 09:54:03 +00007251else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007252 if test "$ac_cv_type_int" = yes; then
7253 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7254$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007255as_fn_error 77 "cannot compute sizeof (int)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007256See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007257 else
7258 ac_cv_sizeof_int=0
7259 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007260fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007261
Martin v. Löwis11437992002-04-12 09:54:03 +00007262fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007263{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
7264$as_echo "$ac_cv_sizeof_int" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007265
7266
7267
Martin v. Löwis11437992002-04-12 09:54:03 +00007268cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007269#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00007270_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007271
7272
Martin v. Löwiseba40652007-08-30 20:10:57 +00007273# The cast to long int works around a bug in the HP C Compiler
7274# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7275# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7276# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007277{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
7278$as_echo_n "checking size of long... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007279if ${ac_cv_sizeof_long+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007280 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007281else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007282 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 +00007283
Martin v. Löwis11437992002-04-12 09:54:03 +00007284else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007285 if test "$ac_cv_type_long" = yes; then
7286 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7287$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007288as_fn_error 77 "cannot compute sizeof (long)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007289See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007290 else
7291 ac_cv_sizeof_long=0
7292 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007293fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007294
Martin v. Löwis11437992002-04-12 09:54:03 +00007295fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007296{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
7297$as_echo "$ac_cv_sizeof_long" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007298
7299
7300
Martin v. Löwis11437992002-04-12 09:54:03 +00007301cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007302#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00007303_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007304
7305
Martin v. Löwiseba40652007-08-30 20:10:57 +00007306# The cast to long int works around a bug in the HP C Compiler
7307# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7308# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7309# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007310{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
7311$as_echo_n "checking size of void *... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007312if ${ac_cv_sizeof_void_p+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007313 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007314else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007315 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 +00007316
Martin v. Löwis11437992002-04-12 09:54:03 +00007317else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007318 if test "$ac_cv_type_void_p" = yes; then
7319 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7320$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007321as_fn_error 77 "cannot compute sizeof (void *)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007322See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007323 else
7324 ac_cv_sizeof_void_p=0
7325 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007326fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007327
Martin v. Löwis11437992002-04-12 09:54:03 +00007328fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007329{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
7330$as_echo "$ac_cv_sizeof_void_p" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007331
7332
7333
Martin v. Löwis11437992002-04-12 09:54:03 +00007334cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00007335#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00007336_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00007337
7338
Martin v. Löwiseba40652007-08-30 20:10:57 +00007339# The cast to long int works around a bug in the HP C Compiler
7340# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7341# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7342# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007343{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
7344$as_echo_n "checking size of short... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007345if ${ac_cv_sizeof_short+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007346 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007347else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007348 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 +00007349
Martin v. Löwis11437992002-04-12 09:54:03 +00007350else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007351 if test "$ac_cv_type_short" = yes; then
7352 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7353$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007354as_fn_error 77 "cannot compute sizeof (short)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007355See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007356 else
7357 ac_cv_sizeof_short=0
7358 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007359fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007360
Martin v. Löwis11437992002-04-12 09:54:03 +00007361fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007362{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
7363$as_echo "$ac_cv_sizeof_short" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007364
7365
7366
Martin v. Löwis11437992002-04-12 09:54:03 +00007367cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007368#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00007369_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007370
7371
Martin v. Löwiseba40652007-08-30 20:10:57 +00007372# The cast to long int works around a bug in the HP C Compiler
7373# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7374# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7375# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007376{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of float" >&5
7377$as_echo_n "checking size of float... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007378if ${ac_cv_sizeof_float+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007379 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007380else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007381 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 +00007382
Martin v. Löwis11437992002-04-12 09:54:03 +00007383else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007384 if test "$ac_cv_type_float" = yes; then
7385 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7386$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007387as_fn_error 77 "cannot compute sizeof (float)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007388See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007389 else
7390 ac_cv_sizeof_float=0
7391 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007392fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007393
Martin v. Löwis11437992002-04-12 09:54:03 +00007394fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007395{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_float" >&5
7396$as_echo "$ac_cv_sizeof_float" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007397
7398
7399
Martin v. Löwis11437992002-04-12 09:54:03 +00007400cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007401#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00007402_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007403
7404
Martin v. Löwiseba40652007-08-30 20:10:57 +00007405# The cast to long int works around a bug in the HP C Compiler
7406# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7407# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7408# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007409{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of double" >&5
7410$as_echo_n "checking size of double... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007411if ${ac_cv_sizeof_double+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007412 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007413else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007414 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 +00007415
Martin v. Löwis11437992002-04-12 09:54:03 +00007416else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007417 if test "$ac_cv_type_double" = yes; then
7418 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7419$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007420as_fn_error 77 "cannot compute sizeof (double)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007421See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007422 else
7423 ac_cv_sizeof_double=0
7424 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007425fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007426
Martin v. Löwis11437992002-04-12 09:54:03 +00007427fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007428{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5
7429$as_echo "$ac_cv_sizeof_double" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007430
7431
7432
Martin v. Löwis11437992002-04-12 09:54:03 +00007433cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007434#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00007435_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007436
7437
Martin v. Löwiseba40652007-08-30 20:10:57 +00007438# The cast to long int works around a bug in the HP C Compiler
7439# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7440# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7441# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007442{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of fpos_t" >&5
7443$as_echo_n "checking size of fpos_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007444if ${ac_cv_sizeof_fpos_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007445 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007446else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007447 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 +00007448
Martin v. Löwis11437992002-04-12 09:54:03 +00007449else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007450 if test "$ac_cv_type_fpos_t" = yes; then
7451 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7452$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007453as_fn_error 77 "cannot compute sizeof (fpos_t)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007454See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007455 else
7456 ac_cv_sizeof_fpos_t=0
7457 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007458fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007459
Martin v. Löwis11437992002-04-12 09:54:03 +00007460fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007461{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_fpos_t" >&5
7462$as_echo "$ac_cv_sizeof_fpos_t" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007463
7464
7465
Martin v. Löwis11437992002-04-12 09:54:03 +00007466cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007467#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007468_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007469
Michael W. Hudson54241132001-12-07 15:38:26 +00007470
Martin v. Löwiseba40652007-08-30 20:10:57 +00007471# The cast to long int works around a bug in the HP C Compiler
7472# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7473# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7474# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007475{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
7476$as_echo_n "checking size of size_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007477if ${ac_cv_sizeof_size_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007478 $as_echo_n "(cached) " >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00007479else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007480 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 +00007481
Martin v. Löwis18e16552006-02-15 17:27:45 +00007482else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007483 if test "$ac_cv_type_size_t" = yes; then
7484 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7485$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007486as_fn_error 77 "cannot compute sizeof (size_t)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007487See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007488 else
7489 ac_cv_sizeof_size_t=0
7490 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +00007491fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007492
Martin v. Löwis18e16552006-02-15 17:27:45 +00007493fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007494{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
7495$as_echo "$ac_cv_sizeof_size_t" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007496
7497
7498
Martin v. Löwis18e16552006-02-15 17:27:45 +00007499cat >>confdefs.h <<_ACEOF
7500#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
7501_ACEOF
7502
7503
Christian Heimes951cc0f2008-01-31 23:08:23 +00007504# The cast to long int works around a bug in the HP C Compiler
7505# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7506# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7507# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007508{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pid_t" >&5
7509$as_echo_n "checking size of pid_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007510if ${ac_cv_sizeof_pid_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007511 $as_echo_n "(cached) " >&6
Christian Heimes951cc0f2008-01-31 23:08:23 +00007512else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007513 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 +00007514
Christian Heimes951cc0f2008-01-31 23:08:23 +00007515else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007516 if test "$ac_cv_type_pid_t" = yes; then
7517 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7518$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007519as_fn_error 77 "cannot compute sizeof (pid_t)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007520See \`config.log' for more details" "$LINENO" 5; }
Christian Heimes951cc0f2008-01-31 23:08:23 +00007521 else
7522 ac_cv_sizeof_pid_t=0
7523 fi
7524fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007525
Christian Heimes951cc0f2008-01-31 23:08:23 +00007526fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007527{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pid_t" >&5
7528$as_echo "$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes951cc0f2008-01-31 23:08:23 +00007529
7530
7531
7532cat >>confdefs.h <<_ACEOF
7533#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
7534_ACEOF
7535
7536
Michael W. Hudson54241132001-12-07 15:38:26 +00007537
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007538{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support" >&5
7539$as_echo_n "checking for long long support... " >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007540have_long_long=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007541cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007542/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007543
Martin v. Löwis11437992002-04-12 09:54:03 +00007544int
7545main ()
7546{
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007547long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007548 ;
7549 return 0;
7550}
7551_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007552if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007553
7554
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007555$as_echo "#define HAVE_LONG_LONG 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007556
Martin v. Löwisc45929e2002-04-06 10:10:49 +00007557 have_long_long=yes
7558
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007559fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007560rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007561{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_long" >&5
7562$as_echo "$have_long_long" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +00007563if test "$have_long_long" = yes ; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00007564# The cast to long int works around a bug in the HP C Compiler
7565# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7566# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7567# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007568{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
7569$as_echo_n "checking size of long long... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007570if ${ac_cv_sizeof_long_long+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007571 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007572else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007573 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 +00007574
Martin v. Löwis11437992002-04-12 09:54:03 +00007575else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007576 if test "$ac_cv_type_long_long" = yes; then
7577 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7578$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007579as_fn_error 77 "cannot compute sizeof (long long)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007580See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007581 else
7582 ac_cv_sizeof_long_long=0
7583 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007584fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007585
Martin v. Löwis11437992002-04-12 09:54:03 +00007586fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007587{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
7588$as_echo "$ac_cv_sizeof_long_long" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007589
7590
7591
Martin v. Löwis11437992002-04-12 09:54:03 +00007592cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007593#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +00007594_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007595
Michael W. Hudson54241132001-12-07 15:38:26 +00007596
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007597fi
7598
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007599{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support" >&5
7600$as_echo_n "checking for long double support... " >&6; }
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007601have_long_double=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007602cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007603/* end confdefs.h. */
7604
7605int
7606main ()
7607{
Matthias Klosec511b472010-05-08 11:01:39 +00007608long double x; x = (long double)0;
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007609 ;
7610 return 0;
7611}
7612_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007613if ac_fn_c_try_compile "$LINENO"; then :
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007614
7615
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007616$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007617
7618 have_long_double=yes
7619
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007620fi
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007621rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007622{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_double" >&5
7623$as_echo "$have_long_double" >&6; }
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007624if test "$have_long_double" = yes ; then
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007625# The cast to long int works around a bug in the HP C Compiler
7626# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7627# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7628# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007629{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long double" >&5
7630$as_echo_n "checking size of long double... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007631if ${ac_cv_sizeof_long_double+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007632 $as_echo_n "(cached) " >&6
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007633else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007634 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 +00007635
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007636else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007637 if test "$ac_cv_type_long_double" = yes; then
7638 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7639$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007640as_fn_error 77 "cannot compute sizeof (long double)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007641See \`config.log' for more details" "$LINENO" 5; }
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007642 else
7643 ac_cv_sizeof_long_double=0
7644 fi
7645fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007646
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007647fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007648{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double" >&5
7649$as_echo "$ac_cv_sizeof_long_double" >&6; }
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007650
7651
7652
7653cat >>confdefs.h <<_ACEOF
7654#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
7655_ACEOF
7656
7657
7658fi
7659
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007660{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _Bool support" >&5
7661$as_echo_n "checking for _Bool support... " >&6; }
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007662have_c99_bool=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007663cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007664/* end confdefs.h. */
7665
7666int
7667main ()
7668{
7669_Bool x; x = (_Bool)0;
7670 ;
7671 return 0;
7672}
7673_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007674if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007675
7676
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007677$as_echo "#define HAVE_C99_BOOL 1" >>confdefs.h
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007678
7679 have_c99_bool=yes
7680
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007681fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007682rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007683{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_c99_bool" >&5
7684$as_echo "$have_c99_bool" >&6; }
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007685if test "$have_c99_bool" = yes ; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00007686# The cast to long int works around a bug in the HP C Compiler
7687# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7688# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7689# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007690{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of _Bool" >&5
7691$as_echo_n "checking size of _Bool... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007692if ${ac_cv_sizeof__Bool+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007693 $as_echo_n "(cached) " >&6
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007694else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007695 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 +00007696
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007697else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007698 if test "$ac_cv_type__Bool" = yes; then
7699 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7700$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007701as_fn_error 77 "cannot compute sizeof (_Bool)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007702See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007703 else
7704 ac_cv_sizeof__Bool=0
7705 fi
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007706fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007707
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007708fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007709{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof__Bool" >&5
7710$as_echo "$ac_cv_sizeof__Bool" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007711
7712
7713
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007714cat >>confdefs.h <<_ACEOF
7715#define SIZEOF__BOOL $ac_cv_sizeof__Bool
7716_ACEOF
7717
7718
7719fi
7720
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007721ac_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 +00007722 #include <stdint.h>
7723 #endif
Antoine Pitrou7be5a652010-10-10 08:14:41 +00007724 #ifdef HAVE_INTTYPES_H
7725 #include <inttypes.h>
7726 #endif
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007727"
Matthias Klose3cef2a92012-03-14 23:39:33 +01007728if test "x$ac_cv_type_uintptr_t" = xyes; then :
Martin v. Löwisebe26702006-10-02 14:55:51 +00007729
7730cat >>confdefs.h <<_ACEOF
7731#define HAVE_UINTPTR_T 1
7732_ACEOF
7733
Martin v. Löwiseba40652007-08-30 20:10:57 +00007734# The cast to long int works around a bug in the HP C Compiler
7735# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7736# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7737# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007738{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of uintptr_t" >&5
7739$as_echo_n "checking size of uintptr_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007740if ${ac_cv_sizeof_uintptr_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007741 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007742else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007743 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 +00007744
Martin v. Löwis11437992002-04-12 09:54:03 +00007745else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007746 if test "$ac_cv_type_uintptr_t" = yes; then
7747 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7748$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007749as_fn_error 77 "cannot compute sizeof (uintptr_t)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007750See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007751 else
7752 ac_cv_sizeof_uintptr_t=0
7753 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007754fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007755
Martin v. Löwis11437992002-04-12 09:54:03 +00007756fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007757{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uintptr_t" >&5
7758$as_echo "$ac_cv_sizeof_uintptr_t" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007759
7760
7761
Martin v. Löwis11437992002-04-12 09:54:03 +00007762cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007763#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007764_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007765
Michael W. Hudson54241132001-12-07 15:38:26 +00007766
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007767fi
7768
Martin v. Löwisebe26702006-10-02 14:55:51 +00007769
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007770# The cast to long int works around a bug in the HP C Compiler
7771# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7772# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7773# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007774{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
7775$as_echo_n "checking size of off_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007776if ${ac_cv_sizeof_off_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007777 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007778else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007779 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007780#ifdef HAVE_SYS_TYPES_H
7781#include <sys/types.h>
7782#endif
7783
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007784"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007785
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007786else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007787 if test "$ac_cv_type_off_t" = yes; then
7788 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7789$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007790as_fn_error 77 "cannot compute sizeof (off_t)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007791See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007792 else
7793 ac_cv_sizeof_off_t=0
7794 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007795fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007796
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007797fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007798{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
7799$as_echo "$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007800
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007801
7802
Martin v. Löwis11437992002-04-12 09:54:03 +00007803cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007804#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007805_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007806
Michael W. Hudson54241132001-12-07 15:38:26 +00007807
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007808
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007809{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable large file support" >&5
7810$as_echo_n "checking whether to enable large file support... " >&6; }
Mark Dickinson0ef0b912009-12-31 21:11:48 +00007811if test "$have_long_long" = yes
7812then
7813if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +00007814 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007815
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007816$as_echo "#define HAVE_LARGEFILE_SUPPORT 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007817
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007818 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7819$as_echo "yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007820else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007821 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7822$as_echo "no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007823fi
Mark Dickinson0ef0b912009-12-31 21:11:48 +00007824else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007825 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7826$as_echo "no" >&6; }
Mark Dickinson0ef0b912009-12-31 21:11:48 +00007827fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007828
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007829# The cast to long int works around a bug in the HP C Compiler
7830# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7831# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7832# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007833{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
7834$as_echo_n "checking size of time_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007835if ${ac_cv_sizeof_time_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007836 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007837else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007838 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007839#ifdef HAVE_SYS_TYPES_H
7840#include <sys/types.h>
7841#endif
7842#ifdef HAVE_TIME_H
7843#include <time.h>
7844#endif
7845
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007846"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007847
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007848else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007849 if test "$ac_cv_type_time_t" = yes; then
7850 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7851$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007852as_fn_error 77 "cannot compute sizeof (time_t)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007853See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007854 else
7855 ac_cv_sizeof_time_t=0
7856 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007857fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007858
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007859fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007860{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
7861$as_echo "$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007862
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007863
7864
Martin v. Löwis11437992002-04-12 09:54:03 +00007865cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007866#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007867_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007868
Michael W. Hudson54241132001-12-07 15:38:26 +00007869
7870
Trent Mick635f6fb2000-08-23 21:33:05 +00007871# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00007872ac_save_cc="$CC"
7873if test "$ac_cv_kpthread" = "yes"
7874then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00007875elif test "$ac_cv_kthread" = "yes"
7876then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00007877elif test "$ac_cv_pthread" = "yes"
7878then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00007879fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007880{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_t" >&5
7881$as_echo_n "checking for pthread_t... " >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00007882have_pthread_t=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007883cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007884/* end confdefs.h. */
Matthias Klosec511b472010-05-08 11:01:39 +00007885
7886 #include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007887int
7888main ()
7889{
Guido van Rossum12580492000-09-24 16:47:19 +00007890pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007891 ;
7892 return 0;
7893}
Matthias Klosec511b472010-05-08 11:01:39 +00007894
Martin v. Löwis11437992002-04-12 09:54:03 +00007895_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007896if ac_fn_c_try_compile "$LINENO"; then :
Trent Mick635f6fb2000-08-23 21:33:05 +00007897 have_pthread_t=yes
Trent Mick635f6fb2000-08-23 21:33:05 +00007898fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007899rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007900{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_pthread_t" >&5
7901$as_echo "$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00007902if test "$have_pthread_t" = yes ; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007903 # The cast to long int works around a bug in the HP C Compiler
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007904# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7905# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7906# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007907{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
7908$as_echo_n "checking size of pthread_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007909if ${ac_cv_sizeof_pthread_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007910 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007911else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007912 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t" "
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007913#ifdef HAVE_PTHREAD_H
7914#include <pthread.h>
7915#endif
7916
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007917"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007918
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007919else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007920 if test "$ac_cv_type_pthread_t" = yes; then
7921 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7922$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007923as_fn_error 77 "cannot compute sizeof (pthread_t)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007924See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007925 else
7926 ac_cv_sizeof_pthread_t=0
7927 fi
Trent Mick635f6fb2000-08-23 21:33:05 +00007928fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007929
Trent Mick635f6fb2000-08-23 21:33:05 +00007930fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007931{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
7932$as_echo "$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007933
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007934
7935
Martin v. Löwis11437992002-04-12 09:54:03 +00007936cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00007937#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007938_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00007939
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007940
Trent Mick635f6fb2000-08-23 21:33:05 +00007941fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00007942CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00007943
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007944{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-toolbox-glue" >&5
7945$as_echo_n "checking for --enable-toolbox-glue... " >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007946# Check whether --enable-toolbox-glue was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007947if test "${enable_toolbox_glue+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00007948 enableval=$enable_toolbox_glue;
7949fi
Jack Jansene578a632001-08-15 01:27:14 +00007950
7951
7952if test -z "$enable_toolbox_glue"
Martin v. Löwis11437992002-04-12 09:54:03 +00007953then
Jack Jansene578a632001-08-15 01:27:14 +00007954 case $ac_sys_system/$ac_sys_release in
7955 Darwin/*)
7956 enable_toolbox_glue="yes";;
7957 *)
7958 enable_toolbox_glue="no";;
7959 esac
7960fi
7961case "$enable_toolbox_glue" in
7962yes)
Jack Jansene578a632001-08-15 01:27:14 +00007963 extra_machdep_objs="Python/mactoolboxglue.o"
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00007964 extra_undefs="-u _PyMac_Error"
Martin v. Löwis11437992002-04-12 09:54:03 +00007965
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007966$as_echo "#define USE_TOOLBOX_OBJECT_GLUE 1" >>confdefs.h
Jack Jansene578a632001-08-15 01:27:14 +00007967
7968 ;;
7969*)
Jack Jansene578a632001-08-15 01:27:14 +00007970 extra_machdep_objs=""
Jack Jansen591cbed2001-08-15 13:55:15 +00007971 extra_undefs=""
Jack Jansene578a632001-08-15 01:27:14 +00007972 ;;
7973esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007974{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_toolbox_glue" >&5
7975$as_echo "$enable_toolbox_glue" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00007976
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007977
Ronald Oussoren0d236eb2008-06-06 21:31:33 +00007978
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007979case $ac_sys_system/$ac_sys_release in
Anthony Baxter82201742006-04-09 15:07:40 +00007980 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +00007981 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
7982 ;;
7983 Darwin/*)
7984 OTHER_LIBTOOL_OPT=""
7985 ;;
7986esac
7987
7988
Ronald Oussoren25967582009-09-06 10:00:26 +00007989
Bob Ippolito7026a0a2005-03-28 23:23:47 +00007990case $ac_sys_system/$ac_sys_release in
Anthony Baxter82201742006-04-09 15:07:40 +00007991 Darwin/[01567]\..*)
Ronald Oussoren988117f2006-04-29 11:31:35 +00007992 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
7993 if test "${enable_universalsdk}"; then
7994 :
7995 else
Ronald Oussorenbc0e83c2010-02-11 13:26:54 +00007996 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Ronald Oussoren988117f2006-04-29 11:31:35 +00007997 fi
Jack Jansenb36687a2004-07-16 08:43:47 +00007998 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00007999 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00008000 Darwin/*)
Ronald Oussorena55af9a2010-01-17 16:25:57 +00008001 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008002 if test ${gcc_version} '<' 4.0
8003 then
8004 LIBTOOL_CRUFT="-lcc_dynamic"
8005 else
8006 LIBTOOL_CRUFT=""
8007 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008008 if test "$cross_compiling" = yes; then :
Ronald Oussoren23d92532009-09-07 06:12:00 +00008009 ac_osx_32bit=yes
Ronald Oussoren25967582009-09-06 10:00:26 +00008010else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008011 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren25967582009-09-06 10:00:26 +00008012/* end confdefs.h. */
Ronald Oussoren23d92532009-09-07 06:12:00 +00008013
Ronald Oussoren25967582009-09-06 10:00:26 +00008014 #include <unistd.h>
8015 int main(int argc, char*argv[])
8016 {
8017 if (sizeof(long) == 4) {
8018 return 0;
8019 } else {
8020 return 1;
8021 }
Ronald Oussoren84ddd722009-09-08 07:17:10 +00008022 }
Ronald Oussoren23d92532009-09-07 06:12:00 +00008023
Ronald Oussoren25967582009-09-06 10:00:26 +00008024_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008025if ac_fn_c_try_run "$LINENO"; then :
Ronald Oussoren25967582009-09-06 10:00:26 +00008026 ac_osx_32bit=yes
8027else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008028 ac_osx_32bit=no
Ronald Oussoren25967582009-09-06 10:00:26 +00008029fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008030rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8031 conftest.$ac_objext conftest.beam conftest.$ac_ext
Ronald Oussoren25967582009-09-06 10:00:26 +00008032fi
8033
8034
Ronald Oussoren25967582009-09-06 10:00:26 +00008035 if test "${ac_osx_32bit}" = "yes"; then
Ronald Oussorenbc0e83c2010-02-11 13:26:54 +00008036 case `/usr/bin/arch` in
Ronald Oussoren25967582009-09-06 10:00:26 +00008037 i386)
8038 MACOSX_DEFAULT_ARCH="i386"
8039 ;;
8040 ppc)
8041 MACOSX_DEFAULT_ARCH="ppc"
8042 ;;
8043 *)
Georg Brandl71f4fbb2011-02-25 11:04:50 +00008044 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren25967582009-09-06 10:00:26 +00008045 ;;
8046 esac
8047 else
Ronald Oussorenbc0e83c2010-02-11 13:26:54 +00008048 case `/usr/bin/arch` in
Ronald Oussoren25967582009-09-06 10:00:26 +00008049 i386)
8050 MACOSX_DEFAULT_ARCH="x86_64"
8051 ;;
8052 ppc)
8053 MACOSX_DEFAULT_ARCH="ppc64"
8054 ;;
8055 *)
Georg Brandl71f4fbb2011-02-25 11:04:50 +00008056 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren25967582009-09-06 10:00:26 +00008057 ;;
8058 esac
8059
8060 #ARCH_RUN_32BIT="true"
8061 fi
8062
8063 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +00008064 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00008065 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008066esac
8067
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008068{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-framework" >&5
8069$as_echo_n "checking for --enable-framework... " >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00008070if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008071then
Skip Montanarodecc6a42003-01-01 20:07:49 +00008072 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00008073 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00008074 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008075
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008076$as_echo "#define WITH_NEXT_FRAMEWORK 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008077
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008078 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8079$as_echo "yes" >&6; }
Ronald Oussoren450d5612009-06-08 21:12:41 +00008080 if test $enable_shared = "yes"
8081 then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00008082 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 +00008083 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008084else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008085 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8086$as_echo "no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008087fi
8088
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008089{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dyld" >&5
8090$as_echo_n "checking for dyld... " >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008091case $ac_sys_system/$ac_sys_release in
8092 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008093
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008094$as_echo "#define WITH_DYLD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008095
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008096 { $as_echo "$as_me:${as_lineno-$LINENO}: result: always on for Darwin" >&5
8097$as_echo "always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008098 ;;
8099 *)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008100 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8101$as_echo "no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00008102 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008103esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008104
Guido van Rossum0a516c91994-09-12 10:58:40 +00008105# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00008106
Michael W. Hudson54241132001-12-07 15:38:26 +00008107
8108
8109
8110
Ronald Oussoren75912852010-04-08 08:13:31 +00008111
Guido van Rossum0a516c91994-09-12 10:58:40 +00008112# SO is the extension of shared libraries `(including the dot!)
Guido van Rossumaef734b2001-01-10 21:09:12 +00008113# -- usually .so, .sl on HP-UX, .dll on Cygwin
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008114{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SO" >&5
8115$as_echo_n "checking SO... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008116if test -z "$SO"
8117then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008118 case $ac_sys_system in
Neal Norwitz58e28882006-05-19 07:00:58 +00008119 hp*|HP*)
8120 case `uname -m` in
8121 ia64) SO=.so;;
8122 *) SO=.sl;;
8123 esac
8124 ;;
Guido van Rossumaef734b2001-01-10 21:09:12 +00008125 CYGWIN*) SO=.dll;;
Guido van Rossum563e7081996-09-10 18:20:48 +00008126 *) SO=.so;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008127 esac
Martin v. Löwis368de8f2003-06-14 14:46:38 +00008128else
8129 # this might also be a termcap variable, see #610332
8130 echo
8131 echo '====================================================================='
8132 echo '+ +'
8133 echo '+ WARNING: You have set SO in your environment. +'
8134 echo '+ Do you really mean to change the extension for shared libraries? +'
8135 echo '+ Continuing in 10 seconds to let you to ponder. +'
8136 echo '+ +'
8137 echo '====================================================================='
8138 sleep 10
Guido van Rossum0a516c91994-09-12 10:58:40 +00008139fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008140{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SO" >&5
8141$as_echo "$SO" >&6; }
Neal Norwitz58e28882006-05-19 07:00:58 +00008142
Ronald Oussoren79f90492009-01-02 10:44:46 +00008143
Neal Norwitz58e28882006-05-19 07:00:58 +00008144cat >>confdefs.h <<_ACEOF
8145#define SHLIB_EXT "$SO"
8146_ACEOF
8147
Guido van Rossum0a516c91994-09-12 10:58:40 +00008148# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +00008149# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008150# (Shared libraries in this instance are shared modules to be loaded into
8151# Python, as opposed to building Python itself as a shared library.)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008152{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDSHARED" >&5
8153$as_echo_n "checking LDSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008154if test -z "$LDSHARED"
8155then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008156 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008157 AIX*)
Georg Brandl71f4fbb2011-02-25 11:04:50 +00008158 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:\$(srcdir)/Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +00008159 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008160 ;;
8161 BeOS*)
8162 BLDSHARED="\$(srcdir)/Modules/ld_so_beos $LDLIBRARY"
Guido van Rossumce608b02001-09-28 15:59:38 +00008163 LDSHARED="\$(BINLIBDEST)/config/ld_so_beos \$(LIBDIR)/$LDLIBRARY"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008164 ;;
Guido van Rossum07397971997-04-29 21:49:50 +00008165 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00008166 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +00008167 SunOS/5*)
Ronald Oussoren75912852010-04-08 08:13:31 +00008168 if test "$GCC" = "yes" ; then
8169 LDSHARED='$(CC) -shared'
8170 LDCXXSHARED='$(CXX) -shared'
8171 else
8172 LDSHARED='$(CC) -G'
8173 LDCXXSHARED='$(CXX) -G'
Greg Ward57c9a662000-05-26 12:22:54 +00008174 fi ;;
Thomas Hellerdc96a772008-04-04 10:07:55 +00008175 hp*|HP*)
Ronald Oussoren75912852010-04-08 08:13:31 +00008176 if test "$GCC" = "yes" ; then
8177 LDSHARED='$(CC) -shared'
8178 LDCXXSHARED='$(CXX) -shared'
8179 else
8180 LDSHARED='ld -b'
Thomas Hellerdc96a772008-04-04 10:07:55 +00008181 fi ;;
Guido van Rossumda88dad1995-01-26 00:46:29 +00008182 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
Jack Jansen418c3b12001-11-14 10:59:57 +00008183 Darwin/1.3*)
Stefan Krah3a3e2032010-11-28 15:30:05 +00008184 LDSHARED='$(CC) -bundle'
8185 LDCXXSHARED='$(CXX) -bundle'
Jack Jansena3891ea2001-09-07 14:25:12 +00008186 if test "$enable_framework" ; then
8187 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00008188 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
8189 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Ronald Oussoren75912852010-04-08 08:13:31 +00008190 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00008191 else
8192 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00008193 LDSHARED="$LDSHARED -undefined suppress"
Ronald Oussoren75912852010-04-08 08:13:31 +00008194 LDCXXSHARED="$LDCXXSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00008195 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00008196 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Stefan Krah3a3e2032010-11-28 15:30:05 +00008197 LDSHARED='$(CC) -bundle'
8198 LDCXXSHARED='$(CXX) -bundle'
Jack Jansene578a632001-08-15 01:27:14 +00008199 if test "$enable_framework" ; then
8200 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00008201 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
8202 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Ronald Oussoren75912852010-04-08 08:13:31 +00008203 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00008204 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00008205 # No framework, use the Python app as bundle-loader
8206 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00008207 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Ronald Oussoren75912852010-04-08 08:13:31 +00008208 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008209 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00008210 Darwin/*)
8211 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
8212 # This allows an extension to be used in any Python
Ronald Oussoren38f1b982007-09-02 09:46:07 +00008213
Ronald Oussoren5640ce22008-06-05 12:58:24 +00008214 if test ${MACOSX_DEPLOYMENT_TARGET} '>' 10.2
Jack Jansen6b08a402004-06-03 12:41:45 +00008215 then
Ronald Oussoren988117f2006-04-29 11:31:35 +00008216 if test "${enable_universalsdk}"; then
Ronald Oussoren5640ce22008-06-05 12:58:24 +00008217 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Ronald Oussoren988117f2006-04-29 11:31:35 +00008218 fi
Stefan Krah3a3e2032010-11-28 15:30:05 +00008219 LDSHARED='$(CC) -bundle -undefined dynamic_lookup'
8220 LDCXXSHARED='$(CXX) -bundle -undefined dynamic_lookup'
Jack Jansen6b08a402004-06-03 12:41:45 +00008221 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +00008222 else
Stefan Krah3a3e2032010-11-28 15:30:05 +00008223 LDSHARED='$(CC) -bundle'
8224 LDCXXSHARED='$(CXX) -bundle'
Jack Jansen6b08a402004-06-03 12:41:45 +00008225 if test "$enable_framework" ; then
8226 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00008227 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
8228 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Ronald Oussoren75912852010-04-08 08:13:31 +00008229 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +00008230 else
8231 # No framework, use the Python app as bundle-loader
8232 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
8233 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Ronald Oussoren75912852010-04-08 08:13:31 +00008234 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Jack Jansen6b08a402004-06-03 12:41:45 +00008235 fi
8236 fi
8237 ;;
Ronald Oussoren75912852010-04-08 08:13:31 +00008238 Linux*|GNU*|QNX*)
8239 LDSHARED='$(CC) -shared'
8240 LDCXXSHARED='$(CXX) -shared';;
8241 BSD/OS*/4*)
8242 LDSHARED="gcc -shared"
8243 LDCXXSHARED="g++ -shared";;
Martin v. Löwis222c5152006-06-03 07:37:13 +00008244 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00008245 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00008246 then
Stefan Krah3a3e2032010-11-28 15:30:05 +00008247 LDSHARED='$(CC) -shared'
8248 LDCXXSHARED='$(CXX) -shared'
Guido van Rossum0286ae82000-08-29 15:06:49 +00008249 else
Stefan Krah3a3e2032010-11-28 15:30:05 +00008250 LDSHARED="ld -Bshareable"
Guido van Rossum0286ae82000-08-29 15:06:49 +00008251 fi;;
Martin v. Löwis222c5152006-06-03 07:37:13 +00008252 OpenBSD*)
8253 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
8254 then
Stefan Krah3a3e2032010-11-28 15:30:05 +00008255 LDSHARED='$(CC) -shared $(CCSHARED)'
8256 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Martin v. Löwis222c5152006-06-03 07:37:13 +00008257 else
8258 case `uname -r` in
8259 [01].* | 2.[0-7] | 2.[0-7].*)
8260 LDSHARED="ld -Bshareable ${LDFLAGS}"
8261 ;;
8262 *)
Stefan Krah3a3e2032010-11-28 15:30:05 +00008263 LDSHARED='$(CC) -shared $(CCSHARED)'
8264 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Martin v. Löwis222c5152006-06-03 07:37:13 +00008265 ;;
8266 esac
8267 fi;;
Ronald Oussoren75912852010-04-08 08:13:31 +00008268 NetBSD*|DragonFly*)
Antoine Pitroucb402772011-01-02 20:51:34 +00008269 LDSHARED='$(CC) -shared'
8270 LDCXXSHARED='$(CXX) -shared';;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00008271 OpenUNIX*|UnixWare*)
Ronald Oussoren75912852010-04-08 08:13:31 +00008272 if test "$GCC" = "yes" ; then
8273 LDSHARED='$(CC) -shared'
8274 LDCXXSHARED='$(CXX) -shared'
8275 else
8276 LDSHARED='$(CC) -G'
8277 LDCXXSHARED='$(CXX) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00008278 fi;;
Ronald Oussoren75912852010-04-08 08:13:31 +00008279 SCO_SV*)
8280 LDSHARED='$(CC) -Wl,-G,-Bexport'
8281 LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
8282 CYGWIN*)
8283 LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
8284 LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
8285 atheos*)
8286 LDSHARED="gcc -shared"
8287 LDCXXSHARED="g++ -shared";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008288 *) LDSHARED="ld";;
8289 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008290fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008291{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDSHARED" >&5
8292$as_echo "$LDSHARED" >&6; }
Ronald Oussoren75912852010-04-08 08:13:31 +00008293LDCXXSHARED=${LDCXXSHARED-$LDSHARED}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008294BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00008295# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008296# library (module) -- this is only needed for a few systems
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008297{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CCSHARED" >&5
8298$as_echo_n "checking CCSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008299if test -z "$CCSHARED"
8300then
Guido van Rossum07397971997-04-29 21:49:50 +00008301 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00008302 SunOS*) if test "$GCC" = yes;
Martin v. Löwiseb623572007-03-12 10:50:39 +00008303 then CCSHARED="-fPIC";
8304 elif test `uname -p` = sparc;
8305 then CCSHARED="-xcode=pic32";
8306 else CCSHARED="-Kpic";
8307 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00008308 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00008309 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00008310 else CCSHARED="+z";
8311 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008312 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00008313 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00008314 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00008315 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00008316 if test "$GCC" = "yes"
8317 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008318 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00008319 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00008320 SCO_SV*)
8321 if test "$GCC" = "yes"
8322 then CCSHARED="-fPIC"
8323 else CCSHARED="-Kpic -belf"
8324 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008325 IRIX*/6*) case $CC in
8326 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00008327 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008328 esac;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008329 atheos*) CCSHARED="-fPIC";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008330 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008331fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008332{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCSHARED" >&5
8333$as_echo "$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008334# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008335# the python executable -- this is only needed for a few systems
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008336{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKFORSHARED" >&5
8337$as_echo_n "checking LINKFORSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008338if test -z "$LINKFORSHARED"
8339then
Guido van Rossum07397971997-04-29 21:49:50 +00008340 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008341 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008342 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00008343 LINKFORSHARED="-Wl,-E -Wl,+s";;
8344# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00008345 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008346 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008347 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00008348 Darwin/*)
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00008349 # -u _PyMac_Error is needed to pull in the mac toolbox glue,
8350 # which is
Jack Jansene578a632001-08-15 01:27:14 +00008351 # not used by the core itself but which needs to be in the core so
8352 # that dynamically loaded extension modules have access to it.
Jack Jansen97e3f002003-02-23 22:59:01 +00008353 # -prebind is no longer used, because it actually seems to give a
8354 # slowdown in stead of a speedup, maybe due to the large number of
8355 # dynamic loads Python does.
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00008356
8357 LINKFORSHARED="$extra_undefs"
Jack Jansene578a632001-08-15 01:27:14 +00008358 if test "$enable_framework"
8359 then
Jack Jansenda49e192005-01-07 13:08:22 +00008360 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00008361 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00008362 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00008363 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00008364 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00008365 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00008366 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +00008367 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
8368 then
8369 LINKFORSHARED="-Wl,--export-dynamic"
8370 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008371 SunOS/5*) case $CC in
8372 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00008373 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00008374 then
8375 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008376 fi;;
8377 esac;;
Jason Tishler30765592003-09-04 11:04:06 +00008378 CYGWIN*)
8379 if test $enable_shared = "no"
8380 then
8381 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
8382 fi;;
Martin v. Löwis8c255e42008-05-23 15:06:50 +00008383 QNX*)
8384 # -Wl,-E causes the symbols to be added to the dynamic
8385 # symbol table so that they can be found when a module
8386 # is loaded. -N 2048K causes the stack size to be set
8387 # to 2048 kilobytes so that the stack doesn't overflow
8388 # when running test_compile.py.
8389 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008390 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008391fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008392{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKFORSHARED" >&5
8393$as_echo "$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008394
Michael W. Hudson54241132001-12-07 15:38:26 +00008395
Ronald Oussoren0d236eb2008-06-06 21:31:33 +00008396
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008397{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAGSFORSHARED" >&5
8398$as_echo_n "checking CFLAGSFORSHARED... " >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00008399if test ! "$LIBRARY" = "$LDLIBRARY"
8400then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00008401 case $ac_sys_system in
8402 CYGWIN*)
8403 # Cygwin needs CCSHARED when building extension DLLs
8404 # but not when building the interpreter DLL.
8405 CFLAGSFORSHARED='';;
8406 *)
8407 CFLAGSFORSHARED='$(CCSHARED)'
8408 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00008409fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008410{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CFLAGSFORSHARED" >&5
8411$as_echo "$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00008412
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008413# SHLIBS are libraries (except -lc and -lm) to link to the python shared
8414# library (with --enable-shared).
8415# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00008416# symbols, this must be set to $(LIBS) (expanded by make). We do this even
8417# if it is not required, since it creates a dependency of the shared library
8418# to LIBS. This, in turn, means that applications linking the shared libpython
8419# don't need to link LIBS explicitly. The default should be only changed
8420# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008421
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008422{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SHLIBS" >&5
8423$as_echo_n "checking SHLIBS... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008424case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008425 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00008426 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008427esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008428{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIBS" >&5
8429$as_echo "$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008430
8431
Guido van Rossum627b2d71993-12-24 10:39:16 +00008432# checks for libraries
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008433{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
8434$as_echo_n "checking for dlopen in -ldl... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008435if ${ac_cv_lib_dl_dlopen+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008436 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008437else
Martin v. Löwis11437992002-04-12 09:54:03 +00008438 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008439LIBS="-ldl $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008440cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008441/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008442
Martin v. Löwiseba40652007-08-30 20:10:57 +00008443/* Override any GCC internal prototype to avoid an error.
8444 Use char because int might match the return type of a GCC
8445 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008446#ifdef __cplusplus
8447extern "C"
8448#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008449char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008450int
8451main ()
8452{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008453return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008454 ;
8455 return 0;
8456}
8457_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008458if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008459 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008460else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008461 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008462fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008463rm -f core conftest.err conftest.$ac_objext \
8464 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008465LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00008466fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008467{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
8468$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008469if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008470 cat >>confdefs.h <<_ACEOF
8471#define HAVE_LIBDL 1
8472_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00008473
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008474 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00008475
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008476fi
8477 # Dynamic linking for SunOS/Solaris and SYSV
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008478{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
8479$as_echo_n "checking for shl_load in -ldld... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008480if ${ac_cv_lib_dld_shl_load+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008481 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008482else
Martin v. Löwis11437992002-04-12 09:54:03 +00008483 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008484LIBS="-ldld $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008485cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008486/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008487
Martin v. Löwiseba40652007-08-30 20:10:57 +00008488/* Override any GCC internal prototype to avoid an error.
8489 Use char because int might match the return type of a GCC
8490 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008491#ifdef __cplusplus
8492extern "C"
8493#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008494char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008495int
8496main ()
8497{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008498return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008499 ;
8500 return 0;
8501}
8502_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008503if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008504 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008505else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008506 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008507fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008508rm -f core conftest.err conftest.$ac_objext \
8509 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008510LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00008511fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008512{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
8513$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008514if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008515 cat >>confdefs.h <<_ACEOF
8516#define HAVE_LIBDLD 1
8517_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00008518
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008519 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008520
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008521fi
8522 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +00008523
Ronald Oussoren79f90492009-01-02 10:44:46 +00008524# only check for sem_init if thread support is requested
Martin v. Löwis519adae2003-09-20 10:47:47 +00008525if test "$with_threads" = "yes" -o -z "$with_threads"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008526 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
8527$as_echo_n "checking for library containing sem_init... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008528if ${ac_cv_search_sem_init+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008529 $as_echo_n "(cached) " >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00008530else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00008531 ac_func_search_save_LIBS=$LIBS
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008532cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008533/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008534
Martin v. Löwiseba40652007-08-30 20:10:57 +00008535/* Override any GCC internal prototype to avoid an error.
8536 Use char because int might match the return type of a GCC
8537 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008538#ifdef __cplusplus
8539extern "C"
8540#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008541char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008542int
8543main ()
8544{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008545return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008546 ;
8547 return 0;
8548}
8549_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00008550for ac_lib in '' pthread rt posix4; do
8551 if test -z "$ac_lib"; then
8552 ac_res="none required"
8553 else
8554 ac_res=-l$ac_lib
Skip Montanaro89e975f2007-08-22 19:05:21 +00008555 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Martin v. Löwiseba40652007-08-30 20:10:57 +00008556 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008557 if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00008558 ac_cv_search_sem_init=$ac_res
Brett Cannon19fab762007-06-02 03:02:29 +00008559fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008560rm -f core conftest.err conftest.$ac_objext \
8561 conftest$ac_exeext
Matthias Klose3cef2a92012-03-14 23:39:33 +01008562 if ${ac_cv_search_sem_init+:} false; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00008563 break
Skip Montanaro89e975f2007-08-22 19:05:21 +00008564fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008565done
Matthias Klose3cef2a92012-03-14 23:39:33 +01008566if ${ac_cv_search_sem_init+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008567
Martin v. Löwiseba40652007-08-30 20:10:57 +00008568else
8569 ac_cv_search_sem_init=no
8570fi
8571rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00008572LIBS=$ac_func_search_save_LIBS
8573fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008574{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
8575$as_echo "$ac_cv_search_sem_init" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008576ac_res=$ac_cv_search_sem_init
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008577if test "$ac_res" != no; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00008578 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00008579
Martin v. Löwis41933dd2002-03-21 15:10:58 +00008580fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +00008581 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +00008582 # posix4 on Solaris 2.6
8583 # pthread (first!) on Linux
8584fi
8585
Martin v. Löwis19d17342003-06-14 21:03:05 +00008586# check if we need libintl for locale functions
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008587{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for textdomain in -lintl" >&5
8588$as_echo_n "checking for textdomain in -lintl... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008589if ${ac_cv_lib_intl_textdomain+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008590 $as_echo_n "(cached) " >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +00008591else
8592 ac_check_lib_save_LIBS=$LIBS
8593LIBS="-lintl $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008594cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008595/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00008596
Martin v. Löwiseba40652007-08-30 20:10:57 +00008597/* Override any GCC internal prototype to avoid an error.
8598 Use char because int might match the return type of a GCC
8599 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00008600#ifdef __cplusplus
8601extern "C"
8602#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +00008603char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00008604int
8605main ()
8606{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008607return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00008608 ;
8609 return 0;
8610}
8611_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008612if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00008613 ac_cv_lib_intl_textdomain=yes
8614else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008615 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +00008616fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008617rm -f core conftest.err conftest.$ac_objext \
8618 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +00008619LIBS=$ac_check_lib_save_LIBS
8620fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008621{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_textdomain" >&5
8622$as_echo "$ac_cv_lib_intl_textdomain" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008623if test "x$ac_cv_lib_intl_textdomain" = xyes; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00008624
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008625$as_echo "#define WITH_LIBINTL 1" >>confdefs.h
Martin v. Löwis19d17342003-06-14 21:03:05 +00008626
8627fi
8628
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008629
8630# checks for system dependent C++ extensions support
8631case "$ac_sys_system" in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008632 AIX*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for genuine AIX C++ extensions support" >&5
8633$as_echo_n "checking for genuine AIX C++ extensions support... " >&6; }
8634 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008635/* end confdefs.h. */
Matthias Klosec511b472010-05-08 11:01:39 +00008636
Georg Brandl94800df2011-02-25 11:09:02 +00008637 #include <load.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008638int
8639main ()
8640{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008641loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00008642 ;
8643 return 0;
8644}
Matthias Klosec511b472010-05-08 11:01:39 +00008645
Martin v. Löwis11437992002-04-12 09:54:03 +00008646_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008647if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008648
Matthias Klosec511b472010-05-08 11:01:39 +00008649
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008650$as_echo "#define AIX_GENUINE_CPLUSPLUS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008651
Matthias Klosec511b472010-05-08 11:01:39 +00008652 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008653$as_echo "yes" >&6; }
Matthias Klosec511b472010-05-08 11:01:39 +00008654
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008655else
Matthias Klosec511b472010-05-08 11:01:39 +00008656
8657 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008658$as_echo "no" >&6; }
Matthias Klosec511b472010-05-08 11:01:39 +00008659
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008660fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008661rm -f core conftest.err conftest.$ac_objext \
8662 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008663 *) ;;
8664esac
8665
Guido van Rossum70c7f481998-03-26 18:44:10 +00008666# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008667# BeOS' sockets are stashed in libnet.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008668{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_open in -lnsl" >&5
8669$as_echo_n "checking for t_open in -lnsl... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008670if ${ac_cv_lib_nsl_t_open+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008671 $as_echo_n "(cached) " >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008672else
Martin v. Löwis11437992002-04-12 09:54:03 +00008673 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008674LIBS="-lnsl $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008675cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008676/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008677
Martin v. Löwiseba40652007-08-30 20:10:57 +00008678/* Override any GCC internal prototype to avoid an error.
8679 Use char because int might match the return type of a GCC
8680 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008681#ifdef __cplusplus
8682extern "C"
8683#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008684char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008685int
8686main ()
8687{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008688return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008689 ;
8690 return 0;
8691}
8692_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008693if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008694 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008695else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008696 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008697fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008698rm -f core conftest.err conftest.$ac_objext \
8699 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008700LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008701fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008702{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_t_open" >&5
8703$as_echo "$ac_cv_lib_nsl_t_open" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008704if test "x$ac_cv_lib_nsl_t_open" = xyes; then :
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008705 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008706fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00008707 # SVR4
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008708{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
8709$as_echo_n "checking for socket in -lsocket... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008710if ${ac_cv_lib_socket_socket+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008711 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008712else
Martin v. Löwis11437992002-04-12 09:54:03 +00008713 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008714LIBS="-lsocket $LIBS $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008715cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008716/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008717
Martin v. Löwiseba40652007-08-30 20:10:57 +00008718/* Override any GCC internal prototype to avoid an error.
8719 Use char because int might match the return type of a GCC
8720 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008721#ifdef __cplusplus
8722extern "C"
8723#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008724char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008725int
8726main ()
8727{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008728return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008729 ;
8730 return 0;
8731}
8732_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008733if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008734 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008735else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008736 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008737fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008738rm -f core conftest.err conftest.$ac_objext \
8739 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008740LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008741fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008742{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
8743$as_echo "$ac_cv_lib_socket_socket" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008744if test "x$ac_cv_lib_socket_socket" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +00008745 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +00008746fi
8747 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +00008748
Jeremy Hyltoncb25d5e2000-07-27 21:23:28 +00008749case "$ac_sys_system" in
8750BeOS*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008751{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lnet" >&5
8752$as_echo_n "checking for socket in -lnet... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008753if ${ac_cv_lib_net_socket+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008754 $as_echo_n "(cached) " >&6
Guido van Rossumad678af1998-10-02 14:42:15 +00008755else
Martin v. Löwis11437992002-04-12 09:54:03 +00008756 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +00008757LIBS="-lnet $LIBS $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008758cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008759/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008760
Martin v. Löwiseba40652007-08-30 20:10:57 +00008761/* Override any GCC internal prototype to avoid an error.
8762 Use char because int might match the return type of a GCC
8763 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008764#ifdef __cplusplus
8765extern "C"
8766#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008767char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008768int
8769main ()
8770{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008771return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008772 ;
8773 return 0;
8774}
8775_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008776if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008777 ac_cv_lib_net_socket=yes
Guido van Rossumad678af1998-10-02 14:42:15 +00008778else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008779 ac_cv_lib_net_socket=no
Guido van Rossumad678af1998-10-02 14:42:15 +00008780fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008781rm -f core conftest.err conftest.$ac_objext \
8782 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008783LIBS=$ac_check_lib_save_LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +00008784fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008785{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_net_socket" >&5
8786$as_echo "$ac_cv_lib_net_socket" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008787if test "x$ac_cv_lib_net_socket" = xyes; then :
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008788 LIBS="-lnet $LIBS"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008789fi
8790 # BeOS
8791;;
8792esac
Guido van Rossum70c7f481998-03-26 18:44:10 +00008793
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008794{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libs" >&5
8795$as_echo_n "checking for --with-libs... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008796
Martin v. Löwiseba40652007-08-30 20:10:57 +00008797# Check whether --with-libs was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008798if test "${with_libs+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00008799 withval=$with_libs;
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008800{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
8801$as_echo "$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +00008802LIBS="$withval $LIBS"
8803
8804else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008805 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8806$as_echo "no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008807fi
8808
Guido van Rossum7f43da71994-08-01 12:15:30 +00008809
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00008810if test -n "$ac_tool_prefix"; then
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008811 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
8812set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008813{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8814$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008815if ${ac_cv_path_PKG_CONFIG+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008816 $as_echo_n "(cached) " >&6
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008817else
8818 case $PKG_CONFIG in
8819 [\\/]* | ?:[\\/]*)
8820 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
8821 ;;
8822 *)
8823 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8824for as_dir in $PATH
8825do
8826 IFS=$as_save_IFS
8827 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008828 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01008829 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008830 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008831 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008832 break 2
8833 fi
8834done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008835 done
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008836IFS=$as_save_IFS
8837
8838 ;;
8839esac
8840fi
8841PKG_CONFIG=$ac_cv_path_PKG_CONFIG
8842if test -n "$PKG_CONFIG"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008843 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
8844$as_echo "$PKG_CONFIG" >&6; }
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008845else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008846 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8847$as_echo "no" >&6; }
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008848fi
8849
8850
8851fi
8852if test -z "$ac_cv_path_PKG_CONFIG"; then
8853 ac_pt_PKG_CONFIG=$PKG_CONFIG
8854 # Extract the first word of "pkg-config", so it can be a program name with args.
8855set dummy pkg-config; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008856{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8857$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008858if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008859 $as_echo_n "(cached) " >&6
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008860else
8861 case $ac_pt_PKG_CONFIG in
8862 [\\/]* | ?:[\\/]*)
8863 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
8864 ;;
8865 *)
8866 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8867for as_dir in $PATH
8868do
8869 IFS=$as_save_IFS
8870 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008871 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01008872 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008873 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008874 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008875 break 2
8876 fi
8877done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008878 done
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008879IFS=$as_save_IFS
8880
8881 ;;
8882esac
8883fi
8884ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
8885if test -n "$ac_pt_PKG_CONFIG"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008886 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
8887$as_echo "$ac_pt_PKG_CONFIG" >&6; }
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008888else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008889 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8890$as_echo "no" >&6; }
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008891fi
8892
8893 if test "x$ac_pt_PKG_CONFIG" = x; then
8894 PKG_CONFIG=""
8895 else
8896 case $cross_compiling:$ac_tool_warned in
8897yes:)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008898{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8899$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008900ac_tool_warned=yes ;;
8901esac
8902 PKG_CONFIG=$ac_pt_PKG_CONFIG
8903 fi
8904else
8905 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
8906fi
8907
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00008908
8909# Check for use of the system expat library
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008910{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-expat" >&5
8911$as_echo_n "checking for --with-system-expat... " >&6; }
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00008912
8913# Check whether --with-system_expat was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008914if test "${with_system_expat+set}" = set; then :
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00008915 withval=$with_system_expat;
Benjamin Petersonf2d1b2a2010-10-31 16:53:53 +00008916else
8917 with_system_expat="no"
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00008918fi
8919
8920
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008921{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_expat" >&5
8922$as_echo "$with_system_expat" >&6; }
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00008923
8924# Check for use of the system libffi library
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008925{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-ffi" >&5
8926$as_echo_n "checking for --with-system-ffi... " >&6; }
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00008927
8928# Check whether --with-system_ffi was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008929if test "${with_system_ffi+set}" = set; then :
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00008930 withval=$with_system_ffi;
Benjamin Petersonf2d1b2a2010-10-31 16:53:53 +00008931else
8932 with_system_ffi="no"
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00008933fi
8934
8935
8936if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008937 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
8938else
8939 LIBFFI_INCLUDEDIR=""
8940fi
8941
8942
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008943{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_ffi" >&5
8944$as_echo "$with_system_ffi" >&6; }
Martin v. Löwis9176fc12006-04-11 11:12:43 +00008945
Ned Deilya2a9f572013-10-25 00:30:10 -07008946# Check for --with-tcltk-includes=path and --with-tcltk-libs=path
8947
8948
8949{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-includes" >&5
8950$as_echo_n "checking for --with-tcltk-includes... " >&6; }
8951
8952# Check whether --with-tcltk-includes was given.
8953if test "${with_tcltk_includes+set}" = set; then :
8954 withval=$with_tcltk_includes;
8955else
8956 with_tcltk_includes="default"
8957fi
8958
8959{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_includes" >&5
8960$as_echo "$with_tcltk_includes" >&6; }
8961{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-libs" >&5
8962$as_echo_n "checking for --with-tcltk-libs... " >&6; }
8963
8964# Check whether --with-tcltk-libs was given.
8965if test "${with_tcltk_libs+set}" = set; then :
8966 withval=$with_tcltk_libs;
8967else
8968 with_tcltk_libs="default"
8969fi
8970
8971{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_libs" >&5
8972$as_echo "$with_tcltk_libs" >&6; }
8973if test "x$with_tcltk_includes" = xdefault || test "x$with_tcltk_libs" = xdefault
8974then
8975 if test "x$with_tcltk_includes" != "x$with_tcltk_libs"
8976 then
8977 as_fn_error $? "use both --with-tcltk-includes='...' and --with-tcltk-libs='...' or neither" "$LINENO" 5
8978 fi
8979 TCLTK_INCLUDES=""
8980 TCLTK_LIBS=""
8981else
8982 TCLTK_INCLUDES="$with_tcltk_includes"
8983 TCLTK_LIBS="$with_tcltk_libs"
8984fi
8985
Benjamin Peterson867475c2009-04-29 20:36:25 +00008986# Check for --with-dbmliborder
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008987{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dbmliborder" >&5
8988$as_echo_n "checking for --with-dbmliborder... " >&6; }
Benjamin Peterson867475c2009-04-29 20:36:25 +00008989
8990# Check whether --with-dbmliborder was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008991if test "${with_dbmliborder+set}" = set; then :
Benjamin Peterson867475c2009-04-29 20:36:25 +00008992 withval=$with_dbmliborder;
8993if test x$with_dbmliborder = xyes
8994then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00008995as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Benjamin Peterson867475c2009-04-29 20:36:25 +00008996else
8997 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
8998 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
8999 then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00009000 as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Benjamin Peterson867475c2009-04-29 20:36:25 +00009001 fi
9002 done
9003fi
9004fi
9005
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009006{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dbmliborder" >&5
9007$as_echo "$with_dbmliborder" >&6; }
Benjamin Peterson867475c2009-04-29 20:36:25 +00009008
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00009009# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009010
9011
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009012{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-signal-module" >&5
9013$as_echo_n "checking for --with-signal-module... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009014
Martin v. Löwiseba40652007-08-30 20:10:57 +00009015# Check whether --with-signal-module was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009016if test "${with_signal_module+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00009017 withval=$with_signal_module;
9018fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009019
9020
9021if test -z "$with_signal_module"
9022then with_signal_module="yes"
9023fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009024{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_signal_module" >&5
9025$as_echo "$with_signal_module" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009026
9027if test "${with_signal_module}" = "yes"; then
9028 USE_SIGNAL_MODULE=""
9029 SIGNAL_OBJS=""
9030else
9031 USE_SIGNAL_MODULE="#"
9032 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
9033fi
9034
Guido van Rossum3d15bd82001-01-10 18:53:48 +00009035# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +00009036
Barry Warsawc0d24d82000-06-29 16:12:00 +00009037USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +00009038
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009039{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dec-threads" >&5
9040$as_echo_n "checking for --with-dec-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009041
Guido van Rossumec2f0731997-01-22 20:54:01 +00009042
Martin v. Löwiseba40652007-08-30 20:10:57 +00009043# Check whether --with-dec-threads was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009044if test "${with_dec_threads+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00009045 withval=$with_dec_threads;
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009046{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9047$as_echo "$withval" >&6; }
Guido van Rossumec2f0731997-01-22 20:54:01 +00009048LDLAST=-threads
Guido van Rossumf78abae1997-01-21 22:02:36 +00009049if test "${with_thread+set}" != set; then
Guido van Rossumec2f0731997-01-22 20:54:01 +00009050 with_thread="$withval";
Guido van Rossumf78abae1997-01-21 22:02:36 +00009051fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00009052else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009053 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9054$as_echo "no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009055fi
9056
Martin v. Löwis11437992002-04-12 09:54:03 +00009057
9058# Templates for things AC_DEFINEd more than once.
9059# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +00009060
9061
Martin v. Löwis11437992002-04-12 09:54:03 +00009062
9063
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009064{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-threads" >&5
9065$as_echo_n "checking for --with-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009066
Martin v. Löwiseba40652007-08-30 20:10:57 +00009067# Check whether --with-threads was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009068if test "${with_threads+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00009069 withval=$with_threads;
9070fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00009071
9072
Barry Warsawc0d24d82000-06-29 16:12:00 +00009073# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +00009074
Martin v. Löwiseba40652007-08-30 20:10:57 +00009075# Check whether --with-thread was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009076if test "${with_thread+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00009077 withval=$with_thread; with_threads=$with_thread
9078fi
9079
Barry Warsawc0d24d82000-06-29 16:12:00 +00009080
9081if test -z "$with_threads"
9082then with_threads="yes"
9083fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009084{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_threads" >&5
9085$as_echo "$with_threads" >&6; }
Barry Warsawc0d24d82000-06-29 16:12:00 +00009086
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009087
Barry Warsawc0d24d82000-06-29 16:12:00 +00009088if test "$with_threads" = "no"
9089then
9090 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009091elif test "$ac_cv_pthread_is_default" = yes
9092then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009093 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009094
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009095 # Defining _REENTRANT on system with POSIX threads should not hurt.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009096 $as_echo "#define _REENTRANT 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009097
9098 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +00009099 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009100elif test "$ac_cv_kpthread" = "yes"
9101then
9102 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00009103 if test "$ac_cv_cxx_thread" = "yes"; then
9104 CXX="$CXX -Kpthread"
9105 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009106 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum2242f2f2001-04-11 20:58:20 +00009107
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009108 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009109 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00009110elif test "$ac_cv_kthread" = "yes"
9111then
9112 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00009113 if test "$ac_cv_cxx_thread" = "yes"; then
9114 CXX="$CXX -Kthread"
9115 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009116 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis5f433f02003-05-05 05:05:30 +00009117
9118 posix_threads=yes
9119 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009120elif test "$ac_cv_pthread" = "yes"
9121then
9122 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00009123 if test "$ac_cv_cxx_thread" = "yes"; then
9124 CXX="$CXX -pthread"
9125 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009126 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009127
9128 posix_threads=yes
9129 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009130else
9131 if test ! -z "$with_threads" -a -d "$with_threads"
9132 then LDFLAGS="$LDFLAGS -L$with_threads"
9133 fi
9134 if test ! -z "$withval" -a -d "$withval"
9135 then LDFLAGS="$LDFLAGS -L$withval"
9136 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009137
9138 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +00009139 # define _POSIX_THREADS in unistd.h. Some apparently don't
9140 # (e.g. gnu pth with pthread emulation)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009141 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _POSIX_THREADS in unistd.h" >&5
9142$as_echo_n "checking for _POSIX_THREADS in unistd.h... " >&6; }
9143 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009144/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +00009145
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009146#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +00009147#ifdef _POSIX_THREADS
9148yes
9149#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009150
9151_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009152if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009153 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009154 unistd_defines_pthreads=yes
9155else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009156 unistd_defines_pthreads=no
9157fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00009158rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009159
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009160 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $unistd_defines_pthreads" >&5
9161$as_echo "$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009162
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009163 $as_echo "#define _REENTRANT 1" >>confdefs.h
Guido van Rossum9caf77a1996-08-01 00:52:26 +00009164
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009165 ac_fn_c_check_header_mongrel "$LINENO" "cthreads.h" "ac_cv_header_cthreads_h" "$ac_includes_default"
Matthias Klose3cef2a92012-03-14 23:39:33 +01009166if test "x$ac_cv_header_cthreads_h" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009167 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +00009168
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009169 $as_echo "#define C_THREADS 1" >>confdefs.h
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009170
Martin v. Löwis11437992002-04-12 09:54:03 +00009171
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009172$as_echo "#define HURD_C_THREADS 1" >>confdefs.h
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009173
9174 LIBS="$LIBS -lthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009175 THREADOBJ="Python/thread.o"
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009176else
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009177
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009178 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 +01009179if test "x$ac_cv_header_mach_cthreads_h" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009180 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +00009181
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009182 $as_echo "#define C_THREADS 1" >>confdefs.h
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009183
Martin v. Löwis11437992002-04-12 09:54:03 +00009184
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009185$as_echo "#define MACH_C_THREADS 1" >>confdefs.h
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009186
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009187 THREADOBJ="Python/thread.o"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009188else
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009189
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009190 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pth" >&5
9191$as_echo_n "checking for --with-pth... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009192
Martin v. Löwiseba40652007-08-30 20:10:57 +00009193# Check whether --with-pth was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009194if test "${with_pth+set}" = set; then :
9195 withval=$with_pth; { $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9196$as_echo "$withval" >&6; }
9197 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009198
9199
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009200$as_echo "#define HAVE_PTH 1" >>confdefs.h
Guido van Rossum9e8181b2000-09-19 00:46:46 +00009201
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00009202 LIBS="-lpth $LIBS"
9203 THREADOBJ="Python/thread.o"
Guido van Rossum9e8181b2000-09-19 00:46:46 +00009204else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009205 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9206$as_echo "no" >&6; }
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009207
9208 # Just looking for pthread_create in libpthread is not enough:
9209 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
9210 # So we really have to include pthread.h, and then link.
9211 _libs=$LIBS
9212 LIBS="$LIBS -lpthread"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009213 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
9214$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
9215 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009216/* end confdefs.h. */
Stefan Krahae66ca62012-11-22 22:36:57 +01009217
9218#include <stdio.h>
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009219#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +00009220
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009221void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +00009222int
9223main ()
9224{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009225
9226pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +00009227 ;
9228 return 0;
9229}
9230_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009231if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009232
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009233 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9234$as_echo "yes" >&6; }
9235 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum02a1c402000-02-25 19:26:31 +00009236
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009237 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009238 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +00009239else
Martin v. Löwis11437992002-04-12 09:54:03 +00009240
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009241 LIBS=$_libs
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009242 ac_fn_c_check_func "$LINENO" "pthread_detach" "ac_cv_func_pthread_detach"
Matthias Klose3cef2a92012-03-14 23:39:33 +01009243if test "x$ac_cv_func_pthread_detach" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009244 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumad678af1998-10-02 14:42:15 +00009245
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009246 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009247 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +00009248else
Guido van Rossumad678af1998-10-02 14:42:15 +00009249
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009250 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 +01009251if test "x$ac_cv_header_atheos_threads_h" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009252 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009253
9254
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009255$as_echo "#define ATHEOS_THREADS 1" >>confdefs.h
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009256
9257 THREADOBJ="Python/thread.o"
9258else
9259
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009260 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 +01009261if test "x$ac_cv_header_kernel_OS_h" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009262 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009263
9264
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009265$as_echo "#define BEOS_THREADS 1" >>confdefs.h
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009266
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009267 THREADOBJ="Python/thread.o"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009268else
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009269
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009270 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5
9271$as_echo_n "checking for pthread_create in -lpthreads... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009272if ${ac_cv_lib_pthreads_pthread_create+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009273 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009274else
Martin v. Löwis11437992002-04-12 09:54:03 +00009275 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009276LIBS="-lpthreads $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009277cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009278/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009279
Martin v. Löwiseba40652007-08-30 20:10:57 +00009280/* Override any GCC internal prototype to avoid an error.
9281 Use char because int might match the return type of a GCC
9282 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009283#ifdef __cplusplus
9284extern "C"
9285#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009286char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009287int
9288main ()
9289{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009290return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009291 ;
9292 return 0;
9293}
9294_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009295if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009296 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +00009297else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009298 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +00009299fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009300rm -f core conftest.err conftest.$ac_objext \
9301 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009302LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00009303fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009304{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5
9305$as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009306if test "x$ac_cv_lib_pthreads_pthread_create" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009307 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Greg Steinadf63d62000-07-05 10:38:09 +00009308
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009309 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00009310 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009311 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +00009312else
Greg Steinadf63d62000-07-05 10:38:09 +00009313
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009314 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5
9315$as_echo_n "checking for pthread_create in -lc_r... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009316if ${ac_cv_lib_c_r_pthread_create+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009317 $as_echo_n "(cached) " >&6
Greg Steinadf63d62000-07-05 10:38:09 +00009318else
Martin v. Löwis11437992002-04-12 09:54:03 +00009319 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00009320LIBS="-lc_r $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009321cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009322/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009323
Martin v. Löwiseba40652007-08-30 20:10:57 +00009324/* Override any GCC internal prototype to avoid an error.
9325 Use char because int might match the return type of a GCC
9326 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009327#ifdef __cplusplus
9328extern "C"
9329#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009330char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009331int
9332main ()
9333{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009334return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009335 ;
9336 return 0;
9337}
9338_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009339if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009340 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +00009341else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009342 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +00009343fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009344rm -f core conftest.err conftest.$ac_objext \
9345 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009346LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +00009347fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009348{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5
9349$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009350if test "x$ac_cv_lib_c_r_pthread_create" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009351 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum49545951997-12-02 19:28:29 +00009352
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009353 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00009354 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009355 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +00009356else
Guido van Rossum07bd90e2000-05-08 13:41:38 +00009357
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009358 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_create_system in -lpthread" >&5
9359$as_echo_n "checking for __pthread_create_system in -lpthread... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009360if ${ac_cv_lib_pthread___pthread_create_system+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009361 $as_echo_n "(cached) " >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009362else
Martin v. Löwis11437992002-04-12 09:54:03 +00009363 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009364LIBS="-lpthread $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009365cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009366/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009367
Martin v. Löwiseba40652007-08-30 20:10:57 +00009368/* Override any GCC internal prototype to avoid an error.
9369 Use char because int might match the return type of a GCC
9370 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009371#ifdef __cplusplus
9372extern "C"
9373#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009374char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009375int
9376main ()
9377{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009378return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009379 ;
9380 return 0;
9381}
9382_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009383if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009384 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009385else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009386 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009387fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009388rm -f core conftest.err conftest.$ac_objext \
9389 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009390LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009391fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009392{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_create_system" >&5
9393$as_echo "$ac_cv_lib_pthread___pthread_create_system" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009394if test "x$ac_cv_lib_pthread___pthread_create_system" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009395 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009396
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009397 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00009398 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009399 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009400else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009401
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009402 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lcma" >&5
9403$as_echo_n "checking for pthread_create in -lcma... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009404if ${ac_cv_lib_cma_pthread_create+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009405 $as_echo_n "(cached) " >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +00009406else
Martin v. Löwis11437992002-04-12 09:54:03 +00009407 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00009408LIBS="-lcma $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009409cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009410/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009411
Martin v. Löwiseba40652007-08-30 20:10:57 +00009412/* Override any GCC internal prototype to avoid an error.
9413 Use char because int might match the return type of a GCC
9414 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009415#ifdef __cplusplus
9416extern "C"
9417#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009418char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009419int
9420main ()
9421{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009422return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009423 ;
9424 return 0;
9425}
9426_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009427if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009428 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +00009429else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009430 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +00009431fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009432rm -f core conftest.err conftest.$ac_objext \
9433 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009434LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00009435fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009436{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cma_pthread_create" >&5
9437$as_echo "$ac_cv_lib_cma_pthread_create" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009438if test "x$ac_cv_lib_cma_pthread_create" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009439 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumb93a8621998-05-07 13:27:32 +00009440
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009441 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00009442 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009443 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +00009444else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +00009445
Martin v. Löwis130fb172001-07-19 11:00:41 +00009446 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +00009447fi
9448
Guido van Rossum627b2d71993-12-24 10:39:16 +00009449
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009450fi
9451
Guido van Rossum0be3e491997-05-22 20:33:33 +00009452fi
9453
Guido van Rossum49545951997-12-02 19:28:29 +00009454fi
9455
Guido van Rossumb93a8621998-05-07 13:27:32 +00009456fi
9457
Guido van Rossum07bd90e2000-05-08 13:41:38 +00009458
Michael W. Hudson54241132001-12-07 15:38:26 +00009459fi
9460
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009461
9462fi
9463
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009464fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009465rm -f core conftest.err conftest.$ac_objext \
9466 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009467fi
9468
Martin v. Löwis11437992002-04-12 09:54:03 +00009469fi
9470
9471
9472fi
9473
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009474
Michael W. Hudson54241132001-12-07 15:38:26 +00009475
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009476 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usconfig in -lmpc" >&5
9477$as_echo_n "checking for usconfig in -lmpc... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009478if ${ac_cv_lib_mpc_usconfig+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009479 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009480else
Martin v. Löwis11437992002-04-12 09:54:03 +00009481 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009482LIBS="-lmpc $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009483cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009484/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009485
Martin v. Löwiseba40652007-08-30 20:10:57 +00009486/* Override any GCC internal prototype to avoid an error.
9487 Use char because int might match the return type of a GCC
9488 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009489#ifdef __cplusplus
9490extern "C"
9491#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009492char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009493int
9494main ()
9495{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009496return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009497 ;
9498 return 0;
9499}
9500_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009501if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009502 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009503else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009504 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009505fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009506rm -f core conftest.err conftest.$ac_objext \
9507 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009508LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009509fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009510{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpc_usconfig" >&5
9511$as_echo "$ac_cv_lib_mpc_usconfig" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009512if test "x$ac_cv_lib_mpc_usconfig" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009513 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00009514
Martin v. Löwis130fb172001-07-19 11:00:41 +00009515 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009516 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009517 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +00009518fi
9519
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00009520
Neal Norwitza978ab02002-11-02 16:58:05 +00009521 if test "$posix_threads" != "yes"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009522 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thr_create in -lthread" >&5
9523$as_echo_n "checking for thr_create in -lthread... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009524if ${ac_cv_lib_thread_thr_create+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009525 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009526else
Martin v. Löwis11437992002-04-12 09:54:03 +00009527 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009528LIBS="-lthread $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009529cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009530/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009531
Martin v. Löwiseba40652007-08-30 20:10:57 +00009532/* Override any GCC internal prototype to avoid an error.
9533 Use char because int might match the return type of a GCC
9534 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009535#ifdef __cplusplus
9536extern "C"
9537#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009538char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009539int
9540main ()
9541{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009542return thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009543 ;
9544 return 0;
9545}
9546_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009547if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009548 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009549else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009550 ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009551fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009552rm -f core conftest.err conftest.$ac_objext \
9553 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009554LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009555fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009556{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_thread_thr_create" >&5
9557$as_echo "$ac_cv_lib_thread_thr_create" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009558if test "x$ac_cv_lib_thread_thr_create" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009559 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00009560
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00009561 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009562 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00009563 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +00009564fi
9565
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00009566 fi
Michael W. Hudson54241132001-12-07 15:38:26 +00009567
Martin v. Löwis130fb172001-07-19 11:00:41 +00009568 if test "$USE_THREAD_MODULE" != "#"
9569 then
9570 # If the above checks didn't disable threads, (at least) OSF1
9571 # needs this '-threads' argument during linking.
9572 case $ac_sys_system in
9573 OSF1) LDLAST=-threads;;
9574 esac
Jeremy Hylton1a2ca862000-10-16 16:59:12 +00009575 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009576fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00009577
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009578if test "$posix_threads" = "yes"; then
9579 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00009580
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009581$as_echo "#define _POSIX_THREADS 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009582
9583 fi
9584
9585 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
9586 case $ac_sys_system/$ac_sys_release in
Charles-François Natali4929eb92011-07-21 19:41:04 +02009587 SunOS/5.6)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009588$as_echo "#define HAVE_PTHREAD_DESTRUCTOR 1" >>confdefs.h
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00009589
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009590 ;;
9591 SunOS/5.8)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009592$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009593
9594 ;;
Charles-François Natali4929eb92011-07-21 19:41:04 +02009595 AIX/*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009596$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Christian Heimescba36bb2008-01-30 22:54:18 +00009597
9598 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009599 esac
9600
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009601 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
9602$as_echo_n "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009603 if ${ac_cv_pthread_system_supported+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009604 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009605else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009606 if test "$cross_compiling" = yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009607 ac_cv_pthread_system_supported=no
9608else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009609 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009610/* end confdefs.h. */
Stefan Krahae66ca62012-11-22 22:36:57 +01009611
9612 #include <stdio.h>
9613 #include <pthread.h>
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009614 void *foo(void *parm) {
9615 return NULL;
9616 }
9617 main() {
9618 pthread_attr_t attr;
9619 pthread_t id;
9620 if (pthread_attr_init(&attr)) exit(-1);
9621 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
9622 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
9623 exit(0);
9624 }
9625_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009626if ac_fn_c_try_run "$LINENO"; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009627 ac_cv_pthread_system_supported=yes
9628else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009629 ac_cv_pthread_system_supported=no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009630fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009631rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9632 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009633fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00009634
Martin v. Löwiseba40652007-08-30 20:10:57 +00009635
Guido van Rossum627b2d71993-12-24 10:39:16 +00009636fi
9637
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009638 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_system_supported" >&5
9639$as_echo "$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009640 if test "$ac_cv_pthread_system_supported" = "yes"; then
9641
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009642$as_echo "#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009643
9644 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009645 for ac_func in pthread_sigmask
9646do :
9647 ac_fn_c_check_func "$LINENO" "pthread_sigmask" "ac_cv_func_pthread_sigmask"
Matthias Klose3cef2a92012-03-14 23:39:33 +01009648if test "x$ac_cv_func_pthread_sigmask" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009649 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009650#define HAVE_PTHREAD_SIGMASK 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009651_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +00009652 case $ac_sys_system in
9653 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009654
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009655$as_echo "#define HAVE_BROKEN_PTHREAD_SIGMASK 1" >>confdefs.h
Jason Tishlerfac083d2003-07-22 15:20:49 +00009656
9657 ;;
9658 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009659fi
9660done
9661
Christian Heimes0d604cf2013-08-21 13:26:05 +02009662 for ac_func in pthread_atfork
9663do :
9664 ac_fn_c_check_func "$LINENO" "pthread_atfork" "ac_cv_func_pthread_atfork"
9665if test "x$ac_cv_func_pthread_atfork" = xyes; then :
9666 cat >>confdefs.h <<_ACEOF
9667#define HAVE_PTHREAD_ATFORK 1
9668_ACEOF
9669
9670fi
9671done
9672
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009673fi
9674
9675
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009676# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +00009677
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009678{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if --enable-ipv6 is specified" >&5
9679$as_echo_n "checking if --enable-ipv6 is specified... " >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009680# Check whether --enable-ipv6 was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009681if test "${enable_ipv6+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00009682 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009683 no)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009684 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9685$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009686 ipv6=no
9687 ;;
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009688 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9689$as_echo "yes" >&6; }
9690 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009691
9692 ipv6=yes
9693 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009694 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009695else
Martin v. Löwis11437992002-04-12 09:54:03 +00009696
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009697 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009698/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009699 /* AF_INET6 available check */
9700#include <sys/types.h>
9701#include <sys/socket.h>
Charles-François Natalibe2b9072013-01-08 19:47:00 +01009702int
9703main ()
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009704{
Charles-François Natalibe2b9072013-01-08 19:47:00 +01009705int domain = AF_INET6;
9706 ;
9707 return 0;
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009708}
Martin v. Löwis11437992002-04-12 09:54:03 +00009709_ACEOF
Charles-François Natalibe2b9072013-01-08 19:47:00 +01009710if ac_fn_c_try_compile "$LINENO"; then :
Matthias Klosec511b472010-05-08 11:01:39 +00009711
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009712 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9713$as_echo "yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009714 ipv6=yes
Matthias Klosec511b472010-05-08 11:01:39 +00009715
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009716else
Matthias Klosec511b472010-05-08 11:01:39 +00009717
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009718 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9719$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009720 ipv6=no
Matthias Klosec511b472010-05-08 11:01:39 +00009721
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009722fi
Charles-François Natalibe2b9072013-01-08 19:47:00 +01009723rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009724
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009725if test "$ipv6" = "yes"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009726 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RFC2553 API is available" >&5
9727$as_echo_n "checking if RFC2553 API is available... " >&6; }
9728 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009729/* end confdefs.h. */
Matthias Klosec511b472010-05-08 11:01:39 +00009730
9731 #include <sys/types.h>
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009732#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009733int
9734main ()
9735{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009736struct sockaddr_in6 x;
Matthias Klosec511b472010-05-08 11:01:39 +00009737 x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +00009738 ;
9739 return 0;
9740}
Matthias Klosec511b472010-05-08 11:01:39 +00009741
Martin v. Löwis11437992002-04-12 09:54:03 +00009742_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009743if ac_fn_c_try_compile "$LINENO"; then :
Matthias Klosec511b472010-05-08 11:01:39 +00009744
9745 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009746$as_echo "yes" >&6; }
Matthias Klosec511b472010-05-08 11:01:39 +00009747 ipv6=yes
9748
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009749else
Matthias Klosec511b472010-05-08 11:01:39 +00009750
9751 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009752$as_echo "no" >&6; }
Matthias Klosec511b472010-05-08 11:01:39 +00009753 ipv6=no
9754
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009755fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009756rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009757fi
9758
9759if test "$ipv6" = "yes"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009760 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009761
9762fi
9763
Martin v. Löwiseba40652007-08-30 20:10:57 +00009764fi
9765
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009766
9767ipv6type=unknown
9768ipv6lib=none
9769ipv6trylibc=no
9770
9771if test "$ipv6" = "yes"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009772 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5
9773$as_echo_n "checking ipv6 stack type... " >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +00009774 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
9775 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009776 case $i in
9777 inria)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009778 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009779/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009780
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009781#include <netinet/in.h>
9782#ifdef IPV6_INRIA_VERSION
9783yes
9784#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009785_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009786if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009787 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00009788 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009789fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00009790rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009791
9792 ;;
9793 kame)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009794 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009795/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009796
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009797#include <netinet/in.h>
9798#ifdef __KAME__
9799yes
9800#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009801_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009802if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009803 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009804 ipv6type=$i;
9805 ipv6lib=inet6
9806 ipv6libdir=/usr/local/v6/lib
9807 ipv6trylibc=yes
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 linux-glibc)
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 <features.h>
9817#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
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 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009825fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00009826rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009827
9828 ;;
9829 linux-inet6)
9830 if test -d /usr/inet6; then
9831 ipv6type=$i
9832 ipv6lib=inet6
9833 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +00009834 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009835 fi
9836 ;;
9837 solaris)
9838 if test -f /etc/netconfig; then
Antoine Pitrou31e85952011-01-03 18:57:14 +00009839 if $GREP -q tcp6 /etc/netconfig; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009840 ipv6type=$i
9841 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009842 fi
9843 fi
9844 ;;
9845 toshiba)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009846 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009847/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009848
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009849#include <sys/param.h>
9850#ifdef _TOSHIBA_INET6
9851yes
9852#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009853_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009854if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009855 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009856 ipv6type=$i;
9857 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00009858 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009859fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00009860rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009861
9862 ;;
9863 v6d)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009864 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009865/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009866
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009867#include </usr/local/v6/include/sys/v6config.h>
9868#ifdef __V6D__
9869yes
9870#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009871_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009872if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009873 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009874 ipv6type=$i;
9875 ipv6lib=v6;
9876 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +00009877 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
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 zeta)
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 <sys/param.h>
9887#ifdef _ZETA_MINAMI_INET6
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=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00009895 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009896fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00009897rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009898
9899 ;;
9900 esac
9901 if test "$ipv6type" != "unknown"; then
9902 break
9903 fi
9904 done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009905 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5
9906$as_echo "$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009907fi
9908
9909if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
9910 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
9911 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
9912 echo "using lib$ipv6lib"
9913 else
9914 if test $ipv6trylibc = "yes"; then
9915 echo "using libc"
9916 else
9917 echo 'Fatal: no $ipv6lib library found. cannot continue.'
9918 echo "You need to fetch lib$ipv6lib.a from appropriate"
9919 echo 'ipv6 kit and compile beforehand.'
9920 exit 1
9921 fi
9922 fi
9923fi
9924
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009925{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for OSX 10.5 SDK or later" >&5
9926$as_echo_n "checking for OSX 10.5 SDK or later... " >&6; }
9927cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren0d236eb2008-06-06 21:31:33 +00009928/* end confdefs.h. */
Matthias Klosec511b472010-05-08 11:01:39 +00009929
9930 #include <Carbon/Carbon.h>
Ronald Oussoren0d236eb2008-06-06 21:31:33 +00009931int
9932main ()
9933{
9934FSIORefNum fRef = 0
9935 ;
9936 return 0;
9937}
Mark Dickinson0712b562010-05-08 19:13:21 +00009938
Ronald Oussoren0d236eb2008-06-06 21:31:33 +00009939_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009940if ac_fn_c_try_compile "$LINENO"; then :
Matthias Klosec511b472010-05-08 11:01:39 +00009941
Ronald Oussoren0d236eb2008-06-06 21:31:33 +00009942
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009943$as_echo "#define HAVE_OSX105_SDK 1" >>confdefs.h
Ronald Oussoren0d236eb2008-06-06 21:31:33 +00009944
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009945 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9946$as_echo "yes" >&6; }
Ronald Oussoren0d236eb2008-06-06 21:31:33 +00009947
Mark Dickinson0712b562010-05-08 19:13:21 +00009948else
9949
9950 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9951$as_echo "no" >&6; }
9952
Ronald Oussoren0d236eb2008-06-06 21:31:33 +00009953fi
Ronald Oussoren0d236eb2008-06-06 21:31:33 +00009954rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9955
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009956# Check for --with-doc-strings
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009957{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-doc-strings" >&5
9958$as_echo_n "checking for --with-doc-strings... " >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009959
Martin v. Löwiseba40652007-08-30 20:10:57 +00009960# Check whether --with-doc-strings was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009961if test "${with_doc_strings+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00009962 withval=$with_doc_strings;
9963fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009964
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009965
9966if test -z "$with_doc_strings"
9967then with_doc_strings="yes"
9968fi
9969if test "$with_doc_strings" != "no"
9970then
9971
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009972$as_echo "#define WITH_DOC_STRINGS 1" >>confdefs.h
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009973
9974fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009975{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_doc_strings" >&5
9976$as_echo "$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009977
Neil Schemenauera35c6882001-02-27 04:45:05 +00009978# Check for Python-specific malloc support
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009979{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tsc" >&5
9980$as_echo_n "checking for --with-tsc... " >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009981
Martin v. Löwiseba40652007-08-30 20:10:57 +00009982# Check whether --with-tsc was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009983if test "${with_tsc+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00009984 withval=$with_tsc;
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009985if test "$withval" != no
9986then
9987
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009988$as_echo "#define WITH_TSC 1" >>confdefs.h
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009989
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009990 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9991$as_echo "yes" >&6; }
9992else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9993$as_echo "no" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009994fi
9995else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009996 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9997$as_echo "no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009998fi
9999
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010000
10001# Check for Python-specific malloc support
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010002{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pymalloc" >&5
10003$as_echo_n "checking for --with-pymalloc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010004
Martin v. Löwiseba40652007-08-30 20:10:57 +000010005# Check whether --with-pymalloc was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010006if test "${with_pymalloc+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +000010007 withval=$with_pymalloc;
10008fi
Michael W. Hudson54241132001-12-07 15:38:26 +000010009
Neil Schemenauera35c6882001-02-27 04:45:05 +000010010
Neil Schemenauer16c22972002-03-22 15:34:49 +000010011if test -z "$with_pymalloc"
10012then with_pymalloc="yes"
10013fi
10014if test "$with_pymalloc" != "no"
10015then
Martin v. Löwis11437992002-04-12 09:54:03 +000010016
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010017$as_echo "#define WITH_PYMALLOC 1" >>confdefs.h
Neil Schemenauer16c22972002-03-22 15:34:49 +000010018
10019fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010020{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pymalloc" >&5
10021$as_echo "$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +000010022
Benjamin Peterson91c12eb2009-12-03 02:52:39 +000010023# Check for Valgrind support
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010024{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-valgrind" >&5
10025$as_echo_n "checking for --with-valgrind... " >&6; }
Benjamin Peterson91c12eb2009-12-03 02:52:39 +000010026
10027# Check whether --with-valgrind was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010028if test "${with_valgrind+set}" = set; then :
Benjamin Peterson91c12eb2009-12-03 02:52:39 +000010029 withval=$with_valgrind;
10030else
10031 with_valgrind=no
10032fi
10033
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010034{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_valgrind" >&5
10035$as_echo "$with_valgrind" >&6; }
Benjamin Peterson91c12eb2009-12-03 02:52:39 +000010036if test "$with_valgrind" != no; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010037 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 +010010038if test "x$ac_cv_header_valgrind_valgrind_h" = xyes; then :
Benjamin Peterson91c12eb2009-12-03 02:52:39 +000010039
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010040$as_echo "#define WITH_VALGRIND 1" >>confdefs.h
Benjamin Peterson91c12eb2009-12-03 02:52:39 +000010041
10042else
Georg Brandl71f4fbb2011-02-25 11:04:50 +000010043 as_fn_error $? "Valgrind support requested but headers not available" "$LINENO" 5
Benjamin Peterson91c12eb2009-12-03 02:52:39 +000010044
10045fi
10046
10047
10048fi
10049
Barry Warsawef82cd72000-06-30 16:21:01 +000010050# Check for --with-wctype-functions
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010051{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-wctype-functions" >&5
10052$as_echo_n "checking for --with-wctype-functions... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010053
Martin v. Löwiseba40652007-08-30 20:10:57 +000010054# Check whether --with-wctype-functions was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010055if test "${with_wctype_functions+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +000010056 withval=$with_wctype_functions;
Barry Warsawef82cd72000-06-30 16:21:01 +000010057if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000010058then
10059
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010060$as_echo "#define WANT_WCTYPE_FUNCTIONS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000010061
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010062 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10063$as_echo "yes" >&6; }
10064else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10065$as_echo "no" >&6; }
Barry Warsawef82cd72000-06-30 16:21:01 +000010066fi
10067else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010068 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10069$as_echo "no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000010070fi
10071
Barry Warsawef82cd72000-06-30 16:21:01 +000010072
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010073# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000010074
Guido van Rossum98935bf2001-09-05 19:13:16 +000010075DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000010076
Guido van Rossume97ee181999-12-20 21:27:22 +000010077# the dlopen() function means we might want to use dynload_shlib.o. some
10078# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +000010079for ac_func in dlopen
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010080do :
10081 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
Matthias Klose3cef2a92012-03-14 23:39:33 +010010082if test "x$ac_cv_func_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010083 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010084#define HAVE_DLOPEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010085_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000010086
Guido van Rossume97ee181999-12-20 21:27:22 +000010087fi
Thomas Wouters3a584202000-08-05 23:28:51 +000010088done
Guido van Rossume97ee181999-12-20 21:27:22 +000010089
Michael W. Hudson54241132001-12-07 15:38:26 +000010090
Guido van Rossume97ee181999-12-20 21:27:22 +000010091# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
10092# loading of modules.
10093
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010094{ $as_echo "$as_me:${as_lineno-$LINENO}: checking DYNLOADFILE" >&5
10095$as_echo_n "checking DYNLOADFILE... " >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000010096if test -z "$DYNLOADFILE"
10097then
10098 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000010099 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
10100 if test "$ac_cv_func_dlopen" = yes
10101 then DYNLOADFILE="dynload_shlib.o"
10102 else DYNLOADFILE="dynload_aix.o"
10103 fi
10104 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000010105 BeOS*) DYNLOADFILE="dynload_beos.o";;
10106 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Anthony Baxter82201742006-04-09 15:07:40 +000010107 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
10108 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010109 atheos*) DYNLOADFILE="dynload_atheos.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000010110 *)
10111 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
10112 # out any dynamic loading
10113 if test "$ac_cv_func_dlopen" = yes
10114 then DYNLOADFILE="dynload_shlib.o"
10115 else DYNLOADFILE="dynload_stub.o"
10116 fi
10117 ;;
10118 esac
10119fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010120{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DYNLOADFILE" >&5
10121$as_echo "$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000010122if test "$DYNLOADFILE" != "dynload_stub.o"
10123then
Martin v. Löwis11437992002-04-12 09:54:03 +000010124
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010125$as_echo "#define HAVE_DYNAMIC_LOADING 1" >>confdefs.h
Guido van Rossume97ee181999-12-20 21:27:22 +000010126
10127fi
10128
Neil Schemenauer4e425612001-06-19 15:44:15 +000010129# MACHDEP_OBJS can be set to platform-specific object files needed by Python
10130
Michael W. Hudson54241132001-12-07 15:38:26 +000010131
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010132{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP_OBJS" >&5
10133$as_echo_n "checking MACHDEP_OBJS... " >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000010134if test -z "$MACHDEP_OBJS"
10135then
Jack Jansene578a632001-08-15 01:27:14 +000010136 MACHDEP_OBJS=$extra_machdep_objs
10137else
10138 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000010139fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010140{ $as_echo "$as_me:${as_lineno-$LINENO}: result: MACHDEP_OBJS" >&5
10141$as_echo "MACHDEP_OBJS" >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000010142
Guido van Rossum627b2d71993-12-24 10:39:16 +000010143# checks for library functions
Martin v. Löwisaef18b12008-03-24 13:31:16 +000010144for ac_func in alarm setitimer getitimer bind_textdomain_codeset chown \
10145 clock confstr ctermid execv fchmod fchown fork fpathconf ftime ftruncate \
Martin v. Löwis438b5342002-12-27 10:16:42 +000010146 gai_strerror getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwis50ea4562009-11-27 13:56:01 +000010147 getpriority getresuid getresgid getpwent getspnam getspent getsid getwd \
Benjamin Petersond16e01c2014-02-04 10:20:26 -050010148 initgroups kill killpg lchmod lchown lstat mkfifo mknod mktime mmap \
Martin v. Löwisa5f09072002-10-11 05:37:59 +000010149 mremap nice pathconf pause plock poll pthread_init \
Guido van Rossum162e38c2003-02-19 15:25:10 +000010150 putenv readlink realpath \
Jesse Noller355b1262009-04-02 00:03:28 +000010151 select sem_open sem_timedwait sem_getvalue sem_unlink setegid seteuid \
10152 setgid \
Martin v. Löwis4daacb12003-03-28 18:37:01 +000010153 setlocale setregid setreuid setsid setpgid setpgrp setuid setvbuf snprintf \
Martin v. Löwis50ea4562009-11-27 13:56:01 +000010154 setlocale setregid setreuid setresuid setresgid \
10155 setsid setpgid setpgrp setuid setvbuf snprintf \
Skip Montanaro7e11a012004-02-07 12:55:46 +000010156 sigaction siginterrupt sigrelse strftime \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000010157 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Neal Norwitz05a45592006-03-20 06:30:08 +000010158 truncate uname unsetenv utimes waitpid wait3 wait4 wcscoll _getpty
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010159do :
10160 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10161ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Georg Brandl71f4fbb2011-02-25 11:04:50 +000010162if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010163 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010164#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010165_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000010166
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010167fi
10168done
10169
Michael W. Hudson54241132001-12-07 15:38:26 +000010170
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010171# For some functions, having a definition is not sufficient, since
10172# we want to take their address.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010173{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chroot" >&5
10174$as_echo_n "checking for chroot... " >&6; }
10175cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010176/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010177#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010178int
10179main ()
10180{
10181void *x=chroot
10182 ;
10183 return 0;
10184}
10185_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010186if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010187
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010188$as_echo "#define HAVE_CHROOT 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010189
Matthias Klosec511b472010-05-08 11:01:39 +000010190 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010191$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010192else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010193 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10194$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010195
10196fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010197rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010198{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for link" >&5
10199$as_echo_n "checking for link... " >&6; }
10200cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010201/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010202#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010203int
10204main ()
10205{
10206void *x=link
10207 ;
10208 return 0;
10209}
10210_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010211if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010212
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010213$as_echo "#define HAVE_LINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010214
Matthias Klosec511b472010-05-08 11:01:39 +000010215 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010216$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010217else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010218 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10219$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010220
10221fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010222rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010223{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for symlink" >&5
10224$as_echo_n "checking for symlink... " >&6; }
10225cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010226/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010227#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010228int
10229main ()
10230{
10231void *x=symlink
10232 ;
10233 return 0;
10234}
10235_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010236if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010237
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010238$as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010239
Matthias Klosec511b472010-05-08 11:01:39 +000010240 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010241$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010242else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010243 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10244$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010245
10246fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010247rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010248{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fchdir" >&5
10249$as_echo_n "checking for fchdir... " >&6; }
10250cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010251/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010252#include <unistd.h>
10253int
10254main ()
10255{
10256void *x=fchdir
10257 ;
10258 return 0;
10259}
10260_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010261if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010262
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010263$as_echo "#define HAVE_FCHDIR 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010264
Matthias Klosec511b472010-05-08 11:01:39 +000010265 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010266$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010267else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010268 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10269$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010270
10271fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010272rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010273{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fsync" >&5
10274$as_echo_n "checking for fsync... " >&6; }
10275cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010276/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010277#include <unistd.h>
10278int
10279main ()
10280{
10281void *x=fsync
10282 ;
10283 return 0;
10284}
10285_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010286if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010287
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010288$as_echo "#define HAVE_FSYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010289
Matthias Klosec511b472010-05-08 11:01:39 +000010290 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010291$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010292else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010293 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10294$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010295
10296fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010297rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010298{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fdatasync" >&5
10299$as_echo_n "checking for fdatasync... " >&6; }
10300cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010301/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010302#include <unistd.h>
10303int
10304main ()
10305{
10306void *x=fdatasync
10307 ;
10308 return 0;
10309}
10310_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010311if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010312
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010313$as_echo "#define HAVE_FDATASYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010314
Matthias Klosec511b472010-05-08 11:01:39 +000010315 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010316$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010317else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010318 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10319$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010320
10321fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010322rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010323{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll" >&5
10324$as_echo_n "checking for epoll... " >&6; }
10325cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000010326/* end confdefs.h. */
10327#include <sys/epoll.h>
10328int
10329main ()
10330{
10331void *x=epoll_create
10332 ;
10333 return 0;
10334}
10335_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010336if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010337
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010338$as_echo "#define HAVE_EPOLL 1" >>confdefs.h
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000010339
Matthias Klosec511b472010-05-08 11:01:39 +000010340 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010341$as_echo "yes" >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000010342else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010343 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10344$as_echo "no" >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000010345
10346fi
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000010347rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010348{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kqueue" >&5
10349$as_echo_n "checking for kqueue... " >&6; }
10350cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000010351/* end confdefs.h. */
10352
10353#include <sys/types.h>
10354#include <sys/event.h>
10355
10356int
10357main ()
10358{
10359int x=kqueue()
10360 ;
10361 return 0;
10362}
10363_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010364if ac_fn_c_try_compile "$LINENO"; then :
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000010365
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010366$as_echo "#define HAVE_KQUEUE 1" >>confdefs.h
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000010367
Matthias Klosec511b472010-05-08 11:01:39 +000010368 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010369$as_echo "yes" >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000010370else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010371 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10372$as_echo "no" >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000010373
10374fi
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000010375rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000010376# On some systems (eg. FreeBSD 5), we would find a definition of the
10377# functions ctermid_r, setgroups in the library, but no prototype
10378# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
10379# address to avoid compiler warnings and potential miscompilations
10380# because of the missing prototypes.
10381
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010382{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ctermid_r" >&5
10383$as_echo_n "checking for ctermid_r... " >&6; }
10384cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010385/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000010386
Martin v. Löwisd5843682002-11-21 20:41:28 +000010387#include <stdio.h>
10388
Martin v. Löwisd5843682002-11-21 20:41:28 +000010389int
10390main ()
10391{
10392void* p = ctermid_r
10393 ;
10394 return 0;
10395}
10396_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010397if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000010398
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010399$as_echo "#define HAVE_CTERMID_R 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000010400
Matthias Klosec511b472010-05-08 11:01:39 +000010401 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010402$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010403else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010404 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10405$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010406
10407fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010408rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10409
Antoine Pitroub170f172010-09-10 18:47:36 +000010410{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock declaration" >&5
10411$as_echo_n "checking for flock declaration... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010412if ${ac_cv_flock_decl+:} false; then :
Antoine Pitroub170f172010-09-10 18:47:36 +000010413 $as_echo_n "(cached) " >&6
10414else
10415 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010416/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010417#include <sys/file.h>
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010418int
10419main ()
10420{
10421void* p = flock
Antoine Pitroub170f172010-09-10 18:47:36 +000010422
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010423 ;
10424 return 0;
10425}
10426_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010427if ac_fn_c_try_compile "$LINENO"; then :
Antoine Pitroub170f172010-09-10 18:47:36 +000010428 ac_cv_flock_decl=yes
10429else
10430 ac_cv_flock_decl=no
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010431
10432fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010433rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitrou85729812010-09-07 14:55:24 +000010434
Antoine Pitroub170f172010-09-10 18:47:36 +000010435fi
10436{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_flock_decl" >&5
10437$as_echo "$ac_cv_flock_decl" >&6; }
10438if test "x${ac_cv_flock_decl}" = xyes; then
10439 for ac_func in flock
10440do :
10441 ac_fn_c_check_func "$LINENO" "flock" "ac_cv_func_flock"
Matthias Klose3cef2a92012-03-14 23:39:33 +010010442if test "x$ac_cv_func_flock" = xyes; then :
Antoine Pitroub170f172010-09-10 18:47:36 +000010443 cat >>confdefs.h <<_ACEOF
10444#define HAVE_FLOCK 1
Antoine Pitrou85729812010-09-07 14:55:24 +000010445_ACEOF
Antoine Pitroub170f172010-09-10 18:47:36 +000010446
Antoine Pitrou85729812010-09-07 14:55:24 +000010447else
Antoine Pitroub170f172010-09-10 18:47:36 +000010448 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock in -lbsd" >&5
Antoine Pitrou85729812010-09-07 14:55:24 +000010449$as_echo_n "checking for flock in -lbsd... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010450if ${ac_cv_lib_bsd_flock+:} false; then :
Antoine Pitrou85729812010-09-07 14:55:24 +000010451 $as_echo_n "(cached) " >&6
10452else
10453 ac_check_lib_save_LIBS=$LIBS
10454LIBS="-lbsd $LIBS"
10455cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10456/* end confdefs.h. */
10457
10458/* Override any GCC internal prototype to avoid an error.
10459 Use char because int might match the return type of a GCC
10460 builtin and then its argument prototype would still apply. */
10461#ifdef __cplusplus
10462extern "C"
10463#endif
10464char flock ();
10465int
10466main ()
10467{
10468return flock ();
10469 ;
10470 return 0;
10471}
10472_ACEOF
10473if ac_fn_c_try_link "$LINENO"; then :
10474 ac_cv_lib_bsd_flock=yes
10475else
10476 ac_cv_lib_bsd_flock=no
10477fi
10478rm -f core conftest.err conftest.$ac_objext \
10479 conftest$ac_exeext conftest.$ac_ext
10480LIBS=$ac_check_lib_save_LIBS
10481fi
10482{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_flock" >&5
10483$as_echo "$ac_cv_lib_bsd_flock" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010484if test "x$ac_cv_lib_bsd_flock" = xyes; then :
Antoine Pitroub170f172010-09-10 18:47:36 +000010485 $as_echo "#define HAVE_FLOCK 1" >>confdefs.h
Antoine Pitrou85729812010-09-07 14:55:24 +000010486
10487
10488$as_echo "#define FLOCK_NEEDS_LIBBSD 1" >>confdefs.h
10489
10490
10491fi
10492
10493
10494fi
Antoine Pitroub170f172010-09-10 18:47:36 +000010495done
10496
Antoine Pitrou85729812010-09-07 14:55:24 +000010497fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010498
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010499{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
10500$as_echo_n "checking for getpagesize... " >&6; }
10501cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010502/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010503
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010504#include <unistd.h>
10505
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010506int
10507main ()
10508{
10509void* p = getpagesize
10510 ;
10511 return 0;
10512}
10513_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010514if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010515
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010516$as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010517
Matthias Klosec511b472010-05-08 11:01:39 +000010518 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010519$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010520else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010521 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10522$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010523
10524fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010525rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010526
Charles-François Natali93a11752011-11-27 13:01:35 +010010527{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken unsetenv" >&5
10528$as_echo_n "checking for broken unsetenv... " >&6; }
10529cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10530/* end confdefs.h. */
10531
10532#include <stdlib.h>
10533
10534int
10535main ()
10536{
10537int res = unsetenv("DUMMY")
10538 ;
10539 return 0;
10540}
10541_ACEOF
10542if ac_fn_c_try_compile "$LINENO"; then :
10543 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10544$as_echo "no" >&6; }
10545else
10546
10547$as_echo "#define HAVE_BROKEN_UNSETENV 1" >>confdefs.h
10548
10549 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10550$as_echo "yes" >&6; }
10551
10552fi
10553rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10554
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010555for ac_prog in true
10556do
10557 # Extract the first word of "$ac_prog", so it can be a program name with args.
10558set dummy $ac_prog; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010559{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10560$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010561if ${ac_cv_prog_TRUE+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010562 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010563else
10564 if test -n "$TRUE"; then
10565 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
10566else
10567as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10568for as_dir in $PATH
10569do
10570 IFS=$as_save_IFS
10571 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010572 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +010010573 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010574 ac_cv_prog_TRUE="$ac_prog"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010575 $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 +000010576 break 2
10577 fi
10578done
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010579 done
Martin v. Löwiseba40652007-08-30 20:10:57 +000010580IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010581
10582fi
10583fi
10584TRUE=$ac_cv_prog_TRUE
10585if test -n "$TRUE"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010586 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TRUE" >&5
10587$as_echo "$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010588else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010589 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10590$as_echo "no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010591fi
10592
Martin v. Löwiseba40652007-08-30 20:10:57 +000010593
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010594 test -n "$TRUE" && break
10595done
10596test -n "$TRUE" || TRUE="/bin/true"
10597
10598
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010599{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lc" >&5
10600$as_echo_n "checking for inet_aton in -lc... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010601if ${ac_cv_lib_c_inet_aton+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010602 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010603else
10604 ac_check_lib_save_LIBS=$LIBS
10605LIBS="-lc $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010606cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010607/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010608
Martin v. Löwiseba40652007-08-30 20:10:57 +000010609/* Override any GCC internal prototype to avoid an error.
10610 Use char because int might match the return type of a GCC
10611 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010612#ifdef __cplusplus
10613extern "C"
10614#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010615char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010616int
10617main ()
10618{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010619return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010620 ;
10621 return 0;
10622}
10623_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010624if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010625 ac_cv_lib_c_inet_aton=yes
10626else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010627 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010628fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010629rm -f core conftest.err conftest.$ac_objext \
10630 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010631LIBS=$ac_check_lib_save_LIBS
10632fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010633{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_inet_aton" >&5
10634$as_echo "$ac_cv_lib_c_inet_aton" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010635if test "x$ac_cv_lib_c_inet_aton" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010636 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010637else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010638 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5
10639$as_echo_n "checking for inet_aton in -lresolv... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010640if ${ac_cv_lib_resolv_inet_aton+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010641 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010642else
10643 ac_check_lib_save_LIBS=$LIBS
10644LIBS="-lresolv $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010645cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010646/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010647
Martin v. Löwiseba40652007-08-30 20:10:57 +000010648/* Override any GCC internal prototype to avoid an error.
10649 Use char because int might match the return type of a GCC
10650 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010651#ifdef __cplusplus
10652extern "C"
10653#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010654char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010655int
10656main ()
10657{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010658return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010659 ;
10660 return 0;
10661}
10662_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010663if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010664 ac_cv_lib_resolv_inet_aton=yes
10665else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010666 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010667fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010668rm -f core conftest.err conftest.$ac_objext \
10669 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010670LIBS=$ac_check_lib_save_LIBS
10671fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010672{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5
10673$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010674if test "x$ac_cv_lib_resolv_inet_aton" = xyes; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010675 cat >>confdefs.h <<_ACEOF
10676#define HAVE_LIBRESOLV 1
10677_ACEOF
10678
10679 LIBS="-lresolv $LIBS"
10680
10681fi
10682
10683
10684fi
10685
10686
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010687# On Tru64, chflags seems to be present, but calling it will
10688# exit Python
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010689{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chflags" >&5
10690$as_echo_n "checking for chflags... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010691if ${ac_cv_have_chflags+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010692 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010693else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010694 if test "$cross_compiling" = yes; then :
Gregory P. Smith49437c22009-11-02 01:38:35 +000010695 ac_cv_have_chflags=cross
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010696else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010697 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010698/* end confdefs.h. */
Ned Deily43e10542011-06-27 23:41:53 -070010699
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010700#include <sys/stat.h>
10701#include <unistd.h>
10702int main(int argc, char*argv[])
10703{
10704 if(chflags(argv[0], 0) != 0)
10705 return 1;
10706 return 0;
10707}
Ned Deily43e10542011-06-27 23:41:53 -070010708
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010709_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010710if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010711 ac_cv_have_chflags=yes
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010712else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010713 ac_cv_have_chflags=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010714fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010715rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10716 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +000010717fi
10718
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010719
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010720fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010721{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_chflags" >&5
10722$as_echo "$ac_cv_have_chflags" >&6; }
Gregory P. Smith49437c22009-11-02 01:38:35 +000010723if test "$ac_cv_have_chflags" = cross ; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010724 ac_fn_c_check_func "$LINENO" "chflags" "ac_cv_func_chflags"
Matthias Klose3cef2a92012-03-14 23:39:33 +010010725if test "x$ac_cv_func_chflags" = xyes; then :
Gregory P. Smith49437c22009-11-02 01:38:35 +000010726 ac_cv_have_chflags="yes"
10727else
10728 ac_cv_have_chflags="no"
10729fi
10730
10731fi
10732if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010733
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010734$as_echo "#define HAVE_CHFLAGS 1" >>confdefs.h
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010735
10736fi
10737
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010738{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lchflags" >&5
10739$as_echo_n "checking for lchflags... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010740if ${ac_cv_have_lchflags+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010741 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010742else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010743 if test "$cross_compiling" = yes; then :
Gregory P. Smith49437c22009-11-02 01:38:35 +000010744 ac_cv_have_lchflags=cross
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010745else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010746 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010747/* end confdefs.h. */
Ned Deily43e10542011-06-27 23:41:53 -070010748
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010749#include <sys/stat.h>
10750#include <unistd.h>
10751int main(int argc, char*argv[])
10752{
10753 if(lchflags(argv[0], 0) != 0)
10754 return 1;
10755 return 0;
10756}
Ned Deily43e10542011-06-27 23:41:53 -070010757
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010758_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010759if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010760 ac_cv_have_lchflags=yes
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010761else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010762 ac_cv_have_lchflags=no
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010763fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010764rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10765 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010766fi
10767
10768
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010769fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010770{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lchflags" >&5
10771$as_echo "$ac_cv_have_lchflags" >&6; }
Gregory P. Smith49437c22009-11-02 01:38:35 +000010772if test "$ac_cv_have_lchflags" = cross ; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010773 ac_fn_c_check_func "$LINENO" "lchflags" "ac_cv_func_lchflags"
Matthias Klose3cef2a92012-03-14 23:39:33 +010010774if test "x$ac_cv_func_lchflags" = xyes; then :
Gregory P. Smith49437c22009-11-02 01:38:35 +000010775 ac_cv_have_lchflags="yes"
10776else
10777 ac_cv_have_lchflags="no"
10778fi
10779
10780fi
10781if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010782
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010783$as_echo "#define HAVE_LCHFLAGS 1" >>confdefs.h
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010784
10785fi
10786
Ronald Oussorenf8752642006-07-06 10:13:35 +000010787case $ac_sys_system/$ac_sys_release in
10788Darwin/*)
10789 _CUR_CFLAGS="${CFLAGS}"
10790 _CUR_LDFLAGS="${LDFLAGS}"
10791 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
10792 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
10793 ;;
10794esac
10795
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010796{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5
10797$as_echo_n "checking for inflateCopy in -lz... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010798if ${ac_cv_lib_z_inflateCopy+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010799 $as_echo_n "(cached) " >&6
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000010800else
10801 ac_check_lib_save_LIBS=$LIBS
10802LIBS="-lz $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010803cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000010804/* end confdefs.h. */
10805
Martin v. Löwiseba40652007-08-30 20:10:57 +000010806/* Override any GCC internal prototype to avoid an error.
10807 Use char because int might match the return type of a GCC
10808 builtin and then its argument prototype would still apply. */
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000010809#ifdef __cplusplus
10810extern "C"
10811#endif
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000010812char inflateCopy ();
10813int
10814main ()
10815{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010816return inflateCopy ();
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000010817 ;
10818 return 0;
10819}
10820_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010821if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000010822 ac_cv_lib_z_inflateCopy=yes
10823else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010824 ac_cv_lib_z_inflateCopy=no
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000010825fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010826rm -f core conftest.err conftest.$ac_objext \
10827 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000010828LIBS=$ac_check_lib_save_LIBS
10829fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010830{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5
10831$as_echo "$ac_cv_lib_z_inflateCopy" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010832if test "x$ac_cv_lib_z_inflateCopy" = xyes; then :
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000010833
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010834$as_echo "#define HAVE_ZLIB_COPY 1" >>confdefs.h
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000010835
10836fi
10837
10838
Ronald Oussorenf8752642006-07-06 10:13:35 +000010839case $ac_sys_system/$ac_sys_release in
10840Darwin/*)
10841 CFLAGS="${_CUR_CFLAGS}"
10842 LDFLAGS="${_CUR_LDFLAGS}"
10843 ;;
10844esac
10845
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010846{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hstrerror" >&5
10847$as_echo_n "checking for hstrerror... " >&6; }
10848cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010849/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000010850
Martin v. Löwise9416172003-05-03 10:12:45 +000010851#include <netdb.h>
10852
Martin v. Löwise9416172003-05-03 10:12:45 +000010853int
10854main ()
10855{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010856void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000010857 ;
10858 return 0;
10859}
10860_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010861if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000010862
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010863$as_echo "#define HAVE_HSTRERROR 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000010864
Matthias Klosec511b472010-05-08 11:01:39 +000010865 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010866$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010867else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010868 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10869$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010870
10871fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010872rm -f core conftest.err conftest.$ac_objext \
10873 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010874
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010875{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5
10876$as_echo_n "checking for inet_aton... " >&6; }
10877cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010878/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000010879
Martin v. Löwis86d66262006-02-17 08:40:11 +000010880#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000010881#include <sys/socket.h>
10882#include <netinet/in.h>
10883#include <arpa/inet.h>
10884
Martin v. Löwise9416172003-05-03 10:12:45 +000010885int
10886main ()
10887{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010888void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000010889 ;
10890 return 0;
10891}
10892_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010893if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000010894
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010895$as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000010896
Matthias Klosec511b472010-05-08 11:01:39 +000010897 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010898$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010899else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010900 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10901$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010902
10903fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010904rm -f core conftest.err conftest.$ac_objext \
10905 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010906
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010907{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_pton" >&5
10908$as_echo_n "checking for inet_pton... " >&6; }
10909cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010910/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000010911
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000010912#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000010913#include <sys/socket.h>
10914#include <netinet/in.h>
10915#include <arpa/inet.h>
10916
Martin v. Löwise9416172003-05-03 10:12:45 +000010917int
10918main ()
10919{
10920void* p = inet_pton
10921 ;
10922 return 0;
10923}
10924_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010925if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000010926
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010927$as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000010928
Matthias Klosec511b472010-05-08 11:01:39 +000010929 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010930$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010931else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010932 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10933$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010934
10935fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010936rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000010937
Martin v. Löwisd6640d42003-07-06 09:29:52 +000010938# On some systems, setgroups is in unistd.h, on others, in grp.h
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010939{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for setgroups" >&5
10940$as_echo_n "checking for setgroups... " >&6; }
10941cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010942/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000010943
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000010944#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000010945#ifdef HAVE_GRP_H
10946#include <grp.h>
10947#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000010948
Martin v. Löwisd5843682002-11-21 20:41:28 +000010949int
10950main ()
10951{
10952void* p = setgroups
10953 ;
10954 return 0;
10955}
10956_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010957if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000010958
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010959$as_echo "#define HAVE_SETGROUPS 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000010960
Matthias Klosec511b472010-05-08 11:01:39 +000010961 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010962$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010963else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010964 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10965$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010966
10967fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010968rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000010969
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010970# check for openpty and forkpty
10971
10972for ac_func in openpty
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010973do :
10974 ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty"
Matthias Klose3cef2a92012-03-14 23:39:33 +010010975if test "x$ac_cv_func_openpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010976 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010977#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010978_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010979
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010980else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010981 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5
10982$as_echo_n "checking for openpty in -lutil... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010983if ${ac_cv_lib_util_openpty+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010984 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000010985else
Martin v. Löwis11437992002-04-12 09:54:03 +000010986 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010987LIBS="-lutil $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010988cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010989/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010990
Martin v. Löwiseba40652007-08-30 20:10:57 +000010991/* Override any GCC internal prototype to avoid an error.
10992 Use char because int might match the return type of a GCC
10993 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010994#ifdef __cplusplus
10995extern "C"
10996#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010997char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010998int
10999main ()
11000{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011001return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011002 ;
11003 return 0;
11004}
11005_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011006if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011007 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000011008else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011009 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011010fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011011rm -f core conftest.err conftest.$ac_objext \
11012 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011013LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011014fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011015{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5
11016$as_echo "$ac_cv_lib_util_openpty" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011017if test "x$ac_cv_lib_util_openpty" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011018 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000011019 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011020else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011021 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lbsd" >&5
11022$as_echo_n "checking for openpty in -lbsd... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011023if ${ac_cv_lib_bsd_openpty+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011024 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011025else
11026 ac_check_lib_save_LIBS=$LIBS
11027LIBS="-lbsd $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011028cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011029/* end confdefs.h. */
11030
Martin v. Löwiseba40652007-08-30 20:10:57 +000011031/* Override any GCC internal prototype to avoid an error.
11032 Use char because int might match the return type of a GCC
11033 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011034#ifdef __cplusplus
11035extern "C"
11036#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011037char openpty ();
11038int
11039main ()
11040{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011041return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011042 ;
11043 return 0;
11044}
11045_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011046if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011047 ac_cv_lib_bsd_openpty=yes
11048else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011049 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011050fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011051rm -f core conftest.err conftest.$ac_objext \
11052 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011053LIBS=$ac_check_lib_save_LIBS
11054fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011055{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_openpty" >&5
11056$as_echo "$ac_cv_lib_bsd_openpty" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011057if test "x$ac_cv_lib_bsd_openpty" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011058 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011059 LIBS="$LIBS -lbsd"
11060fi
11061
11062
11063fi
11064
Fred Drake8cef4cf2000-06-28 16:40:38 +000011065
11066fi
11067done
11068
11069for ac_func in forkpty
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011070do :
11071 ac_fn_c_check_func "$LINENO" "forkpty" "ac_cv_func_forkpty"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011072if test "x$ac_cv_func_forkpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011073 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011074#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011075_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011076
Fred Drake8cef4cf2000-06-28 16:40:38 +000011077else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011078 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5
11079$as_echo_n "checking for forkpty in -lutil... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011080if ${ac_cv_lib_util_forkpty+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011081 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000011082else
Martin v. Löwis11437992002-04-12 09:54:03 +000011083 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011084LIBS="-lutil $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011085cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011086/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011087
Martin v. Löwiseba40652007-08-30 20:10:57 +000011088/* Override any GCC internal prototype to avoid an error.
11089 Use char because int might match the return type of a GCC
11090 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011091#ifdef __cplusplus
11092extern "C"
11093#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011094char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011095int
11096main ()
11097{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011098return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011099 ;
11100 return 0;
11101}
11102_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011103if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011104 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000011105else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011106 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011107fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011108rm -f core conftest.err conftest.$ac_objext \
11109 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011110LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011111fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011112{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5
11113$as_echo "$ac_cv_lib_util_forkpty" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011114if test "x$ac_cv_lib_util_forkpty" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011115 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000011116 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011117else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011118 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lbsd" >&5
11119$as_echo_n "checking for forkpty in -lbsd... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011120if ${ac_cv_lib_bsd_forkpty+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011121 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011122else
11123 ac_check_lib_save_LIBS=$LIBS
11124LIBS="-lbsd $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011125cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011126/* end confdefs.h. */
11127
Martin v. Löwiseba40652007-08-30 20:10:57 +000011128/* Override any GCC internal prototype to avoid an error.
11129 Use char because int might match the return type of a GCC
11130 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011131#ifdef __cplusplus
11132extern "C"
11133#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011134char forkpty ();
11135int
11136main ()
11137{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011138return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011139 ;
11140 return 0;
11141}
11142_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011143if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011144 ac_cv_lib_bsd_forkpty=yes
11145else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011146 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011147fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011148rm -f core conftest.err conftest.$ac_objext \
11149 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011150LIBS=$ac_check_lib_save_LIBS
11151fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011152{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_forkpty" >&5
11153$as_echo "$ac_cv_lib_bsd_forkpty" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011154if test "x$ac_cv_lib_bsd_forkpty" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011155 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011156 LIBS="$LIBS -lbsd"
11157fi
11158
11159
11160fi
11161
Fred Drake8cef4cf2000-06-28 16:40:38 +000011162
11163fi
11164done
11165
Jack Jansendd19cf82001-12-06 22:36:17 +000011166
Brett Cannonaa5778d2008-03-18 04:09:00 +000011167# Stuff for expat.
Brett Cannonaa5778d2008-03-18 04:09:00 +000011168for ac_func in memmove
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011169do :
11170 ac_fn_c_check_func "$LINENO" "memmove" "ac_cv_func_memmove"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011171if test "x$ac_cv_func_memmove" = xyes; then :
Brett Cannonaa5778d2008-03-18 04:09:00 +000011172 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011173#define HAVE_MEMMOVE 1
Brett Cannonaa5778d2008-03-18 04:09:00 +000011174_ACEOF
11175
11176fi
11177done
11178
11179
Michael W. Hudson54241132001-12-07 15:38:26 +000011180# check for long file support functions
Fred Drake8cef4cf2000-06-28 16:40:38 +000011181for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011182do :
11183 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11184ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Georg Brandl71f4fbb2011-02-25 11:04:50 +000011185if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011186 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011187#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011188_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000011189
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011190fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000011191done
11192
Michael W. Hudson54241132001-12-07 15:38:26 +000011193
Georg Brandl71f4fbb2011-02-25 11:04:50 +000011194ac_fn_c_check_func "$LINENO" "dup2" "ac_cv_func_dup2"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011195if test "x$ac_cv_func_dup2" = xyes; then :
Georg Brandl71f4fbb2011-02-25 11:04:50 +000011196 $as_echo "#define HAVE_DUP2 1" >>confdefs.h
Martin v. Löwis1142de32002-03-29 16:28:31 +000011197
Martin v. Löwis1142de32002-03-29 16:28:31 +000011198else
Martin v. Löwiseba40652007-08-30 20:10:57 +000011199 case " $LIBOBJS " in
Georg Brandl71f4fbb2011-02-25 11:04:50 +000011200 *" dup2.$ac_objext "* ) ;;
11201 *) LIBOBJS="$LIBOBJS dup2.$ac_objext"
Martin v. Löwiseba40652007-08-30 20:10:57 +000011202 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000011203esac
11204
Martin v. Löwis1142de32002-03-29 16:28:31 +000011205fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +000011206
11207ac_fn_c_check_func "$LINENO" "getcwd" "ac_cv_func_getcwd"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011208if test "x$ac_cv_func_getcwd" = xyes; then :
Georg Brandl71f4fbb2011-02-25 11:04:50 +000011209 $as_echo "#define HAVE_GETCWD 1" >>confdefs.h
11210
11211else
11212 case " $LIBOBJS " in
11213 *" getcwd.$ac_objext "* ) ;;
11214 *) LIBOBJS="$LIBOBJS getcwd.$ac_objext"
11215 ;;
11216esac
11217
11218fi
11219
11220ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011221if test "x$ac_cv_func_strdup" = xyes; then :
Georg Brandl71f4fbb2011-02-25 11:04:50 +000011222 $as_echo "#define HAVE_STRDUP 1" >>confdefs.h
11223
11224else
11225 case " $LIBOBJS " in
11226 *" strdup.$ac_objext "* ) ;;
11227 *) LIBOBJS="$LIBOBJS strdup.$ac_objext"
11228 ;;
11229esac
11230
11231fi
Martin v. Löwis1142de32002-03-29 16:28:31 +000011232
11233
11234for ac_func in getpgrp
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011235do :
11236 ac_fn_c_check_func "$LINENO" "getpgrp" "ac_cv_func_getpgrp"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011237if test "x$ac_cv_func_getpgrp" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011238 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011239#define HAVE_GETPGRP 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011240_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011241 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011242/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011243#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011244int
11245main ()
11246{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011247getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000011248 ;
11249 return 0;
11250}
11251_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011252if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011253
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011254$as_echo "#define GETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000011255
Guido van Rossum627b2d71993-12-24 10:39:16 +000011256fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011257rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011258
Guido van Rossum627b2d71993-12-24 10:39:16 +000011259fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011260done
Guido van Rossum627b2d71993-12-24 10:39:16 +000011261
Jack Jansen150753c2003-03-29 22:07:47 +000011262for ac_func in setpgrp
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011263do :
11264 ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011265if test "x$ac_cv_func_setpgrp" = xyes; then :
Jack Jansen150753c2003-03-29 22:07:47 +000011266 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011267#define HAVE_SETPGRP 1
Jack Jansen150753c2003-03-29 22:07:47 +000011268_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011269 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011270/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000011271#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000011272int
11273main ()
11274{
11275setpgrp(0,0);
11276 ;
11277 return 0;
11278}
11279_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011280if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011281
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011282$as_echo "#define SETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000011283
Guido van Rossum8eee56f1994-10-20 22:18:37 +000011284fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011285rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000011286
11287fi
11288done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000011289
Thomas Wouters3a584202000-08-05 23:28:51 +000011290for ac_func in gettimeofday
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011291do :
11292 ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011293if test "x$ac_cv_func_gettimeofday" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011294 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011295#define HAVE_GETTIMEOFDAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011296_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011297 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011298/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000011299#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011300int
11301main ()
11302{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011303gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000011304 ;
11305 return 0;
11306}
11307_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011308if ac_fn_c_try_compile "$LINENO"; then :
11309
Guido van Rossum627b2d71993-12-24 10:39:16 +000011310else
Skip Montanaro6dead952003-09-25 14:50:04 +000011311
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011312$as_echo "#define GETTIMEOFDAY_NO_TZ 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000011313
Martin v. Löwis11437992002-04-12 09:54:03 +000011314
Guido van Rossum627b2d71993-12-24 10:39:16 +000011315fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011316rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011317
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011318fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011319done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011320
Michael W. Hudson54241132001-12-07 15:38:26 +000011321
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011322{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for major" >&5
11323$as_echo_n "checking for major... " >&6; }
11324cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011325/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011326
Neal Norwitz6eb37f02003-02-23 23:28:15 +000011327#if defined(MAJOR_IN_MKDEV)
11328#include <sys/mkdev.h>
11329#elif defined(MAJOR_IN_SYSMACROS)
11330#include <sys/sysmacros.h>
11331#else
11332#include <sys/types.h>
11333#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011334
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011335int
11336main ()
11337{
11338
11339 makedev(major(0),minor(0));
11340
11341 ;
11342 return 0;
11343}
11344_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011345if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011346
11347
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011348$as_echo "#define HAVE_DEVICE_MACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011349
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011350 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11351$as_echo "yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011352
11353else
Skip Montanaro6dead952003-09-25 14:50:04 +000011354
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011355 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11356$as_echo "no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011357
11358fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011359rm -f core conftest.err conftest.$ac_objext \
11360 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000011361
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011362# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000011363# for [no]getaddrinfo in netdb.h.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011364{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
11365$as_echo_n "checking for getaddrinfo... " >&6; }
11366cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011367/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011368
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000011369#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011370#include <sys/socket.h>
11371#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000011372#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011373
Martin v. Löwis11437992002-04-12 09:54:03 +000011374int
11375main ()
11376{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011377getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000011378 ;
11379 return 0;
11380}
11381_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011382if ac_fn_c_try_link "$LINENO"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011383 have_getaddrinfo=yes
11384else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011385 have_getaddrinfo=no
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011386fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011387rm -f core conftest.err conftest.$ac_objext \
11388 conftest$ac_exeext conftest.$ac_ext
11389{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getaddrinfo" >&5
11390$as_echo "$have_getaddrinfo" >&6; }
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011391if test $have_getaddrinfo = yes
11392then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011393 { $as_echo "$as_me:${as_lineno-$LINENO}: checking getaddrinfo bug" >&5
11394$as_echo_n "checking getaddrinfo bug... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011395 if ${ac_cv_buggy_getaddrinfo+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011396 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011397else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011398 if test "$cross_compiling" = yes; then :
doko@python.orgd65e2ba2013-01-31 23:52:03 +010011399
11400if test "${enable_ipv6+set}" = set; then
11401 ac_cv_buggy_getaddrinfo="no -- configured with --(en|dis)able-ipv6"
11402else
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011403 ac_cv_buggy_getaddrinfo=yes
doko@python.orgd65e2ba2013-01-31 23:52:03 +010011404fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011405else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011406 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011407/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011408
Stefan Krah0afe4e42012-11-22 23:56:51 +010011409#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011410#include <sys/types.h>
11411#include <netdb.h>
11412#include <string.h>
11413#include <sys/socket.h>
11414#include <netinet/in.h>
11415
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011416int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011417{
11418 int passive, gaierr, inet4 = 0, inet6 = 0;
11419 struct addrinfo hints, *ai, *aitop;
11420 char straddr[INET6_ADDRSTRLEN], strport[16];
11421
11422 for (passive = 0; passive <= 1; passive++) {
11423 memset(&hints, 0, sizeof(hints));
11424 hints.ai_family = AF_UNSPEC;
11425 hints.ai_flags = passive ? AI_PASSIVE : 0;
11426 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000011427 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011428 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
11429 (void)gai_strerror(gaierr);
11430 goto bad;
11431 }
11432 for (ai = aitop; ai; ai = ai->ai_next) {
11433 if (ai->ai_addr == NULL ||
11434 ai->ai_addrlen == 0 ||
11435 getnameinfo(ai->ai_addr, ai->ai_addrlen,
11436 straddr, sizeof(straddr), strport, sizeof(strport),
11437 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
11438 goto bad;
11439 }
11440 switch (ai->ai_family) {
11441 case AF_INET:
11442 if (strcmp(strport, "54321") != 0) {
11443 goto bad;
11444 }
11445 if (passive) {
11446 if (strcmp(straddr, "0.0.0.0") != 0) {
11447 goto bad;
11448 }
11449 } else {
11450 if (strcmp(straddr, "127.0.0.1") != 0) {
11451 goto bad;
11452 }
11453 }
11454 inet4++;
11455 break;
11456 case AF_INET6:
11457 if (strcmp(strport, "54321") != 0) {
11458 goto bad;
11459 }
11460 if (passive) {
11461 if (strcmp(straddr, "::") != 0) {
11462 goto bad;
11463 }
11464 } else {
11465 if (strcmp(straddr, "::1") != 0) {
11466 goto bad;
11467 }
11468 }
11469 inet6++;
11470 break;
11471 case AF_UNSPEC:
11472 goto bad;
11473 break;
11474 default:
11475 /* another family support? */
11476 break;
11477 }
11478 }
11479 }
11480
11481 if (!(inet4 == 0 || inet4 == 2))
11482 goto bad;
11483 if (!(inet6 == 0 || inet6 == 2))
11484 goto bad;
11485
11486 if (aitop)
11487 freeaddrinfo(aitop);
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011488 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011489
11490 bad:
11491 if (aitop)
11492 freeaddrinfo(aitop);
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011493 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011494}
11495
Martin v. Löwis11437992002-04-12 09:54:03 +000011496_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011497if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011498 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011499else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011500 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011501fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011502rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11503 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011504fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011505
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011506fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011507
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011508fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011509
Benjamin Peterson75fed812010-11-01 01:47:19 +000011510{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_buggy_getaddrinfo" >&5
11511$as_echo "$ac_cv_buggy_getaddrinfo" >&6; }
11512
Mark Dickinson0ef0b912009-12-31 21:11:48 +000011513if test $have_getaddrinfo = no -o "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011514then
11515 if test $ipv6 = yes
11516 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011517 echo 'Fatal: You must get working getaddrinfo() function.'
11518 echo ' or you can specify "--disable-ipv6"'.
11519 exit 1
11520 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011521else
Martin v. Löwis11437992002-04-12 09:54:03 +000011522
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011523$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011524
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011525fi
Benjamin Peterson75fed812010-11-01 01:47:19 +000011526
Jack Jansen9a66b6d2001-08-08 13:56:14 +000011527for ac_func in getnameinfo
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011528do :
11529 ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011530if test "x$ac_cv_func_getnameinfo" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011531 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011532#define HAVE_GETNAMEINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011533_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011534
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011535fi
11536done
11537
Michael W. Hudson54241132001-12-07 15:38:26 +000011538
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011539# checks for structures
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011540{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
11541$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011542if ${ac_cv_header_time+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011543 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011544else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011545 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011546/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011547#include <sys/types.h>
11548#include <sys/time.h>
11549#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011550
Martin v. Löwis11437992002-04-12 09:54:03 +000011551int
11552main ()
11553{
11554if ((struct tm *) 0)
11555return 0;
11556 ;
11557 return 0;
11558}
11559_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011560if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011561 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000011562else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011563 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011564fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011565rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011566fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011567{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
11568$as_echo "$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000011569if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011570
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011571$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011572
11573fi
11574
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011575{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
11576$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011577if ${ac_cv_struct_tm+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011578 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011579else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011580 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011581/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011582#include <sys/types.h>
11583#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011584
Martin v. Löwis11437992002-04-12 09:54:03 +000011585int
11586main ()
11587{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011588struct tm tm;
11589 int *p = &tm.tm_sec;
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011590 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000011591 ;
11592 return 0;
11593}
11594_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011595if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011596 ac_cv_struct_tm=time.h
11597else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011598 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011599fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011600rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011601fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011602{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
11603$as_echo "$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000011604if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011605
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011606$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011607
11608fi
11609
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011610ac_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 +000011611#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000011612
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011613"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011614if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011615
11616cat >>confdefs.h <<_ACEOF
11617#define HAVE_STRUCT_TM_TM_ZONE 1
11618_ACEOF
11619
11620
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011621fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011622
Martin v. Löwis11437992002-04-12 09:54:03 +000011623if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
11624
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011625$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011626
11627else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011628 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
11629"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011630if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011631 ac_have_decl=1
Martin v. Löwiseba40652007-08-30 20:10:57 +000011632else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011633 ac_have_decl=0
Martin v. Löwiseba40652007-08-30 20:10:57 +000011634fi
11635
Martin v. Löwiseba40652007-08-30 20:10:57 +000011636cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011637#define HAVE_DECL_TZNAME $ac_have_decl
Martin v. Löwiseba40652007-08-30 20:10:57 +000011638_ACEOF
11639
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011640 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
11641$as_echo_n "checking for tzname... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011642if ${ac_cv_var_tzname+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011643 $as_echo_n "(cached) " >&6
Martin v. Löwiseba40652007-08-30 20:10:57 +000011644else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011645 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011646/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000011647#include <time.h>
Martin v. Löwiseba40652007-08-30 20:10:57 +000011648#if !HAVE_DECL_TZNAME
11649extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000011650#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011651
Martin v. Löwis11437992002-04-12 09:54:03 +000011652int
11653main ()
11654{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011655return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000011656 ;
11657 return 0;
11658}
11659_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011660if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011661 ac_cv_var_tzname=yes
11662else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011663 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011664fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011665rm -f core conftest.err conftest.$ac_objext \
11666 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000011667fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011668{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
11669$as_echo "$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000011670 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011671
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011672$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000011673
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011674 fi
11675fi
11676
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011677ac_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 +010011678if test "x$ac_cv_member_struct_stat_st_rdev" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011679
11680cat >>confdefs.h <<_ACEOF
11681#define HAVE_STRUCT_STAT_ST_RDEV 1
11682_ACEOF
11683
11684
Guido van Rossum98bf58f2001-10-18 20:34:25 +000011685fi
11686
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011687ac_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 +010011688if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000011689
Martin v. Löwis11437992002-04-12 09:54:03 +000011690cat >>confdefs.h <<_ACEOF
11691#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
11692_ACEOF
11693
11694
Guido van Rossum98bf58f2001-10-18 20:34:25 +000011695fi
11696
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011697ac_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 +010011698if test "x$ac_cv_member_struct_stat_st_flags" = xyes; then :
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000011699
11700cat >>confdefs.h <<_ACEOF
11701#define HAVE_STRUCT_STAT_ST_FLAGS 1
11702_ACEOF
11703
11704
11705fi
11706
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011707ac_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 +010011708if test "x$ac_cv_member_struct_stat_st_gen" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000011709
11710cat >>confdefs.h <<_ACEOF
11711#define HAVE_STRUCT_STAT_ST_GEN 1
11712_ACEOF
11713
11714
11715fi
11716
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011717ac_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 +010011718if test "x$ac_cv_member_struct_stat_st_birthtime" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000011719
11720cat >>confdefs.h <<_ACEOF
11721#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
11722_ACEOF
11723
11724
11725fi
11726
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011727ac_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 +010011728if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000011729
Martin v. Löwis11437992002-04-12 09:54:03 +000011730cat >>confdefs.h <<_ACEOF
11731#define HAVE_STRUCT_STAT_ST_BLOCKS 1
11732_ACEOF
11733
11734
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011735$as_echo "#define HAVE_ST_BLOCKS 1" >>confdefs.h
Guido van Rossum98bf58f2001-10-18 20:34:25 +000011736
11737else
Martin v. Löwiseba40652007-08-30 20:10:57 +000011738 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000011739 *" fileblocks.$ac_objext "* ) ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000011740 *) LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
11741 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000011742esac
11743
Guido van Rossum98bf58f2001-10-18 20:34:25 +000011744fi
11745
Michael W. Hudson54241132001-12-07 15:38:26 +000011746
Martin v. Löwis11437992002-04-12 09:54:03 +000011747
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011748{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5
11749$as_echo_n "checking for time.h that defines altzone... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011750if ${ac_cv_header_time_altzone+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011751 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011752else
Matthias Klosec511b472010-05-08 11:01:39 +000011753
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011754 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011755/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000011756#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011757int
11758main ()
11759{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011760return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000011761 ;
11762 return 0;
11763}
11764_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011765if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011766 ac_cv_header_time_altzone=yes
11767else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011768 ac_cv_header_time_altzone=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011769fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011770rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosec511b472010-05-08 11:01:39 +000011771
Martin v. Löwiseba40652007-08-30 20:10:57 +000011772fi
11773
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011774{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5
11775$as_echo "$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011776if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011777
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011778$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011779
11780fi
11781
Guido van Rossumda88dad1995-01-26 00:46:29 +000011782was_it_defined=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011783{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
11784$as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
11785cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011786/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000011787
11788#include <sys/types.h>
11789#include <sys/select.h>
11790#include <sys/time.h>
11791
Martin v. Löwis11437992002-04-12 09:54:03 +000011792int
11793main ()
11794{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011795;
Martin v. Löwis11437992002-04-12 09:54:03 +000011796 ;
11797 return 0;
11798}
11799_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011800if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011801
11802
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011803$as_echo "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011804
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011805 was_it_defined=yes
11806
Martin v. Löwiseba40652007-08-30 20:10:57 +000011807fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011808rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011809{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
11810$as_echo "$was_it_defined" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000011811
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011812{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for addrinfo" >&5
11813$as_echo_n "checking for addrinfo... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011814if ${ac_cv_struct_addrinfo+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011815 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011816else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011817 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011818/* end confdefs.h. */
Matthias Klosec511b472010-05-08 11:01:39 +000011819#include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011820int
11821main ()
11822{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011823struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000011824 ;
11825 return 0;
11826}
11827_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011828if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011829 ac_cv_struct_addrinfo=yes
11830else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011831 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011832fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011833rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11834fi
11835
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011836{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5
11837$as_echo "$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011838if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011839
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011840$as_echo "#define HAVE_ADDRINFO 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011841
11842fi
11843
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011844{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5
11845$as_echo_n "checking for sockaddr_storage... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011846if ${ac_cv_struct_sockaddr_storage+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011847 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011848else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011849 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011850/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011851
11852# include <sys/types.h>
11853# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011854int
11855main ()
11856{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011857struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000011858 ;
11859 return 0;
11860}
11861_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011862if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011863 ac_cv_struct_sockaddr_storage=yes
11864else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011865 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011866fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011867rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11868fi
11869
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011870{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5
11871$as_echo "$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011872if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011873
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011874$as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011875
11876fi
11877
Guido van Rossum627b2d71993-12-24 10:39:16 +000011878# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000011879
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011880{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
11881$as_echo_n "checking whether char is unsigned... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011882if ${ac_cv_c_char_unsigned+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011883 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000011884else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011885 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011886/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011887$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000011888int
11889main ()
11890{
11891static int test_array [1 - 2 * !(((char) -1) < 0)];
Charles-François Natalibe2b9072013-01-08 19:47:00 +010011892test_array [0] = 0;
11893return test_array [0];
Martin v. Löwis11437992002-04-12 09:54:03 +000011894
11895 ;
11896 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000011897}
Martin v. Löwis11437992002-04-12 09:54:03 +000011898_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011899if ac_fn_c_try_compile "$LINENO"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000011900 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000011901else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011902 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011903fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011904rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000011905fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011906{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
11907$as_echo "$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011908if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011909 $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011910
11911fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000011912
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011913{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
11914$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011915if ${ac_cv_c_const+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011916 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000011917else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011918 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011919/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011920
Martin v. Löwis11437992002-04-12 09:54:03 +000011921int
11922main ()
11923{
Charles-François Natalibe2b9072013-01-08 19:47:00 +010011924
Martin v. Löwis11437992002-04-12 09:54:03 +000011925#ifndef __cplusplus
Charles-François Natalibe2b9072013-01-08 19:47:00 +010011926 /* Ultrix mips cc rejects this sort of thing. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011927 typedef int charset[2];
Charles-François Natalibe2b9072013-01-08 19:47:00 +010011928 const charset cs = { 0, 0 };
Martin v. Löwis11437992002-04-12 09:54:03 +000011929 /* SunOS 4.1.1 cc rejects this. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000011930 char const *const *pcpcc;
11931 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000011932 /* NEC SVR4.0.2 mips cc rejects this. */
11933 struct point {int x, y;};
11934 static struct point const zero = {0,0};
11935 /* AIX XL C 1.02.0.0 rejects this.
11936 It does not let you subtract one const X* pointer from another in
11937 an arm of an if-expression whose if-part is not a constant
11938 expression */
11939 const char *g = "string";
Martin v. Löwiseba40652007-08-30 20:10:57 +000011940 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000011941 /* HPUX 7.0 cc rejects these. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000011942 ++pcpcc;
11943 ppc = (char**) pcpcc;
11944 pcpcc = (char const *const *) ppc;
Charles-François Natalibe2b9072013-01-08 19:47:00 +010011945 { /* SCO 3.2v4 cc rejects this sort of thing. */
11946 char tx;
11947 char *t = &tx;
Martin v. Löwis11437992002-04-12 09:54:03 +000011948 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011949
Martin v. Löwis11437992002-04-12 09:54:03 +000011950 *t++ = 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +000011951 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011952 }
11953 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
11954 int x[] = {25, 17};
11955 const int *foo = &x[0];
11956 ++foo;
11957 }
11958 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
11959 typedef const int *iptr;
11960 iptr p = 0;
11961 ++p;
11962 }
Charles-François Natalibe2b9072013-01-08 19:47:00 +010011963 { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
Martin v. Löwis11437992002-04-12 09:54:03 +000011964 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
Charles-François Natalibe2b9072013-01-08 19:47:00 +010011965 struct s { int j; const int *ap[3]; } bx;
11966 struct s *b = &bx; b->j = 5;
Martin v. Löwis11437992002-04-12 09:54:03 +000011967 }
11968 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
11969 const int foo = 10;
Martin v. Löwiseba40652007-08-30 20:10:57 +000011970 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011971 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000011972 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000011973#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000011974
Martin v. Löwis11437992002-04-12 09:54:03 +000011975 ;
11976 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000011977}
Martin v. Löwis11437992002-04-12 09:54:03 +000011978_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011979if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011980 ac_cv_c_const=yes
11981else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011982 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011983fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011984rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011985fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011986{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
11987$as_echo "$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011988if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011989
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011990$as_echo "#define const /**/" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011991
11992fi
11993
Michael W. Hudson54241132001-12-07 15:38:26 +000011994
Guido van Rossumda88dad1995-01-26 00:46:29 +000011995works=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011996{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5
11997$as_echo_n "checking for working volatile... " >&6; }
11998cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011999/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000012000
Martin v. Löwis11437992002-04-12 09:54:03 +000012001int
12002main ()
12003{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012004volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012005 ;
12006 return 0;
12007}
12008_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012009if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000012010 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000012011else
Skip Montanaro6dead952003-09-25 14:50:04 +000012012
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012013$as_echo "#define volatile /**/" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000012014
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012015
Guido van Rossum627b2d71993-12-24 10:39:16 +000012016fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012017rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012018{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
12019$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000012020
Guido van Rossumda88dad1995-01-26 00:46:29 +000012021works=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012022{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working signed char" >&5
12023$as_echo_n "checking for working signed char... " >&6; }
12024cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012025/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000012026
Martin v. Löwis11437992002-04-12 09:54:03 +000012027int
12028main ()
12029{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012030signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000012031 ;
12032 return 0;
12033}
12034_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012035if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000012036 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000012037else
Skip Montanaro6dead952003-09-25 14:50:04 +000012038
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012039$as_echo "#define signed /**/" >>confdefs.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000012040
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012041
Guido van Rossum7f43da71994-08-01 12:15:30 +000012042fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012043rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012044{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
12045$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000012046
Guido van Rossumda88dad1995-01-26 00:46:29 +000012047have_prototypes=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012048{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototypes" >&5
12049$as_echo_n "checking for prototypes... " >&6; }
12050cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012051/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012052int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012053int
12054main ()
12055{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012056return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000012057 ;
12058 return 0;
12059}
12060_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012061if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012062
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012063$as_echo "#define HAVE_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012064
Matthias Klosec511b472010-05-08 11:01:39 +000012065 have_prototypes=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000012066fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012067rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012068{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_prototypes" >&5
12069$as_echo "$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012070
Guido van Rossumda88dad1995-01-26 00:46:29 +000012071works=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012072{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for variable length prototypes and stdarg.h" >&5
12073$as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; }
12074cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012075/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012076
12077#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000012078int foo(int x, ...) {
12079 va_list va;
12080 va_start(va, x);
12081 va_arg(va, int);
12082 va_arg(va, char *);
12083 va_arg(va, double);
12084 return 0;
12085}
Guido van Rossum7f43da71994-08-01 12:15:30 +000012086
Martin v. Löwis11437992002-04-12 09:54:03 +000012087int
12088main ()
12089{
Guido van Rossum90eea071996-08-30 20:58:57 +000012090return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000012091 ;
12092 return 0;
12093}
12094_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012095if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012096
12097
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012098$as_echo "#define HAVE_STDARG_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012099
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012100 works=yes
12101
Guido van Rossum627b2d71993-12-24 10:39:16 +000012102fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012103rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012104{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
12105$as_echo "$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012106
Martin v. Löwisd6320502004-08-12 13:45:08 +000012107# check for socketpair
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012108{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair" >&5
12109$as_echo_n "checking for socketpair... " >&6; }
12110cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000012111/* end confdefs.h. */
12112
12113#include <sys/types.h>
12114#include <sys/socket.h>
12115
12116int
12117main ()
12118{
12119void *x=socketpair
12120 ;
12121 return 0;
12122}
12123_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012124if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd6320502004-08-12 13:45:08 +000012125
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012126$as_echo "#define HAVE_SOCKETPAIR 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +000012127
Matthias Klosec511b472010-05-08 11:01:39 +000012128 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012129$as_echo "yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000012130else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012131 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12132$as_echo "no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000012133
12134fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012135rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000012136
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012137# check if sockaddr has sa_len member
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012138{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr has sa_len member" >&5
12139$as_echo_n "checking if sockaddr has sa_len member... " >&6; }
12140cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012141/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012142#include <sys/types.h>
12143#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012144int
12145main ()
12146{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012147struct sockaddr x;
12148x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012149 ;
12150 return 0;
12151}
12152_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012153if ac_fn_c_try_compile "$LINENO"; then :
12154 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12155$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012156
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012157$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012158
12159else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012160 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12161$as_echo "no" >&6; }
Matthias Klosec511b472010-05-08 11:01:39 +000012162
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012163fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012164rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012165
Guido van Rossumda88dad1995-01-26 00:46:29 +000012166va_list_is_array=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012167{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether va_list is an array" >&5
12168$as_echo_n "checking whether va_list is an array... " >&6; }
12169cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012170/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012171
12172#ifdef HAVE_STDARG_PROTOTYPES
12173#include <stdarg.h>
12174#else
12175#include <varargs.h>
12176#endif
12177
Martin v. Löwis11437992002-04-12 09:54:03 +000012178int
12179main ()
12180{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012181va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000012182 ;
12183 return 0;
12184}
12185_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012186if ac_fn_c_try_compile "$LINENO"; then :
12187
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012188else
Skip Montanaro6dead952003-09-25 14:50:04 +000012189
Martin v. Löwis11437992002-04-12 09:54:03 +000012190
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012191$as_echo "#define VA_LIST_IS_ARRAY 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012192
Guido van Rossumda88dad1995-01-26 00:46:29 +000012193 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012194
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012195fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012196rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012197{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $va_list_is_array" >&5
12198$as_echo "$va_list_is_array" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012199
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012200# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000012201
12202
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012203ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r"
Matthias Klose3cef2a92012-03-14 23:39:33 +010012204if test "x$ac_cv_func_gethostbyname_r" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012205
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012206 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000012207
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012208 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 6 args" >&5
12209$as_echo_n "checking gethostbyname_r with 6 args... " >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012210 OLD_CFLAGS=$CFLAGS
12211 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012212 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012213/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012214
12215# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012216
Martin v. Löwis11437992002-04-12 09:54:03 +000012217int
12218main ()
12219{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012220
12221 char *name;
12222 struct hostent *he, *res;
12223 char buffer[2048];
12224 int buflen = 2048;
12225 int h_errnop;
12226
12227 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000012228
12229 ;
12230 return 0;
12231}
12232_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012233if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012234
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012235 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000012236
Martin v. Löwis11437992002-04-12 09:54:03 +000012237
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012238$as_echo "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012239
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012240 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12241$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012242
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012243else
Skip Montanaro6dead952003-09-25 14:50:04 +000012244
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012245 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12246$as_echo "no" >&6; }
12247 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 5 args" >&5
12248$as_echo_n "checking gethostbyname_r with 5 args... " >&6; }
12249 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012250/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012251
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012252# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012253
Martin v. Löwis11437992002-04-12 09:54:03 +000012254int
12255main ()
12256{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012257
12258 char *name;
12259 struct hostent *he;
Matthias Klosec511b472010-05-08 11:01:39 +000012260 char buffer[2048];
12261 int buflen = 2048;
12262 int h_errnop;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012263
Matthias Klosec511b472010-05-08 11:01:39 +000012264 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000012265
12266 ;
12267 return 0;
12268}
12269_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012270if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012271
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012272 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000012273
Martin v. Löwis11437992002-04-12 09:54:03 +000012274
Matthias Klosec511b472010-05-08 11:01:39 +000012275$as_echo "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012276
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012277 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12278$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012279
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012280else
Skip Montanaro6dead952003-09-25 14:50:04 +000012281
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012282 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12283$as_echo "no" >&6; }
Matthias Klosec511b472010-05-08 11:01:39 +000012284 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 3 args" >&5
12285$as_echo_n "checking gethostbyname_r with 3 args... " >&6; }
12286 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12287/* end confdefs.h. */
12288
12289# include <netdb.h>
12290
12291int
12292main ()
12293{
12294
12295 char *name;
12296 struct hostent *he;
12297 struct hostent_data data;
12298
12299 (void) gethostbyname_r(name, he, &data);
12300
12301 ;
12302 return 0;
12303}
12304_ACEOF
12305if ac_fn_c_try_compile "$LINENO"; then :
12306
12307 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
12308
12309
12310$as_echo "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h
12311
12312 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12313$as_echo "yes" >&6; }
12314
12315else
12316
12317 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12318$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012319
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012320fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012321rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012322
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012323fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012324rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012325
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012326fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012327rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012328 CFLAGS=$OLD_CFLAGS
12329
12330else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012331
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012332 for ac_func in gethostbyname
12333do :
12334 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
Matthias Klose3cef2a92012-03-14 23:39:33 +010012335if test "x$ac_cv_func_gethostbyname" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012336 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012337#define HAVE_GETHOSTBYNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012338_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012339
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012340fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012341done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012342
Michael W. Hudson54241132001-12-07 15:38:26 +000012343
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012344fi
12345
Michael W. Hudson54241132001-12-07 15:38:26 +000012346
12347
12348
12349
12350
12351
Guido van Rossum627b2d71993-12-24 10:39:16 +000012352# checks for system services
12353# (none yet)
12354
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012355# Linux requires this for correct f.p. operations
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012356ac_fn_c_check_func "$LINENO" "__fpu_control" "ac_cv_func___fpu_control"
Matthias Klose3cef2a92012-03-14 23:39:33 +010012357if test "x$ac_cv_func___fpu_control" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012358
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000012359else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012360 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5
12361$as_echo_n "checking for __fpu_control in -lieee... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012362if ${ac_cv_lib_ieee___fpu_control+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012363 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012364else
Martin v. Löwis11437992002-04-12 09:54:03 +000012365 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012366LIBS="-lieee $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012367cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012368/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012369
Martin v. Löwiseba40652007-08-30 20:10:57 +000012370/* Override any GCC internal prototype to avoid an error.
12371 Use char because int might match the return type of a GCC
12372 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012373#ifdef __cplusplus
12374extern "C"
12375#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012376char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012377int
12378main ()
12379{
Martin v. Löwiseba40652007-08-30 20:10:57 +000012380return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012381 ;
12382 return 0;
12383}
12384_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012385if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012386 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000012387else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012388 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012389fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012390rm -f core conftest.err conftest.$ac_objext \
12391 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012392LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012393fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012394{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee___fpu_control" >&5
12395$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012396if test "x$ac_cv_lib_ieee___fpu_control" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012397 cat >>confdefs.h <<_ACEOF
12398#define HAVE_LIBIEEE 1
12399_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012400
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012401 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012402
Guido van Rossum627b2d71993-12-24 10:39:16 +000012403fi
12404
Michael W. Hudson54241132001-12-07 15:38:26 +000012405
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000012406fi
12407
Michael W. Hudson54241132001-12-07 15:38:26 +000012408
Guido van Rossum7f253911997-05-09 02:42:48 +000012409# Check for --with-fpectl
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012410{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-fpectl" >&5
12411$as_echo_n "checking for --with-fpectl... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012412
Martin v. Löwiseba40652007-08-30 20:10:57 +000012413# Check whether --with-fpectl was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012414if test "${with_fpectl+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +000012415 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000012416if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000012417then
12418
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012419$as_echo "#define WANT_SIGFPE_HANDLER 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012420
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012421 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12422$as_echo "yes" >&6; }
12423else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12424$as_echo "no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000012425fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000012426else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012427 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12428$as_echo "no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012429fi
12430
Guido van Rossum7f253911997-05-09 02:42:48 +000012431
Guido van Rossum7f43da71994-08-01 12:15:30 +000012432# check for --with-libm=...
12433
Guido van Rossum563e7081996-09-10 18:20:48 +000012434case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000012435Darwin) ;;
Guido van Rossumec95c7b1998-08-04 17:59:56 +000012436BeOS) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000012437*) LIBM=-lm
12438esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012439{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libm=STRING" >&5
12440$as_echo_n "checking for --with-libm=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012441
Martin v. Löwiseba40652007-08-30 20:10:57 +000012442# Check whether --with-libm was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012443if test "${with_libm+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +000012444 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000012445if test "$withval" = no
12446then LIBM=
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012447 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBM empty" >&5
12448$as_echo "force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000012449elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000012450then LIBM=$withval
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012451 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBM=\"$withval\"" >&5
12452$as_echo "set LIBM=\"$withval\"" >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +000012453else as_fn_error $? "proper usage is --with-libm=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000012454fi
Guido van Rossum7f253911997-05-09 02:42:48 +000012455else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012456 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBM=\"$LIBM\"" >&5
12457$as_echo "default LIBM=\"$LIBM\"" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012458fi
12459
Guido van Rossum7f43da71994-08-01 12:15:30 +000012460
12461# check for --with-libc=...
12462
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012463{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libc=STRING" >&5
12464$as_echo_n "checking for --with-libc=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012465
Martin v. Löwiseba40652007-08-30 20:10:57 +000012466# Check whether --with-libc was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012467if test "${with_libc+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +000012468 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000012469if test "$withval" = no
12470then LIBC=
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012471 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBC empty" >&5
12472$as_echo "force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000012473elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000012474then LIBC=$withval
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012475 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBC=\"$withval\"" >&5
12476$as_echo "set LIBC=\"$withval\"" >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +000012477else as_fn_error $? "proper usage is --with-libc=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000012478fi
Guido van Rossum7f253911997-05-09 02:42:48 +000012479else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012480 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBC=\"$LIBC\"" >&5
12481$as_echo "default LIBC=\"$LIBC\"" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012482fi
12483
Guido van Rossum7f43da71994-08-01 12:15:30 +000012484
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012485# **************************************************
12486# * Check for various properties of floating point *
12487# **************************************************
Mark Dickinson265d7382008-04-21 22:32:24 +000012488
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012489{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are little-endian IEEE 754 binary64" >&5
12490$as_echo_n "checking whether C doubles are little-endian IEEE 754 binary64... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012491if ${ac_cv_little_endian_double+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012492 $as_echo_n "(cached) " >&6
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012493else
12494
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012495if test "$cross_compiling" = yes; then :
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012496 ac_cv_little_endian_double=no
12497else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012498 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012499/* end confdefs.h. */
12500
12501#include <string.h>
12502int main() {
12503 double x = 9006104071832581.0;
12504 if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
12505 return 0;
12506 else
12507 return 1;
12508}
12509
12510_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012511if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012512 ac_cv_little_endian_double=yes
12513else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012514 ac_cv_little_endian_double=no
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012515fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012516rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12517 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012518fi
12519
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012520fi
12521
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012522{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_little_endian_double" >&5
12523$as_echo "$ac_cv_little_endian_double" >&6; }
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012524if test "$ac_cv_little_endian_double" = yes
12525then
12526
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012527$as_echo "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012528
12529fi
12530
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012531{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are big-endian IEEE 754 binary64" >&5
12532$as_echo_n "checking whether C doubles are big-endian IEEE 754 binary64... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012533if ${ac_cv_big_endian_double+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012534 $as_echo_n "(cached) " >&6
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012535else
12536
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012537if test "$cross_compiling" = yes; then :
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012538 ac_cv_big_endian_double=no
12539else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012540 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012541/* end confdefs.h. */
12542
12543#include <string.h>
12544int main() {
12545 double x = 9006104071832581.0;
12546 if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
12547 return 0;
12548 else
12549 return 1;
12550}
12551
12552_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012553if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012554 ac_cv_big_endian_double=yes
12555else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012556 ac_cv_big_endian_double=no
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012557fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012558rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12559 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012560fi
12561
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012562fi
12563
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012564{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_big_endian_double" >&5
12565$as_echo "$ac_cv_big_endian_double" >&6; }
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012566if test "$ac_cv_big_endian_double" = yes
12567then
12568
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012569$as_echo "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012570
12571fi
12572
12573# Some ARM platforms use a mixed-endian representation for doubles.
12574# While Python doesn't currently have full support for these platforms
12575# (see e.g., issue 1762561), we can at least make sure that float <-> string
12576# conversions work.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012577{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5
12578$as_echo_n "checking whether C doubles are ARM mixed-endian IEEE 754 binary64... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012579if ${ac_cv_mixed_endian_double+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012580 $as_echo_n "(cached) " >&6
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012581else
12582
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012583if test "$cross_compiling" = yes; then :
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012584 ac_cv_mixed_endian_double=no
12585else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012586 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012587/* end confdefs.h. */
12588
12589#include <string.h>
12590int main() {
12591 double x = 9006104071832581.0;
12592 if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
12593 return 0;
12594 else
12595 return 1;
12596}
12597
12598_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012599if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012600 ac_cv_mixed_endian_double=yes
12601else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012602 ac_cv_mixed_endian_double=no
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012603fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012604rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12605 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012606fi
12607
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012608fi
12609
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012610{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mixed_endian_double" >&5
12611$as_echo "$ac_cv_mixed_endian_double" >&6; }
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012612if test "$ac_cv_mixed_endian_double" = yes
12613then
12614
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012615$as_echo "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012616
12617fi
12618
12619# The short float repr introduced in Python 3.1 requires the
12620# correctly-rounded string <-> double conversion functions from
12621# Python/dtoa.c, which in turn require that the FPU uses 53-bit
12622# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsona548dee2009-11-15 13:12:43 +000012623# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012624# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsona548dee2009-11-15 13:12:43 +000012625
12626# This inline assembler syntax may also work for suncc and icc,
12627# so we try it on all platforms.
12628
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012629{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
12630$as_echo_n "checking whether we can use gcc inline assembler to get and set x87 control word... " >&6; }
12631cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012632/* end confdefs.h. */
12633
12634int
12635main ()
12636{
12637
Mark Dickinsona548dee2009-11-15 13:12:43 +000012638 unsigned short cw;
12639 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
12640 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012641
12642 ;
12643 return 0;
12644}
12645_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012646if ac_fn_c_try_compile "$LINENO"; then :
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012647 have_gcc_asm_for_x87=yes
12648else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012649 have_gcc_asm_for_x87=no
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012650fi
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012651rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012652{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x87" >&5
12653$as_echo "$have_gcc_asm_for_x87" >&6; }
Mark Dickinsona548dee2009-11-15 13:12:43 +000012654if test "$have_gcc_asm_for_x87" = yes
12655then
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012656
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012657$as_echo "#define HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012658
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012659fi
Mark Dickinson7a3d8642008-04-22 00:54:27 +000012660
Mark Dickinson04b27232009-01-04 12:29:36 +000012661# Detect whether system arithmetic is subject to x87-style double
12662# rounding issues. The result of this test has little meaning on non
12663# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
12664# mode is round-to-nearest and double rounding issues are present, and
12665# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012666{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x87-style double rounding" >&5
12667$as_echo_n "checking for x87-style double rounding... " >&6; }
Mark Dickinson99abd142009-10-24 13:44:16 +000012668# $BASECFLAGS may affect the result
12669ac_save_cc="$CC"
12670CC="$CC $BASECFLAGS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012671if test "$cross_compiling" = yes; then :
Mark Dickinson04b27232009-01-04 12:29:36 +000012672 ac_cv_x87_double_rounding=no
12673else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012674 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson04b27232009-01-04 12:29:36 +000012675/* end confdefs.h. */
12676
12677#include <stdlib.h>
12678#include <math.h>
12679int main() {
12680 volatile double x, y, z;
12681 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
12682 x = 0.99999999999999989; /* 1-2**-53 */
12683 y = 1./x;
12684 if (y != 1.)
12685 exit(0);
12686 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
12687 x = 1e16;
12688 y = 2.99999;
12689 z = x + y;
12690 if (z != 1e16+4.)
12691 exit(0);
12692 /* both tests show evidence of double rounding */
12693 exit(1);
12694}
12695
12696_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012697if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson04b27232009-01-04 12:29:36 +000012698 ac_cv_x87_double_rounding=no
12699else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012700 ac_cv_x87_double_rounding=yes
Mark Dickinson04b27232009-01-04 12:29:36 +000012701fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012702rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12703 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson04b27232009-01-04 12:29:36 +000012704fi
12705
Mark Dickinson99abd142009-10-24 13:44:16 +000012706CC="$ac_save_cc"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012707{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5
12708$as_echo "$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson04b27232009-01-04 12:29:36 +000012709if test "$ac_cv_x87_double_rounding" = yes
12710then
12711
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012712$as_echo "#define X87_DOUBLE_ROUNDING 1" >>confdefs.h
Mark Dickinson04b27232009-01-04 12:29:36 +000012713
12714fi
12715
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012716# ************************************
12717# * Check for mathematical functions *
12718# ************************************
12719
12720LIBS_SAVE=$LIBS
12721LIBS="$LIBS $LIBM"
12722
Mark Dickinson265d7382008-04-21 22:32:24 +000012723# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
12724# -0. on some architectures.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012725{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether tanh preserves the sign of zero" >&5
12726$as_echo_n "checking whether tanh preserves the sign of zero... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012727if ${ac_cv_tanh_preserves_zero_sign+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012728 $as_echo_n "(cached) " >&6
Mark Dickinson265d7382008-04-21 22:32:24 +000012729else
12730
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012731if test "$cross_compiling" = yes; then :
Mark Dickinson265d7382008-04-21 22:32:24 +000012732 ac_cv_tanh_preserves_zero_sign=no
12733else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012734 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson265d7382008-04-21 22:32:24 +000012735/* end confdefs.h. */
12736
12737#include <math.h>
Mark Dickinson7a3d8642008-04-22 00:54:27 +000012738#include <stdlib.h>
Mark Dickinson265d7382008-04-21 22:32:24 +000012739int main() {
12740 /* return 0 if either negative zeros don't exist
12741 on this platform or if negative zeros exist
12742 and tanh(-0.) == -0. */
12743 if (atan2(0., -1.) == atan2(-0., -1.) ||
12744 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
12745 else exit(1);
12746}
12747
12748_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012749if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson265d7382008-04-21 22:32:24 +000012750 ac_cv_tanh_preserves_zero_sign=yes
12751else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012752 ac_cv_tanh_preserves_zero_sign=no
Mark Dickinson265d7382008-04-21 22:32:24 +000012753fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012754rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12755 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson265d7382008-04-21 22:32:24 +000012756fi
12757
Mark Dickinson265d7382008-04-21 22:32:24 +000012758fi
12759
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012760{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_tanh_preserves_zero_sign" >&5
12761$as_echo "$ac_cv_tanh_preserves_zero_sign" >&6; }
Mark Dickinson265d7382008-04-21 22:32:24 +000012762if test "$ac_cv_tanh_preserves_zero_sign" = yes
12763then
12764
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012765$as_echo "#define TANH_PRESERVES_ZERO_SIGN 1" >>confdefs.h
Mark Dickinson265d7382008-04-21 22:32:24 +000012766
12767fi
12768
Mark Dickinson65898e02009-09-05 10:27:00 +000012769for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012770do :
12771 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12772ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Georg Brandl71f4fbb2011-02-25 11:04:50 +000012773if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinson65898e02009-09-05 10:27:00 +000012774 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012775#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Mark Dickinson65898e02009-09-05 10:27:00 +000012776_ACEOF
12777
12778fi
12779done
12780
Mark Dickinson65898e02009-09-05 10:27:00 +000012781for ac_func in hypot lgamma log1p round tgamma
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012782do :
12783 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12784ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Georg Brandl71f4fbb2011-02-25 11:04:50 +000012785if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Christian Heimes0a8143f2007-12-18 23:22:54 +000012786 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012787#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Christian Heimes0a8143f2007-12-18 23:22:54 +000012788_ACEOF
12789
12790fi
12791done
12792
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012793ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
12794"
Matthias Klose3cef2a92012-03-14 23:39:33 +010012795if test "x$ac_cv_have_decl_isinf" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012796 ac_have_decl=1
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012797else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012798 ac_have_decl=0
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012799fi
12800
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012801cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012802#define HAVE_DECL_ISINF $ac_have_decl
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012803_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012804ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h>
12805"
Matthias Klose3cef2a92012-03-14 23:39:33 +010012806if test "x$ac_cv_have_decl_isnan" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012807 ac_have_decl=1
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012808else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012809 ac_have_decl=0
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012810fi
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012811
12812cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012813#define HAVE_DECL_ISNAN $ac_have_decl
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012814_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012815ac_fn_c_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include <math.h>
12816"
Matthias Klose3cef2a92012-03-14 23:39:33 +010012817if test "x$ac_cv_have_decl_isfinite" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012818 ac_have_decl=1
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012819else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012820 ac_have_decl=0
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012821fi
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012822
12823cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012824#define HAVE_DECL_ISFINITE $ac_have_decl
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012825_ACEOF
12826
12827
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000012828LIBS=$LIBS_SAVE
12829
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012830# For multiprocessing module, check that sem_open
12831# actually works. For FreeBSD versions <= 7.2,
12832# the kernel module that provides POSIX semaphores
12833# isn't loaded by default, so an attempt to call
12834# sem_open results in a 'Signal 12' error.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012835{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX semaphores are enabled" >&5
12836$as_echo_n "checking whether POSIX semaphores are enabled... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012837if ${ac_cv_posix_semaphores_enabled+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012838 $as_echo_n "(cached) " >&6
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012839else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012840 if test "$cross_compiling" = yes; then :
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012841 ac_cv_posix_semaphores_enabled=yes
12842else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012843 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012844/* end confdefs.h. */
12845
12846#include <unistd.h>
12847#include <fcntl.h>
12848#include <stdio.h>
12849#include <semaphore.h>
12850#include <sys/stat.h>
12851
12852int main(void) {
12853 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
12854 if (a == SEM_FAILED) {
12855 perror("sem_open");
12856 return 1;
12857 }
12858 sem_close(a);
Mark Dickinson59dc89e2009-12-13 21:06:06 +000012859 sem_unlink("/autoconf");
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012860 return 0;
12861}
12862
12863_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012864if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012865 ac_cv_posix_semaphores_enabled=yes
12866else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012867 ac_cv_posix_semaphores_enabled=no
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012868fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012869rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12870 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012871fi
12872
12873
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012874fi
12875
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012876{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_semaphores_enabled" >&5
12877$as_echo "$ac_cv_posix_semaphores_enabled" >&6; }
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012878if test $ac_cv_posix_semaphores_enabled = no
12879then
12880
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012881$as_echo "#define POSIX_SEMAPHORES_NOT_ENABLED 1" >>confdefs.h
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012882
12883fi
12884
12885# Multiprocessing check for broken sem_getvalue
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012886{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken sem_getvalue" >&5
12887$as_echo_n "checking for broken sem_getvalue... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012888if ${ac_cv_broken_sem_getvalue+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012889 $as_echo_n "(cached) " >&6
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012890else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012891 if test "$cross_compiling" = yes; then :
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012892 ac_cv_broken_sem_getvalue=yes
12893else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012894 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012895/* end confdefs.h. */
12896
12897#include <unistd.h>
12898#include <fcntl.h>
12899#include <stdio.h>
12900#include <semaphore.h>
12901#include <sys/stat.h>
12902
12903int main(void){
Mark Dickinson59dc89e2009-12-13 21:06:06 +000012904 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012905 int count;
12906 int res;
12907 if(a==SEM_FAILED){
12908 perror("sem_open");
12909 return 1;
12910
12911 }
12912 res = sem_getvalue(a, &count);
12913 sem_close(a);
Mark Dickinson59dc89e2009-12-13 21:06:06 +000012914 sem_unlink("/autocftw");
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012915 return res==-1 ? 1 : 0;
12916}
12917
12918_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012919if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012920 ac_cv_broken_sem_getvalue=no
12921else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012922 ac_cv_broken_sem_getvalue=yes
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012923fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012924rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12925 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012926fi
12927
12928
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012929fi
12930
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012931{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_sem_getvalue" >&5
12932$as_echo "$ac_cv_broken_sem_getvalue" >&6; }
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012933if test $ac_cv_broken_sem_getvalue = yes
12934then
12935
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012936$as_echo "#define HAVE_BROKEN_SEM_GETVALUE 1" >>confdefs.h
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012937
12938fi
12939
Mark Dickinsonefc82f72009-03-20 15:51:55 +000012940# determine what size digit to use for Python's longs
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012941{ $as_echo "$as_me:${as_lineno-$LINENO}: checking digit size for Python's longs" >&5
12942$as_echo_n "checking digit size for Python's longs... " >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +000012943# Check whether --enable-big-digits was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012944if test "${enable_big_digits+set}" = set; then :
Mark Dickinsonefc82f72009-03-20 15:51:55 +000012945 enableval=$enable_big_digits; case $enable_big_digits in
12946yes)
12947 enable_big_digits=30 ;;
12948no)
12949 enable_big_digits=15 ;;
1295015|30)
12951 ;;
12952*)
Matthias Klose3cef2a92012-03-14 23:39:33 +010012953 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 +000012954esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012955{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_big_digits" >&5
12956$as_echo "$enable_big_digits" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +000012957
12958cat >>confdefs.h <<_ACEOF
12959#define PYLONG_BITS_IN_DIGIT $enable_big_digits
12960_ACEOF
12961
12962
12963else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012964 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
12965$as_echo "no value specified" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +000012966fi
12967
12968
Guido van Rossumef2255b2000-03-10 22:30:29 +000012969# check for wchar.h
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012970ac_fn_c_check_header_mongrel "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
Matthias Klose3cef2a92012-03-14 23:39:33 +010012971if test "x$ac_cv_header_wchar_h" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012972
12973
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012974$as_echo "#define HAVE_WCHAR_H 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012975
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012976 wchar_h="yes"
12977
Guido van Rossumef2255b2000-03-10 22:30:29 +000012978else
Martin v. Löwis11437992002-04-12 09:54:03 +000012979 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000012980
12981fi
12982
Michael W. Hudson54241132001-12-07 15:38:26 +000012983
Martin v. Löwis11437992002-04-12 09:54:03 +000012984
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012985# determine wchar_t size
12986if test "$wchar_h" = yes
12987then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012988 # The cast to long int works around a bug in the HP C Compiler
Martin v. Löwiseba40652007-08-30 20:10:57 +000012989# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
12990# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
12991# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012992{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
12993$as_echo_n "checking size of wchar_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012994if ${ac_cv_sizeof_wchar_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012995 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000012996else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012997 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "#include <wchar.h>
12998"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012999
Martin v. Löwis11437992002-04-12 09:54:03 +000013000else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013001 if test "$ac_cv_type_wchar_t" = yes; then
13002 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
13003$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +000013004as_fn_error 77 "cannot compute sizeof (wchar_t)
Matthias Klose3cef2a92012-03-14 23:39:33 +010013005See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000013006 else
13007 ac_cv_sizeof_wchar_t=0
13008 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013009fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013010
Martin v. Löwis11437992002-04-12 09:54:03 +000013011fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013012{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
13013$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000013014
13015
13016
Martin v. Löwis11437992002-04-12 09:54:03 +000013017cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013018#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000013019_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013020
Michael W. Hudson54241132001-12-07 15:38:26 +000013021
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013022fi
13023
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013024{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UCS-4 tcl" >&5
13025$as_echo_n "checking for UCS-4 tcl... " >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013026have_ucs4_tcl=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013027cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013028/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013029
13030#include <tcl.h>
13031#if TCL_UTF_MAX != 6
13032# error "NOT UCS4_TCL"
13033#endif
13034int
13035main ()
13036{
13037
13038 ;
13039 return 0;
13040}
13041_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013042if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013043
13044
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013045$as_echo "#define HAVE_UCS4_TCL 1" >>confdefs.h
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013046
13047 have_ucs4_tcl=yes
13048
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013049fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013050rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013051{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ucs4_tcl" >&5
13052$as_echo "$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013053
Skip Montanaro6dead952003-09-25 14:50:04 +000013054# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013055if test "$wchar_h" = yes
13056then
13057 # check whether wchar_t is signed or not
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013058 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is signed" >&5
13059$as_echo_n "checking whether wchar_t is signed... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013060 if ${ac_cv_wchar_t_signed+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013061 $as_echo_n "(cached) " >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013062else
13063
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013064 if test "$cross_compiling" = yes; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013065 ac_cv_wchar_t_signed=yes
13066else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013067 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013068/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013069
13070 #include <wchar.h>
13071 int main()
13072 {
Martin v. Löwis44fe0e42006-04-11 07:15:30 +000013073 /* Success: exit code 0 */
13074 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013075 }
13076
13077_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013078if ac_fn_c_try_run "$LINENO"; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013079 ac_cv_wchar_t_signed=yes
13080else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013081 ac_cv_wchar_t_signed=no
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013082fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013083rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13084 conftest.$ac_objext conftest.beam conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013085fi
13086
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013087fi
13088
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013089 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wchar_t_signed" >&5
13090$as_echo "$ac_cv_wchar_t_signed" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000013091fi
13092
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013093{ $as_echo "$as_me:${as_lineno-$LINENO}: checking what type to use for unicode" >&5
13094$as_echo_n "checking what type to use for unicode... " >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000013095# Check whether --enable-unicode was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013096if test "${enable_unicode+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +000013097 enableval=$enable_unicode;
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013098else
13099 enable_unicode=yes
Martin v. Löwiseba40652007-08-30 20:10:57 +000013100fi
13101
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013102
13103if test $enable_unicode = yes
13104then
Martin v. Löwisfd917792001-06-27 20:22:04 +000013105 # Without any arguments, Py_UNICODE defaults to two-byte mode
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013106 case "$have_ucs4_tcl" in
13107 yes) enable_unicode="ucs4"
13108 ;;
13109 *) enable_unicode="ucs2"
13110 ;;
13111 esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013112fi
13113
Martin v. Löwis0036cba2002-04-12 09:58:45 +000013114
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013115case "$enable_unicode" in
13116ucs2) unicode_size="2"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013117 $as_echo "#define Py_UNICODE_SIZE 2" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013118
13119 ;;
13120ucs4) unicode_size="4"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013121 $as_echo "#define Py_UNICODE_SIZE 4" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013122
13123 ;;
Martin v. Löwised11a5d2012-05-20 10:42:17 +020013124no) ;; # To allow --disable-unicode
Matthias Klose3cef2a92012-03-14 23:39:33 +010013125*) 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 +000013126esac
13127
Michael W. Hudson54241132001-12-07 15:38:26 +000013128
Martin v. Löwis11437992002-04-12 09:54:03 +000013129
13130
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013131if test "$enable_unicode" = "no"
13132then
Martin v. Löwis339d0f72001-08-17 18:39:25 +000013133 UNICODE_OBJS=""
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013134 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not used" >&5
13135$as_echo "not used" >&6; }
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013136else
Martin v. Löwis339d0f72001-08-17 18:39:25 +000013137 UNICODE_OBJS="Objects/unicodeobject.o Objects/unicodectype.o"
Martin v. Löwis11437992002-04-12 09:54:03 +000013138
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013139$as_echo "#define Py_USING_UNICODE 1" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013140
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013141
13142 # wchar_t is only usable if it maps to an unsigned type
13143 if test "$unicode_size" = "$ac_cv_sizeof_wchar_t" \
Matthias Klose7dbeed72004-12-24 08:22:17 +000013144 -a "$ac_cv_wchar_t_signed" = "no"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013145 then
13146 PY_UNICODE_TYPE="wchar_t"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013147
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013148$as_echo "#define HAVE_USABLE_WCHAR_T 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013149
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013150 $as_echo "#define PY_UNICODE_TYPE wchar_t" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013151
13152 elif test "$ac_cv_sizeof_short" = "$unicode_size"
13153 then
13154 PY_UNICODE_TYPE="unsigned short"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013155 $as_echo "#define PY_UNICODE_TYPE unsigned short" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013156
13157 elif test "$ac_cv_sizeof_long" = "$unicode_size"
13158 then
13159 PY_UNICODE_TYPE="unsigned long"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013160 $as_echo "#define PY_UNICODE_TYPE unsigned long" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013161
13162 else
13163 PY_UNICODE_TYPE="no type found"
13164 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013165 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PY_UNICODE_TYPE" >&5
13166$as_echo "$PY_UNICODE_TYPE" >&6; }
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013167fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000013168
13169# check for endianness
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013170 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
13171$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013172if ${ac_cv_c_bigendian+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013173 $as_echo_n "(cached) " >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000013174else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013175 ac_cv_c_bigendian=unknown
13176 # See if we're dealing with a universal compiler.
13177 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13178/* end confdefs.h. */
13179#ifndef __APPLE_CC__
13180 not a universal capable compiler
13181 #endif
13182 typedef int dummy;
13183
Skip Montanaro6dead952003-09-25 14:50:04 +000013184_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013185if ac_fn_c_try_compile "$LINENO"; then :
13186
13187 # Check for potential -arch flags. It is not universal unless
13188 # there are at least two -arch flags with different values.
13189 ac_arch=
13190 ac_prev=
13191 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
13192 if test -n "$ac_prev"; then
13193 case $ac_word in
13194 i?86 | x86_64 | ppc | ppc64)
13195 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
13196 ac_arch=$ac_word
13197 else
13198 ac_cv_c_bigendian=universal
13199 break
13200 fi
13201 ;;
13202 esac
13203 ac_prev=
13204 elif test "x$ac_word" = "x-arch"; then
13205 ac_prev=arch
13206 fi
13207 done
13208fi
13209rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13210 if test $ac_cv_c_bigendian = unknown; then
13211 # See if sys/param.h defines the BYTE_ORDER macro.
13212 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013213/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000013214#include <sys/types.h>
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013215 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000013216
Martin v. Löwis11437992002-04-12 09:54:03 +000013217int
13218main ()
13219{
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013220#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
13221 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
13222 && LITTLE_ENDIAN)
13223 bogus endian macros
13224 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013225
13226 ;
13227 return 0;
13228}
13229_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013230if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000013231 # It does; now see whether it defined to BIG_ENDIAN or not.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013232 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013233/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000013234#include <sys/types.h>
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013235 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000013236
Martin v. Löwis11437992002-04-12 09:54:03 +000013237int
13238main ()
13239{
Guido van Rossumef2255b2000-03-10 22:30:29 +000013240#if BYTE_ORDER != BIG_ENDIAN
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013241 not big endian
13242 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013243
13244 ;
13245 return 0;
13246}
13247_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013248if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000013249 ac_cv_c_bigendian=yes
13250else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013251 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000013252fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013253rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013254fi
13255rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13256 fi
13257 if test $ac_cv_c_bigendian = unknown; then
13258 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
13259 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013260/* end confdefs.h. */
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013261#include <limits.h>
13262
Martin v. Löwis11437992002-04-12 09:54:03 +000013263int
13264main ()
13265{
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013266#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
13267 bogus endian macros
13268 #endif
13269
Martin v. Löwis11437992002-04-12 09:54:03 +000013270 ;
13271 return 0;
13272}
13273_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013274if ac_fn_c_try_compile "$LINENO"; then :
13275 # It does; now see whether it defined to _BIG_ENDIAN or not.
13276 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13277/* end confdefs.h. */
13278#include <limits.h>
13279
13280int
13281main ()
13282{
13283#ifndef _BIG_ENDIAN
13284 not big endian
13285 #endif
13286
13287 ;
13288 return 0;
13289}
13290_ACEOF
13291if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013292 ac_cv_c_bigendian=yes
Alexandre Vassalottia2db6872009-07-17 07:46:46 +000013293else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013294 ac_cv_c_bigendian=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013295fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013296rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13297fi
13298rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13299 fi
13300 if test $ac_cv_c_bigendian = unknown; then
13301 # Compile a test program.
13302 if test "$cross_compiling" = yes; then :
13303 # Try to guess by grepping values from an object file.
13304 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13305/* end confdefs.h. */
13306short int ascii_mm[] =
13307 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
13308 short int ascii_ii[] =
13309 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
13310 int use_ascii (int i) {
13311 return ascii_mm[i] + ascii_ii[i];
13312 }
13313 short int ebcdic_ii[] =
13314 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
13315 short int ebcdic_mm[] =
13316 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
13317 int use_ebcdic (int i) {
13318 return ebcdic_mm[i] + ebcdic_ii[i];
13319 }
13320 extern int foo;
Martin v. Löwiseba40652007-08-30 20:10:57 +000013321
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013322int
13323main ()
13324{
13325return use_ascii (foo) == use_ebcdic (foo);
13326 ;
13327 return 0;
13328}
13329_ACEOF
13330if ac_fn_c_try_compile "$LINENO"; then :
13331 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
13332 ac_cv_c_bigendian=yes
13333 fi
13334 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
13335 if test "$ac_cv_c_bigendian" = unknown; then
13336 ac_cv_c_bigendian=no
13337 else
13338 # finding both strings is unlikely to happen, but who knows?
13339 ac_cv_c_bigendian=unknown
13340 fi
13341 fi
13342fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013343rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013344else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013345 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013346/* end confdefs.h. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000013347$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000013348int
13349main ()
13350{
Martin v. Löwiseba40652007-08-30 20:10:57 +000013351
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013352 /* Are we little or big endian? From Harbison&Steele. */
13353 union
13354 {
13355 long int l;
13356 char c[sizeof (long int)];
13357 } u;
13358 u.l = 1;
13359 return u.c[sizeof (long int) - 1] == 1;
Martin v. Löwiseba40652007-08-30 20:10:57 +000013360
13361 ;
13362 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000013363}
Martin v. Löwis11437992002-04-12 09:54:03 +000013364_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013365if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000013366 ac_cv_c_bigendian=no
13367else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013368 ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000013369fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013370rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13371 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000013372fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013373
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013374 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013375fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013376{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
13377$as_echo "$ac_cv_c_bigendian" >&6; }
13378 case $ac_cv_c_bigendian in #(
13379 yes)
13380 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
13381;; #(
13382 no)
13383 ;; #(
13384 universal)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013385
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013386$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Alexandre Vassalottia2db6872009-07-17 07:46:46 +000013387
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013388 ;; #(
13389 *)
Georg Brandl71f4fbb2011-02-25 11:04:50 +000013390 as_fn_error $? "unknown endianness
Matthias Klose3cef2a92012-03-14 23:39:33 +010013391 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013392 esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000013393
Michael W. Hudson54241132001-12-07 15:38:26 +000013394
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013395# Check whether right shifting a negative integer extends the sign bit
13396# or fills with zeros (like the Cray J90, according to Tim Peters).
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013397{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether right shift extends the sign bit" >&5
13398$as_echo_n "checking whether right shift extends the sign bit... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013399if ${ac_cv_rshift_extends_sign+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013400 $as_echo_n "(cached) " >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000013401else
Martin v. Löwis11437992002-04-12 09:54:03 +000013402
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013403if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000013404 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013405else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013406 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013407/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013408
13409int main()
13410{
Vladimir Marangozova6180282000-07-12 05:05:06 +000013411 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013412}
13413
Martin v. Löwis11437992002-04-12 09:54:03 +000013414_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013415if ac_fn_c_try_run "$LINENO"; then :
Vladimir Marangozova6180282000-07-12 05:05:06 +000013416 ac_cv_rshift_extends_sign=yes
13417else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013418 ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000013419fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013420rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13421 conftest.$ac_objext conftest.beam conftest.$ac_ext
Vladimir Marangozova6180282000-07-12 05:05:06 +000013422fi
13423
Martin v. Löwiseba40652007-08-30 20:10:57 +000013424fi
13425
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013426{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rshift_extends_sign" >&5
13427$as_echo "$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000013428if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013429then
Martin v. Löwis11437992002-04-12 09:54:03 +000013430
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013431$as_echo "#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1" >>confdefs.h
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013432
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013433fi
13434
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013435# check for getc_unlocked and related locking functions
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013436{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getc_unlocked() and friends" >&5
13437$as_echo_n "checking for getc_unlocked() and friends... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013438if ${ac_cv_have_getc_unlocked+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013439 $as_echo_n "(cached) " >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013440else
Martin v. Löwis11437992002-04-12 09:54:03 +000013441
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013442cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013443/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013444#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013445int
13446main ()
13447{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013448
13449 FILE *f = fopen("/dev/null", "r");
13450 flockfile(f);
13451 getc_unlocked(f);
13452 funlockfile(f);
13453
Martin v. Löwis11437992002-04-12 09:54:03 +000013454 ;
13455 return 0;
13456}
13457_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013458if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013459 ac_cv_have_getc_unlocked=yes
13460else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013461 ac_cv_have_getc_unlocked=no
13462fi
13463rm -f core conftest.err conftest.$ac_objext \
13464 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013465fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013466
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013467{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getc_unlocked" >&5
13468$as_echo "$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013469if test "$ac_cv_have_getc_unlocked" = yes
13470then
Martin v. Löwis11437992002-04-12 09:54:03 +000013471
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013472$as_echo "#define HAVE_GETC_UNLOCKED 1" >>confdefs.h
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013473
13474fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013475
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013476# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000013477# save the value of LIBS so we don't actually link Python with readline
13478LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013479
Gregory P. Smithcc023f12008-09-07 05:15:58 +000013480# On some systems we need to link readline to a termcap compatible
13481# library. NOTE: Keep the precedence of listed libraries synchronised
13482# with setup.py.
13483py_cv_lib_readline=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013484{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link readline libs" >&5
13485$as_echo_n "checking how to link readline libs... " >&6; }
Gregory P. Smithcc023f12008-09-07 05:15:58 +000013486for py_libtermcap in "" ncursesw ncurses curses termcap; do
13487 if test -z "$py_libtermcap"; then
13488 READLINE_LIBS="-lreadline"
13489 else
13490 READLINE_LIBS="-lreadline -l$py_libtermcap"
13491 fi
13492 LIBS="$READLINE_LIBS $LIBS_no_readline"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013493 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013494/* end confdefs.h. */
13495
Martin v. Löwiseba40652007-08-30 20:10:57 +000013496/* Override any GCC internal prototype to avoid an error.
13497 Use char because int might match the return type of a GCC
13498 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013499#ifdef __cplusplus
13500extern "C"
13501#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013502char readline ();
13503int
13504main ()
13505{
Martin v. Löwiseba40652007-08-30 20:10:57 +000013506return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013507 ;
13508 return 0;
13509}
13510_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013511if ac_fn_c_try_link "$LINENO"; then :
Gregory P. Smithcc023f12008-09-07 05:15:58 +000013512 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013513fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013514rm -f core conftest.err conftest.$ac_objext \
13515 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smithcc023f12008-09-07 05:15:58 +000013516 if test $py_cv_lib_readline = yes; then
13517 break
13518 fi
13519done
13520# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
13521#AC_SUBST([READLINE_LIBS])
Gregory P. Smithe080cdf2008-09-07 19:19:04 +000013522if test $py_cv_lib_readline = no; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013523 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
13524$as_echo "none" >&6; }
Gregory P. Smithcc023f12008-09-07 05:15:58 +000013525else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013526 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_LIBS" >&5
13527$as_echo "$READLINE_LIBS" >&6; }
Gregory P. Smithcc023f12008-09-07 05:15:58 +000013528
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013529$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013530
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013531fi
13532
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013533# check for readline 2.1
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013534{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_callback_handler_install in -lreadline" >&5
13535$as_echo_n "checking for rl_callback_handler_install in -lreadline... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013536if ${ac_cv_lib_readline_rl_callback_handler_install+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013537 $as_echo_n "(cached) " >&6
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013538else
13539 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000013540LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013541cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013542/* end confdefs.h. */
13543
Martin v. Löwiseba40652007-08-30 20:10:57 +000013544/* Override any GCC internal prototype to avoid an error.
13545 Use char because int might match the return type of a GCC
13546 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013547#ifdef __cplusplus
13548extern "C"
13549#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013550char rl_callback_handler_install ();
13551int
13552main ()
13553{
Martin v. Löwiseba40652007-08-30 20:10:57 +000013554return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013555 ;
13556 return 0;
13557}
13558_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013559if ac_fn_c_try_link "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013560 ac_cv_lib_readline_rl_callback_handler_install=yes
13561else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013562 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013563fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013564rm -f core conftest.err conftest.$ac_objext \
13565 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013566LIBS=$ac_check_lib_save_LIBS
13567fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013568{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
13569$as_echo "$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013570if test "x$ac_cv_lib_readline_rl_callback_handler_install" = xyes; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013571
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013572$as_echo "#define HAVE_RL_CALLBACK 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013573
13574fi
13575
13576
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013577# check for readline 2.2
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013578cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013579/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013580#include <readline/readline.h>
13581_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013582if ac_fn_c_try_cpp "$LINENO"; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013583 have_readline=yes
13584else
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013585 have_readline=no
Matthias Klosec511b472010-05-08 11:01:39 +000013586
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013587fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +000013588rm -f conftest.err conftest.i conftest.$ac_ext
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013589if test $have_readline = yes
13590then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013591 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013592/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013593#include <readline/readline.h>
13594
13595_ACEOF
13596if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013597 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013598
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013599$as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013600
13601fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +000013602rm -f conftest*
Antoine Pitroud9ff74e2009-10-26 19:16:46 +000013603
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013604 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroud9ff74e2009-10-26 19:16:46 +000013605/* end confdefs.h. */
13606#include <readline/readline.h>
13607
13608_ACEOF
13609if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013610 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then :
Antoine Pitroud9ff74e2009-10-26 19:16:46 +000013611
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013612$as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h
Antoine Pitroud9ff74e2009-10-26 19:16:46 +000013613
13614fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +000013615rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013616
13617fi
13618
Martin v. Löwis0daad592001-09-30 21:09:59 +000013619# check for readline 4.0
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013620{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -lreadline" >&5
13621$as_echo_n "checking for rl_pre_input_hook in -lreadline... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013622if ${ac_cv_lib_readline_rl_pre_input_hook+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013623 $as_echo_n "(cached) " >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000013624else
Martin v. Löwis11437992002-04-12 09:54:03 +000013625 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000013626LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013627cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013628/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013629
Martin v. Löwiseba40652007-08-30 20:10:57 +000013630/* Override any GCC internal prototype to avoid an error.
13631 Use char because int might match the return type of a GCC
13632 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013633#ifdef __cplusplus
13634extern "C"
13635#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013636char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013637int
13638main ()
13639{
Martin v. Löwiseba40652007-08-30 20:10:57 +000013640return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013641 ;
13642 return 0;
13643}
13644_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013645if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013646 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000013647else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013648 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000013649fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013650rm -f core conftest.err conftest.$ac_objext \
13651 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013652LIBS=$ac_check_lib_save_LIBS
13653fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013654{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
13655$as_echo "$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013656if test "x$ac_cv_lib_readline_rl_pre_input_hook" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000013657
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013658$as_echo "#define HAVE_RL_PRE_INPUT_HOOK 1" >>confdefs.h
Martin v. Löwis0daad592001-09-30 21:09:59 +000013659
Martin v. Löwis0daad592001-09-30 21:09:59 +000013660fi
13661
Michael W. Hudson54241132001-12-07 15:38:26 +000013662
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000013663# also in 4.0
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013664{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -lreadline" >&5
13665$as_echo_n "checking for rl_completion_display_matches_hook in -lreadline... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013666if ${ac_cv_lib_readline_rl_completion_display_matches_hook+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013667 $as_echo_n "(cached) " >&6
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000013668else
13669 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000013670LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013671cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000013672/* end confdefs.h. */
13673
13674/* Override any GCC internal prototype to avoid an error.
13675 Use char because int might match the return type of a GCC
13676 builtin and then its argument prototype would still apply. */
13677#ifdef __cplusplus
13678extern "C"
13679#endif
13680char rl_completion_display_matches_hook ();
13681int
13682main ()
13683{
13684return rl_completion_display_matches_hook ();
13685 ;
13686 return 0;
13687}
13688_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013689if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000013690 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
13691else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013692 ac_cv_lib_readline_rl_completion_display_matches_hook=no
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000013693fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013694rm -f core conftest.err conftest.$ac_objext \
13695 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000013696LIBS=$ac_check_lib_save_LIBS
13697fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013698{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
13699$as_echo "$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013700if test "x$ac_cv_lib_readline_rl_completion_display_matches_hook" = xyes; then :
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000013701
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013702$as_echo "#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000013703
13704fi
13705
13706
Martin v. Löwis0daad592001-09-30 21:09:59 +000013707# check for readline 4.2
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013708{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5
13709$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013710if ${ac_cv_lib_readline_rl_completion_matches+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013711 $as_echo_n "(cached) " >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000013712else
Martin v. Löwis11437992002-04-12 09:54:03 +000013713 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000013714LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013715cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013716/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013717
Martin v. Löwiseba40652007-08-30 20:10:57 +000013718/* Override any GCC internal prototype to avoid an error.
13719 Use char because int might match the return type of a GCC
13720 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013721#ifdef __cplusplus
13722extern "C"
13723#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013724char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013725int
13726main ()
13727{
Martin v. Löwiseba40652007-08-30 20:10:57 +000013728return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013729 ;
13730 return 0;
13731}
13732_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013733if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013734 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000013735else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013736 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000013737fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013738rm -f core conftest.err conftest.$ac_objext \
13739 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013740LIBS=$ac_check_lib_save_LIBS
13741fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013742{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_matches" >&5
13743$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013744if test "x$ac_cv_lib_readline_rl_completion_matches" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000013745
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013746$as_echo "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h
Guido van Rossum353ae582001-07-10 16:45:32 +000013747
Guido van Rossum353ae582001-07-10 16:45:32 +000013748fi
13749
Jack Jansendd19cf82001-12-06 22:36:17 +000013750
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013751# also in readline 4.2
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013752cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013753/* end confdefs.h. */
13754#include <readline/readline.h>
13755_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013756if ac_fn_c_try_cpp "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013757 have_readline=yes
13758else
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013759 have_readline=no
Matthias Klosec511b472010-05-08 11:01:39 +000013760
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013761fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +000013762rm -f conftest.err conftest.i conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013763if test $have_readline = yes
13764then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013765 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013766/* end confdefs.h. */
13767#include <readline/readline.h>
13768
13769_ACEOF
13770if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013771 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013772
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013773$as_echo "#define HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013774
13775fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +000013776rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013777
13778fi
13779
Martin v. Löwis82bca632006-02-10 20:49:30 +000013780# End of readline checks: restore LIBS
13781LIBS=$LIBS_no_readline
13782
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013783{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken nice()" >&5
13784$as_echo_n "checking for broken nice()... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013785if ${ac_cv_broken_nice+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013786 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000013787else
Martin v. Löwis11437992002-04-12 09:54:03 +000013788
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013789if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000013790 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013791else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013792 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013793/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013794
13795int main()
13796{
13797 int val1 = nice(1);
13798 if (val1 != -1 && val1 == nice(2))
13799 exit(0);
13800 exit(1);
13801}
13802
Martin v. Löwis11437992002-04-12 09:54:03 +000013803_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013804if ac_fn_c_try_run "$LINENO"; then :
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013805 ac_cv_broken_nice=yes
13806else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013807 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013808fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013809rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13810 conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013811fi
13812
Martin v. Löwiseba40652007-08-30 20:10:57 +000013813fi
13814
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013815{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_nice" >&5
13816$as_echo "$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013817if test "$ac_cv_broken_nice" = yes
13818then
Martin v. Löwis11437992002-04-12 09:54:03 +000013819
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013820$as_echo "#define HAVE_BROKEN_NICE 1" >>confdefs.h
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013821
13822fi
13823
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013824{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken poll()" >&5
13825$as_echo_n "checking for broken poll()... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013826if ${ac_cv_broken_poll+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013827 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013828else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013829 if test "$cross_compiling" = yes; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013830 ac_cv_broken_poll=no
13831else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013832 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013833/* end confdefs.h. */
13834
13835#include <poll.h>
13836
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013837int main()
13838{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013839 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013840 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013841
13842 close (42);
13843
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013844 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013845 if (poll_test < 0)
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013846 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013847 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013848 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013849 else
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013850 return 1;
13851}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013852
13853_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013854if ac_fn_c_try_run "$LINENO"; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013855 ac_cv_broken_poll=yes
13856else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013857 ac_cv_broken_poll=no
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013858fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013859rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13860 conftest.$ac_objext conftest.beam conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013861fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013862
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013863fi
13864
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013865{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_poll" >&5
13866$as_echo "$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013867if test "$ac_cv_broken_poll" = yes
13868then
13869
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013870$as_echo "#define HAVE_BROKEN_POLL 1" >>confdefs.h
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013871
13872fi
13873
Brett Cannon43802422005-02-10 20:48:03 +000013874# 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 +000013875# (which is not required by ISO C or UNIX spec) and/or if we support
13876# tzname[]
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013877ac_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 +000013878#include <$ac_cv_struct_tm>
13879
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013880"
Matthias Klose3cef2a92012-03-14 23:39:33 +010013881if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Brett Cannon43802422005-02-10 20:48:03 +000013882
13883cat >>confdefs.h <<_ACEOF
13884#define HAVE_STRUCT_TM_TM_ZONE 1
13885_ACEOF
13886
13887
13888fi
13889
13890if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
13891
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013892$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000013893
13894else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013895 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
13896"
Matthias Klose3cef2a92012-03-14 23:39:33 +010013897if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013898 ac_have_decl=1
Martin v. Löwiseba40652007-08-30 20:10:57 +000013899else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013900 ac_have_decl=0
Martin v. Löwiseba40652007-08-30 20:10:57 +000013901fi
13902
Martin v. Löwiseba40652007-08-30 20:10:57 +000013903cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013904#define HAVE_DECL_TZNAME $ac_have_decl
Martin v. Löwiseba40652007-08-30 20:10:57 +000013905_ACEOF
13906
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013907 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
13908$as_echo_n "checking for tzname... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013909if ${ac_cv_var_tzname+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013910 $as_echo_n "(cached) " >&6
Martin v. Löwiseba40652007-08-30 20:10:57 +000013911else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013912 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000013913/* end confdefs.h. */
13914#include <time.h>
Martin v. Löwiseba40652007-08-30 20:10:57 +000013915#if !HAVE_DECL_TZNAME
13916extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000013917#endif
13918
13919int
13920main ()
13921{
Martin v. Löwiseba40652007-08-30 20:10:57 +000013922return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000013923 ;
13924 return 0;
13925}
13926_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013927if ac_fn_c_try_link "$LINENO"; then :
Brett Cannon43802422005-02-10 20:48:03 +000013928 ac_cv_var_tzname=yes
13929else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013930 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000013931fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013932rm -f core conftest.err conftest.$ac_objext \
13933 conftest$ac_exeext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000013934fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013935{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
13936$as_echo "$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000013937 if test $ac_cv_var_tzname = yes; then
13938
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013939$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000013940
13941 fi
13942fi
13943
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013944
Martin v. Löwis1d459062005-03-14 21:23:33 +000013945# check tzset(3) exists and works like we expect it to
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013946{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working tzset()" >&5
13947$as_echo_n "checking for working tzset()... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013948if ${ac_cv_working_tzset+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013949 $as_echo_n "(cached) " >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013950else
13951
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013952if test "$cross_compiling" = yes; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013953 ac_cv_working_tzset=no
13954else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013955 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013956/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013957
13958#include <stdlib.h>
13959#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000013960#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000013961
13962#if HAVE_TZNAME
13963extern char *tzname[];
13964#endif
13965
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013966int main()
13967{
Brett Cannon18367812003-09-19 00:59:16 +000013968 /* Note that we need to ensure that not only does tzset(3)
13969 do 'something' with localtime, but it works as documented
13970 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000013971 This includes making sure that tzname is set properly if
13972 tm->tm_zone does not exist since it is the alternative way
13973 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000013974
13975 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000013976 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000013977 */
13978
Martin v. Löwis1d459062005-03-14 21:23:33 +000013979 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000013980 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
13981
Neal Norwitz7f2588c2003-04-11 15:35:53 +000013982 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013983 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000013984 if (localtime(&groundhogday)->tm_hour != 0)
13985 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013986#if HAVE_TZNAME
13987 /* For UTC, tzname[1] is sometimes "", sometimes " " */
13988 if (strcmp(tzname[0], "UTC") ||
13989 (tzname[1][0] != 0 && tzname[1][0] != ' '))
13990 exit(1);
13991#endif
Brett Cannon18367812003-09-19 00:59:16 +000013992
Neal Norwitz7f2588c2003-04-11 15:35:53 +000013993 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013994 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000013995 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013996 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013997#if HAVE_TZNAME
13998 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
13999 exit(1);
14000#endif
Brett Cannon18367812003-09-19 00:59:16 +000014001
14002 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
14003 tzset();
14004 if (localtime(&groundhogday)->tm_hour != 11)
14005 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000014006#if HAVE_TZNAME
14007 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
14008 exit(1);
14009#endif
14010
14011#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000014012 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
14013 exit(1);
14014 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
14015 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000014016#endif
Brett Cannon18367812003-09-19 00:59:16 +000014017
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014018 exit(0);
14019}
14020
14021_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014022if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014023 ac_cv_working_tzset=yes
14024else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014025 ac_cv_working_tzset=no
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014026fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014027rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14028 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014029fi
14030
Martin v. Löwiseba40652007-08-30 20:10:57 +000014031fi
14032
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014033{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_tzset" >&5
14034$as_echo "$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014035if test "$ac_cv_working_tzset" = yes
14036then
14037
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014038$as_echo "#define HAVE_WORKING_TZSET 1" >>confdefs.h
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014039
14040fi
14041
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014042# Look for subsecond timestamps in struct stat
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014043{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec in struct stat" >&5
14044$as_echo_n "checking for tv_nsec in struct stat... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010014045if ${ac_cv_stat_tv_nsec+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014046 $as_echo_n "(cached) " >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014047else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014048 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014049/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014050#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014051int
14052main ()
14053{
14054
14055struct stat st;
14056st.st_mtim.tv_nsec = 1;
14057
14058 ;
14059 return 0;
14060}
14061_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014062if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa32c9942002-09-09 16:17:47 +000014063 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014064else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014065 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014066fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014067rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14068fi
14069
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014070{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec" >&5
14071$as_echo "$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014072if test "$ac_cv_stat_tv_nsec" = yes
14073then
14074
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014075$as_echo "#define HAVE_STAT_TV_NSEC 1" >>confdefs.h
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014076
14077fi
14078
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014079# Look for BSD style subsecond timestamps in struct stat
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014080{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec2 in struct stat" >&5
14081$as_echo_n "checking for tv_nsec2 in struct stat... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010014082if ${ac_cv_stat_tv_nsec2+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014083 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014084else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014085 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014086/* end confdefs.h. */
14087#include <sys/stat.h>
14088int
14089main ()
14090{
14091
14092struct stat st;
14093st.st_mtimespec.tv_nsec = 1;
14094
14095 ;
14096 return 0;
14097}
14098_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014099if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014100 ac_cv_stat_tv_nsec2=yes
14101else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014102 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014103fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014104rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14105fi
14106
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014107{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec2" >&5
14108$as_echo "$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014109if test "$ac_cv_stat_tv_nsec2" = yes
14110then
14111
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014112$as_echo "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014113
14114fi
14115
doko@ubuntu.comf27ec3e2014-04-17 20:11:19 +020014116# first curses configure check
14117ac_save_cppflags="$CPPFLAGS"
14118CPPFLAGS="$CPPFLAGS -I/usr/include/ncursesw"
14119
14120for ac_header in curses.h ncurses.h
14121do :
14122 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
14123ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
14124if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
14125 cat >>confdefs.h <<_ACEOF
14126#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
14127_ACEOF
14128
14129fi
14130
14131done
14132
14133
14134# On Solaris, term.h requires curses.h
14135for ac_header in term.h
14136do :
14137 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "
14138#ifdef HAVE_CURSES_H
14139#include <curses.h>
14140#endif
14141
14142"
14143if test "x$ac_cv_header_term_h" = xyes; then :
14144 cat >>confdefs.h <<_ACEOF
14145#define HAVE_TERM_H 1
14146_ACEOF
14147
14148fi
14149
14150done
14151
14152
Jack Jansen666b1e72001-10-31 12:11:48 +000014153# On HP/UX 11.0, mvwdelch is a block with a return statement
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014154{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mvwdelch is an expression" >&5
14155$as_echo_n "checking whether mvwdelch is an expression... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010014156if ${ac_cv_mvwdelch_is_expression+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014157 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000014158else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014159 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014160/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000014161#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014162int
14163main ()
14164{
Jack Jansen666b1e72001-10-31 12:11:48 +000014165
14166 int rtn;
14167 rtn = mvwdelch(0,0,0);
14168
Martin v. Löwis11437992002-04-12 09:54:03 +000014169 ;
14170 return 0;
14171}
14172_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014173if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000014174 ac_cv_mvwdelch_is_expression=yes
14175else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014176 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000014177fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014178rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14179fi
14180
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014181{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mvwdelch_is_expression" >&5
14182$as_echo "$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000014183
14184if test "$ac_cv_mvwdelch_is_expression" = yes
14185then
Martin v. Löwis11437992002-04-12 09:54:03 +000014186
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014187$as_echo "#define MVWDELCH_IS_EXPRESSION 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000014188
14189fi
14190
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014191{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WINDOW has _flags" >&5
14192$as_echo_n "checking whether WINDOW has _flags... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010014193if ${ac_cv_window_has_flags+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014194 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000014195else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014196 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014197/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000014198#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014199int
14200main ()
14201{
Jack Jansen666b1e72001-10-31 12:11:48 +000014202
14203 WINDOW *w;
14204 w->_flags = 0;
14205
Martin v. Löwis11437992002-04-12 09:54:03 +000014206 ;
14207 return 0;
14208}
14209_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014210if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000014211 ac_cv_window_has_flags=yes
14212else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014213 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000014214fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014215rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14216fi
14217
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014218{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_window_has_flags" >&5
14219$as_echo "$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000014220
Jack Jansen666b1e72001-10-31 12:11:48 +000014221
14222if test "$ac_cv_window_has_flags" = yes
14223then
Martin v. Löwis11437992002-04-12 09:54:03 +000014224
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014225$as_echo "#define WINDOW_HAS_FLAGS 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000014226
14227fi
14228
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014229{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_term_resized" >&5
14230$as_echo_n "checking for is_term_resized... " >&6; }
14231cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Walter Dörwald4994d952006-06-19 08:07:50 +000014232/* end confdefs.h. */
14233#include <curses.h>
14234int
14235main ()
14236{
14237void *x=is_term_resized
14238 ;
14239 return 0;
14240}
14241_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014242if ac_fn_c_try_compile "$LINENO"; then :
Walter Dörwald4994d952006-06-19 08:07:50 +000014243
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014244$as_echo "#define HAVE_CURSES_IS_TERM_RESIZED 1" >>confdefs.h
Walter Dörwald4994d952006-06-19 08:07:50 +000014245
Matthias Klosec511b472010-05-08 11:01:39 +000014246 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014247$as_echo "yes" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000014248else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014249 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14250$as_echo "no" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000014251
14252fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014253rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14254
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014255{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resize_term" >&5
14256$as_echo_n "checking for resize_term... " >&6; }
14257cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Walter Dörwald4994d952006-06-19 08:07:50 +000014258/* end confdefs.h. */
14259#include <curses.h>
14260int
14261main ()
14262{
14263void *x=resize_term
14264 ;
14265 return 0;
14266}
14267_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014268if ac_fn_c_try_compile "$LINENO"; then :
Walter Dörwald4994d952006-06-19 08:07:50 +000014269
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014270$as_echo "#define HAVE_CURSES_RESIZE_TERM 1" >>confdefs.h
Walter Dörwald4994d952006-06-19 08:07:50 +000014271
Matthias Klosec511b472010-05-08 11:01:39 +000014272 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014273$as_echo "yes" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000014274else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014275 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14276$as_echo "no" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000014277
14278fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014279rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14280
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014281{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resizeterm" >&5
14282$as_echo_n "checking for resizeterm... " >&6; }
14283cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Walter Dörwald4994d952006-06-19 08:07:50 +000014284/* end confdefs.h. */
14285#include <curses.h>
14286int
14287main ()
14288{
14289void *x=resizeterm
14290 ;
14291 return 0;
14292}
14293_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014294if ac_fn_c_try_compile "$LINENO"; then :
Walter Dörwald4994d952006-06-19 08:07:50 +000014295
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014296$as_echo "#define HAVE_CURSES_RESIZETERM 1" >>confdefs.h
Walter Dörwald4994d952006-06-19 08:07:50 +000014297
Matthias Klosec511b472010-05-08 11:01:39 +000014298 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014299$as_echo "yes" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000014300else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014301 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14302$as_echo "no" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000014303
14304fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014305rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
doko@ubuntu.comf27ec3e2014-04-17 20:11:19 +020014306# last curses configure check
14307CPPFLAGS=$ac_save_cppflags
Martin v. Löwiseba40652007-08-30 20:10:57 +000014308
doko@python.orgd65e2ba2013-01-31 23:52:03 +010014309{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for device files" >&5
14310$as_echo "$as_me: checking for device files" >&6;}
14311
14312if test "x$cross_compiling" = xyes; then
14313 if test "${ac_cv_file__dev_ptmx+set}" != set; then
14314 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
14315$as_echo_n "checking for /dev/ptmx... " >&6; }
14316 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
14317$as_echo "not set" >&6; }
14318 as_fn_error $? "set ac_cv_file__dev_ptmx to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
14319 fi
14320 if test "${ac_cv_file__dev_ptc+set}" != set; then
14321 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
14322$as_echo_n "checking for /dev/ptc... " >&6; }
14323 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
14324$as_echo "not set" >&6; }
14325 as_fn_error $? "set ac_cv_file__dev_ptc to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
14326 fi
14327fi
14328
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014329{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
14330$as_echo_n "checking for /dev/ptmx... " >&6; }
doko@python.orgd65e2ba2013-01-31 23:52:03 +010014331if ${ac_cv_file__dev_ptmx+:} false; then :
14332 $as_echo_n "(cached) " >&6
14333else
14334 test "$cross_compiling" = yes &&
14335 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
14336if test -r "/dev/ptmx"; then
14337 ac_cv_file__dev_ptmx=yes
14338else
14339 ac_cv_file__dev_ptmx=no
14340fi
14341fi
14342{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptmx" >&5
14343$as_echo "$ac_cv_file__dev_ptmx" >&6; }
14344if test "x$ac_cv_file__dev_ptmx" = xyes; then :
Martin v. Löwisfefbc202006-10-17 18:59:23 +000014345
doko@python.orgd65e2ba2013-01-31 23:52:03 +010014346fi
14347
14348if test "x$ac_cv_file__dev_ptmx" = xyes; then
Martin v. Löwis24a880b2002-12-31 12:55:15 +000014349
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014350$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
Martin v. Löwis24a880b2002-12-31 12:55:15 +000014351
Martin v. Löwis24a880b2002-12-31 12:55:15 +000014352fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014353{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
14354$as_echo_n "checking for /dev/ptc... " >&6; }
doko@python.orgd65e2ba2013-01-31 23:52:03 +010014355if ${ac_cv_file__dev_ptc+:} false; then :
14356 $as_echo_n "(cached) " >&6
14357else
14358 test "$cross_compiling" = yes &&
14359 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
14360if test -r "/dev/ptc"; then
14361 ac_cv_file__dev_ptc=yes
14362else
14363 ac_cv_file__dev_ptc=no
14364fi
14365fi
14366{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptc" >&5
14367$as_echo "$ac_cv_file__dev_ptc" >&6; }
14368if test "x$ac_cv_file__dev_ptc" = xyes; then :
Martin v. Löwisfefbc202006-10-17 18:59:23 +000014369
doko@python.orgd65e2ba2013-01-31 23:52:03 +010014370fi
14371
14372if test "x$ac_cv_file__dev_ptc" = xyes; then
Neal Norwitz865400f2003-03-21 01:42:58 +000014373
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014374$as_echo "#define HAVE_DEV_PTC 1" >>confdefs.h
Neal Norwitz865400f2003-03-21 01:42:58 +000014375
Neal Norwitz865400f2003-03-21 01:42:58 +000014376fi
14377
Mark Dickinson82864d12009-11-15 16:18:58 +000014378if test "$have_long_long" = yes
14379then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014380 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for %lld and %llu printf() format support" >&5
14381$as_echo_n "checking for %lld and %llu printf() format support... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010014382 if ${ac_cv_have_long_long_format+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014383 $as_echo_n "(cached) " >&6
Mark Dickinson82864d12009-11-15 16:18:58 +000014384else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014385 if test "$cross_compiling" = yes; then :
doko@python.orgd65e2ba2013-01-31 23:52:03 +010014386 ac_cv_have_long_long_format="cross -- assuming no"
14387 if test x$GCC = xyes; then
14388 save_CFLAGS=$CFLAGS
14389 CFLAGS="$CFLAGS -Werror -Wformat"
14390 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14391/* end confdefs.h. */
14392
14393 #include <stdio.h>
14394 #include <stddef.h>
14395
14396int
14397main ()
14398{
14399
14400 char *buffer;
14401 sprintf(buffer, "%lld", (long long)123);
14402 sprintf(buffer, "%lld", (long long)-123);
14403 sprintf(buffer, "%llu", (unsigned long long)123);
14404
14405 ;
14406 return 0;
14407}
14408_ACEOF
14409if ac_fn_c_try_compile "$LINENO"; then :
14410 ac_cv_have_long_long_format=yes
14411
14412fi
14413rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14414 CFLAGS=$save_CFLAGS
14415 fi
Mark Dickinson82864d12009-11-15 16:18:58 +000014416else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014417 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson82864d12009-11-15 16:18:58 +000014418/* end confdefs.h. */
14419
14420 #include <stdio.h>
14421 #include <stddef.h>
14422 #include <string.h>
14423
14424 #ifdef HAVE_SYS_TYPES_H
14425 #include <sys/types.h>
14426 #endif
14427
14428 int main()
14429 {
14430 char buffer[256];
14431
14432 if (sprintf(buffer, "%lld", (long long)123) < 0)
14433 return 1;
14434 if (strcmp(buffer, "123"))
14435 return 1;
14436
14437 if (sprintf(buffer, "%lld", (long long)-123) < 0)
14438 return 1;
14439 if (strcmp(buffer, "-123"))
14440 return 1;
14441
14442 if (sprintf(buffer, "%llu", (unsigned long long)123) < 0)
14443 return 1;
14444 if (strcmp(buffer, "123"))
14445 return 1;
14446
14447 return 0;
14448 }
14449
14450_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014451if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson82864d12009-11-15 16:18:58 +000014452 ac_cv_have_long_long_format=yes
14453else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014454 ac_cv_have_long_long_format=no
Mark Dickinson82864d12009-11-15 16:18:58 +000014455fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014456rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14457 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson82864d12009-11-15 16:18:58 +000014458fi
14459
14460
Mark Dickinson82864d12009-11-15 16:18:58 +000014461fi
14462
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014463 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_long_long_format" >&5
14464$as_echo "$ac_cv_have_long_long_format" >&6; }
Mark Dickinson82864d12009-11-15 16:18:58 +000014465fi
14466
Mark Dickinson5ce84742009-12-31 20:48:04 +000014467if test "$ac_cv_have_long_long_format" = yes
Mark Dickinson82864d12009-11-15 16:18:58 +000014468then
14469
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014470$as_echo "#define PY_FORMAT_LONG_LONG \"ll\"" >>confdefs.h
Mark Dickinson82864d12009-11-15 16:18:58 +000014471
14472fi
14473
Ronald Oussoren315cd0c2009-11-19 16:25:21 +000014474if test $ac_sys_system = Darwin
14475then
14476 LIBS="$LIBS -framework CoreFoundation"
14477fi
14478
Mark Dickinson82864d12009-11-15 16:18:58 +000014479
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014480{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for %zd printf() format support" >&5
14481$as_echo_n "checking for %zd printf() format support... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010014482if ${ac_cv_have_size_t_format+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014483 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014484else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014485 if test "$cross_compiling" = yes; then :
Gregory P. Smithc9ff3a72009-11-02 02:03:16 +000014486 ac_cv_have_size_t_format="cross -- assuming yes"
14487
Brett Cannon09d12362006-05-11 05:11:33 +000014488else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014489 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Brett Cannon09d12362006-05-11 05:11:33 +000014490/* end confdefs.h. */
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014491
Brett Cannon09d12362006-05-11 05:11:33 +000014492#include <stdio.h>
14493#include <stddef.h>
14494#include <string.h>
14495
Christian Heimesdb3d6cb2007-12-16 21:39:43 +000014496#ifdef HAVE_SYS_TYPES_H
14497#include <sys/types.h>
14498#endif
Neal Norwitz4a8fbdb2006-09-22 08:16:26 +000014499
14500#ifdef HAVE_SSIZE_T
14501typedef ssize_t Py_ssize_t;
14502#elif SIZEOF_VOID_P == SIZEOF_LONG
14503typedef long Py_ssize_t;
14504#else
14505typedef int Py_ssize_t;
14506#endif
Brett Cannon09d12362006-05-11 05:11:33 +000014507
Christian Heimesdb3d6cb2007-12-16 21:39:43 +000014508int main()
14509{
14510 char buffer[256];
14511
Brett Cannon09d12362006-05-11 05:11:33 +000014512 if(sprintf(buffer, "%zd", (size_t)123) < 0)
14513 return 1;
14514
Neal Norwitz4a8fbdb2006-09-22 08:16:26 +000014515 if (strcmp(buffer, "123"))
14516 return 1;
14517
14518 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
14519 return 1;
14520
14521 if (strcmp(buffer, "-123"))
Brett Cannon09d12362006-05-11 05:11:33 +000014522 return 1;
14523
14524 return 0;
14525}
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014526
Brett Cannon09d12362006-05-11 05:11:33 +000014527_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014528if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014529 ac_cv_have_size_t_format=yes
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014530else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014531 ac_cv_have_size_t_format=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014532fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014533rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14534 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +000014535fi
14536
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014537fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014538{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t_format" >&5
14539$as_echo "$ac_cv_have_size_t_format" >&6; }
Gregory P. Smithc9ff3a72009-11-02 02:03:16 +000014540if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014541
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014542$as_echo "#define PY_FORMAT_SIZE_T \"z\"" >>confdefs.h
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014543
14544fi
14545
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014546ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
Martin v. Löwis01c04012002-11-11 14:58:44 +000014547#ifdef HAVE_SYS_TYPES_H
14548#include <sys/types.h>
14549#endif
14550#ifdef HAVE_SYS_SOCKET_H
14551#include <sys/socket.h>
14552#endif
14553
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014554"
Matthias Klose3cef2a92012-03-14 23:39:33 +010014555if test "x$ac_cv_type_socklen_t" = xyes; then :
Martin v. Löwis01c04012002-11-11 14:58:44 +000014556
Martin v. Löwis11437992002-04-12 09:54:03 +000014557else
Guido van Rossum95713eb2000-05-18 20:53:31 +000014558
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014559$as_echo "#define socklen_t int" >>confdefs.h
Guido van Rossum95713eb2000-05-18 20:53:31 +000014560
14561fi
14562
Michael W. Hudson54241132001-12-07 15:38:26 +000014563
Benjamin Peterson7497e912010-10-16 00:53:39 +000014564case $ac_sys_system in
14565AIX*)
14566
14567$as_echo "#define HAVE_BROKEN_PIPE_BUF 1" >>confdefs.h
14568 ;;
14569esac
14570
14571
Michael W. Hudson54241132001-12-07 15:38:26 +000014572
14573
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000014574for h in `(cd $srcdir;echo Python/thread_*.h)`
14575do
14576 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
14577done
14578
Michael W. Hudson54241132001-12-07 15:38:26 +000014579
Neal Norwitzd24499d2005-12-18 21:36:39 +000014580SRCDIRS="Parser Grammar Objects Python Modules Mac"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014581{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5
14582$as_echo_n "checking for build directories... " >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000014583for dir in $SRCDIRS; do
14584 if test ! -d $dir; then
14585 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000014586 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000014587done
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014588{ $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
14589$as_echo "done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000014590
Guido van Rossum627b2d71993-12-24 10:39:16 +000014591# generate output files
Antoine Pitrouf2caeed2009-05-24 20:23:57 +000014592ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config Misc/python.pc"
Martin v. Löwis88afe662002-10-26 13:47:44 +000014593
Antoine Pitrouaabdceb2010-09-10 20:03:17 +000014594ac_config_files="$ac_config_files Modules/ld_so_aix"
14595
Martin v. Löwis11437992002-04-12 09:54:03 +000014596cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014597# This file is a shell script that caches the results of configure
14598# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000014599# scripts and configure runs, see configure's option --config-cache.
14600# It is not useful on other systems. If it contains results you don't
14601# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014602#
Martin v. Löwis11437992002-04-12 09:54:03 +000014603# config.status only pays attention to the cache file if you give it
14604# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014605#
Skip Montanaro6dead952003-09-25 14:50:04 +000014606# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000014607# loading this file, other *unset* `ac_cv_foo' will be assigned the
14608# following values.
14609
14610_ACEOF
14611
Guido van Rossumf78abae1997-01-21 22:02:36 +000014612# The following way of writing the cache mishandles newlines in values,
14613# but we know of no workaround that is simple, portable, and efficient.
Martin v. Löwiseba40652007-08-30 20:10:57 +000014614# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014615# Ultrix sh set writes to stderr and can't be redirected directly,
14616# and sets the high bit in the cache file unless we assign to the vars.
Martin v. Löwiseba40652007-08-30 20:10:57 +000014617(
14618 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
14619 eval ac_val=\$$ac_var
14620 case $ac_val in #(
14621 *${as_nl}*)
14622 case $ac_var in #(
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014623 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
14624$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000014625 esac
14626 case $ac_var in #(
14627 _ | IFS | as_nl) ;; #(
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014628 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
14629 *) { eval $ac_var=; unset $ac_var;} ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000014630 esac ;;
14631 esac
14632 done
14633
Martin v. Löwis11437992002-04-12 09:54:03 +000014634 (set) 2>&1 |
Martin v. Löwiseba40652007-08-30 20:10:57 +000014635 case $as_nl`(ac_space=' '; set) 2>&1` in #(
14636 *${as_nl}ac_space=\ *)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014637 # `set' does not quote correctly, so add quotes: double-quote
14638 # substitution turns \\\\ into \\, and sed turns \\ into \.
Martin v. Löwis11437992002-04-12 09:54:03 +000014639 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014640 "s/'/'\\\\''/g;
14641 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Martin v. Löwiseba40652007-08-30 20:10:57 +000014642 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000014643 *)
14644 # `set' quotes correctly as required by POSIX, so do not add quotes.
Martin v. Löwiseba40652007-08-30 20:10:57 +000014645 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000014646 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000014647 esac |
14648 sort
14649) |
Martin v. Löwis11437992002-04-12 09:54:03 +000014650 sed '
Martin v. Löwiseba40652007-08-30 20:10:57 +000014651 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000014652 t clear
Martin v. Löwiseba40652007-08-30 20:10:57 +000014653 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000014654 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
14655 t end
Martin v. Löwiseba40652007-08-30 20:10:57 +000014656 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
14657 :end' >>confcache
14658if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
14659 if test -w "$cache_file"; then
Matthias Klose3cef2a92012-03-14 23:39:33 +010014660 if test "x$cache_file" != "x/dev/null"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014661 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
14662$as_echo "$as_me: updating cache $cache_file" >&6;}
Matthias Klose3cef2a92012-03-14 23:39:33 +010014663 if test ! -f "$cache_file" || test -h "$cache_file"; then
14664 cat confcache >"$cache_file"
14665 else
14666 case $cache_file in #(
14667 */* | ?:*)
14668 mv -f confcache "$cache_file"$$ &&
14669 mv -f "$cache_file"$$ "$cache_file" ;; #(
14670 *)
14671 mv -f confcache "$cache_file" ;;
14672 esac
14673 fi
14674 fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014675 else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014676 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
14677$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014678 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014679fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014680rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000014681
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014682test "x$prefix" = xNONE && prefix=$ac_default_prefix
14683# Let make expand exec_prefix.
14684test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000014685
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014686DEFS=-DHAVE_CONFIG_H
14687
Skip Montanaro6dead952003-09-25 14:50:04 +000014688ac_libobjs=
14689ac_ltlibobjs=
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014690U=
Skip Montanaro6dead952003-09-25 14:50:04 +000014691for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
14692 # 1. Remove the extension, and $U if already installed.
Martin v. Löwiseba40652007-08-30 20:10:57 +000014693 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014694 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
Martin v. Löwiseba40652007-08-30 20:10:57 +000014695 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
14696 # will be set to the directory where LIBOBJS objects are built.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014697 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
14698 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000014699done
14700LIBOBJS=$ac_libobjs
14701
14702LTLIBOBJS=$ac_ltlibobjs
14703
14704
Martin v. Löwis11437992002-04-12 09:54:03 +000014705
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014706
Matthias Klose3cef2a92012-03-14 23:39:33 +010014707: "${CONFIG_STATUS=./config.status}"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014708ac_write_fail=0
Martin v. Löwis11437992002-04-12 09:54:03 +000014709ac_clean_files_save=$ac_clean_files
14710ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014711{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
14712$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
14713as_write_fail=0
14714cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014715#! $SHELL
14716# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000014717# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014718# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000014719# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000014720
Martin v. Löwis11437992002-04-12 09:54:03 +000014721debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000014722ac_cs_recheck=false
14723ac_cs_silent=false
Jack Jansendd19cf82001-12-06 22:36:17 +000014724
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014725SHELL=\${CONFIG_SHELL-$SHELL}
14726export SHELL
14727_ASEOF
14728cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
14729## -------------------- ##
14730## M4sh Initialization. ##
14731## -------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000014732
Martin v. Löwiseba40652007-08-30 20:10:57 +000014733# Be more Bourne compatible
14734DUALCASE=1; export DUALCASE # for MKS sh
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014735if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014736 emulate sh
14737 NULLCMD=:
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014738 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000014739 # is contrary to our usage. Disable this feature.
14740 alias -g '${1+"$@"}'='"$@"'
Martin v. Löwiseba40652007-08-30 20:10:57 +000014741 setopt NO_GLOB_SUBST
Skip Montanaro89e975f2007-08-22 19:05:21 +000014742else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014743 case `(set -o) 2>/dev/null` in #(
14744 *posix*) :
14745 set -o posix ;; #(
14746 *) :
14747 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000014748esac
Martin v. Löwis11437992002-04-12 09:54:03 +000014749fi
Michael W. Hudson54241132001-12-07 15:38:26 +000014750
Skip Montanaro6dead952003-09-25 14:50:04 +000014751
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014752as_nl='
14753'
14754export as_nl
14755# Printing a long string crashes Solaris 7 /usr/bin/printf.
14756as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
14757as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
14758as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
14759# Prefer a ksh shell builtin over an external printf program on Solaris,
14760# but without wasting forks for bash or zsh.
14761if test -z "$BASH_VERSION$ZSH_VERSION" \
14762 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
14763 as_echo='print -r --'
14764 as_echo_n='print -rn --'
14765elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
14766 as_echo='printf %s\n'
14767 as_echo_n='printf %s'
14768else
14769 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
14770 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
14771 as_echo_n='/usr/ucb/echo -n'
14772 else
14773 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
14774 as_echo_n_body='eval
14775 arg=$1;
14776 case $arg in #(
14777 *"$as_nl"*)
14778 expr "X$arg" : "X\\(.*\\)$as_nl";
14779 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
14780 esac;
14781 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
14782 '
14783 export as_echo_n_body
14784 as_echo_n='sh -c $as_echo_n_body as_echo'
14785 fi
14786 export as_echo_body
14787 as_echo='sh -c $as_echo_body as_echo'
14788fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014789
14790# The user is always right.
14791if test "${PATH_SEPARATOR+set}" != set; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014792 PATH_SEPARATOR=:
14793 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
14794 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
14795 PATH_SEPARATOR=';'
14796 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000014797fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014798
Martin v. Löwiseba40652007-08-30 20:10:57 +000014799
14800# IFS
14801# We need space, tab and new line, in precisely that order. Quoting is
14802# there to prevent editors from complaining about space-tab.
14803# (If _AS_PATH_WALK were called with IFS unset, it would disable word
14804# splitting by setting IFS to empty value.)
Martin v. Löwiseba40652007-08-30 20:10:57 +000014805IFS=" "" $as_nl"
14806
14807# Find who we are. Look in the path if we contain no directory separator.
Matthias Klose3cef2a92012-03-14 23:39:33 +010014808as_myself=
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014809case $0 in #((
Martin v. Löwiseba40652007-08-30 20:10:57 +000014810 *[\\/]* ) as_myself=$0 ;;
14811 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000014812for as_dir in $PATH
14813do
14814 IFS=$as_save_IFS
14815 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014816 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
14817 done
Martin v. Löwiseba40652007-08-30 20:10:57 +000014818IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000014819
Martin v. Löwiseba40652007-08-30 20:10:57 +000014820 ;;
14821esac
14822# We did not find ourselves, most probably we were run as `sh COMMAND'
14823# in which case we are not to be found in the path.
14824if test "x$as_myself" = x; then
14825 as_myself=$0
14826fi
14827if test ! -f "$as_myself"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014828 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
14829 exit 1
Martin v. Löwiseba40652007-08-30 20:10:57 +000014830fi
14831
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014832# Unset variables that we do not need and which cause bugs (e.g. in
14833# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
14834# suppresses any "Segmentation fault" message there. '((' could
14835# trigger a bug in pdksh 5.2.14.
14836for as_var in BASH_ENV ENV MAIL MAILPATH
14837do eval test x\${$as_var+set} = xset \
14838 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Martin v. Löwiseba40652007-08-30 20:10:57 +000014839done
14840PS1='$ '
14841PS2='> '
14842PS4='+ '
14843
14844# NLS nuisances.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014845LC_ALL=C
14846export LC_ALL
14847LANGUAGE=C
14848export LANGUAGE
Martin v. Löwiseba40652007-08-30 20:10:57 +000014849
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014850# CDPATH.
14851(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
14852
14853
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014854# as_fn_error STATUS ERROR [LINENO LOG_FD]
14855# ----------------------------------------
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014856# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
14857# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014858# script with STATUS, using 1 if that was 0.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014859as_fn_error ()
14860{
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014861 as_status=$1; test $as_status -eq 0 && as_status=1
14862 if test "$4"; then
14863 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
14864 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014865 fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014866 $as_echo "$as_me: error: $2" >&2
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014867 as_fn_exit $as_status
14868} # as_fn_error
14869
14870
14871# as_fn_set_status STATUS
14872# -----------------------
14873# Set $? to STATUS, without forking.
14874as_fn_set_status ()
14875{
14876 return $1
14877} # as_fn_set_status
14878
14879# as_fn_exit STATUS
14880# -----------------
14881# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
14882as_fn_exit ()
14883{
14884 set +e
14885 as_fn_set_status $1
14886 exit $1
14887} # as_fn_exit
14888
14889# as_fn_unset VAR
14890# ---------------
14891# Portably unset VAR.
14892as_fn_unset ()
14893{
14894 { eval $1=; unset $1;}
14895}
14896as_unset=as_fn_unset
14897# as_fn_append VAR VALUE
14898# ----------------------
14899# Append the text in VALUE to the end of the definition contained in VAR. Take
14900# advantage of any shell optimizations that allow amortized linear growth over
14901# repeated appends, instead of the typical quadratic growth present in naive
14902# implementations.
14903if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
14904 eval 'as_fn_append ()
14905 {
14906 eval $1+=\$2
14907 }'
14908else
14909 as_fn_append ()
14910 {
14911 eval $1=\$$1\$2
14912 }
14913fi # as_fn_append
14914
14915# as_fn_arith ARG...
14916# ------------------
14917# Perform arithmetic evaluation on the ARGs, and store the result in the
14918# global $as_val. Take advantage of shells that can avoid forks. The arguments
14919# must be portable across $(()) and expr.
14920if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
14921 eval 'as_fn_arith ()
14922 {
14923 as_val=$(( $* ))
14924 }'
14925else
14926 as_fn_arith ()
14927 {
14928 as_val=`expr "$@" || test $? -eq 1`
14929 }
14930fi # as_fn_arith
14931
14932
Martin v. Löwiseba40652007-08-30 20:10:57 +000014933if expr a : '\(a\)' >/dev/null 2>&1 &&
14934 test "X`expr 00001 : '.*\(...\)'`" = X001; then
14935 as_expr=expr
14936else
14937 as_expr=false
14938fi
14939
14940if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
14941 as_basename=basename
14942else
14943 as_basename=false
14944fi
14945
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014946if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
14947 as_dirname=dirname
14948else
14949 as_dirname=false
14950fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014951
Martin v. Löwiseba40652007-08-30 20:10:57 +000014952as_me=`$as_basename -- "$0" ||
14953$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
14954 X"$0" : 'X\(//\)$' \| \
14955 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014956$as_echo X/"$0" |
Martin v. Löwiseba40652007-08-30 20:10:57 +000014957 sed '/^.*\/\([^/][^/]*\)\/*$/{
14958 s//\1/
14959 q
14960 }
14961 /^X\/\(\/\/\)$/{
14962 s//\1/
14963 q
14964 }
14965 /^X\/\(\/\).*/{
14966 s//\1/
14967 q
14968 }
14969 s/.*/./; q'`
14970
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014971# Avoid depending upon Character Ranges.
14972as_cr_letters='abcdefghijklmnopqrstuvwxyz'
14973as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
14974as_cr_Letters=$as_cr_letters$as_cr_LETTERS
14975as_cr_digits='0123456789'
14976as_cr_alnum=$as_cr_Letters$as_cr_digits
Martin v. Löwiseba40652007-08-30 20:10:57 +000014977
14978ECHO_C= ECHO_N= ECHO_T=
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014979case `echo -n x` in #(((((
Martin v. Löwiseba40652007-08-30 20:10:57 +000014980-n*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014981 case `echo 'xy\c'` in
Martin v. Löwiseba40652007-08-30 20:10:57 +000014982 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014983 xy) ECHO_C='\c';;
14984 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
14985 ECHO_T=' ';;
Martin v. Löwiseba40652007-08-30 20:10:57 +000014986 esac;;
14987*)
14988 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000014989esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014990
Martin v. Löwis11437992002-04-12 09:54:03 +000014991rm -f conf$$ conf$$.exe conf$$.file
Martin v. Löwiseba40652007-08-30 20:10:57 +000014992if test -d conf$$.dir; then
14993 rm -f conf$$.dir/conf$$.file
14994else
14995 rm -f conf$$.dir
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014996 mkdir conf$$.dir 2>/dev/null
Martin v. Löwiseba40652007-08-30 20:10:57 +000014997fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014998if (echo >conf$$.file) 2>/dev/null; then
14999 if ln -s conf$$.file conf$$ 2>/dev/null; then
15000 as_ln_s='ln -s'
15001 # ... but there are two gotchas:
15002 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
15003 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
Charles-François Natalibe2b9072013-01-08 19:47:00 +010015004 # In both cases, we have to default to `cp -pR'.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015005 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Charles-François Natalibe2b9072013-01-08 19:47:00 +010015006 as_ln_s='cp -pR'
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015007 elif ln conf$$.file conf$$ 2>/dev/null; then
15008 as_ln_s=ln
15009 else
Charles-François Natalibe2b9072013-01-08 19:47:00 +010015010 as_ln_s='cp -pR'
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015011 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015012else
Charles-François Natalibe2b9072013-01-08 19:47:00 +010015013 as_ln_s='cp -pR'
Martin v. Löwis11437992002-04-12 09:54:03 +000015014fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015015rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
15016rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000015017
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015018
15019# as_fn_mkdir_p
15020# -------------
15021# Create "$as_dir" as a directory, including parents if necessary.
15022as_fn_mkdir_p ()
15023{
15024
15025 case $as_dir in #(
15026 -*) as_dir=./$as_dir;;
15027 esac
15028 test -d "$as_dir" || eval $as_mkdir_p || {
15029 as_dirs=
15030 while :; do
15031 case $as_dir in #(
15032 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
15033 *) as_qdir=$as_dir;;
15034 esac
15035 as_dirs="'$as_qdir' $as_dirs"
15036 as_dir=`$as_dirname -- "$as_dir" ||
15037$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
15038 X"$as_dir" : 'X\(//\)[^/]' \| \
15039 X"$as_dir" : 'X\(//\)$' \| \
15040 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
15041$as_echo X"$as_dir" |
15042 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
15043 s//\1/
15044 q
15045 }
15046 /^X\(\/\/\)[^/].*/{
15047 s//\1/
15048 q
15049 }
15050 /^X\(\/\/\)$/{
15051 s//\1/
15052 q
15053 }
15054 /^X\(\/\).*/{
15055 s//\1/
15056 q
15057 }
15058 s/.*/./; q'`
15059 test -d "$as_dir" && break
15060 done
15061 test -z "$as_dirs" || eval "mkdir $as_dirs"
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015062 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015063
15064
15065} # as_fn_mkdir_p
Skip Montanaro6dead952003-09-25 14:50:04 +000015066if mkdir -p . 2>/dev/null; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015067 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +000015068else
Skip Montanarof0d5f792004-08-15 14:08:23 +000015069 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000015070 as_mkdir_p=false
15071fi
15072
Charles-François Natalibe2b9072013-01-08 19:47:00 +010015073
15074# as_fn_executable_p FILE
15075# -----------------------
15076# Test if FILE is an executable regular file.
15077as_fn_executable_p ()
15078{
15079 test -f "$1" && test -x "$1"
15080} # as_fn_executable_p
15081as_test_x='test -x'
15082as_executable_p=as_fn_executable_p
Martin v. Löwis11437992002-04-12 09:54:03 +000015083
15084# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000015085as_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 +000015086
15087# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000015088as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000015089
15090
Martin v. Löwis11437992002-04-12 09:54:03 +000015091exec 6>&1
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015092## ----------------------------------- ##
15093## Main body of $CONFIG_STATUS script. ##
15094## ----------------------------------- ##
15095_ASEOF
15096test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015097
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015098cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15099# Save the log message, to keep $0 and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000015100# report actual input values of CONFIG_FILES etc. instead of their
Martin v. Löwiseba40652007-08-30 20:10:57 +000015101# values after options handling.
15102ac_log="
Martin v. Löwis174440b2008-10-03 08:59:41 +000015103This file was extended by python $as_me 2.7, which was
Charles-François Natalibe2b9072013-01-08 19:47:00 +010015104generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000015105
15106 CONFIG_FILES = $CONFIG_FILES
15107 CONFIG_HEADERS = $CONFIG_HEADERS
15108 CONFIG_LINKS = $CONFIG_LINKS
15109 CONFIG_COMMANDS = $CONFIG_COMMANDS
15110 $ $0 $@
15111
Martin v. Löwiseba40652007-08-30 20:10:57 +000015112on `(hostname || uname -n) 2>/dev/null | sed 1q`
15113"
15114
Martin v. Löwis11437992002-04-12 09:54:03 +000015115_ACEOF
15116
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015117case $ac_config_files in *"
15118"*) set x $ac_config_files; shift; ac_config_files=$*;;
15119esac
15120
15121case $ac_config_headers in *"
15122"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
15123esac
15124
15125
15126cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015127# Files that config.status was made for.
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015128config_files="$ac_config_files"
15129config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000015130
Martin v. Löwiseba40652007-08-30 20:10:57 +000015131_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000015132
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015133cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015134ac_cs_usage="\
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015135\`$as_me' instantiates files and other configuration actions
15136from templates according to the current configuration. Unless the files
15137and actions are specified as TAGs, all are instantiated by default.
Martin v. Löwis11437992002-04-12 09:54:03 +000015138
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015139Usage: $0 [OPTION]... [TAG]...
Martin v. Löwis11437992002-04-12 09:54:03 +000015140
15141 -h, --help print this help, then exit
Martin v. Löwiseba40652007-08-30 20:10:57 +000015142 -V, --version print version number and configuration settings, then exit
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015143 --config print configuration, then exit
15144 -q, --quiet, --silent
15145 do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000015146 -d, --debug don't remove temporary files
15147 --recheck update $as_me by reconfiguring in the same conditions
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015148 --file=FILE[:TEMPLATE]
15149 instantiate the configuration file FILE
15150 --header=FILE[:TEMPLATE]
15151 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000015152
15153Configuration files:
15154$config_files
15155
15156Configuration headers:
15157$config_headers
15158
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015159Report bugs to <http://bugs.python.org/>."
Skip Montanaro89e975f2007-08-22 19:05:21 +000015160
Martin v. Löwiseba40652007-08-30 20:10:57 +000015161_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015162cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15163ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
Martin v. Löwis11437992002-04-12 09:54:03 +000015164ac_cs_version="\\
Martin v. Löwis174440b2008-10-03 08:59:41 +000015165python config.status 2.7
Charles-François Natalibe2b9072013-01-08 19:47:00 +010015166configured by $0, generated by GNU Autoconf 2.69,
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015167 with options \\"\$ac_cs_config\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000015168
Charles-François Natalibe2b9072013-01-08 19:47:00 +010015169Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000015170This config.status script is free software; the Free Software Foundation
15171gives unlimited permission to copy, distribute and modify it."
Martin v. Löwiseba40652007-08-30 20:10:57 +000015172
15173ac_pwd='$ac_pwd'
15174srcdir='$srcdir'
15175INSTALL='$INSTALL'
Trent Nelsonf6407a12012-08-30 14:56:13 +000015176MKDIR_P='$MKDIR_P'
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015177test -n "\$AWK" || AWK=awk
Martin v. Löwis11437992002-04-12 09:54:03 +000015178_ACEOF
15179
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015180cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15181# The default lists apply if the user does not specify any file.
Martin v. Löwis11437992002-04-12 09:54:03 +000015182ac_need_defaults=:
15183while test $# != 0
15184do
15185 case $1 in
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015186 --*=?*)
Martin v. Löwiseba40652007-08-30 20:10:57 +000015187 ac_option=`expr "X$1" : 'X\([^=]*\)='`
15188 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000015189 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000015190 ;;
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015191 --*=)
15192 ac_option=`expr "X$1" : 'X\([^=]*\)='`
15193 ac_optarg=
15194 ac_shift=:
15195 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015196 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000015197 ac_option=$1
15198 ac_optarg=$2
15199 ac_shift=shift
15200 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015201 esac
15202
Skip Montanaro6dead952003-09-25 14:50:04 +000015203 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000015204 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000015205 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
15206 ac_cs_recheck=: ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015207 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015208 $as_echo "$ac_cs_version"; exit ;;
15209 --config | --confi | --conf | --con | --co | --c )
15210 $as_echo "$ac_cs_config"; exit ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015211 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000015212 debug=: ;;
15213 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000015214 $ac_shift
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015215 case $ac_optarg in
15216 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015217 '') as_fn_error $? "missing file argument" ;;
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015218 esac
15219 as_fn_append CONFIG_FILES " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000015220 ac_need_defaults=false;;
15221 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000015222 $ac_shift
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015223 case $ac_optarg in
15224 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
15225 esac
15226 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000015227 ac_need_defaults=false;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015228 --he | --h)
15229 # Conflict between --help and --header
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015230 as_fn_error $? "ambiguous option: \`$1'
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015231Try \`$0 --help' for more information.";;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015232 --help | --hel | -h )
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015233 $as_echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000015234 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
15235 | -silent | --silent | --silen | --sile | --sil | --si | --s)
15236 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015237
15238 # This is an error.
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015239 -*) as_fn_error $? "unrecognized option: \`$1'
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015240Try \`$0 --help' for more information." ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015241
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015242 *) as_fn_append ac_config_targets " $1"
Martin v. Löwiseba40652007-08-30 20:10:57 +000015243 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015244
15245 esac
15246 shift
15247done
15248
Skip Montanaro6dead952003-09-25 14:50:04 +000015249ac_configure_extra_args=
15250
15251if $ac_cs_silent; then
15252 exec 6>/dev/null
15253 ac_configure_extra_args="$ac_configure_extra_args --silent"
15254fi
15255
15256_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015257cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Skip Montanaro6dead952003-09-25 14:50:04 +000015258if \$ac_cs_recheck; then
Charles-François Natalibe2b9072013-01-08 19:47:00 +010015259 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015260 shift
15261 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
15262 CONFIG_SHELL='$SHELL'
Martin v. Löwiseba40652007-08-30 20:10:57 +000015263 export CONFIG_SHELL
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015264 exec "\$@"
Skip Montanaro6dead952003-09-25 14:50:04 +000015265fi
15266
Martin v. Löwis11437992002-04-12 09:54:03 +000015267_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015268cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwiseba40652007-08-30 20:10:57 +000015269exec 5>>config.log
15270{
15271 echo
15272 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
15273## Running $as_me. ##
15274_ASBOX
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015275 $as_echo "$ac_log"
Martin v. Löwiseba40652007-08-30 20:10:57 +000015276} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015277
Martin v. Löwiseba40652007-08-30 20:10:57 +000015278_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015279cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwiseba40652007-08-30 20:10:57 +000015280_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000015281
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015282cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwiseba40652007-08-30 20:10:57 +000015283
15284# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000015285for ac_config_target in $ac_config_targets
15286do
Martin v. Löwiseba40652007-08-30 20:10:57 +000015287 case $ac_config_target in
15288 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
15289 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
15290 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
15291 "Mac/IDLE/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/IDLE/Makefile" ;;
Ronald Oussoren580c7fe2008-05-02 19:45:11 +000015292 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
15293 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015294 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
15295 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
Antoine Pitrouf2caeed2009-05-24 20:23:57 +000015296 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
Antoine Pitrouaabdceb2010-09-10 20:03:17 +000015297 "Modules/ld_so_aix") CONFIG_FILES="$CONFIG_FILES Modules/ld_so_aix" ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015298
Matthias Klose3cef2a92012-03-14 23:39:33 +010015299 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015300 esac
15301done
15302
Martin v. Löwiseba40652007-08-30 20:10:57 +000015303
Martin v. Löwis11437992002-04-12 09:54:03 +000015304# If the user did not use the arguments to specify the items to instantiate,
15305# then the envvar interface is used. Set only those that are not.
15306# We use the long form for the default assignment because of an extremely
15307# bizarre bug on SunOS 4.1.3.
15308if $ac_need_defaults; then
15309 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
15310 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
15311fi
15312
Skip Montanaro6dead952003-09-25 14:50:04 +000015313# Have a temporary directory for convenience. Make it in the build tree
Martin v. Löwiseba40652007-08-30 20:10:57 +000015314# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000015315# creating and moving files from /tmp can sometimes cause problems.
Martin v. Löwiseba40652007-08-30 20:10:57 +000015316# Hook for its removal unless debugging.
15317# Note that there is a small window in which the directory will not be cleaned:
15318# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000015319$debug ||
15320{
Matthias Klose3cef2a92012-03-14 23:39:33 +010015321 tmp= ac_tmp=
Martin v. Löwiseba40652007-08-30 20:10:57 +000015322 trap 'exit_status=$?
Matthias Klose3cef2a92012-03-14 23:39:33 +010015323 : "${ac_tmp:=$tmp}"
15324 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
Martin v. Löwiseba40652007-08-30 20:10:57 +000015325' 0
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015326 trap 'as_fn_exit 1' 1 2 13 15
Martin v. Löwis11437992002-04-12 09:54:03 +000015327}
Martin v. Löwis11437992002-04-12 09:54:03 +000015328# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000015329
Martin v. Löwis11437992002-04-12 09:54:03 +000015330{
Martin v. Löwiseba40652007-08-30 20:10:57 +000015331 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Matthias Klose3cef2a92012-03-14 23:39:33 +010015332 test -d "$tmp"
Martin v. Löwis11437992002-04-12 09:54:03 +000015333} ||
15334{
Martin v. Löwiseba40652007-08-30 20:10:57 +000015335 tmp=./conf$$-$RANDOM
15336 (umask 077 && mkdir "$tmp")
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015337} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
Matthias Klose3cef2a92012-03-14 23:39:33 +010015338ac_tmp=$tmp
Martin v. Löwis11437992002-04-12 09:54:03 +000015339
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015340# Set up the scripts for CONFIG_FILES section.
15341# No need to generate them if there are no CONFIG_FILES.
15342# This happens for instance with `./config.status config.h'.
Martin v. Löwiseba40652007-08-30 20:10:57 +000015343if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015344
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015345
15346ac_cr=`echo X | tr X '\015'`
15347# On cygwin, bash can eat \r inside `` if the user requested igncr.
15348# But we know of no other shell where ac_cr would be empty at this
15349# point, so we can use a bashism as a fallback.
15350if test "x$ac_cr" = x; then
15351 eval ac_cr=\$\'\\r\'
15352fi
15353ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
15354if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015355 ac_cs_awk_cr='\\r'
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015356else
15357 ac_cs_awk_cr=$ac_cr
15358fi
15359
Matthias Klose3cef2a92012-03-14 23:39:33 +010015360echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
Martin v. Löwis11437992002-04-12 09:54:03 +000015361_ACEOF
15362
Martin v. Löwiseba40652007-08-30 20:10:57 +000015363
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015364{
15365 echo "cat >conf$$subs.awk <<_ACEOF" &&
15366 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
15367 echo "_ACEOF"
15368} >conf$$subs.sh ||
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015369 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
15370ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
Martin v. Löwiseba40652007-08-30 20:10:57 +000015371ac_delim='%!_!# '
15372for ac_last_try in false false false false false :; do
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015373 . ./conf$$subs.sh ||
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015374 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015375
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015376 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
15377 if test $ac_delim_n = $ac_delim_num; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015378 break
15379 elif $ac_last_try; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015380 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015381 else
15382 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000015383 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015384done
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015385rm -f conf$$subs.sh
Martin v. Löwiseba40652007-08-30 20:10:57 +000015386
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015387cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Matthias Klose3cef2a92012-03-14 23:39:33 +010015388cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
Martin v. Löwiseba40652007-08-30 20:10:57 +000015389_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015390sed -n '
15391h
15392s/^/S["/; s/!.*/"]=/
15393p
15394g
15395s/^[^!]*!//
15396:repl
15397t repl
15398s/'"$ac_delim"'$//
15399t delim
15400:nl
15401h
15402s/\(.\{148\}\)..*/\1/
15403t more1
15404s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
15405p
15406n
15407b repl
15408:more1
15409s/["\\]/\\&/g; s/^/"/; s/$/"\\/
15410p
15411g
15412s/.\{148\}//
15413t nl
15414:delim
15415h
15416s/\(.\{148\}\)..*/\1/
15417t more2
15418s/["\\]/\\&/g; s/^/"/; s/$/"/
15419p
15420b
15421:more2
15422s/["\\]/\\&/g; s/^/"/; s/$/"\\/
15423p
15424g
15425s/.\{148\}//
15426t delim
15427' <conf$$subs.awk | sed '
15428/^[^""]/{
15429 N
15430 s/\n//
15431}
15432' >>$CONFIG_STATUS || ac_write_fail=1
15433rm -f conf$$subs.awk
15434cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15435_ACAWK
Matthias Klose3cef2a92012-03-14 23:39:33 +010015436cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015437 for (key in S) S_is_set[key] = 1
15438 FS = ""
15439
15440}
15441{
15442 line = $ 0
15443 nfields = split(line, field, "@")
15444 substed = 0
15445 len = length(field[1])
15446 for (i = 2; i < nfields; i++) {
15447 key = field[i]
15448 keylen = length(key)
15449 if (S_is_set[key]) {
15450 value = S[key]
15451 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
15452 len += length(value) + length(field[++i])
15453 substed = 1
15454 } else
15455 len += 1 + keylen
15456 }
15457
15458 print line
15459}
15460
15461_ACAWK
Martin v. Löwiseba40652007-08-30 20:10:57 +000015462_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015463cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15464if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
15465 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
15466else
15467 cat
Matthias Klose3cef2a92012-03-14 23:39:33 +010015468fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015469 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015470_ACEOF
15471
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015472# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
15473# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
Martin v. Löwiseba40652007-08-30 20:10:57 +000015474# trailing colons and then remove the whole line if VPATH becomes empty
15475# (actually we leave an empty line to preserve line numbers).
15476if test "x$srcdir" = x.; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015477 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
15478h
15479s///
15480s/^/:/
15481s/[ ]*$/:/
15482s/:\$(srcdir):/:/g
15483s/:\${srcdir}:/:/g
15484s/:@srcdir@:/:/g
15485s/^:*//
Martin v. Löwiseba40652007-08-30 20:10:57 +000015486s/:*$//
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015487x
15488s/\(=[ ]*\).*/\1/
15489G
15490s/\n//
Martin v. Löwiseba40652007-08-30 20:10:57 +000015491s/^[^=]*=[ ]*$//
15492}'
15493fi
15494
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015495cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015496fi # test -n "$CONFIG_FILES"
15497
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015498# Set up the scripts for CONFIG_HEADERS section.
15499# No need to generate them if there are no CONFIG_HEADERS.
15500# This happens for instance with `./config.status Makefile'.
15501if test -n "$CONFIG_HEADERS"; then
Matthias Klose3cef2a92012-03-14 23:39:33 +010015502cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015503BEGIN {
15504_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000015505
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015506# Transform confdefs.h into an awk script `defines.awk', embedded as
15507# here-document in config.status, that substitutes the proper values into
15508# config.h.in to produce config.h.
15509
15510# Create a delimiter string that does not exist in confdefs.h, to ease
15511# handling of long lines.
15512ac_delim='%!_!# '
15513for ac_last_try in false false :; do
Matthias Klose3cef2a92012-03-14 23:39:33 +010015514 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
15515 if test -z "$ac_tt"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015516 break
15517 elif $ac_last_try; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015518 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015519 else
15520 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
15521 fi
15522done
15523
15524# For the awk script, D is an array of macro values keyed by name,
15525# likewise P contains macro parameters if any. Preserve backslash
15526# newline sequences.
15527
15528ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
15529sed -n '
15530s/.\{148\}/&'"$ac_delim"'/g
15531t rset
15532:rset
15533s/^[ ]*#[ ]*define[ ][ ]*/ /
15534t def
15535d
15536:def
15537s/\\$//
15538t bsnl
15539s/["\\]/\\&/g
15540s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
15541D["\1"]=" \3"/p
15542s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
15543d
15544:bsnl
15545s/["\\]/\\&/g
15546s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
15547D["\1"]=" \3\\\\\\n"\\/p
15548t cont
15549s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
15550t cont
15551d
15552:cont
15553n
15554s/.\{148\}/&'"$ac_delim"'/g
15555t clear
15556:clear
15557s/\\$//
15558t bsnlc
15559s/["\\]/\\&/g; s/^/"/; s/$/"/p
15560d
15561:bsnlc
15562s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
15563b cont
15564' <confdefs.h | sed '
15565s/'"$ac_delim"'/"\\\
15566"/g' >>$CONFIG_STATUS || ac_write_fail=1
15567
15568cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15569 for (key in D) D_is_set[key] = 1
15570 FS = ""
15571}
15572/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
15573 line = \$ 0
15574 split(line, arg, " ")
15575 if (arg[1] == "#") {
15576 defundef = arg[2]
15577 mac1 = arg[3]
15578 } else {
15579 defundef = substr(arg[1], 2)
15580 mac1 = arg[2]
15581 }
15582 split(mac1, mac2, "(") #)
15583 macro = mac2[1]
15584 prefix = substr(line, 1, index(line, defundef) - 1)
15585 if (D_is_set[macro]) {
15586 # Preserve the white space surrounding the "#".
15587 print prefix "define", macro P[macro] D[macro]
15588 next
15589 } else {
15590 # Replace #undef with comments. This is necessary, for example,
15591 # in the case of _POSIX_SOURCE, which is predefined and required
15592 # on some systems where configure will not decide to define it.
15593 if (defundef == "undef") {
15594 print "/*", prefix defundef, macro, "*/"
15595 next
15596 }
15597 }
15598}
15599{ print }
15600_ACAWK
15601_ACEOF
15602cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015603 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015604fi # test -n "$CONFIG_HEADERS"
15605
15606
15607eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
15608shift
15609for ac_tag
Martin v. Löwiseba40652007-08-30 20:10:57 +000015610do
15611 case $ac_tag in
15612 :[FHLC]) ac_mode=$ac_tag; continue;;
15613 esac
15614 case $ac_mode$ac_tag in
15615 :[FHL]*:*);;
Matthias Klose3cef2a92012-03-14 23:39:33 +010015616 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015617 :[FH]-) ac_tag=-:-;;
15618 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
15619 esac
15620 ac_save_IFS=$IFS
15621 IFS=:
15622 set x $ac_tag
15623 IFS=$ac_save_IFS
15624 shift
15625 ac_file=$1
15626 shift
15627
15628 case $ac_mode in
15629 :L) ac_source=$1;;
15630 :[FH])
15631 ac_file_inputs=
15632 for ac_f
15633 do
15634 case $ac_f in
Matthias Klose3cef2a92012-03-14 23:39:33 +010015635 -) ac_f="$ac_tmp/stdin";;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015636 *) # Look for the file first in the build tree, then in the source tree
15637 # (if the path is not absolute). The absolute path cannot be DOS-style,
15638 # because $ac_f cannot contain `:'.
15639 test -f "$ac_f" ||
15640 case $ac_f in
15641 [\\/$]*) false;;
15642 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
15643 esac ||
Matthias Klose3cef2a92012-03-14 23:39:33 +010015644 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015645 esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015646 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
15647 as_fn_append ac_file_inputs " '$ac_f'"
Martin v. Löwiseba40652007-08-30 20:10:57 +000015648 done
15649
15650 # Let's still pretend it is `configure' which instantiates (i.e., don't
15651 # use $as_me), people would be surprised to read:
15652 # /* config.h. Generated by config.status. */
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015653 configure_input='Generated from '`
15654 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
15655 `' by configure.'
Martin v. Löwiseba40652007-08-30 20:10:57 +000015656 if test x"$ac_file" != x-; then
15657 configure_input="$ac_file. $configure_input"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015658 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
15659$as_echo "$as_me: creating $ac_file" >&6;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000015660 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015661 # Neutralize special characters interpreted by sed in replacement strings.
15662 case $configure_input in #(
15663 *\&* | *\|* | *\\* )
15664 ac_sed_conf_input=`$as_echo "$configure_input" |
15665 sed 's/[\\\\&|]/\\\\&/g'`;; #(
15666 *) ac_sed_conf_input=$configure_input;;
15667 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000015668
15669 case $ac_tag in
Matthias Klose3cef2a92012-03-14 23:39:33 +010015670 *:-:* | *:-) cat >"$ac_tmp/stdin" \
15671 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015672 esac
15673 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015674 esac
15675
Martin v. Löwiseba40652007-08-30 20:10:57 +000015676 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000015677$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015678 X"$ac_file" : 'X\(//\)[^/]' \| \
15679 X"$ac_file" : 'X\(//\)$' \| \
Martin v. Löwiseba40652007-08-30 20:10:57 +000015680 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015681$as_echo X"$ac_file" |
Martin v. Löwiseba40652007-08-30 20:10:57 +000015682 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
15683 s//\1/
15684 q
15685 }
15686 /^X\(\/\/\)[^/].*/{
15687 s//\1/
15688 q
15689 }
15690 /^X\(\/\/\)$/{
15691 s//\1/
15692 q
15693 }
15694 /^X\(\/\).*/{
15695 s//\1/
15696 q
15697 }
15698 s/.*/./; q'`
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015699 as_dir="$ac_dir"; as_fn_mkdir_p
Martin v. Löwis11437992002-04-12 09:54:03 +000015700 ac_builddir=.
15701
Martin v. Löwiseba40652007-08-30 20:10:57 +000015702case "$ac_dir" in
15703.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
15704*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015705 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Martin v. Löwiseba40652007-08-30 20:10:57 +000015706 # A ".." for each directory in $ac_dir_suffix.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015707 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Martin v. Löwiseba40652007-08-30 20:10:57 +000015708 case $ac_top_builddir_sub in
15709 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
15710 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
15711 esac ;;
15712esac
15713ac_abs_top_builddir=$ac_pwd
15714ac_abs_builddir=$ac_pwd$ac_dir_suffix
15715# for backward compatibility:
15716ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000015717
15718case $srcdir in
Martin v. Löwiseba40652007-08-30 20:10:57 +000015719 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000015720 ac_srcdir=.
Martin v. Löwiseba40652007-08-30 20:10:57 +000015721 ac_top_srcdir=$ac_top_builddir_sub
15722 ac_abs_top_srcdir=$ac_pwd ;;
15723 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000015724 ac_srcdir=$srcdir$ac_dir_suffix;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015725 ac_top_srcdir=$srcdir
15726 ac_abs_top_srcdir=$srcdir ;;
15727 *) # Relative name.
15728 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
15729 ac_top_srcdir=$ac_top_build_prefix$srcdir
15730 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015731esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000015732ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000015733
Martin v. Löwis11437992002-04-12 09:54:03 +000015734
Martin v. Löwiseba40652007-08-30 20:10:57 +000015735 case $ac_mode in
15736 :F)
15737 #
15738 # CONFIG_FILE
15739 #
Martin v. Löwis11437992002-04-12 09:54:03 +000015740
15741 case $INSTALL in
15742 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015743 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015744 esac
Trent Nelsonf6407a12012-08-30 14:56:13 +000015745 ac_MKDIR_P=$MKDIR_P
15746 case $MKDIR_P in
15747 [\\/$]* | ?:[\\/]* ) ;;
15748 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
15749 esac
Brett Cannon19fab762007-06-02 03:02:29 +000015750_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000015751
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# If the template does not know about datarootdir, expand it.
15754# FIXME: This hack should be removed a few years after 2.60.
15755ac_datarootdir_hack=; ac_datarootdir_seen=
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015756ac_sed_dataroot='
15757/datarootdir/ {
Martin v. Löwiseba40652007-08-30 20:10:57 +000015758 p
15759 q
15760}
15761/@datadir@/p
15762/@docdir@/p
15763/@infodir@/p
15764/@localedir@/p
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015765/@mandir@/p'
15766case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
Martin v. Löwiseba40652007-08-30 20:10:57 +000015767*datarootdir*) ac_datarootdir_seen=yes;;
15768*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015769 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
15770$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000015771_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015772cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwiseba40652007-08-30 20:10:57 +000015773 ac_datarootdir_hack='
15774 s&@datadir@&$datadir&g
15775 s&@docdir@&$docdir&g
15776 s&@infodir@&$infodir&g
15777 s&@localedir@&$localedir&g
15778 s&@mandir@&$mandir&g
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015779 s&\\\${datarootdir}&$datarootdir&g' ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015780esac
15781_ACEOF
15782
15783# Neutralize VPATH when `$srcdir' = `.'.
15784# Shell code in configure.ac might set extrasub.
15785# FIXME: do we really want to maintain this feature?
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015786cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15787ac_sed_extra="$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000015788$extrasub
15789_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015790cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015791:t
15792/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015793s|@configure_input@|$ac_sed_conf_input|;t t
Martin v. Löwiseba40652007-08-30 20:10:57 +000015794s&@top_builddir@&$ac_top_builddir_sub&;t t
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015795s&@top_build_prefix@&$ac_top_build_prefix&;t t
Martin v. Löwiseba40652007-08-30 20:10:57 +000015796s&@srcdir@&$ac_srcdir&;t t
15797s&@abs_srcdir@&$ac_abs_srcdir&;t t
15798s&@top_srcdir@&$ac_top_srcdir&;t t
15799s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
15800s&@builddir@&$ac_builddir&;t t
15801s&@abs_builddir@&$ac_abs_builddir&;t t
15802s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
15803s&@INSTALL@&$ac_INSTALL&;t t
Trent Nelsonf6407a12012-08-30 14:56:13 +000015804s&@MKDIR_P@&$ac_MKDIR_P&;t t
Martin v. Löwiseba40652007-08-30 20:10:57 +000015805$ac_datarootdir_hack
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015806"
Matthias Klose3cef2a92012-03-14 23:39:33 +010015807eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
15808 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015809
Martin v. Löwiseba40652007-08-30 20:10:57 +000015810test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
Matthias Klose3cef2a92012-03-14 23:39:33 +010015811 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
15812 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
15813 "$ac_tmp/out"`; test -z "$ac_out"; } &&
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015814 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015815which seems to be undefined. Please make sure it is defined" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015816$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015817which seems to be undefined. Please make sure it is defined" >&2;}
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015818
Matthias Klose3cef2a92012-03-14 23:39:33 +010015819 rm -f "$ac_tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000015820 case $ac_file in
Matthias Klose3cef2a92012-03-14 23:39:33 +010015821 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
15822 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015823 esac \
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015824 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015825 ;;
15826 :H)
15827 #
15828 # CONFIG_HEADER
15829 #
Martin v. Löwis11437992002-04-12 09:54:03 +000015830 if test x"$ac_file" != x-; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015831 {
15832 $as_echo "/* $configure_input */" \
Matthias Klose3cef2a92012-03-14 23:39:33 +010015833 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
15834 } >"$ac_tmp/config.h" \
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015835 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Matthias Klose3cef2a92012-03-14 23:39:33 +010015836 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015837 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
15838$as_echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000015839 else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015840 rm -f "$ac_file"
Matthias Klose3cef2a92012-03-14 23:39:33 +010015841 mv "$ac_tmp/config.h" "$ac_file" \
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015842 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000015843 fi
15844 else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015845 $as_echo "/* $configure_input */" \
Matthias Klose3cef2a92012-03-14 23:39:33 +010015846 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015847 || as_fn_error $? "could not create -" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000015848 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015849 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000015850
Martin v. Löwiseba40652007-08-30 20:10:57 +000015851
15852 esac
15853
Antoine Pitrouaabdceb2010-09-10 20:03:17 +000015854
15855 case $ac_file$ac_mode in
15856 "Modules/ld_so_aix":F) chmod +x Modules/ld_so_aix ;;
15857
15858 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000015859done # for ac_tag
15860
Guido van Rossum627b2d71993-12-24 10:39:16 +000015861
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015862as_fn_exit 0
Martin v. Löwis11437992002-04-12 09:54:03 +000015863_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000015864ac_clean_files=$ac_clean_files_save
15865
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015866test $ac_write_fail = 0 ||
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015867 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015868
Martin v. Löwis11437992002-04-12 09:54:03 +000015869
15870# configure is writing to config.log, and then calls config.status.
15871# config.status does its own redirection, appending to config.log.
15872# Unfortunately, on DOS this fails, as config.log is still kept open
15873# by configure, so config.status won't be able to write to it; its
15874# output is simply discarded. So we exec the FD to /dev/null,
15875# effectively closing config.log, so it can be properly (re)opened and
15876# appended to by config.status. When coming back to configure, we
15877# need to make the FD available again.
15878if test "$no_create" != yes; then
15879 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000015880 ac_config_status_args=
15881 test "$silent" = yes &&
15882 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000015883 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000015884 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000015885 exec 5>>config.log
15886 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
15887 # would make configure fail if this is the last instruction.
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015888 $ac_cs_success || as_fn_exit 1
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015889fi
15890if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
15891 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
15892$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000015893fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000015894
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000015895
Martin v. Löwisf7afe952006-04-14 15:16:15 +000015896echo "creating Modules/Setup"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000015897if test ! -f Modules/Setup
15898then
15899 cp $srcdir/Modules/Setup.dist Modules/Setup
15900fi
15901
Martin v. Löwisf7afe952006-04-14 15:16:15 +000015902echo "creating Modules/Setup.local"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000015903if test ! -f Modules/Setup.local
15904then
15905 echo "# Edit this file for local setup changes" >Modules/Setup.local
15906fi
15907
15908echo "creating Makefile"
15909$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
15910 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000015911 Modules/Setup.local Modules/Setup
Skip Montanaro89e975f2007-08-22 19:05:21 +000015912
15913case $ac_sys_system in
15914BeOS)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015915 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
Skip Montanaro89e975f2007-08-22 19:05:21 +000015916
15917 Support for BeOS is deprecated as of Python 2.6.
15918 See PEP 11 for the gory details.
15919 " >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015920$as_echo "$as_me: WARNING:
Skip Montanaro89e975f2007-08-22 19:05:21 +000015921
15922 Support for BeOS is deprecated as of Python 2.6.
15923 See PEP 11 for the gory details.
15924 " >&2;}
15925 ;;
15926*) ;;
15927esac
15928
Neil Schemenauerc761fc82001-02-19 04:50:49 +000015929mv config.c Modules