blob: 68033f50d775e176c1c3072cab4414f6f91d3030 [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
Ned Deily3f1d0b32014-11-20 02:11:03 -0800627ENSUREPIP
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +0000628SRCDIRS
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000629THREADHEADERS
630UNICODE_OBJS
631LIBC
632LIBM
633HAVE_GETHOSTBYNAME
634HAVE_GETHOSTBYNAME_R
635HAVE_GETHOSTBYNAME_R_3_ARG
636HAVE_GETHOSTBYNAME_R_5_ARG
637HAVE_GETHOSTBYNAME_R_6_ARG
638LIBOBJS
639TRUE
640MACHDEP_OBJS
641DYNLOADFILE
642DLINCLDIR
643THREADOBJ
644LDLAST
645USE_THREAD_MODULE
646SIGNAL_OBJS
647USE_SIGNAL_MODULE
Ned Deilya2a9f572013-10-25 00:30:10 -0700648TCLTK_LIBS
649TCLTK_INCLUDES
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000650LIBFFI_INCLUDEDIR
651PKG_CONFIG
652SHLIBS
653CFLAGSFORSHARED
654LINKFORSHARED
655CCSHARED
656BLDSHARED
657LDCXXSHARED
658LDSHARED
659SO
660LIBTOOL_CRUFT
661OTHER_LIBTOOL_OPT
662UNIVERSAL_ARCH_FLAGS
663BASECFLAGS
664OPT
665LN
Trent Nelsonf6407a12012-08-30 14:56:13 +0000666MKDIR_P
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000667INSTALL_DATA
668INSTALL_SCRIPT
669INSTALL_PROGRAM
Georg Brandl3a5508e2011-03-06 10:42:21 +0100670HAS_HG
671HGBRANCH
672HGTAG
673HGVERSION
Trent Nelsond86ceec2012-10-16 09:42:45 -0400674BASECPPFLAGS
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000675SVNVERSION
676ARFLAGS
doko@python.orgd65e2ba2013-01-31 23:52:03 +0100677ac_ct_AR
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000678AR
679RANLIB
680GNULD
681LINKCC
682RUNSHARED
683INSTSONAME
684LDLIBRARYDIR
685BLDLIBRARY
686DLLLIBRARY
687LDLIBRARY
688LIBRARY
689BUILDEXEEXT
690EGREP
691GREP
692CPP
doko@python.org4e63fbe2013-01-25 13:08:27 +0100693MULTIARCH
doko@python.orgd65e2ba2013-01-31 23:52:03 +0100694ac_ct_CXX
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000695MAINCC
696CXX
697OBJEXT
698EXEEXT
699ac_ct_CC
700CPPFLAGS
701LDFLAGS
702CFLAGS
703CC
704EXPORT_MACOSX_DEPLOYMENT_TARGET
705CONFIGURE_MACOSX_DEPLOYMENT_TARGET
706EXTRAMACHDEPPATH
707EXTRAPLATDIR
708SGI_ABI
doko@python.orgd65e2ba2013-01-31 23:52:03 +0100709_PYTHON_HOST_PLATFORM
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000710MACHDEP
711FRAMEWORKINSTALLAPPSPREFIX
712FRAMEWORKUNIXTOOLSPREFIX
713FRAMEWORKALTINSTALLLAST
714FRAMEWORKALTINSTALLFIRST
715FRAMEWORKINSTALLLAST
716FRAMEWORKINSTALLFIRST
717PYTHONFRAMEWORKINSTALLDIR
718PYTHONFRAMEWORKPREFIX
719PYTHONFRAMEWORKDIR
720PYTHONFRAMEWORKIDENTIFIER
721PYTHONFRAMEWORK
722LIPO_32BIT_FLAGS
723ARCH_RUN_32BIT
724UNIVERSALSDK
725CONFIG_ARGS
726SOVERSION
727VERSION
doko@python.orgd65e2ba2013-01-31 23:52:03 +0100728PYTHON_FOR_BUILD
729host_os
730host_vendor
731host_cpu
732host
733build_os
734build_vendor
735build_cpu
736build
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000737target_alias
738host_alias
739build_alias
740LIBS
741ECHO_T
742ECHO_N
743ECHO_C
744DEFS
745mandir
746localedir
747libdir
748psdir
749pdfdir
750dvidir
751htmldir
752infodir
753docdir
754oldincludedir
755includedir
756localstatedir
757sharedstatedir
758sysconfdir
759datadir
760datarootdir
761libexecdir
762sbindir
763bindir
764program_transform_name
765prefix
766exec_prefix
767PACKAGE_URL
768PACKAGE_BUGREPORT
769PACKAGE_STRING
770PACKAGE_VERSION
771PACKAGE_TARNAME
772PACKAGE_NAME
773PATH_SEPARATOR
774SHELL'
Skip Montanaro6dead952003-09-25 14:50:04 +0000775ac_subst_files=''
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000776ac_user_opts='
777enable_option_checking
778enable_universalsdk
779with_universal_archs
780with_framework_name
781enable_framework
782with_gcc
783with_cxx_main
784with_suffix
785enable_shared
786enable_profiling
787with_pydebug
788enable_toolbox_glue
789with_libs
790with_system_expat
791with_system_ffi
Ned Deilya2a9f572013-10-25 00:30:10 -0700792with_tcltk_includes
793with_tcltk_libs
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000794with_dbmliborder
795with_signal_module
796with_dec_threads
797with_threads
798with_thread
799with_pth
800enable_ipv6
801with_doc_strings
802with_tsc
803with_pymalloc
804with_valgrind
805with_wctype_functions
806with_fpectl
807with_libm
808with_libc
809enable_big_digits
810enable_unicode
Ned Deily3f1d0b32014-11-20 02:11:03 -0800811with_ensurepip
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000812'
Martin v. Löwiseba40652007-08-30 20:10:57 +0000813 ac_precious_vars='build_alias
814host_alias
815target_alias
816CC
817CFLAGS
818LDFLAGS
819LIBS
820CPPFLAGS
821CPP'
822
Guido van Rossum627b2d71993-12-24 10:39:16 +0000823
Guido van Rossum7f43da71994-08-01 12:15:30 +0000824# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000825ac_init_help=
826ac_init_version=false
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000827ac_unrecognized_opts=
828ac_unrecognized_sep=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000829# The variables have the same names as the options, with
830# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000831cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000832exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000833no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000834no_recursion=
835prefix=NONE
836program_prefix=NONE
837program_suffix=NONE
838program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000839silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000840site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000841srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000842verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000843x_includes=NONE
844x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000845
846# Installation directory options.
847# These are left unexpanded so users can "make install exec_prefix=/foo"
848# and all the variables that are supposed to be based on exec_prefix
849# by default will actually change.
850# Use braces instead of parens because sh, perl, etc. also accept them.
Martin v. Löwiseba40652007-08-30 20:10:57 +0000851# (The list follows the same order as the GNU Coding Standards.)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000852bindir='${exec_prefix}/bin'
853sbindir='${exec_prefix}/sbin'
854libexecdir='${exec_prefix}/libexec'
Martin v. Löwiseba40652007-08-30 20:10:57 +0000855datarootdir='${prefix}/share'
856datadir='${datarootdir}'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000857sysconfdir='${prefix}/etc'
858sharedstatedir='${prefix}/com'
859localstatedir='${prefix}/var'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000860includedir='${prefix}/include'
861oldincludedir='/usr/include'
Martin v. Löwiseba40652007-08-30 20:10:57 +0000862docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
863infodir='${datarootdir}/info'
864htmldir='${docdir}'
865dvidir='${docdir}'
866pdfdir='${docdir}'
867psdir='${docdir}'
868libdir='${exec_prefix}/lib'
869localedir='${datarootdir}/locale'
870mandir='${datarootdir}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000871
Guido van Rossum7f43da71994-08-01 12:15:30 +0000872ac_prev=
Martin v. Löwiseba40652007-08-30 20:10:57 +0000873ac_dashdash=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000874for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000875do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000876 # If the previous option needs an argument, assign it.
877 if test -n "$ac_prev"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +0000878 eval $ac_prev=\$ac_option
Guido van Rossum7f43da71994-08-01 12:15:30 +0000879 ac_prev=
880 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000881 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000882
Martin v. Löwiseba40652007-08-30 20:10:57 +0000883 case $ac_option in
Georg Brandl71f4fbb2011-02-25 11:04:50 +0000884 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
885 *=) ac_optarg= ;;
886 *) ac_optarg=yes ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +0000887 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000888
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000889 # Accept the important Cygnus configure options, so we can diagnose typos.
890
Martin v. Löwiseba40652007-08-30 20:10:57 +0000891 case $ac_dashdash$ac_option in
892 --)
893 ac_dashdash=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000894
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000895 -bindir | --bindir | --bindi | --bind | --bin | --bi)
896 ac_prev=bindir ;;
897 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000898 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000899
900 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000901 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000902 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000903 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000904
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000905 -cache-file | --cache-file | --cache-fil | --cache-fi \
906 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
907 ac_prev=cache_file ;;
908 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
909 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000910 cache_file=$ac_optarg ;;
911
912 --config-cache | -C)
913 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000914
Martin v. Löwiseba40652007-08-30 20:10:57 +0000915 -datadir | --datadir | --datadi | --datad)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000916 ac_prev=datadir ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +0000917 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000918 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000919
Martin v. Löwiseba40652007-08-30 20:10:57 +0000920 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
921 | --dataroo | --dataro | --datar)
922 ac_prev=datarootdir ;;
923 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
924 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
925 datarootdir=$ac_optarg ;;
926
Guido van Rossum7f43da71994-08-01 12:15:30 +0000927 -disable-* | --disable-*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000928 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000929 # Reject names that are not valid shell variable names.
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000930 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Georg Brandl71f4fbb2011-02-25 11:04:50 +0000931 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000932 ac_useropt_orig=$ac_useropt
933 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
934 case $ac_user_opts in
935 *"
936"enable_$ac_useropt"
937"*) ;;
938 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
939 ac_unrecognized_sep=', ';;
940 esac
941 eval enable_$ac_useropt=no ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +0000942
943 -docdir | --docdir | --docdi | --doc | --do)
944 ac_prev=docdir ;;
945 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
946 docdir=$ac_optarg ;;
947
948 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
949 ac_prev=dvidir ;;
950 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
951 dvidir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000952
953 -enable-* | --enable-*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000954 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000955 # Reject names that are not valid shell variable names.
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000956 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Georg Brandl71f4fbb2011-02-25 11:04:50 +0000957 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000958 ac_useropt_orig=$ac_useropt
959 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
960 case $ac_user_opts in
961 *"
962"enable_$ac_useropt"
963"*) ;;
964 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
965 ac_unrecognized_sep=', ';;
966 esac
967 eval enable_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000968
Guido van Rossum7f43da71994-08-01 12:15:30 +0000969 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
970 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
971 | --exec | --exe | --ex)
972 ac_prev=exec_prefix ;;
973 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
974 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
975 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000976 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000977
978 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000979 # Obsolete; use --with-gas.
980 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000981
Martin v. Löwis11437992002-04-12 09:54:03 +0000982 -help | --help | --hel | --he | -h)
983 ac_init_help=long ;;
984 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
985 ac_init_help=recursive ;;
986 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
987 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000988
989 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +0000990 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000991 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000992 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000993
Martin v. Löwiseba40652007-08-30 20:10:57 +0000994 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
995 ac_prev=htmldir ;;
996 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
997 | --ht=*)
998 htmldir=$ac_optarg ;;
999
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001000 -includedir | --includedir | --includedi | --included | --include \
1001 | --includ | --inclu | --incl | --inc)
1002 ac_prev=includedir ;;
1003 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1004 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001005 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001006
1007 -infodir | --infodir | --infodi | --infod | --info | --inf)
1008 ac_prev=infodir ;;
1009 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001010 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001011
1012 -libdir | --libdir | --libdi | --libd)
1013 ac_prev=libdir ;;
1014 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001015 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001016
1017 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1018 | --libexe | --libex | --libe)
1019 ac_prev=libexecdir ;;
1020 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1021 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001022 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001023
Martin v. Löwiseba40652007-08-30 20:10:57 +00001024 -localedir | --localedir | --localedi | --localed | --locale)
1025 ac_prev=localedir ;;
1026 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1027 localedir=$ac_optarg ;;
1028
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001029 -localstatedir | --localstatedir | --localstatedi | --localstated \
Martin v. Löwiseba40652007-08-30 20:10:57 +00001030 | --localstate | --localstat | --localsta | --localst | --locals)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001031 ac_prev=localstatedir ;;
1032 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Martin v. Löwiseba40652007-08-30 20:10:57 +00001033 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001034 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001035
1036 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1037 ac_prev=mandir ;;
1038 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001039 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001040
Guido van Rossum7f43da71994-08-01 12:15:30 +00001041 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001042 # Obsolete; use --without-fp.
1043 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001044
1045 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +00001046 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +00001047 no_create=yes ;;
1048
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001049 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1050 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1051 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001052
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001053 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1054 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1055 | --oldin | --oldi | --old | --ol | --o)
1056 ac_prev=oldincludedir ;;
1057 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1058 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1059 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001060 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001061
Guido van Rossum7f43da71994-08-01 12:15:30 +00001062 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1063 ac_prev=prefix ;;
1064 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001065 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001066
1067 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1068 | --program-pre | --program-pr | --program-p)
1069 ac_prev=program_prefix ;;
1070 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1071 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001072 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001073
1074 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1075 | --program-suf | --program-su | --program-s)
1076 ac_prev=program_suffix ;;
1077 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1078 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001079 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001080
1081 -program-transform-name | --program-transform-name \
1082 | --program-transform-nam | --program-transform-na \
1083 | --program-transform-n | --program-transform- \
1084 | --program-transform | --program-transfor \
1085 | --program-transfo | --program-transf \
1086 | --program-trans | --program-tran \
1087 | --progr-tra | --program-tr | --program-t)
1088 ac_prev=program_transform_name ;;
1089 -program-transform-name=* | --program-transform-name=* \
1090 | --program-transform-nam=* | --program-transform-na=* \
1091 | --program-transform-n=* | --program-transform-=* \
1092 | --program-transform=* | --program-transfor=* \
1093 | --program-transfo=* | --program-transf=* \
1094 | --program-trans=* | --program-tran=* \
1095 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001096 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001097
Martin v. Löwiseba40652007-08-30 20:10:57 +00001098 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1099 ac_prev=pdfdir ;;
1100 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1101 pdfdir=$ac_optarg ;;
1102
1103 -psdir | --psdir | --psdi | --psd | --ps)
1104 ac_prev=psdir ;;
1105 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1106 psdir=$ac_optarg ;;
1107
Guido van Rossum7f43da71994-08-01 12:15:30 +00001108 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1109 | -silent | --silent | --silen | --sile | --sil)
1110 silent=yes ;;
1111
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001112 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1113 ac_prev=sbindir ;;
1114 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1115 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001116 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001117
1118 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1119 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1120 | --sharedst | --shareds | --shared | --share | --shar \
1121 | --sha | --sh)
1122 ac_prev=sharedstatedir ;;
1123 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1124 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1125 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1126 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001127 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001128
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001129 -site | --site | --sit)
1130 ac_prev=site ;;
1131 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001132 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001133
Guido van Rossum7f43da71994-08-01 12:15:30 +00001134 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1135 ac_prev=srcdir ;;
1136 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001137 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001138
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001139 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1140 | --syscon | --sysco | --sysc | --sys | --sy)
1141 ac_prev=sysconfdir ;;
1142 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1143 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001144 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001145
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 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001148 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001149 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001150
1151 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1152 verbose=yes ;;
1153
Martin v. Löwis11437992002-04-12 09:54:03 +00001154 -version | --version | --versio | --versi | --vers | -V)
1155 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001156
1157 -with-* | --with-*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001158 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001159 # Reject names that are not valid shell variable names.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001160 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001161 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001162 ac_useropt_orig=$ac_useropt
1163 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1164 case $ac_user_opts in
1165 *"
1166"with_$ac_useropt"
1167"*) ;;
1168 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1169 ac_unrecognized_sep=', ';;
1170 esac
1171 eval with_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001172
1173 -without-* | --without-*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001174 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001175 # Reject names that are not valid shell variable names.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001176 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001177 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001178 ac_useropt_orig=$ac_useropt
1179 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1180 case $ac_user_opts in
1181 *"
1182"with_$ac_useropt"
1183"*) ;;
1184 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1185 ac_unrecognized_sep=', ';;
1186 esac
1187 eval with_$ac_useropt=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001188
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001189 --x)
1190 # Obsolete; use --with-x.
1191 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001192
1193 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1194 | --x-incl | --x-inc | --x-in | --x-i)
1195 ac_prev=x_includes ;;
1196 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1197 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001198 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001199
1200 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1201 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1202 ac_prev=x_libraries ;;
1203 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1204 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001205 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001206
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001207 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1208Try \`$0 --help' for more information"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001209 ;;
1210
Martin v. Löwis11437992002-04-12 09:54:03 +00001211 *=*)
1212 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1213 # Reject names that are not valid shell variable names.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001214 case $ac_envvar in #(
1215 '' | [0-9]* | *[!_$as_cr_alnum]* )
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001216 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001217 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00001218 eval $ac_envvar=\$ac_optarg
Martin v. Löwis11437992002-04-12 09:54:03 +00001219 export $ac_envvar ;;
1220
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001221 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001222 # FIXME: should be removed in autoconf 3.0.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001223 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001224 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001225 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
Matthias Klose3cef2a92012-03-14 23:39:33 +01001226 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001227 ;;
1228
1229 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00001230done
1231
Guido van Rossum7f43da71994-08-01 12:15:30 +00001232if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001233 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001234 as_fn_error $? "missing argument to $ac_option"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001235fi
1236
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001237if test -n "$ac_unrecognized_opts"; then
1238 case $enable_option_checking in
1239 no) ;;
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001240 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001241 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1242 esac
1243fi
1244
1245# Check all directory arguments for consistency.
Martin v. Löwiseba40652007-08-30 20:10:57 +00001246for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1247 datadir sysconfdir sharedstatedir localstatedir includedir \
1248 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1249 libdir localedir mandir
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001250do
Martin v. Löwiseba40652007-08-30 20:10:57 +00001251 eval ac_val=\$$ac_var
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001252 # Remove trailing slashes.
1253 case $ac_val in
1254 */ )
1255 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1256 eval $ac_var=\$ac_val;;
1257 esac
1258 # Be sure to have absolute directory names.
Martin v. Löwis11437992002-04-12 09:54:03 +00001259 case $ac_val in
Martin v. Löwiseba40652007-08-30 20:10:57 +00001260 [\\/$]* | ?:[\\/]* ) continue;;
1261 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001262 esac
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001263 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
Martin v. Löwis11437992002-04-12 09:54:03 +00001264done
Guido van Rossum627b2d71993-12-24 10:39:16 +00001265
Martin v. Löwis11437992002-04-12 09:54:03 +00001266# There might be people who depend on the old broken behavior: `$host'
1267# used to hold the argument of --host etc.
1268# FIXME: To remove some day.
1269build=$build_alias
1270host=$host_alias
1271target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +00001272
Martin v. Löwis11437992002-04-12 09:54:03 +00001273# FIXME: To remove some day.
1274if test "x$host_alias" != x; then
1275 if test "x$build_alias" = x; then
1276 cross_compiling=maybe
Martin v. Löwis11437992002-04-12 09:54:03 +00001277 elif test "x$build_alias" != "x$host_alias"; then
1278 cross_compiling=yes
1279 fi
1280fi
1281
1282ac_tool_prefix=
1283test -n "$host_alias" && ac_tool_prefix=$host_alias-
1284
1285test "$silent" = yes && exec 6>/dev/null
1286
Guido van Rossum627b2d71993-12-24 10:39:16 +00001287
Martin v. Löwiseba40652007-08-30 20:10:57 +00001288ac_pwd=`pwd` && test -n "$ac_pwd" &&
1289ac_ls_di=`ls -di .` &&
1290ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001291 as_fn_error $? "working directory cannot be determined"
Martin v. Löwiseba40652007-08-30 20:10:57 +00001292test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001293 as_fn_error $? "pwd does not report name of working directory"
Martin v. Löwiseba40652007-08-30 20:10:57 +00001294
1295
Guido van Rossum627b2d71993-12-24 10:39:16 +00001296# Find the source files, if location was not specified.
1297if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001298 ac_srcdir_defaulted=yes
Martin v. Löwiseba40652007-08-30 20:10:57 +00001299 # Try the directory containing this script, then the parent directory.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001300 ac_confdir=`$as_dirname -- "$as_myself" ||
1301$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1302 X"$as_myself" : 'X\(//\)[^/]' \| \
1303 X"$as_myself" : 'X\(//\)$' \| \
1304 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1305$as_echo X"$as_myself" |
Martin v. Löwiseba40652007-08-30 20:10:57 +00001306 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1307 s//\1/
1308 q
1309 }
1310 /^X\(\/\/\)[^/].*/{
1311 s//\1/
1312 q
1313 }
1314 /^X\(\/\/\)$/{
1315 s//\1/
1316 q
1317 }
1318 /^X\(\/\).*/{
1319 s//\1/
1320 q
1321 }
1322 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001323 srcdir=$ac_confdir
Martin v. Löwiseba40652007-08-30 20:10:57 +00001324 if test ! -r "$srcdir/$ac_unique_file"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001325 srcdir=..
1326 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001327else
1328 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001329fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00001330if test ! -r "$srcdir/$ac_unique_file"; then
1331 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001332 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
Brett Cannon19fab762007-06-02 03:02:29 +00001333fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00001334ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1335ac_abs_confdir=`(
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001336 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
Martin v. Löwiseba40652007-08-30 20:10:57 +00001337 pwd)`
1338# When building in place, set srcdir=.
1339if test "$ac_abs_confdir" = "$ac_pwd"; then
1340 srcdir=.
1341fi
1342# Remove unnecessary trailing slashes from srcdir.
1343# Double slashes in file names in object file debugging info
1344# mess up M-x gdb in Emacs.
1345case $srcdir in
1346*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1347esac
1348for ac_var in $ac_precious_vars; do
1349 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1350 eval ac_env_${ac_var}_value=\$${ac_var}
1351 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1352 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1353done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001354
Martin v. Löwis11437992002-04-12 09:54:03 +00001355#
1356# Report the --help message.
1357#
1358if test "$ac_init_help" = "long"; then
1359 # Omit some internal or obsolete options to make the list less imposing.
1360 # This message is too long to be a string in the A/UX 3.1 sh.
1361 cat <<_ACEOF
Martin v. Löwis174440b2008-10-03 08:59:41 +00001362\`configure' configures python 2.7 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +00001363
1364Usage: $0 [OPTION]... [VAR=VALUE]...
1365
1366To assign environment variables (e.g., CC, CFLAGS...), specify them as
1367VAR=VALUE. See below for descriptions of some of the useful variables.
1368
1369Defaults for the options are specified in brackets.
1370
1371Configuration:
1372 -h, --help display this help and exit
1373 --help=short display options specific to this package
1374 --help=recursive display the short help of all the included packages
1375 -V, --version display version information and exit
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001376 -q, --quiet, --silent do not print \`checking ...' messages
Martin v. Löwis11437992002-04-12 09:54:03 +00001377 --cache-file=FILE cache test results in FILE [disabled]
1378 -C, --config-cache alias for \`--cache-file=config.cache'
1379 -n, --no-create do not create output files
1380 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1381
Martin v. Löwis11437992002-04-12 09:54:03 +00001382Installation directories:
1383 --prefix=PREFIX install architecture-independent files in PREFIX
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001384 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001385 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001386 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +00001387
1388By default, \`make install' will install all the files in
1389\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1390an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1391for instance \`--prefix=\$HOME'.
1392
1393For better control, use the options below.
1394
1395Fine tuning of the installation directories:
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001396 --bindir=DIR user executables [EPREFIX/bin]
1397 --sbindir=DIR system admin executables [EPREFIX/sbin]
1398 --libexecdir=DIR program executables [EPREFIX/libexec]
1399 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1400 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1401 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1402 --libdir=DIR object code libraries [EPREFIX/lib]
1403 --includedir=DIR C header files [PREFIX/include]
1404 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1405 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1406 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1407 --infodir=DIR info documentation [DATAROOTDIR/info]
1408 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1409 --mandir=DIR man documentation [DATAROOTDIR/man]
1410 --docdir=DIR documentation root [DATAROOTDIR/doc/python]
1411 --htmldir=DIR html documentation [DOCDIR]
1412 --dvidir=DIR dvi documentation [DOCDIR]
1413 --pdfdir=DIR pdf documentation [DOCDIR]
1414 --psdir=DIR ps documentation [DOCDIR]
Martin v. Löwis11437992002-04-12 09:54:03 +00001415_ACEOF
1416
1417 cat <<\_ACEOF
doko@python.orgd65e2ba2013-01-31 23:52:03 +01001418
1419System types:
1420 --build=BUILD configure for building on BUILD [guessed]
1421 --host=HOST cross-compile to build programs to run on HOST [BUILD]
Martin v. Löwis11437992002-04-12 09:54:03 +00001422_ACEOF
1423fi
1424
1425if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +00001426 case $ac_init_help in
Martin v. Löwis174440b2008-10-03 08:59:41 +00001427 short | recursive ) echo "Configuration of python 2.7:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +00001428 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001429 cat <<\_ACEOF
1430
1431Optional Features:
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001432 --disable-option-checking ignore unrecognized --enable/--with options
Martin v. Löwis11437992002-04-12 09:54:03 +00001433 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1434 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Brett Cannon91a1dec2008-02-13 19:15:44 +00001435 --enable-universalsdk[=SDKDIR]
Brett Cannon9a8bb0e2008-02-03 02:07:55 +00001436 Build against Mac OS X 10.4u SDK (ppc/i386)
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001437 --enable-framework[=INSTALLDIR]
1438 Build (MacOSX|Darwin) framework
1439 --enable-shared disable/enable building shared python library
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00001440 --enable-profiling enable C-level code profiling
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001441 --enable-toolbox-glue disable/enable MacOSX glue code for extensions
1442 --enable-ipv6 Enable ipv6 (with ipv4) support
1443 --disable-ipv6 Disable ipv6 support
Mark Dickinsonefc82f72009-03-20 15:51:55 +00001444 --enable-big-digits[=BITS]
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001445 use big digits for Python longs [[BITS=30]]
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001446 --enable-unicode[=ucs[24]]
Benjamin Peterson66556b02010-05-25 02:23:32 +00001447 Enable Unicode strings (default is ucs2)
Martin v. Löwis11437992002-04-12 09:54:03 +00001448
1449Optional Packages:
1450 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1451 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Ronald Oussoren5640ce22008-06-05 12:58:24 +00001452 --with-universal-archs=ARCH
1453 select architectures for universal build ("32-bit",
Ronald Oussoren23d92532009-09-07 06:12:00 +00001454 "64-bit", "3-way", "intel" or "all")
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00001455 --with-framework-name=FRAMEWORK
1456 specify an alternate name of the framework built
1457 with --enable-framework
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001458 --without-gcc never use gcc
Martin v. Löwis0f48d982006-04-14 14:34:26 +00001459 --with-cxx-main=<compiler>
1460 compile main() and link python executable with C++
1461 compiler
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001462 --with-suffix=.exe set executable suffix
1463 --with-pydebug build with Py_DEBUG defined
1464 --with-libs='lib1 ...' link against additional libs
Benjamin Peterson2c196742009-12-31 03:17:18 +00001465 --with-system-expat build pyexpat module using an installed expat
1466 library
Martin v. Löwis9176fc12006-04-11 11:12:43 +00001467 --with-system-ffi build _ctypes module using an installed ffi library
Ned Deilya2a9f572013-10-25 00:30:10 -07001468 --with-tcltk-includes='-I...'
1469 override search for Tcl and Tk include files
1470 --with-tcltk-libs='-L...'
1471 override search for Tcl and Tk libs
Benjamin Peterson867475c2009-04-29 20:36:25 +00001472 --with-dbmliborder=db1:db2:...
1473 order to check db backends for dbm. Valid value is a
1474 colon separated string with the backend names
1475 `ndbm', `gdbm' and `bdb'.
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001476 --with-signal-module disable/enable signal module
1477 --with-dec-threads use DEC Alpha/OSF1 thread-safe libraries
1478 --with(out)-threads[=DIRECTORY]
1479 disable/enable thread support
1480 --with(out)-thread[=DIRECTORY]
1481 deprecated; use --with(out)-threads
1482 --with-pth use GNU pth threading libraries
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001483 --with(out)-doc-strings disable/enable documentation strings
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00001484 --with(out)-tsc enable/disable timestamp counter profile
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001485 --with(out)-pymalloc disable/enable specialized mallocs
Benjamin Peterson91c12eb2009-12-03 02:52:39 +00001486 --with-valgrind Enable Valgrind support
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001487 --with-wctype-functions use wctype.h functions
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001488 --with-fpectl enable SIGFPE catching
1489 --with-libm=STRING math library
1490 --with-libc=STRING C library
Ned Deily3f1d0b32014-11-20 02:11:03 -08001491 --with(out)-ensurepip=[=OPTION]
1492 "install" or "upgrade" using bundled pip, default is
1493 "no"
Martin v. Löwis11437992002-04-12 09:54:03 +00001494
1495Some influential environment variables:
1496 CC C compiler command
1497 CFLAGS C compiler flags
1498 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1499 nonstandard directory <lib dir>
Martin v. Löwiseba40652007-08-30 20:10:57 +00001500 LIBS libraries to pass to the linker, e.g. -l<library>
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001501 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
Martin v. Löwiseba40652007-08-30 20:10:57 +00001502 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001503 CPP C preprocessor
1504
1505Use these variables to override the choices made by `configure' or to help
1506it to find libraries and programs with nonstandard names/locations.
1507
Georg Brandl464432d2009-05-20 18:24:08 +00001508Report bugs to <http://bugs.python.org/>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001509_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00001510ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001511fi
1512
1513if test "$ac_init_help" = "recursive"; then
1514 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001515 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001516 test -d "$ac_dir" ||
1517 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1518 continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001519 ac_builddir=.
1520
Martin v. Löwiseba40652007-08-30 20:10:57 +00001521case "$ac_dir" in
1522.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1523*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001524 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Martin v. Löwiseba40652007-08-30 20:10:57 +00001525 # A ".." for each directory in $ac_dir_suffix.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001526 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Martin v. Löwiseba40652007-08-30 20:10:57 +00001527 case $ac_top_builddir_sub in
1528 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1529 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1530 esac ;;
1531esac
1532ac_abs_top_builddir=$ac_pwd
1533ac_abs_builddir=$ac_pwd$ac_dir_suffix
1534# for backward compatibility:
1535ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001536
1537case $srcdir in
Martin v. Löwiseba40652007-08-30 20:10:57 +00001538 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001539 ac_srcdir=.
Martin v. Löwiseba40652007-08-30 20:10:57 +00001540 ac_top_srcdir=$ac_top_builddir_sub
1541 ac_abs_top_srcdir=$ac_pwd ;;
1542 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001543 ac_srcdir=$srcdir$ac_dir_suffix;
Martin v. Löwiseba40652007-08-30 20:10:57 +00001544 ac_top_srcdir=$srcdir
1545 ac_abs_top_srcdir=$srcdir ;;
1546 *) # Relative name.
1547 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1548 ac_top_srcdir=$ac_top_build_prefix$srcdir
1549 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001550esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00001551ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001552
Martin v. Löwiseba40652007-08-30 20:10:57 +00001553 cd "$ac_dir" || { ac_status=$?; continue; }
1554 # Check for guested configure.
1555 if test -f "$ac_srcdir/configure.gnu"; then
1556 echo &&
1557 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1558 elif test -f "$ac_srcdir/configure"; then
1559 echo &&
1560 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001561 else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001562 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Martin v. Löwiseba40652007-08-30 20:10:57 +00001563 fi || ac_status=$?
1564 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001565 done
1566fi
1567
Martin v. Löwiseba40652007-08-30 20:10:57 +00001568test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001569if $ac_init_version; then
1570 cat <<\_ACEOF
Martin v. Löwis174440b2008-10-03 08:59:41 +00001571python configure 2.7
Charles-François Natalibe2b9072013-01-08 19:47:00 +01001572generated by GNU Autoconf 2.69
Martin v. Löwis11437992002-04-12 09:54:03 +00001573
Charles-François Natalibe2b9072013-01-08 19:47:00 +01001574Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001575This configure script is free software; the Free Software Foundation
1576gives unlimited permission to copy, distribute and modify it.
1577_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00001578 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001579fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001580
1581## ------------------------ ##
1582## Autoconf initialization. ##
1583## ------------------------ ##
1584
1585# ac_fn_c_try_compile LINENO
1586# --------------------------
1587# Try to compile conftest.$ac_ext, and return whether this succeeded.
1588ac_fn_c_try_compile ()
1589{
1590 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1591 rm -f conftest.$ac_objext
1592 if { { ac_try="$ac_compile"
1593case "(($ac_try" in
1594 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1595 *) ac_try_echo=$ac_try;;
1596esac
1597eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1598$as_echo "$ac_try_echo"; } >&5
1599 (eval "$ac_compile") 2>conftest.err
1600 ac_status=$?
1601 if test -s conftest.err; then
1602 grep -v '^ *+' conftest.err >conftest.er1
1603 cat conftest.er1 >&5
1604 mv -f conftest.er1 conftest.err
1605 fi
1606 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1607 test $ac_status = 0; } && {
1608 test -z "$ac_c_werror_flag" ||
1609 test ! -s conftest.err
1610 } && test -s conftest.$ac_objext; then :
1611 ac_retval=0
1612else
1613 $as_echo "$as_me: failed program was:" >&5
1614sed 's/^/| /' conftest.$ac_ext >&5
1615
1616 ac_retval=1
1617fi
Matthias Klose3cef2a92012-03-14 23:39:33 +01001618 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001619 as_fn_set_status $ac_retval
1620
1621} # ac_fn_c_try_compile
1622
1623# ac_fn_c_try_cpp LINENO
1624# ----------------------
1625# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1626ac_fn_c_try_cpp ()
1627{
1628 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1629 if { { ac_try="$ac_cpp conftest.$ac_ext"
1630case "(($ac_try" in
1631 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1632 *) ac_try_echo=$ac_try;;
1633esac
1634eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1635$as_echo "$ac_try_echo"; } >&5
1636 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1637 ac_status=$?
1638 if test -s conftest.err; then
1639 grep -v '^ *+' conftest.err >conftest.er1
1640 cat conftest.er1 >&5
1641 mv -f conftest.er1 conftest.err
1642 fi
1643 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001644 test $ac_status = 0; } > conftest.i && {
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001645 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1646 test ! -s conftest.err
1647 }; then :
1648 ac_retval=0
1649else
1650 $as_echo "$as_me: failed program was:" >&5
1651sed 's/^/| /' conftest.$ac_ext >&5
1652
1653 ac_retval=1
1654fi
Matthias Klose3cef2a92012-03-14 23:39:33 +01001655 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001656 as_fn_set_status $ac_retval
1657
1658} # ac_fn_c_try_cpp
1659
1660# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1661# -------------------------------------------------------
1662# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1663# the include files in INCLUDES and setting the cache variable VAR
1664# accordingly.
1665ac_fn_c_check_header_mongrel ()
1666{
1667 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Matthias Klose3cef2a92012-03-14 23:39:33 +01001668 if eval \${$3+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001669 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1670$as_echo_n "checking for $2... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01001671if eval \${$3+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001672 $as_echo_n "(cached) " >&6
1673fi
1674eval ac_res=\$$3
1675 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1676$as_echo "$ac_res" >&6; }
1677else
1678 # Is the header compilable?
1679{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1680$as_echo_n "checking $2 usability... " >&6; }
1681cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1682/* end confdefs.h. */
1683$4
1684#include <$2>
1685_ACEOF
1686if ac_fn_c_try_compile "$LINENO"; then :
1687 ac_header_compiler=yes
1688else
1689 ac_header_compiler=no
1690fi
1691rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1692{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1693$as_echo "$ac_header_compiler" >&6; }
1694
1695# Is the header present?
1696{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1697$as_echo_n "checking $2 presence... " >&6; }
1698cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1699/* end confdefs.h. */
1700#include <$2>
1701_ACEOF
1702if ac_fn_c_try_cpp "$LINENO"; then :
1703 ac_header_preproc=yes
1704else
1705 ac_header_preproc=no
1706fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001707rm -f conftest.err conftest.i conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001708{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1709$as_echo "$ac_header_preproc" >&6; }
1710
1711# So? What about this header?
1712case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1713 yes:no: )
1714 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1715$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1716 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1717$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1718 ;;
1719 no:yes:* )
1720 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1721$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1722 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1723$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1724 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1725$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1726 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1727$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1728 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1729$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001730( $as_echo "## -------------------------------------- ##
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001731## Report this to http://bugs.python.org/ ##
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001732## -------------------------------------- ##"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001733 ) | sed "s/^/$as_me: WARNING: /" >&2
1734 ;;
1735esac
1736 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1737$as_echo_n "checking for $2... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01001738if eval \${$3+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001739 $as_echo_n "(cached) " >&6
1740else
1741 eval "$3=\$ac_header_compiler"
1742fi
1743eval ac_res=\$$3
1744 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1745$as_echo "$ac_res" >&6; }
1746fi
Matthias Klose3cef2a92012-03-14 23:39:33 +01001747 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001748
1749} # ac_fn_c_check_header_mongrel
1750
1751# ac_fn_c_try_run LINENO
1752# ----------------------
1753# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1754# that executables *can* be run.
1755ac_fn_c_try_run ()
1756{
1757 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1758 if { { ac_try="$ac_link"
1759case "(($ac_try" in
1760 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1761 *) ac_try_echo=$ac_try;;
1762esac
1763eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1764$as_echo "$ac_try_echo"; } >&5
1765 (eval "$ac_link") 2>&5
1766 ac_status=$?
1767 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1768 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1769 { { case "(($ac_try" in
1770 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1771 *) ac_try_echo=$ac_try;;
1772esac
1773eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1774$as_echo "$ac_try_echo"; } >&5
1775 (eval "$ac_try") 2>&5
1776 ac_status=$?
1777 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1778 test $ac_status = 0; }; }; then :
1779 ac_retval=0
1780else
1781 $as_echo "$as_me: program exited with status $ac_status" >&5
1782 $as_echo "$as_me: failed program was:" >&5
1783sed 's/^/| /' conftest.$ac_ext >&5
1784
1785 ac_retval=$ac_status
1786fi
1787 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Matthias Klose3cef2a92012-03-14 23:39:33 +01001788 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001789 as_fn_set_status $ac_retval
1790
1791} # ac_fn_c_try_run
1792
1793# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1794# -------------------------------------------------------
1795# Tests whether HEADER exists and can be compiled using the include files in
1796# INCLUDES, setting the cache variable VAR accordingly.
1797ac_fn_c_check_header_compile ()
1798{
1799 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1800 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1801$as_echo_n "checking for $2... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01001802if eval \${$3+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001803 $as_echo_n "(cached) " >&6
1804else
1805 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1806/* end confdefs.h. */
1807$4
1808#include <$2>
1809_ACEOF
1810if ac_fn_c_try_compile "$LINENO"; then :
1811 eval "$3=yes"
1812else
1813 eval "$3=no"
1814fi
1815rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1816fi
1817eval ac_res=\$$3
1818 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1819$as_echo "$ac_res" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01001820 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001821
1822} # ac_fn_c_check_header_compile
1823
1824# ac_fn_c_try_link LINENO
1825# -----------------------
1826# Try to link conftest.$ac_ext, and return whether this succeeded.
1827ac_fn_c_try_link ()
1828{
1829 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1830 rm -f conftest.$ac_objext conftest$ac_exeext
1831 if { { ac_try="$ac_link"
1832case "(($ac_try" in
1833 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1834 *) ac_try_echo=$ac_try;;
1835esac
1836eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1837$as_echo "$ac_try_echo"; } >&5
1838 (eval "$ac_link") 2>conftest.err
1839 ac_status=$?
1840 if test -s conftest.err; then
1841 grep -v '^ *+' conftest.err >conftest.er1
1842 cat conftest.er1 >&5
1843 mv -f conftest.er1 conftest.err
1844 fi
1845 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1846 test $ac_status = 0; } && {
1847 test -z "$ac_c_werror_flag" ||
1848 test ! -s conftest.err
1849 } && test -s conftest$ac_exeext && {
1850 test "$cross_compiling" = yes ||
Charles-François Natalibe2b9072013-01-08 19:47:00 +01001851 test -x conftest$ac_exeext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001852 }; then :
1853 ac_retval=0
1854else
1855 $as_echo "$as_me: failed program was:" >&5
1856sed 's/^/| /' conftest.$ac_ext >&5
1857
1858 ac_retval=1
1859fi
1860 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1861 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1862 # interfere with the next link command; also delete a directory that is
1863 # left behind by Apple's compiler. We do this before executing the actions.
1864 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Matthias Klose3cef2a92012-03-14 23:39:33 +01001865 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001866 as_fn_set_status $ac_retval
1867
1868} # ac_fn_c_try_link
1869
1870# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
1871# -------------------------------------------
1872# Tests whether TYPE exists after having included INCLUDES, setting cache
1873# variable VAR accordingly.
1874ac_fn_c_check_type ()
1875{
1876 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1877 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1878$as_echo_n "checking for $2... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01001879if eval \${$3+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001880 $as_echo_n "(cached) " >&6
1881else
1882 eval "$3=no"
1883 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1884/* end confdefs.h. */
1885$4
1886int
1887main ()
1888{
1889if (sizeof ($2))
1890 return 0;
1891 ;
1892 return 0;
1893}
1894_ACEOF
1895if ac_fn_c_try_compile "$LINENO"; then :
1896 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1897/* end confdefs.h. */
1898$4
1899int
1900main ()
1901{
1902if (sizeof (($2)))
1903 return 0;
1904 ;
1905 return 0;
1906}
1907_ACEOF
1908if ac_fn_c_try_compile "$LINENO"; then :
1909
1910else
1911 eval "$3=yes"
1912fi
1913rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1914fi
1915rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1916fi
1917eval ac_res=\$$3
1918 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1919$as_echo "$ac_res" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01001920 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001921
1922} # ac_fn_c_check_type
1923
1924# ac_fn_c_find_uintX_t LINENO BITS VAR
1925# ------------------------------------
1926# Finds an unsigned integer type with width BITS, setting cache variable VAR
1927# accordingly.
1928ac_fn_c_find_uintX_t ()
1929{
1930 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1931 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uint$2_t" >&5
1932$as_echo_n "checking for uint$2_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01001933if eval \${$3+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001934 $as_echo_n "(cached) " >&6
1935else
1936 eval "$3=no"
1937 # Order is important - never check a type that is potentially smaller
1938 # than half of the expected target width.
1939 for ac_type in uint$2_t 'unsigned int' 'unsigned long int' \
1940 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
1941 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1942/* end confdefs.h. */
1943$ac_includes_default
1944int
1945main ()
1946{
1947static int test_array [1 - 2 * !((($ac_type) -1 >> ($2 / 2 - 1)) >> ($2 / 2 - 1) == 3)];
Charles-François Natalibe2b9072013-01-08 19:47:00 +01001948test_array [0] = 0;
1949return test_array [0];
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001950
1951 ;
1952 return 0;
1953}
1954_ACEOF
1955if ac_fn_c_try_compile "$LINENO"; then :
1956 case $ac_type in #(
1957 uint$2_t) :
1958 eval "$3=yes" ;; #(
1959 *) :
1960 eval "$3=\$ac_type" ;;
1961esac
1962fi
1963rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001964 if eval test \"x\$"$3"\" = x"no"; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001965
1966else
1967 break
1968fi
1969 done
1970fi
1971eval ac_res=\$$3
1972 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1973$as_echo "$ac_res" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01001974 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001975
1976} # ac_fn_c_find_uintX_t
1977
1978# ac_fn_c_find_intX_t LINENO BITS VAR
1979# -----------------------------------
1980# Finds a signed integer type with width BITS, setting cache variable VAR
1981# accordingly.
1982ac_fn_c_find_intX_t ()
1983{
1984 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1985 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for int$2_t" >&5
1986$as_echo_n "checking for int$2_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01001987if eval \${$3+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001988 $as_echo_n "(cached) " >&6
1989else
1990 eval "$3=no"
1991 # Order is important - never check a type that is potentially smaller
1992 # than half of the expected target width.
1993 for ac_type in int$2_t 'int' 'long int' \
1994 'long long int' 'short int' 'signed char'; do
1995 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1996/* end confdefs.h. */
1997$ac_includes_default
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001998 enum { N = $2 / 2 - 1 };
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001999int
2000main ()
2001{
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002002static 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 +01002003test_array [0] = 0;
2004return test_array [0];
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002005
2006 ;
2007 return 0;
2008}
2009_ACEOF
2010if ac_fn_c_try_compile "$LINENO"; then :
2011 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2012/* end confdefs.h. */
2013$ac_includes_default
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002014 enum { N = $2 / 2 - 1 };
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002015int
2016main ()
2017{
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002018static int test_array [1 - 2 * !(($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002019 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 2))];
Charles-François Natalibe2b9072013-01-08 19:47:00 +01002020test_array [0] = 0;
2021return test_array [0];
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002022
2023 ;
2024 return 0;
2025}
2026_ACEOF
2027if ac_fn_c_try_compile "$LINENO"; then :
2028
2029else
2030 case $ac_type in #(
2031 int$2_t) :
2032 eval "$3=yes" ;; #(
2033 *) :
2034 eval "$3=\$ac_type" ;;
2035esac
2036fi
2037rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2038fi
2039rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002040 if eval test \"x\$"$3"\" = x"no"; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002041
2042else
2043 break
2044fi
2045 done
2046fi
2047eval ac_res=\$$3
2048 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2049$as_echo "$ac_res" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01002050 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002051
2052} # ac_fn_c_find_intX_t
2053
2054# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2055# --------------------------------------------
2056# Tries to find the compile-time value of EXPR in a program that includes
2057# INCLUDES, setting VAR accordingly. Returns whether the value could be
2058# computed
2059ac_fn_c_compute_int ()
2060{
2061 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2062 if test "$cross_compiling" = yes; then
2063 # Depending upon the size, compute the lo and hi bounds.
2064cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2065/* end confdefs.h. */
2066$4
2067int
2068main ()
2069{
2070static int test_array [1 - 2 * !(($2) >= 0)];
Charles-François Natalibe2b9072013-01-08 19:47:00 +01002071test_array [0] = 0;
2072return test_array [0];
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002073
2074 ;
2075 return 0;
2076}
2077_ACEOF
2078if ac_fn_c_try_compile "$LINENO"; then :
2079 ac_lo=0 ac_mid=0
2080 while :; do
2081 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2082/* end confdefs.h. */
2083$4
2084int
2085main ()
2086{
2087static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Charles-François Natalibe2b9072013-01-08 19:47:00 +01002088test_array [0] = 0;
2089return test_array [0];
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002090
2091 ;
2092 return 0;
2093}
2094_ACEOF
2095if ac_fn_c_try_compile "$LINENO"; then :
2096 ac_hi=$ac_mid; break
2097else
2098 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2099 if test $ac_lo -le $ac_mid; then
2100 ac_lo= ac_hi=
2101 break
2102 fi
2103 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2104fi
2105rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2106 done
2107else
2108 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2109/* end confdefs.h. */
2110$4
2111int
2112main ()
2113{
2114static int test_array [1 - 2 * !(($2) < 0)];
Charles-François Natalibe2b9072013-01-08 19:47:00 +01002115test_array [0] = 0;
2116return test_array [0];
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002117
2118 ;
2119 return 0;
2120}
2121_ACEOF
2122if ac_fn_c_try_compile "$LINENO"; then :
2123 ac_hi=-1 ac_mid=-1
2124 while :; do
2125 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2126/* end confdefs.h. */
2127$4
2128int
2129main ()
2130{
2131static int test_array [1 - 2 * !(($2) >= $ac_mid)];
Charles-François Natalibe2b9072013-01-08 19:47:00 +01002132test_array [0] = 0;
2133return test_array [0];
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002134
2135 ;
2136 return 0;
2137}
2138_ACEOF
2139if ac_fn_c_try_compile "$LINENO"; then :
2140 ac_lo=$ac_mid; break
2141else
2142 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2143 if test $ac_mid -le $ac_hi; then
2144 ac_lo= ac_hi=
2145 break
2146 fi
2147 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2148fi
2149rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2150 done
2151else
2152 ac_lo= ac_hi=
2153fi
2154rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2155fi
2156rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2157# Binary search between lo and hi bounds.
2158while test "x$ac_lo" != "x$ac_hi"; do
2159 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2160 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2161/* end confdefs.h. */
2162$4
2163int
2164main ()
2165{
2166static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Charles-François Natalibe2b9072013-01-08 19:47:00 +01002167test_array [0] = 0;
2168return test_array [0];
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002169
2170 ;
2171 return 0;
2172}
2173_ACEOF
2174if ac_fn_c_try_compile "$LINENO"; then :
2175 ac_hi=$ac_mid
2176else
2177 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2178fi
2179rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2180done
2181case $ac_lo in #((
2182?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2183'') ac_retval=1 ;;
2184esac
2185 else
2186 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2187/* end confdefs.h. */
2188$4
2189static long int longval () { return $2; }
2190static unsigned long int ulongval () { return $2; }
2191#include <stdio.h>
2192#include <stdlib.h>
2193int
2194main ()
2195{
2196
2197 FILE *f = fopen ("conftest.val", "w");
2198 if (! f)
2199 return 1;
2200 if (($2) < 0)
2201 {
2202 long int i = longval ();
2203 if (i != ($2))
2204 return 1;
2205 fprintf (f, "%ld", i);
2206 }
2207 else
2208 {
2209 unsigned long int i = ulongval ();
2210 if (i != ($2))
2211 return 1;
2212 fprintf (f, "%lu", i);
2213 }
2214 /* Do not output a trailing newline, as this causes \r\n confusion
2215 on some platforms. */
2216 return ferror (f) || fclose (f) != 0;
2217
2218 ;
2219 return 0;
2220}
2221_ACEOF
2222if ac_fn_c_try_run "$LINENO"; then :
2223 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2224else
2225 ac_retval=1
2226fi
2227rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2228 conftest.$ac_objext conftest.beam conftest.$ac_ext
2229rm -f conftest.val
2230
2231 fi
Matthias Klose3cef2a92012-03-14 23:39:33 +01002232 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002233 as_fn_set_status $ac_retval
2234
2235} # ac_fn_c_compute_int
2236
2237# ac_fn_c_check_func LINENO FUNC VAR
2238# ----------------------------------
2239# Tests whether FUNC exists, setting the cache variable VAR accordingly
2240ac_fn_c_check_func ()
2241{
2242 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2243 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2244$as_echo_n "checking for $2... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01002245if eval \${$3+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002246 $as_echo_n "(cached) " >&6
2247else
2248 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2249/* end confdefs.h. */
2250/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2251 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2252#define $2 innocuous_$2
2253
2254/* System header to define __stub macros and hopefully few prototypes,
2255 which can conflict with char $2 (); below.
2256 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2257 <limits.h> exists even on freestanding compilers. */
2258
2259#ifdef __STDC__
2260# include <limits.h>
2261#else
2262# include <assert.h>
2263#endif
2264
2265#undef $2
2266
2267/* Override any GCC internal prototype to avoid an error.
2268 Use char because int might match the return type of a GCC
2269 builtin and then its argument prototype would still apply. */
2270#ifdef __cplusplus
2271extern "C"
2272#endif
2273char $2 ();
2274/* The GNU C library defines this for functions which it implements
2275 to always fail with ENOSYS. Some functions are actually named
2276 something starting with __ and the normal name is an alias. */
2277#if defined __stub_$2 || defined __stub___$2
2278choke me
2279#endif
2280
2281int
2282main ()
2283{
2284return $2 ();
2285 ;
2286 return 0;
2287}
2288_ACEOF
2289if ac_fn_c_try_link "$LINENO"; then :
2290 eval "$3=yes"
2291else
2292 eval "$3=no"
2293fi
2294rm -f core conftest.err conftest.$ac_objext \
2295 conftest$ac_exeext conftest.$ac_ext
2296fi
2297eval ac_res=\$$3
2298 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2299$as_echo "$ac_res" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01002300 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002301
2302} # ac_fn_c_check_func
2303
2304# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2305# ----------------------------------------------------
2306# Tries to find if the field MEMBER exists in type AGGR, after including
2307# INCLUDES, setting cache variable VAR accordingly.
2308ac_fn_c_check_member ()
2309{
2310 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2311 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2312$as_echo_n "checking for $2.$3... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01002313if eval \${$4+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002314 $as_echo_n "(cached) " >&6
2315else
2316 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2317/* end confdefs.h. */
2318$5
2319int
2320main ()
2321{
2322static $2 ac_aggr;
2323if (ac_aggr.$3)
2324return 0;
2325 ;
2326 return 0;
2327}
2328_ACEOF
2329if ac_fn_c_try_compile "$LINENO"; then :
2330 eval "$4=yes"
2331else
2332 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2333/* end confdefs.h. */
2334$5
2335int
2336main ()
2337{
2338static $2 ac_aggr;
2339if (sizeof ac_aggr.$3)
2340return 0;
2341 ;
2342 return 0;
2343}
2344_ACEOF
2345if ac_fn_c_try_compile "$LINENO"; then :
2346 eval "$4=yes"
2347else
2348 eval "$4=no"
2349fi
2350rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2351fi
2352rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2353fi
2354eval ac_res=\$$4
2355 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2356$as_echo "$ac_res" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01002357 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002358
2359} # ac_fn_c_check_member
2360
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002361# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2362# ---------------------------------------------
2363# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2364# accordingly.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002365ac_fn_c_check_decl ()
2366{
2367 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002368 as_decl_name=`echo $2|sed 's/ *(.*//'`
2369 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2370 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2371$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01002372if eval \${$3+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002373 $as_echo_n "(cached) " >&6
2374else
2375 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2376/* end confdefs.h. */
2377$4
2378int
2379main ()
2380{
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002381#ifndef $as_decl_name
2382#ifdef __cplusplus
2383 (void) $as_decl_use;
2384#else
2385 (void) $as_decl_name;
2386#endif
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002387#endif
2388
2389 ;
2390 return 0;
2391}
2392_ACEOF
2393if ac_fn_c_try_compile "$LINENO"; then :
2394 eval "$3=yes"
2395else
2396 eval "$3=no"
2397fi
2398rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2399fi
2400eval ac_res=\$$3
2401 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2402$as_echo "$ac_res" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01002403 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002404
2405} # ac_fn_c_check_decl
Martin v. Löwiseba40652007-08-30 20:10:57 +00002406cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00002407This file contains any messages produced by compilers while
2408running configure, to aid debugging if configure makes a mistake.
2409
Martin v. Löwis174440b2008-10-03 08:59:41 +00002410It was created by python $as_me 2.7, which was
Charles-François Natalibe2b9072013-01-08 19:47:00 +01002411generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00002412
2413 $ $0 $@
2414
2415_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00002416exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00002417{
2418cat <<_ASUNAME
2419## --------- ##
2420## Platform. ##
2421## --------- ##
2422
2423hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2424uname -m = `(uname -m) 2>/dev/null || echo unknown`
2425uname -r = `(uname -r) 2>/dev/null || echo unknown`
2426uname -s = `(uname -s) 2>/dev/null || echo unknown`
2427uname -v = `(uname -v) 2>/dev/null || echo unknown`
2428
2429/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2430/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2431
2432/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2433/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2434/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Martin v. Löwiseba40652007-08-30 20:10:57 +00002435/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00002436/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2437/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2438/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2439
2440_ASUNAME
2441
2442as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2443for as_dir in $PATH
2444do
2445 IFS=$as_save_IFS
2446 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002447 $as_echo "PATH: $as_dir"
2448 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002449IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002450
2451} >&5
2452
2453cat >&5 <<_ACEOF
2454
2455
2456## ----------- ##
2457## Core tests. ##
2458## ----------- ##
2459
2460_ACEOF
2461
2462
2463# Keep a trace of the command line.
2464# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00002465# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00002466# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00002467# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00002468ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00002469ac_configure_args0=
2470ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00002471ac_must_keep_next=false
2472for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00002473do
Skip Montanaro6dead952003-09-25 14:50:04 +00002474 for ac_arg
2475 do
2476 case $ac_arg in
2477 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2478 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2479 | -silent | --silent | --silen | --sile | --sil)
2480 continue ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00002481 *\'*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002482 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002483 esac
2484 case $ac_pass in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002485 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002486 2)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002487 as_fn_append ac_configure_args1 " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002488 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002489 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00002490 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00002491 case $ac_arg in
2492 *=* | --config-cache | -C | -disable-* | --disable-* \
2493 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2494 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2495 | -with-* | --with-* | -without-* | --without-* | --x)
2496 case "$ac_configure_args0 " in
2497 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2498 esac
2499 ;;
2500 -* ) ac_must_keep_next=true ;;
2501 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00002502 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002503 as_fn_append ac_configure_args " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002504 ;;
2505 esac
2506 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002507done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002508{ ac_configure_args0=; unset ac_configure_args0;}
2509{ ac_configure_args1=; unset ac_configure_args1;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002510
2511# When interrupted or exit'd, cleanup temporary files, and complete
2512# config.log. We remove comments because anyway the quotes in there
2513# would cause problems or look ugly.
Martin v. Löwiseba40652007-08-30 20:10:57 +00002514# WARNING: Use '\'' to represent an apostrophe within the trap.
2515# 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 +00002516trap 'exit_status=$?
2517 # Save into config.log some information that might help in debugging.
2518 {
2519 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002520
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002521 $as_echo "## ---------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002522## Cache variables. ##
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002523## ---------------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002524 echo
2525 # The following way of writing the cache mishandles newlines in values,
Martin v. Löwiseba40652007-08-30 20:10:57 +00002526(
2527 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2528 eval ac_val=\$$ac_var
2529 case $ac_val in #(
2530 *${as_nl}*)
2531 case $ac_var in #(
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002532 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2533$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00002534 esac
2535 case $ac_var in #(
2536 _ | IFS | as_nl) ;; #(
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002537 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2538 *) { eval $ac_var=; unset $ac_var;} ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00002539 esac ;;
2540 esac
2541 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002542 (set) 2>&1 |
Martin v. Löwiseba40652007-08-30 20:10:57 +00002543 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2544 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00002545 sed -n \
Martin v. Löwiseba40652007-08-30 20:10:57 +00002546 "s/'\''/'\''\\\\'\'''\''/g;
2547 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2548 ;; #(
Skip Montanaro89e975f2007-08-22 19:05:21 +00002549 *)
Martin v. Löwiseba40652007-08-30 20:10:57 +00002550 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaro89e975f2007-08-22 19:05:21 +00002551 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00002552 esac |
2553 sort
2554)
Martin v. Löwis11437992002-04-12 09:54:03 +00002555 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002556
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002557 $as_echo "## ----------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00002558## Output variables. ##
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002559## ----------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002560 echo
2561 for ac_var in $ac_subst_vars
2562 do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002563 eval ac_val=\$$ac_var
2564 case $ac_val in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002565 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00002566 esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002567 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002568 done | sort
2569 echo
2570
2571 if test -n "$ac_subst_files"; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002572 $as_echo "## ------------------- ##
Martin v. Löwiseba40652007-08-30 20:10:57 +00002573## File substitutions. ##
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002574## ------------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002575 echo
2576 for ac_var in $ac_subst_files
2577 do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002578 eval ac_val=\$$ac_var
2579 case $ac_val in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002580 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00002581 esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002582 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002583 done | sort
2584 echo
2585 fi
2586
Martin v. Löwis11437992002-04-12 09:54:03 +00002587 if test -s confdefs.h; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002588 $as_echo "## ----------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002589## confdefs.h. ##
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002590## ----------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002591 echo
Martin v. Löwiseba40652007-08-30 20:10:57 +00002592 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002593 echo
2594 fi
2595 test "$ac_signal" != 0 &&
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002596 $as_echo "$as_me: caught signal $ac_signal"
2597 $as_echo "$as_me: exit $exit_status"
Martin v. Löwis11437992002-04-12 09:54:03 +00002598 } >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00002599 rm -f core *.core core.conftest.* &&
2600 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00002601 exit $exit_status
Martin v. Löwiseba40652007-08-30 20:10:57 +00002602' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00002603for ac_signal in 1 2 13 15; do
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002604 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00002605done
2606ac_signal=0
2607
2608# confdefs.h avoids OS command line length limits that DEFS can exceed.
Martin v. Löwiseba40652007-08-30 20:10:57 +00002609rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002610
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002611$as_echo "/* confdefs.h */" > confdefs.h
2612
Martin v. Löwis11437992002-04-12 09:54:03 +00002613# Predefined preprocessor variables.
2614
2615cat >>confdefs.h <<_ACEOF
2616#define PACKAGE_NAME "$PACKAGE_NAME"
2617_ACEOF
2618
Martin v. Löwis11437992002-04-12 09:54:03 +00002619cat >>confdefs.h <<_ACEOF
2620#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2621_ACEOF
2622
Martin v. Löwis11437992002-04-12 09:54:03 +00002623cat >>confdefs.h <<_ACEOF
2624#define PACKAGE_VERSION "$PACKAGE_VERSION"
2625_ACEOF
2626
Martin v. Löwis11437992002-04-12 09:54:03 +00002627cat >>confdefs.h <<_ACEOF
2628#define PACKAGE_STRING "$PACKAGE_STRING"
2629_ACEOF
2630
Martin v. Löwis11437992002-04-12 09:54:03 +00002631cat >>confdefs.h <<_ACEOF
2632#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2633_ACEOF
2634
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002635cat >>confdefs.h <<_ACEOF
2636#define PACKAGE_URL "$PACKAGE_URL"
2637_ACEOF
2638
Martin v. Löwis11437992002-04-12 09:54:03 +00002639
2640# Let the site file select an alternate cache file if it wants to.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002641# Prefer an explicitly selected file to automatically selected ones.
2642ac_site_file1=NONE
2643ac_site_file2=NONE
Martin v. Löwiseba40652007-08-30 20:10:57 +00002644if test -n "$CONFIG_SITE"; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002645 # We do not want a PATH search for config.site.
2646 case $CONFIG_SITE in #((
2647 -*) ac_site_file1=./$CONFIG_SITE;;
2648 */*) ac_site_file1=$CONFIG_SITE;;
2649 *) ac_site_file1=./$CONFIG_SITE;;
2650 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00002651elif test "x$prefix" != xNONE; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002652 ac_site_file1=$prefix/share/config.site
2653 ac_site_file2=$prefix/etc/config.site
Martin v. Löwiseba40652007-08-30 20:10:57 +00002654else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002655 ac_site_file1=$ac_default_prefix/share/config.site
2656 ac_site_file2=$ac_default_prefix/etc/config.site
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002657fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002658for ac_site_file in "$ac_site_file1" "$ac_site_file2"
Martin v. Löwiseba40652007-08-30 20:10:57 +00002659do
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002660 test "x$ac_site_file" = xNONE && continue
2661 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2662 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2663$as_echo "$as_me: loading site script $ac_site_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002664 sed 's/^/| /' "$ac_site_file" >&5
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002665 . "$ac_site_file" \
2666 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2667$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2668as_fn_error $? "failed to load site script $ac_site_file
Matthias Klose3cef2a92012-03-14 23:39:33 +01002669See \`config.log' for more details" "$LINENO" 5; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002670 fi
2671done
2672
2673if test -r "$cache_file"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002674 # Some versions of bash will fail to source /dev/null (special files
2675 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2676 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2677 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2678$as_echo "$as_me: loading cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002679 case $cache_file in
Martin v. Löwiseba40652007-08-30 20:10:57 +00002680 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2681 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00002682 esac
2683 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002684else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002685 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2686$as_echo "$as_me: creating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002687 >$cache_file
2688fi
2689
2690# Check that the precious variables saved in the cache have kept the same
2691# value.
2692ac_cache_corrupted=false
Martin v. Löwiseba40652007-08-30 20:10:57 +00002693for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00002694 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2695 eval ac_new_set=\$ac_env_${ac_var}_set
Martin v. Löwiseba40652007-08-30 20:10:57 +00002696 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2697 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00002698 case $ac_old_set,$ac_new_set in
2699 set,)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002700 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2701$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 +00002702 ac_cache_corrupted=: ;;
2703 ,set)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002704 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2705$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002706 ac_cache_corrupted=: ;;
2707 ,);;
2708 *)
2709 if test "x$ac_old_val" != "x$ac_new_val"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002710 # differences in whitespace do not lead to failure.
2711 ac_old_val_w=`echo x $ac_old_val`
2712 ac_new_val_w=`echo x $ac_new_val`
2713 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2714 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2715$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2716 ac_cache_corrupted=:
2717 else
2718 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2719$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2720 eval $ac_var=\$ac_old_val
2721 fi
2722 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2723$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2724 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2725$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002726 fi;;
2727 esac
2728 # Pass precious variables to config.status.
2729 if test "$ac_new_set" = set; then
2730 case $ac_new_val in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002731 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002732 *) ac_arg=$ac_var=$ac_new_val ;;
2733 esac
2734 case " $ac_configure_args " in
2735 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002736 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002737 esac
2738 fi
2739done
2740if $ac_cache_corrupted; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002741 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2742$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2743 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2744$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002745 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002746fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002747## -------------------- ##
2748## Main body of script. ##
2749## -------------------- ##
Martin v. Löwiseba40652007-08-30 20:10:57 +00002750
Guido van Rossum7f43da71994-08-01 12:15:30 +00002751ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002752ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00002753ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2754ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2755ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002756
Guido van Rossum627b2d71993-12-24 10:39:16 +00002757
Michael W. Hudson54241132001-12-07 15:38:26 +00002758
Martin v. Löwiseba40652007-08-30 20:10:57 +00002759ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00002760
2761
doko@python.orgd65e2ba2013-01-31 23:52:03 +01002762ac_aux_dir=
2763for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
2764 if test -f "$ac_dir/install-sh"; then
2765 ac_aux_dir=$ac_dir
2766 ac_install_sh="$ac_aux_dir/install-sh -c"
2767 break
2768 elif test -f "$ac_dir/install.sh"; then
2769 ac_aux_dir=$ac_dir
2770 ac_install_sh="$ac_aux_dir/install.sh -c"
2771 break
2772 elif test -f "$ac_dir/shtool"; then
2773 ac_aux_dir=$ac_dir
2774 ac_install_sh="$ac_aux_dir/shtool install -c"
2775 break
2776 fi
2777done
2778if test -z "$ac_aux_dir"; then
2779 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
2780fi
2781
2782# These three variables are undocumented and unsupported,
2783# and are intended to be withdrawn in a future Autoconf release.
2784# They can cause serious problems if a builder's source tree is in a directory
2785# whose full name contains unusual characters.
2786ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
2787ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
2788ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
2789
2790
2791# Make sure we can run config.sub.
2792$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2793 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
2794
2795{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
2796$as_echo_n "checking build system type... " >&6; }
2797if ${ac_cv_build+:} false; then :
2798 $as_echo_n "(cached) " >&6
2799else
2800 ac_build_alias=$build_alias
2801test "x$ac_build_alias" = x &&
2802 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2803test "x$ac_build_alias" = x &&
2804 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
2805ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2806 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
2807
2808fi
2809{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
2810$as_echo "$ac_cv_build" >&6; }
2811case $ac_cv_build in
2812*-*-*) ;;
2813*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
2814esac
2815build=$ac_cv_build
2816ac_save_IFS=$IFS; IFS='-'
2817set x $ac_cv_build
2818shift
2819build_cpu=$1
2820build_vendor=$2
2821shift; shift
2822# Remember, the first character of IFS is used to create $*,
2823# except with old shells:
2824build_os=$*
2825IFS=$ac_save_IFS
2826case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2827
2828
2829{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
2830$as_echo_n "checking host system type... " >&6; }
2831if ${ac_cv_host+:} false; then :
2832 $as_echo_n "(cached) " >&6
2833else
2834 if test "x$host_alias" = x; then
2835 ac_cv_host=$ac_cv_build
2836else
2837 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2838 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
2839fi
2840
2841fi
2842{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
2843$as_echo "$ac_cv_host" >&6; }
2844case $ac_cv_host in
2845*-*-*) ;;
2846*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
2847esac
2848host=$ac_cv_host
2849ac_save_IFS=$IFS; IFS='-'
2850set x $ac_cv_host
2851shift
2852host_cpu=$1
2853host_vendor=$2
2854shift; shift
2855# Remember, the first character of IFS is used to create $*,
2856# except with old shells:
2857host_os=$*
2858IFS=$ac_save_IFS
2859case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
2860
2861
2862
2863
2864
Ned Deily983df862014-08-22 13:30:59 -07002865# pybuilddir.txt will be created by --generate-posix-vars in the Makefile
2866rm -f pybuilddir.txt
2867
doko@python.orgd65e2ba2013-01-31 23:52:03 +01002868if test "$cross_compiling" = yes; then
2869 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for python interpreter for cross build" >&5
2870$as_echo_n "checking for python interpreter for cross build... " >&6; }
2871 if test -z "$PYTHON_FOR_BUILD"; then
2872 for interp in python$PACKAGE_VERSION python2 python; do
2873 which $interp >/dev/null 2>&1 || continue
2874 if $interp -c 'import sys;sys.exit(not (sys.version_info[:2] >= (2,7) and sys.version_info[0] < 3))'; then
2875 break
2876 fi
2877 interp=
2878 done
2879 if test x$interp = x; then
2880 as_fn_error $? "python$PACKAGE_VERSION interpreter not found" "$LINENO" 5
2881 fi
2882 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $interp" >&5
2883$as_echo "$interp" >&6; }
2884 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
2885 fi
2886elif test "$cross_compiling" = maybe; then
2887 as_fn_error $? "Cross compiling required --host=HOST-TUPLE and --build=ARCH" "$LINENO" 5
2888else
2889 PYTHON_FOR_BUILD='./$(BUILDPYTHON) -E'
2890fi
2891
2892
Martin v. Löwis11437992002-04-12 09:54:03 +00002893
Georg Brandlbcd64a32009-03-31 21:45:18 +00002894if test "$prefix" != "/"; then
2895 prefix=`echo "$prefix" | sed -e 's/\/$//g'`
2896fi
2897
2898
Martin v. Löwis11437992002-04-12 09:54:03 +00002899
2900
Martin v. Löwis8316feb2003-06-14 07:48:07 +00002901# We don't use PACKAGE_ variables, and they cause conflicts
2902# with other autoconf-based packages that include Python.h
2903grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
2904rm confdefs.h
2905mv confdefs.h.new confdefs.h
2906
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00002907
Martin v. Löwis174440b2008-10-03 08:59:41 +00002908VERSION=2.7
Guido van Rossum1fd74a71997-07-19 19:36:02 +00002909
Martin v. Löwis1142de32002-03-29 16:28:31 +00002910
2911SOVERSION=1.0
2912
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002913# The later defininition of _XOPEN_SOURCE disables certain features
2914# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
2915
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002916$as_echo "#define _GNU_SOURCE 1" >>confdefs.h
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002917
2918
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002919# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2920# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
2921# them.
2922
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002923$as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002924
2925
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002926# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2927# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
2928# them.
2929
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002930$as_echo "#define __BSD_VISIBLE 1" >>confdefs.h
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002931
2932
Martin v. Löwisd6320502004-08-12 13:45:08 +00002933# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2934# u_int on Irix 5.3. Defining _BSD_TYPES brings it back.
2935
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002936$as_echo "#define _BSD_TYPES 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +00002937
2938
Ronald Oussoren5640ce22008-06-05 12:58:24 +00002939# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2940# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
2941# them.
2942
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002943$as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
Ronald Oussoren5640ce22008-06-05 12:58:24 +00002944
2945
2946
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002947define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002948
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00002949# Arguments passed to configure.
2950
2951CONFIG_ARGS="$ac_configure_args"
2952
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002953{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-universalsdk" >&5
2954$as_echo_n "checking for --enable-universalsdk... " >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00002955# Check whether --enable-universalsdk was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002956if test "${enable_universalsdk+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00002957 enableval=$enable_universalsdk;
Ronald Oussoren988117f2006-04-29 11:31:35 +00002958 case $enableval in
2959 yes)
2960 enableval=/Developer/SDKs/MacOSX10.4u.sdk
Ronald Oussoren3c0a1262010-01-17 19:27:57 +00002961 if test ! -d "${enableval}"
2962 then
2963 enableval=/
2964 fi
Ronald Oussoren988117f2006-04-29 11:31:35 +00002965 ;;
2966 esac
2967 case $enableval in
2968 no)
2969 UNIVERSALSDK=
2970 enable_universalsdk=
2971 ;;
2972 *)
2973 UNIVERSALSDK=$enableval
Ronald Oussoren3c0a1262010-01-17 19:27:57 +00002974 if test ! -d "${UNIVERSALSDK}"
2975 then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002976 as_fn_error $? "--enable-universalsdk specifies non-existing SDK: ${UNIVERSALSDK}" "$LINENO" 5
Ronald Oussoren3c0a1262010-01-17 19:27:57 +00002977 fi
Ronald Oussoren988117f2006-04-29 11:31:35 +00002978 ;;
2979 esac
2980
Ronald Oussoren3c0a1262010-01-17 19:27:57 +00002981
Ronald Oussoren988117f2006-04-29 11:31:35 +00002982else
2983
2984 UNIVERSALSDK=
2985 enable_universalsdk=
2986
Martin v. Löwiseba40652007-08-30 20:10:57 +00002987fi
Ronald Oussoren988117f2006-04-29 11:31:35 +00002988
Ronald Oussoren3c0a1262010-01-17 19:27:57 +00002989if test -n "${UNIVERSALSDK}"
2990then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002991 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSALSDK}" >&5
2992$as_echo "${UNIVERSALSDK}" >&6; }
Ronald Oussoren3c0a1262010-01-17 19:27:57 +00002993else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002994 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2995$as_echo "no" >&6; }
Ronald Oussoren3c0a1262010-01-17 19:27:57 +00002996fi
Ronald Oussoren988117f2006-04-29 11:31:35 +00002997
Martin v. Löwiseba40652007-08-30 20:10:57 +00002998
Benjamin Peterson0e6ea5d2008-07-16 20:17:04 +00002999
Ned Deily8e60f6e2013-05-30 00:14:29 -07003000ARCH_RUN_32BIT=""
Benjamin Peterson0e6ea5d2008-07-16 20:17:04 +00003001
Ronald Oussoren5640ce22008-06-05 12:58:24 +00003002UNIVERSAL_ARCHS="32-bit"
Ronald Oussoren92919a62009-12-24 13:30:58 +00003003
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003004{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-universal-archs" >&5
3005$as_echo_n "checking for --with-universal-archs... " >&6; }
Ronald Oussoren5640ce22008-06-05 12:58:24 +00003006
3007# Check whether --with-universal-archs was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003008if test "${with_universal_archs+set}" = set; then :
Ronald Oussoren5640ce22008-06-05 12:58:24 +00003009 withval=$with_universal_archs;
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003010 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
3011$as_echo "$withval" >&6; }
Ronald Oussoren5640ce22008-06-05 12:58:24 +00003012 UNIVERSAL_ARCHS="$withval"
Ronald Oussoren9ebd2422009-09-29 13:00:44 +00003013 if test "${enable_universalsdk}" ; then
3014 :
3015 else
Georg Brandl71f4fbb2011-02-25 11:04:50 +00003016 as_fn_error $? "--with-universal-archs without --enable-universalsdk. See Mac/README" "$LINENO" 5
Ronald Oussoren9ebd2422009-09-29 13:00:44 +00003017 fi
Ronald Oussoren5640ce22008-06-05 12:58:24 +00003018
3019else
3020
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003021 { $as_echo "$as_me:${as_lineno-$LINENO}: result: 32-bit" >&5
3022$as_echo "32-bit" >&6; }
Ronald Oussoren5640ce22008-06-05 12:58:24 +00003023
3024fi
3025
3026
3027
3028
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00003029
3030# Check whether --with-framework-name was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003031if test "${with_framework_name+set}" = set; then :
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00003032 withval=$with_framework_name;
Ronald Oussoren9ebd2422009-09-29 13:00:44 +00003033 if test "${enable_framework}"; then
3034 :
3035 else
Georg Brandl71f4fbb2011-02-25 11:04:50 +00003036 as_fn_error $? "--with-framework-name without --enable-framework. See Mac/README" "$LINENO" 5
Ronald Oussoren9ebd2422009-09-29 13:00:44 +00003037 fi
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00003038 PYTHONFRAMEWORK=${withval}
3039 PYTHONFRAMEWORKDIR=${withval}.framework
3040 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
3041
3042else
3043
3044 PYTHONFRAMEWORK=Python
3045 PYTHONFRAMEWORKDIR=Python.framework
3046 PYTHONFRAMEWORKIDENTIFIER=org.python.python
3047
3048fi
3049
Martin v. Löwiseba40652007-08-30 20:10:57 +00003050# Check whether --enable-framework was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003051if test "${enable_framework+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00003052 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00003053 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00003054 yes)
Jack Jansene578a632001-08-15 01:27:14 +00003055 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00003056 esac
3057 case $enableval in
3058 no)
3059 PYTHONFRAMEWORK=
3060 PYTHONFRAMEWORKDIR=no-framework
3061 PYTHONFRAMEWORKPREFIX=
3062 PYTHONFRAMEWORKINSTALLDIR=
Ronald Oussoren567a8ff2006-05-26 11:43:26 +00003063 FRAMEWORKINSTALLFIRST=
3064 FRAMEWORKINSTALLLAST=
Ronald Oussoren5b787322006-06-06 19:50:24 +00003065 FRAMEWORKALTINSTALLFIRST=
3066 FRAMEWORKALTINSTALLLAST=
Ronald Oussoren2db3a8f2006-06-07 19:06:01 +00003067 if test "x${prefix}" = "xNONE"; then
3068 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3069 else
3070 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3071 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00003072 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00003073 ;;
3074 *)
Ronald Oussoren01d149f2010-04-30 11:20:14 +00003075 PYTHONFRAMEWORKPREFIX="${enableval}"
Jack Jansen127e56e2001-09-11 14:41:54 +00003076 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Ronald Oussoren567a8ff2006-05-26 11:43:26 +00003077 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussoren5640ce22008-06-05 12:58:24 +00003078 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure bininstall maninstall"
Ronald Oussoren92919a62009-12-24 13:30:58 +00003079 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
3080 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
Ronald Oussoren01d149f2010-04-30 11:20:14 +00003081 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
Ronald Oussoren5640ce22008-06-05 12:58:24 +00003082
Ronald Oussoren2db3a8f2006-06-07 19:06:01 +00003083 if test "x${prefix}" = "xNONE" ; then
3084 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
Ronald Oussoren01d149f2010-04-30 11:20:14 +00003085
Ronald Oussoren2db3a8f2006-06-07 19:06:01 +00003086 else
3087 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3088 fi
Ronald Oussoren01d149f2010-04-30 11:20:14 +00003089
3090 case "${enableval}" in
3091 /System*)
3092 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3093 if test "${prefix}" = "NONE" ; then
3094 # See below
3095 FRAMEWORKUNIXTOOLSPREFIX="/usr"
3096 fi
3097 ;;
3098
3099 /Library*)
3100 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3101 ;;
3102
3103 */Library/Frameworks)
3104 MDIR="`dirname "${enableval}"`"
3105 MDIR="`dirname "${MDIR}"`"
3106 FRAMEWORKINSTALLAPPSPREFIX="${MDIR}/Applications"
3107
3108 if test "${prefix}" = "NONE"; then
3109 # User hasn't specified the
3110 # --prefix option, but wants to install
3111 # the framework in a non-default location,
3112 # ensure that the compatibility links get
3113 # installed relative to that prefix as well
3114 # instead of in /usr/local.
3115 FRAMEWORKUNIXTOOLSPREFIX="${MDIR}"
3116 fi
3117 ;;
3118
3119 *)
3120 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3121 ;;
3122 esac
3123
Jack Jansen127e56e2001-09-11 14:41:54 +00003124 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Ronald Oussoren836b0392006-05-14 19:56:34 +00003125
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00003126 # Add files for Mac specific code to the list of output
Ronald Oussoren836b0392006-05-14 19:56:34 +00003127 # files:
Martin v. Löwiseba40652007-08-30 20:10:57 +00003128 ac_config_files="$ac_config_files Mac/Makefile"
Ronald Oussoren836b0392006-05-14 19:56:34 +00003129
Martin v. Löwiseba40652007-08-30 20:10:57 +00003130 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Ronald Oussoren836b0392006-05-14 19:56:34 +00003131
Martin v. Löwiseba40652007-08-30 20:10:57 +00003132 ac_config_files="$ac_config_files Mac/IDLE/Makefile"
Ronald Oussoren836b0392006-05-14 19:56:34 +00003133
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00003134 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
3135
3136 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
3137
Jack Jansene578a632001-08-15 01:27:14 +00003138 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003139
Guido van Rossum563e7081996-09-10 18:20:48 +00003140else
Martin v. Löwis11437992002-04-12 09:54:03 +00003141
Jack Jansene578a632001-08-15 01:27:14 +00003142 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00003143 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00003144 PYTHONFRAMEWORKPREFIX=
3145 PYTHONFRAMEWORKINSTALLDIR=
Ronald Oussoren567a8ff2006-05-26 11:43:26 +00003146 FRAMEWORKINSTALLFIRST=
3147 FRAMEWORKINSTALLLAST=
Ronald Oussoren5b787322006-06-06 19:50:24 +00003148 FRAMEWORKALTINSTALLFIRST=
3149 FRAMEWORKALTINSTALLLAST=
Ronald Oussoren2db3a8f2006-06-07 19:06:01 +00003150 if test "x${prefix}" = "xNONE" ; then
3151 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3152 else
3153 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3154 fi
Jack Jansene578a632001-08-15 01:27:14 +00003155 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003156
Ronald Oussoren5640ce22008-06-05 12:58:24 +00003157
Martin v. Löwiseba40652007-08-30 20:10:57 +00003158fi
3159
Michael W. Hudson54241132001-12-07 15:38:26 +00003160
3161
3162
3163
Jack Jansene578a632001-08-15 01:27:14 +00003164
Ronald Oussoren567a8ff2006-05-26 11:43:26 +00003165
3166
Ronald Oussoren5b787322006-06-06 19:50:24 +00003167
3168
3169
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00003170
Ronald Oussoren01d149f2010-04-30 11:20:14 +00003171
Jack Jansene578a632001-08-15 01:27:14 +00003172##AC_ARG_WITH(dyld,
Matthias Klose22520ea2010-05-08 10:14:46 +00003173## AS_HELP_STRING([--with-dyld],
3174## [Use (OpenStep|Rhapsody) dynamic linker]))
Jack Jansene578a632001-08-15 01:27:14 +00003175##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003176# Set name for machine-dependent library files
3177
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003178{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP" >&5
3179$as_echo_n "checking MACHDEP... " >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003180if test -z "$MACHDEP"
3181then
doko@python.orgd65e2ba2013-01-31 23:52:03 +01003182 # avoid using uname for cross builds
3183 if test "$cross_compiling" = yes; then
3184 # ac_sys_system and ac_sys_release are only used for setting
3185 # `define_xopen_source' in the case statement below. For the
3186 # current supported cross builds, this macro is not adjusted.
3187 case "$host" in
3188 *-*-linux*)
3189 ac_sys_system=Linux
3190 ;;
3191 *-*-cygwin*)
3192 ac_sys_system=Cygwin
3193 ;;
3194 *)
3195 # for now, limit cross builds to known configurations
3196 MACHDEP="unknown"
3197 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3198 esac
3199 ac_sys_release=
3200 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003201 ac_sys_system=`uname -s`
Georg Brandlfe18a112009-09-04 07:55:14 +00003202 if test "$ac_sys_system" = "AIX" \
Martin v. Löwis21ee4092002-09-30 16:19:48 +00003203 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00003204 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003205 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003206 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003207 fi
doko@python.orgd65e2ba2013-01-31 23:52:03 +01003208 fi
3209 ac_md_system=`echo $ac_sys_system |
3210 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
3211 ac_md_release=`echo $ac_sys_release |
3212 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
3213 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00003214
doko@python.orgd65e2ba2013-01-31 23:52:03 +01003215 case $MACHDEP in
Victor Stinneracacbaa2011-08-20 14:02:38 +02003216 linux*) MACHDEP="linux2";;
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00003217 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00003218 darwin*) MACHDEP="darwin";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00003219 atheos*) MACHDEP="atheos";;
Martin v. Löwisf3322282003-07-13 09:46:13 +00003220 irix646) MACHDEP="irix6";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00003221 '') MACHDEP="unknown";;
doko@python.orgd65e2ba2013-01-31 23:52:03 +01003222 esac
3223fi
3224
3225
3226if test "$cross_compiling" = yes; then
3227 case "$host" in
3228 *-*-linux*)
3229 case "$host_cpu" in
3230 arm*)
3231 _host_cpu=arm
3232 ;;
3233 *)
3234 _host_cpu=$host_cpu
3235 esac
3236 ;;
3237 *-*-cygwin*)
3238 _host_cpu=
3239 ;;
3240 *)
3241 # for now, limit cross builds to known configurations
3242 MACHDEP="unknown"
3243 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003244 esac
doko@python.orgd65e2ba2013-01-31 23:52:03 +01003245 _PYTHON_HOST_PLATFORM="$MACHDEP${_host_cpu:+-$_host_cpu}"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003246fi
Guido van Rossum91922671997-10-09 20:24:13 +00003247
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003248# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
3249# disable features if it is defined, without any means to access these
3250# features as extensions. For these systems, we skip the definition of
3251# _XOPEN_SOURCE. Before adding a system to the list to gain access to
3252# some feature, make sure there is no alternative way to access this
3253# feature. Also, when using wildcards, make sure you have verified the
3254# need for not defining _XOPEN_SOURCE on all systems matching the
3255# wildcard, and that the wildcard does not include future systems
3256# (which may remove their limitations).
3257case $ac_sys_system/$ac_sys_release in
3258 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
3259 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00003260 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Martin v. Löwis7875ef62010-02-15 21:41:12 +00003261 # In addition, Stefan Krah confirms that issue #1244610 exists through
3262 # OpenBSD 4.6, but is fixed in 4.7.
Charles-François Natali97781b02011-07-22 23:43:42 +02003263 OpenBSD/2.* | OpenBSD/3.* | OpenBSD/4.[0123456])
Martin v. Löwiscb78de62007-12-29 18:49:21 +00003264 define_xopen_source=no
3265 # 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öwiscb78de62007-12-29 18:49:21 +00003270
3271 ;;
Charles-François Natali97781b02011-07-22 23:43:42 +02003272 OpenBSD/*)
Martin v. Löwis5e2dd862010-02-15 08:32:00 +00003273 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3274 # also defined. This can be overridden by defining _BSD_SOURCE
3275 # As this has a different meaning on Linux, only define it on OpenBSD
3276
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003277$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Martin v. Löwis5e2dd862010-02-15 08:32:00 +00003278
3279 ;;
Martin v. Löwis4d542ec2006-11-25 15:39:19 +00003280 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
3281 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
3282 # Marc Recht
Benjamin Petersoneac68f42008-11-16 17:54:55 +00003283 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 +00003284 define_xopen_source=no;;
Martin v. Löwisb41afb52010-05-28 15:28:47 +00003285 # From the perspective of Solaris, _XOPEN_SOURCE is not so much a
3286 # request to enable features supported by the standard as a request
3287 # to disable features not supported by the standard. The best way
3288 # for Python to use Solaris is simply to leave _XOPEN_SOURCE out
3289 # entirely and define __EXTENSIONS__ instead.
3290 SunOS/*)
Martin v. Löwisa9d71422003-03-28 18:43:31 +00003291 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003292 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
3293 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00003294 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00003295 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003296 define_xopen_source=no;;
3297 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003298 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003299 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003300 define_xopen_source=no;;
Martin v. Löwisbb86d832008-11-04 20:40:09 +00003301 # On FreeBSD 4, the math functions C89 does not cover are never defined
3302 # with _XOPEN_SOURCE and __BSD_VISIBLE does not re-enable them.
3303 FreeBSD/4.*)
3304 define_xopen_source=no;;
3305 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
3306 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
3307 # identifies itself as Darwin/7.*
3308 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3309 # disables platform specific features beyond repair.
3310 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3311 # has no effect, don't bother defining them
3312 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00003313 define_xopen_source=no;;
Ronald Oussorena55af9a2010-01-17 16:25:57 +00003314 Darwin/1[0-9].*)
3315 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003316 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
3317 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
3318 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00003319 AIX/4)
3320 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003321 AIX/5)
3322 if test `uname -r` -eq 1; then
3323 define_xopen_source=no
3324 fi
3325 ;;
Martin v. Löwis8c255e42008-05-23 15:06:50 +00003326 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
3327 # defining NI_NUMERICHOST.
3328 QNX/6.3.2)
3329 define_xopen_source=no
3330 ;;
Martin v. Löwisa0588362006-04-04 06:03:50 +00003331
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003332esac
3333
3334if test $define_xopen_source = yes
3335then
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003336
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003337$as_echo "#define _XOPEN_SOURCE 600" >>confdefs.h
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003338
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003339
3340 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
3341 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
3342 # several APIs are not declared. Since this is also needed in some
3343 # cases for HP-UX, we define it globally.
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003344
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003345$as_echo "#define _XOPEN_SOURCE_EXTENDED 1" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003346
3347
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003348
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003349$as_echo "#define _POSIX_C_SOURCE 200112L" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003350
3351
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003352fi
3353
Guido van Rossum91922671997-10-09 20:24:13 +00003354#
3355# SGI compilers allow the specification of the both the ABI and the
3356# ISA on the command line. Depending on the values of these switches,
3357# different and often incompatable code will be generated.
3358#
3359# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
3360# thus supply support for various ABI/ISA combinations. The MACHDEP
3361# variable is also adjusted.
3362#
3363
3364if test ! -z "$SGI_ABI"
3365then
3366 CC="cc $SGI_ABI"
3367 LDFLAGS="$SGI_ABI $LDFLAGS"
3368 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
3369fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003370{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP" >&5
3371$as_echo "$MACHDEP" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003372
Jack Jansen83f898c2002-12-30 22:23:40 +00003373# And add extra plat-mac for darwin
3374
Jack Jansen7b59b422003-03-17 15:44:10 +00003375
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003376{ $as_echo "$as_me:${as_lineno-$LINENO}: checking EXTRAPLATDIR" >&5
3377$as_echo_n "checking EXTRAPLATDIR... " >&6; }
Jack Jansen83f898c2002-12-30 22:23:40 +00003378if test -z "$EXTRAPLATDIR"
3379then
3380 case $MACHDEP in
Jack Jansen7b59b422003-03-17 15:44:10 +00003381 darwin)
3382 EXTRAPLATDIR="\$(PLATMACDIRS)"
3383 EXTRAMACHDEPPATH="\$(PLATMACPATH)"
3384 ;;
3385 *)
3386 EXTRAPLATDIR=""
3387 EXTRAMACHDEPPATH=""
3388 ;;
Jack Jansen83f898c2002-12-30 22:23:40 +00003389 esac
3390fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003391{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXTRAPLATDIR" >&5
3392$as_echo "$EXTRAPLATDIR" >&6; }
Jack Jansen83f898c2002-12-30 22:23:40 +00003393
Jack Jansen6b08a402004-06-03 12:41:45 +00003394# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
3395# it may influence the way we can build extensions, so distutils
3396# needs to check it
3397
Ronald Oussoren988117f2006-04-29 11:31:35 +00003398
Jack Jansen6b08a402004-06-03 12:41:45 +00003399CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Ronald Oussoren988117f2006-04-29 11:31:35 +00003400EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00003401
Guido van Rossum627b2d71993-12-24 10:39:16 +00003402# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00003403
3404# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
3405# for debug/optimization stuff. BASECFLAGS is for flags that are required
3406# just to get things to compile and link. Users are free to override OPT
3407# when running configure or make. The build should not break if they do.
3408# BASECFLAGS should generally not be messed with, however.
3409
3410# XXX shouldn't some/most/all of this code be merged with the stuff later
3411# on that fiddles with OPT and BASECFLAGS?
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003412{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --without-gcc" >&5
3413$as_echo_n "checking for --without-gcc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003414
Martin v. Löwiseba40652007-08-30 20:10:57 +00003415# Check whether --with-gcc was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003416if test "${with_gcc+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00003417 withval=$with_gcc;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003418 case $withval in
Mark Dickinson04b27232009-01-04 12:29:36 +00003419 no) CC=${CC:-cc}
Guido van Rossumda88dad1995-01-26 00:46:29 +00003420 without_gcc=yes;;
3421 yes) CC=gcc
3422 without_gcc=no;;
3423 *) CC=$withval
3424 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003425 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00003426else
Martin v. Löwis11437992002-04-12 09:54:03 +00003427
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003428 case $ac_sys_system in
Antoine Pitrou285cd162010-09-21 15:23:17 +00003429 AIX*) CC=${CC:-xlc_r}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003430 without_gcc=;;
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003431 BeOS*)
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003432 case $BE_HOST_CPU in
3433 ppc)
Fred Drake5790be12000-10-09 17:06:13 +00003434 CC=mwcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003435 without_gcc=yes
Skip Montanarodecc6a42003-01-01 20:07:49 +00003436 BASECFLAGS="$BASECFLAGS -export pragma"
3437 OPT="$OPT -O"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003438 LDFLAGS="$LDFLAGS -nodup"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003439 ;;
3440 x86)
Fred Drake5790be12000-10-09 17:06:13 +00003441 CC=gcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003442 without_gcc=no
Skip Montanarodecc6a42003-01-01 20:07:49 +00003443 OPT="$OPT -O"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003444 ;;
3445 *)
Georg Brandl71f4fbb2011-02-25 11:04:50 +00003446 as_fn_error $? "Unknown BeOS platform \"$BE_HOST_CPU\"" "$LINENO" 5
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003447 ;;
3448 esac
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003449 AR="\$(srcdir)/Modules/ar_beos"
3450 RANLIB=:
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003451 ;;
Martin v. Löwis130fb172001-07-19 11:00:41 +00003452 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00003453 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00003454fi
3455
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003456{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $without_gcc" >&5
3457$as_echo "$without_gcc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003458
Guido van Rossum8b131c51995-03-09 14:10:13 +00003459# If the user switches compilers, we can't believe the cache
3460if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
3461then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00003462 as_fn_error $? "cached CC is different -- throw away $cache_file
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003463(it is also a good idea to do 'make clean' before compiling)" "$LINENO" 5
Guido van Rossum8b131c51995-03-09 14:10:13 +00003464fi
3465
Trent Nelson15daa352012-12-13 06:46:39 +00003466if test "$MACHDEP" = "irix6" && test "$CC" != "gcc"; then
3467 # Normally, MIPSpro CC treats #error directives as warnings, which means
3468 # a successful exit code is returned (0). This is a problem because IRIX
3469 # has a bunch of system headers with this guard at the top:
3470 #
3471 # #ifndef __c99
3472 # #error This header file is to be used only for c99 mode compilations
3473 # #else
3474 #
3475 # When autoconf tests for such a header, like stdint.h, this happens:
3476 #
3477 # configure:4619: cc -c conftest.c >&5
3478 # cc-1035 cc: WARNING File = /usr/include/stdint.h, Line = 5
3479 # #error directive: This header file is to be used only for c99 mode
3480 # compilations
3481 #
3482 # #error This header file is to be used only for c99 mode compilations
3483 # ^
3484 #
3485 # configure:4619: $? = 0
3486 # configure:4619: result: yes
3487 #
3488 # Therefore, we use `-diag_error 1035` to have the compiler treat the
3489 # warning as an error, which causes cc to return a non-zero result,
3490 # which autoconf can interpret correctly.
3491 CFLAGS="$CFLAGS -diag_error 1035"
3492 # Whilst we're here, we might as well make sure CXX defaults to something
3493 # sensible if we're not using gcc.
3494 if test -z "$CXX"; then
3495 CXX="CC"
3496 fi
3497fi
3498
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00003499# If the user set CFLAGS, use this instead of the automatically
3500# determined setting
3501preset_cflags="$CFLAGS"
Martin v. Löwis11437992002-04-12 09:54:03 +00003502ac_ext=c
3503ac_cpp='$CPP $CPPFLAGS'
3504ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3505ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3506ac_compiler_gnu=$ac_cv_c_compiler_gnu
3507if test -n "$ac_tool_prefix"; then
3508 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3509set dummy ${ac_tool_prefix}gcc; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003510{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3511$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01003512if ${ac_cv_prog_CC+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003513 $as_echo_n "(cached) " >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003514else
3515 if test -n "$CC"; then
3516 ac_cv_prog_CC="$CC" # Let the user override the test.
3517else
Martin v. Löwis11437992002-04-12 09:54:03 +00003518as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3519for as_dir in $PATH
3520do
3521 IFS=$as_save_IFS
3522 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003523 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01003524 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003525 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003526 $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 +00003527 break 2
3528 fi
3529done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003530 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003531IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003532
Jack Jansendd19cf82001-12-06 22:36:17 +00003533fi
3534fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003535CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00003536if test -n "$CC"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003537 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3538$as_echo "$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003539else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003540 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3541$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003542fi
3543
Martin v. Löwiseba40652007-08-30 20:10:57 +00003544
Martin v. Löwis11437992002-04-12 09:54:03 +00003545fi
3546if test -z "$ac_cv_prog_CC"; then
3547 ac_ct_CC=$CC
3548 # Extract the first word of "gcc", so it can be a program name with args.
3549set dummy gcc; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003550{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3551$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01003552if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003553 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003554else
3555 if test -n "$ac_ct_CC"; then
3556 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3557else
3558as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3559for as_dir in $PATH
3560do
3561 IFS=$as_save_IFS
3562 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003563 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01003564 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003565 ac_cv_prog_ac_ct_CC="gcc"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003566 $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 +00003567 break 2
3568 fi
3569done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003570 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003571IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003572
3573fi
3574fi
3575ac_ct_CC=$ac_cv_prog_ac_ct_CC
3576if test -n "$ac_ct_CC"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003577 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3578$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003579else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003580 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3581$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003582fi
3583
Martin v. Löwiseba40652007-08-30 20:10:57 +00003584 if test "x$ac_ct_CC" = x; then
3585 CC=""
3586 else
3587 case $cross_compiling:$ac_tool_warned in
3588yes:)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003589{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3590$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00003591ac_tool_warned=yes ;;
3592esac
3593 CC=$ac_ct_CC
3594 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003595else
3596 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00003597fi
3598
Jack Jansendd19cf82001-12-06 22:36:17 +00003599if test -z "$CC"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00003600 if test -n "$ac_tool_prefix"; then
3601 # 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 +00003602set dummy ${ac_tool_prefix}cc; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003603{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3604$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01003605if ${ac_cv_prog_CC+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003606 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00003607else
3608 if test -n "$CC"; then
3609 ac_cv_prog_CC="$CC" # Let the user override the test.
3610else
Martin v. Löwis11437992002-04-12 09:54:03 +00003611as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3612for as_dir in $PATH
3613do
3614 IFS=$as_save_IFS
3615 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003616 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01003617 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003618 ac_cv_prog_CC="${ac_tool_prefix}cc"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003619 $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 +00003620 break 2
3621 fi
3622done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003623 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003624IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003625
3626fi
3627fi
3628CC=$ac_cv_prog_CC
3629if test -n "$CC"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003630 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3631$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003632else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003633 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3634$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003635fi
3636
Martin v. Löwiseba40652007-08-30 20:10:57 +00003637
Martin v. Löwis11437992002-04-12 09:54:03 +00003638 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003639fi
3640if test -z "$CC"; then
3641 # Extract the first word of "cc", so it can be a program name with args.
3642set dummy cc; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003643{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3644$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01003645if ${ac_cv_prog_CC+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003646 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003647else
3648 if test -n "$CC"; then
3649 ac_cv_prog_CC="$CC" # Let the user override the test.
3650else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003651 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003652as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3653for as_dir in $PATH
3654do
3655 IFS=$as_save_IFS
3656 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003657 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01003658 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003659 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3660 ac_prog_rejected=yes
3661 continue
3662 fi
3663 ac_cv_prog_CC="cc"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003664 $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 +00003665 break 2
3666 fi
3667done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003668 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003669IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003670
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003671if test $ac_prog_rejected = yes; then
3672 # We found a bogon in the path, so make sure we never use it.
3673 set dummy $ac_cv_prog_CC
3674 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00003675 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003676 # We chose a different compiler from the bogus one.
3677 # However, it has the same basename, so the bogon will be chosen
3678 # first if we set CC to just the basename; use the full file name.
3679 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00003680 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003681 fi
3682fi
3683fi
3684fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003685CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003686if test -n "$CC"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003687 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3688$as_echo "$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003689else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003690 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3691$as_echo "no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003692fi
3693
Martin v. Löwiseba40652007-08-30 20:10:57 +00003694
Martin v. Löwis11437992002-04-12 09:54:03 +00003695fi
3696if test -z "$CC"; then
3697 if test -n "$ac_tool_prefix"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00003698 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003699 do
3700 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3701set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003702{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3703$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01003704if ${ac_cv_prog_CC+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003705 $as_echo_n "(cached) " >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003706else
3707 if test -n "$CC"; then
3708 ac_cv_prog_CC="$CC" # Let the user override the test.
3709else
Martin v. Löwis11437992002-04-12 09:54:03 +00003710as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3711for as_dir in $PATH
3712do
3713 IFS=$as_save_IFS
3714 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003715 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01003716 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003717 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003718 $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 +00003719 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00003720 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003721done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003722 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003723IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003724
3725fi
3726fi
3727CC=$ac_cv_prog_CC
3728if test -n "$CC"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003729 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3730$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003731else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003732 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3733$as_echo "no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003734fi
3735
Martin v. Löwiseba40652007-08-30 20:10:57 +00003736
Martin v. Löwis11437992002-04-12 09:54:03 +00003737 test -n "$CC" && break
3738 done
3739fi
3740if test -z "$CC"; then
3741 ac_ct_CC=$CC
Martin v. Löwiseba40652007-08-30 20:10:57 +00003742 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003743do
3744 # Extract the first word of "$ac_prog", so it can be a program name with args.
3745set dummy $ac_prog; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003746{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3747$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01003748if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003749 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003750else
3751 if test -n "$ac_ct_CC"; then
3752 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3753else
3754as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3755for as_dir in $PATH
3756do
3757 IFS=$as_save_IFS
3758 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003759 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01003760 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003761 ac_cv_prog_ac_ct_CC="$ac_prog"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003762 $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 +00003763 break 2
3764 fi
3765done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003766 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003767IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00003768
Martin v. Löwis11437992002-04-12 09:54:03 +00003769fi
3770fi
3771ac_ct_CC=$ac_cv_prog_ac_ct_CC
3772if test -n "$ac_ct_CC"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003773 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3774$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003775else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003776 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3777$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003778fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003779
Martin v. Löwiseba40652007-08-30 20:10:57 +00003780
Martin v. Löwis11437992002-04-12 09:54:03 +00003781 test -n "$ac_ct_CC" && break
3782done
Michael W. Hudson54241132001-12-07 15:38:26 +00003783
Martin v. Löwiseba40652007-08-30 20:10:57 +00003784 if test "x$ac_ct_CC" = x; then
3785 CC=""
3786 else
3787 case $cross_compiling:$ac_tool_warned in
3788yes:)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003789{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3790$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00003791ac_tool_warned=yes ;;
3792esac
3793 CC=$ac_ct_CC
3794 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003795fi
3796
3797fi
3798
3799
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003800test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3801$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00003802as_fn_error $? "no acceptable C compiler found in \$PATH
Matthias Klose3cef2a92012-03-14 23:39:33 +01003803See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003804
3805# Provide some information about the compiler.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003806$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3807set X $ac_compile
3808ac_compiler=$2
3809for ac_option in --version -v -V -qversion; do
3810 { { ac_try="$ac_compiler $ac_option >&5"
Martin v. Löwiseba40652007-08-30 20:10:57 +00003811case "(($ac_try" in
3812 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3813 *) ac_try_echo=$ac_try;;
3814esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003815eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3816$as_echo "$ac_try_echo"; } >&5
3817 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003818 ac_status=$?
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003819 if test -s conftest.err; then
3820 sed '10a\
3821... rest of stderr output deleted ...
3822 10q' conftest.err >conftest.er1
3823 cat conftest.er1 >&5
3824 fi
3825 rm -f conftest.er1 conftest.err
3826 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3827 test $ac_status = 0; }
3828done
Martin v. Löwis11437992002-04-12 09:54:03 +00003829
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003830cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003831/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00003832
Martin v. Löwis11437992002-04-12 09:54:03 +00003833int
3834main ()
3835{
3836
3837 ;
3838 return 0;
3839}
3840_ACEOF
3841ac_clean_files_save=$ac_clean_files
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003842ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00003843# Try to create an executable without -o first, disregard a.out.
3844# It will help us diagnose broken compilers, and finding out an intuition
3845# of exeext.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003846{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3847$as_echo_n "checking whether the C compiler works... " >&6; }
3848ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3849
3850# The possible output files:
3851ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3852
Martin v. Löwiseba40652007-08-30 20:10:57 +00003853ac_rmfiles=
3854for ac_file in $ac_files
3855do
3856 case $ac_file in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003857 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00003858 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3859 esac
3860done
3861rm -f $ac_rmfiles
3862
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003863if { { ac_try="$ac_link_default"
Martin v. Löwiseba40652007-08-30 20:10:57 +00003864case "(($ac_try" in
3865 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3866 *) ac_try_echo=$ac_try;;
3867esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003868eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3869$as_echo "$ac_try_echo"; } >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003870 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003871 ac_status=$?
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003872 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3873 test $ac_status = 0; }; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00003874 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3875# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3876# in a Makefile. We should not override ac_cv_exeext if it was cached,
3877# so that the user can short-circuit this test for compilers unknown to
3878# Autoconf.
3879for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00003880do
3881 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00003882 case $ac_file in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003883 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
Skip Montanarof0d5f792004-08-15 14:08:23 +00003884 ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003885 [ab].out )
Skip Montanarof0d5f792004-08-15 14:08:23 +00003886 # We found the default executable, but exeext='' is most
3887 # certainly right.
3888 break;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003889 *.* )
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003890 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
Martin v. Löwiseba40652007-08-30 20:10:57 +00003891 then :; else
3892 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3893 fi
3894 # We set ac_cv_exeext here because the later test for it is not
3895 # safe: cross compilers may not add the suffix if given an `-o'
3896 # argument, so we may need to know it at that point already.
3897 # Even if this section looks crufty: it has the advantage of
3898 # actually working.
Skip Montanarof0d5f792004-08-15 14:08:23 +00003899 break;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003900 * )
Skip Montanarof0d5f792004-08-15 14:08:23 +00003901 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003902 esac
3903done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003904test "$ac_cv_exeext" = no && ac_cv_exeext=
3905
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003906else
Martin v. Löwiseba40652007-08-30 20:10:57 +00003907 ac_file=''
3908fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003909if test -z "$ac_file"; then :
3910 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3911$as_echo "no" >&6; }
3912$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003913sed 's/^/| /' conftest.$ac_ext >&5
3914
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003915{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3916$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00003917as_fn_error 77 "C compiler cannot create executables
Matthias Klose3cef2a92012-03-14 23:39:33 +01003918See \`config.log' for more details" "$LINENO" 5; }
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003919else
3920 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3921$as_echo "yes" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003922fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003923{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3924$as_echo_n "checking for C compiler default output file name... " >&6; }
3925{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3926$as_echo "$ac_file" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003927ac_exeext=$ac_cv_exeext
Michael W. Hudson54241132001-12-07 15:38:26 +00003928
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003929rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
Martin v. Löwis11437992002-04-12 09:54:03 +00003930ac_clean_files=$ac_clean_files_save
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003931{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3932$as_echo_n "checking for suffix of executables... " >&6; }
3933if { { ac_try="$ac_link"
Martin v. Löwiseba40652007-08-30 20:10:57 +00003934case "(($ac_try" in
3935 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3936 *) ac_try_echo=$ac_try;;
3937esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003938eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3939$as_echo "$ac_try_echo"; } >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003940 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003941 ac_status=$?
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003942 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3943 test $ac_status = 0; }; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00003944 # If both `conftest.exe' and `conftest' are `present' (well, observable)
3945# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
3946# work properly (i.e., refer to `conftest.exe'), while it won't with
3947# `rm'.
Skip Montanaro6dead952003-09-25 14:50:04 +00003948for ac_file in conftest.exe conftest conftest.*; do
3949 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00003950 case $ac_file in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003951 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003952 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
Skip Montanarof0d5f792004-08-15 14:08:23 +00003953 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003954 * ) break;;
3955 esac
3956done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003957else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003958 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3959$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00003960as_fn_error $? "cannot compute suffix of executables: cannot compile and link
Matthias Klose3cef2a92012-03-14 23:39:33 +01003961See \`config.log' for more details" "$LINENO" 5; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003962fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003963rm -f conftest conftest$ac_cv_exeext
3964{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3965$as_echo "$ac_cv_exeext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003966
3967rm -f conftest.$ac_ext
3968EXEEXT=$ac_cv_exeext
3969ac_exeext=$EXEEXT
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003970cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3971/* end confdefs.h. */
3972#include <stdio.h>
3973int
3974main ()
3975{
3976FILE *f = fopen ("conftest.out", "w");
3977 return ferror (f) || fclose (f) != 0;
3978
3979 ;
3980 return 0;
3981}
Skip Montanaro6dead952003-09-25 14:50:04 +00003982_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003983ac_clean_files="$ac_clean_files conftest.out"
3984# Check that the compiler produces executables we can run. If not, either
3985# the compiler is broken, or we cross compile.
3986{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
3987$as_echo_n "checking whether we are cross compiling... " >&6; }
3988if test "$cross_compiling" != yes; then
3989 { { ac_try="$ac_link"
3990case "(($ac_try" in
3991 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3992 *) ac_try_echo=$ac_try;;
3993esac
3994eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3995$as_echo "$ac_try_echo"; } >&5
3996 (eval "$ac_link") 2>&5
3997 ac_status=$?
3998 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3999 test $ac_status = 0; }
4000 if { ac_try='./conftest$ac_cv_exeext'
4001 { { case "(($ac_try" in
4002 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4003 *) ac_try_echo=$ac_try;;
4004esac
4005eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4006$as_echo "$ac_try_echo"; } >&5
4007 (eval "$ac_try") 2>&5
4008 ac_status=$?
4009 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4010 test $ac_status = 0; }; }; then
4011 cross_compiling=no
4012 else
4013 if test "$cross_compiling" = maybe; then
4014 cross_compiling=yes
4015 else
4016 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4017$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004018as_fn_error $? "cannot run C compiled programs.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004019If you meant to cross compile, use \`--host'.
Matthias Klose3cef2a92012-03-14 23:39:33 +01004020See \`config.log' for more details" "$LINENO" 5; }
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004021 fi
4022 fi
4023fi
4024{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
4025$as_echo "$cross_compiling" >&6; }
4026
4027rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
4028ac_clean_files=$ac_clean_files_save
4029{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
4030$as_echo_n "checking for suffix of object files... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01004031if ${ac_cv_objext+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004032 $as_echo_n "(cached) " >&6
4033else
4034 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004035/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004036
Martin v. Löwis11437992002-04-12 09:54:03 +00004037int
4038main ()
4039{
4040
4041 ;
4042 return 0;
4043}
4044_ACEOF
4045rm -f conftest.o conftest.obj
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004046if { { ac_try="$ac_compile"
Martin v. Löwiseba40652007-08-30 20:10:57 +00004047case "(($ac_try" in
4048 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4049 *) ac_try_echo=$ac_try;;
4050esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004051eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4052$as_echo "$ac_try_echo"; } >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00004053 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004054 ac_status=$?
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004055 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4056 test $ac_status = 0; }; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00004057 for ac_file in conftest.o conftest.obj conftest.*; do
4058 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00004059 case $ac_file in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004060 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004061 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4062 break;;
4063 esac
4064done
4065else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004066 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004067sed 's/^/| /' conftest.$ac_ext >&5
4068
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004069{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4070$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004071as_fn_error $? "cannot compute suffix of object files: cannot compile
Matthias Klose3cef2a92012-03-14 23:39:33 +01004072See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004073fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004074rm -f conftest.$ac_cv_objext conftest.$ac_ext
4075fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004076{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4077$as_echo "$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004078OBJEXT=$ac_cv_objext
4079ac_objext=$OBJEXT
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004080{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4081$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01004082if ${ac_cv_c_compiler_gnu+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004083 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004084else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004085 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004086/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004087
Martin v. Löwis11437992002-04-12 09:54:03 +00004088int
4089main ()
4090{
4091#ifndef __GNUC__
4092 choke me
4093#endif
4094
4095 ;
4096 return 0;
4097}
4098_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004099if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004100 ac_compiler_gnu=yes
4101else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004102 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00004103fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004104rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004105ac_cv_c_compiler_gnu=$ac_compiler_gnu
4106
4107fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004108{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4109$as_echo "$ac_cv_c_compiler_gnu" >&6; }
4110if test $ac_compiler_gnu = yes; then
4111 GCC=yes
4112else
4113 GCC=
4114fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004115ac_test_CFLAGS=${CFLAGS+set}
4116ac_save_CFLAGS=$CFLAGS
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004117{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4118$as_echo_n "checking whether $CC accepts -g... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01004119if ${ac_cv_prog_cc_g+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004120 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004121else
Martin v. Löwiseba40652007-08-30 20:10:57 +00004122 ac_save_c_werror_flag=$ac_c_werror_flag
4123 ac_c_werror_flag=yes
4124 ac_cv_prog_cc_g=no
4125 CFLAGS="-g"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004126 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004127/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004128
Martin v. Löwis11437992002-04-12 09:54:03 +00004129int
4130main ()
4131{
4132
4133 ;
4134 return 0;
4135}
4136_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004137if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumf78abae1997-01-21 22:02:36 +00004138 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004139else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004140 CFLAGS=""
4141 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +00004142/* end confdefs.h. */
4143
4144int
4145main ()
4146{
4147
4148 ;
4149 return 0;
4150}
4151_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004152if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00004153
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004154else
4155 ac_c_werror_flag=$ac_save_c_werror_flag
Martin v. Löwiseba40652007-08-30 20:10:57 +00004156 CFLAGS="-g"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004157 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +00004158/* end confdefs.h. */
4159
4160int
4161main ()
4162{
4163
4164 ;
4165 return 0;
4166}
4167_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004168if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00004169 ac_cv_prog_cc_g=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004170fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004171rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004172fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004173rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4174fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004175rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4176 ac_c_werror_flag=$ac_save_c_werror_flag
4177fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004178{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4179$as_echo "$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004180if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004181 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004182elif test $ac_cv_prog_cc_g = yes; then
4183 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00004184 CFLAGS="-g -O2"
4185 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004186 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004187 fi
4188else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004189 if test "$GCC" = yes; then
4190 CFLAGS="-O2"
4191 else
4192 CFLAGS=
4193 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004194fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004195{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4196$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01004197if ${ac_cv_prog_cc_c89+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004198 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004199else
Martin v. Löwiseba40652007-08-30 20:10:57 +00004200 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00004201ac_save_CC=$CC
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004202cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004203/* end confdefs.h. */
4204#include <stdarg.h>
4205#include <stdio.h>
Charles-François Natalibe2b9072013-01-08 19:47:00 +01004206struct stat;
Skip Montanaro6dead952003-09-25 14:50:04 +00004207/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4208struct buf { int x; };
4209FILE * (*rcsopen) (struct buf *, struct stat *, int);
4210static char *e (p, i)
4211 char **p;
4212 int i;
4213{
4214 return p[i];
4215}
4216static char *f (char * (*g) (char **, int), char **p, ...)
4217{
4218 char *s;
4219 va_list v;
4220 va_start (v,p);
4221 s = g (p, va_arg (v,int));
4222 va_end (v);
4223 return s;
4224}
Skip Montanarof0d5f792004-08-15 14:08:23 +00004225
4226/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
4227 function prototypes and stuff, but not '\xHH' hex character constants.
4228 These don't provoke an error unfortunately, instead are silently treated
Martin v. Löwiseba40652007-08-30 20:10:57 +00004229 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00004230 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
4231 array size at least. It's necessary to write '\x00'==0 to get something
Martin v. Löwiseba40652007-08-30 20:10:57 +00004232 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00004233int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4234
Martin v. Löwiseba40652007-08-30 20:10:57 +00004235/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4236 inside strings and character constants. */
4237#define FOO(x) 'x'
4238int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4239
Skip Montanaro6dead952003-09-25 14:50:04 +00004240int test (int i, double x);
4241struct s1 {int (*f) (int a);};
4242struct s2 {int (*f) (double a);};
4243int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4244int argc;
4245char **argv;
4246int
4247main ()
4248{
4249return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4250 ;
4251 return 0;
4252}
4253_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00004254for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4255 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00004256do
4257 CC="$ac_save_CC $ac_arg"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004258 if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00004259 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00004260fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004261rm -f core conftest.err conftest.$ac_objext
4262 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00004263done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004264rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004265CC=$ac_save_CC
4266
4267fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004268# AC_CACHE_VAL
4269case "x$ac_cv_prog_cc_c89" in
4270 x)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004271 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4272$as_echo "none needed" >&6; } ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00004273 xno)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004274 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4275$as_echo "unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004276 *)
Martin v. Löwiseba40652007-08-30 20:10:57 +00004277 CC="$CC $ac_cv_prog_cc_c89"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004278 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4279$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004280esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004281if test "x$ac_cv_prog_cc_c89" != xno; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004282
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004283fi
Skip Montanaro6dead952003-09-25 14:50:04 +00004284
Martin v. Löwis11437992002-04-12 09:54:03 +00004285ac_ext=c
4286ac_cpp='$CPP $CPPFLAGS'
4287ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4288ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4289ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004290
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00004291if test ! -z "$preset_cflags"
4292then
4293 CFLAGS=$preset_cflags
4294fi
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004295
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004296
4297
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004298{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-cxx-main=<compiler>" >&5
4299$as_echo_n "checking for --with-cxx-main=<compiler>... " >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004300
Martin v. Löwiseba40652007-08-30 20:10:57 +00004301# Check whether --with-cxx_main was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004302if test "${with_cxx_main+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00004303 withval=$with_cxx_main;
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004304
4305 case $withval in
4306 no) with_cxx_main=no
4307 MAINCC='$(CC)';;
4308 yes) with_cxx_main=yes
4309 MAINCC='$(CXX)';;
4310 *) with_cxx_main=yes
4311 MAINCC=$withval
4312 if test -z "$CXX"
4313 then
4314 CXX=$withval
4315 fi;;
4316 esac
4317else
4318
4319 with_cxx_main=no
4320 MAINCC='$(CC)'
4321
Martin v. Löwiseba40652007-08-30 20:10:57 +00004322fi
4323
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004324{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_cxx_main" >&5
4325$as_echo "$with_cxx_main" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004326
4327preset_cxx="$CXX"
4328if test -z "$CXX"
4329then
4330 case "$CC" in
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004331 gcc) if test -n "$ac_tool_prefix"; then
4332 # Extract the first word of "${ac_tool_prefix}g++", so it can be a program name with args.
4333set dummy ${ac_tool_prefix}g++; ac_word=$2
4334{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4335$as_echo_n "checking for $ac_word... " >&6; }
4336if ${ac_cv_path_CXX+:} false; then :
4337 $as_echo_n "(cached) " >&6
4338else
4339 case $CXX in
4340 [\\/]* | ?:[\\/]*)
4341 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4342 ;;
4343 *)
4344 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4345for as_dir in notfound
4346do
4347 IFS=$as_save_IFS
4348 test -z "$as_dir" && as_dir=.
4349 for ac_exec_ext in '' $ac_executable_extensions; do
4350 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4351 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4352 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4353 break 2
4354 fi
4355done
4356 done
4357IFS=$as_save_IFS
4358
4359 ;;
4360esac
4361fi
4362CXX=$ac_cv_path_CXX
4363if test -n "$CXX"; then
4364 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4365$as_echo "$CXX" >&6; }
4366else
4367 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4368$as_echo "no" >&6; }
4369fi
4370
4371
4372fi
4373if test -z "$ac_cv_path_CXX"; then
4374 ac_pt_CXX=$CXX
4375 # Extract the first word of "g++", so it can be a program name with args.
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004376set dummy g++; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004377{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4378$as_echo_n "checking for $ac_word... " >&6; }
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004379if ${ac_cv_path_ac_pt_CXX+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004380 $as_echo_n "(cached) " >&6
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004381else
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004382 case $ac_pt_CXX in
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004383 [\\/]* | ?:[\\/]*)
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004384 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 +00004385 ;;
4386 *)
4387 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4388for as_dir in notfound
4389do
4390 IFS=$as_save_IFS
4391 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004392 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01004393 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004394 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004395 $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 +00004396 break 2
4397 fi
4398done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004399 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004400IFS=$as_save_IFS
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004401
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004402 ;;
4403esac
4404fi
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004405ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4406if test -n "$ac_pt_CXX"; then
4407 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4408$as_echo "$ac_pt_CXX" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00004409else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004410 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4411$as_echo "no" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00004412fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004413
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004414 if test "x$ac_pt_CXX" = x; then
4415 CXX="g++"
4416 else
4417 case $cross_compiling:$ac_tool_warned in
4418yes:)
4419{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4420$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4421ac_tool_warned=yes ;;
4422esac
4423 CXX=$ac_pt_CXX
4424 fi
4425else
4426 CXX="$ac_cv_path_CXX"
4427fi
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004428 ;;
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004429 cc) if test -n "$ac_tool_prefix"; then
4430 # Extract the first word of "${ac_tool_prefix}c++", so it can be a program name with args.
4431set dummy ${ac_tool_prefix}c++; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004432{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4433$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01004434if ${ac_cv_path_CXX+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004435 $as_echo_n "(cached) " >&6
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004436else
4437 case $CXX in
4438 [\\/]* | ?:[\\/]*)
4439 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4440 ;;
4441 *)
4442 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4443for as_dir in notfound
4444do
4445 IFS=$as_save_IFS
4446 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004447 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01004448 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004449 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004450 $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 +00004451 break 2
4452 fi
4453done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004454 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004455IFS=$as_save_IFS
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004456
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004457 ;;
4458esac
4459fi
4460CXX=$ac_cv_path_CXX
Skip Montanaro89e975f2007-08-22 19:05:21 +00004461if test -n "$CXX"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004462 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4463$as_echo "$CXX" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00004464else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004465 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4466$as_echo "no" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00004467fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004468
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004469
4470fi
4471if test -z "$ac_cv_path_CXX"; then
4472 ac_pt_CXX=$CXX
4473 # Extract the first word of "c++", so it can be a program name with args.
4474set dummy c++; ac_word=$2
4475{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4476$as_echo_n "checking for $ac_word... " >&6; }
4477if ${ac_cv_path_ac_pt_CXX+:} false; then :
4478 $as_echo_n "(cached) " >&6
4479else
4480 case $ac_pt_CXX in
4481 [\\/]* | ?:[\\/]*)
4482 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4483 ;;
4484 *)
4485 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4486for as_dir in notfound
4487do
4488 IFS=$as_save_IFS
4489 test -z "$as_dir" && as_dir=.
4490 for ac_exec_ext in '' $ac_executable_extensions; do
4491 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4492 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4493 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4494 break 2
4495 fi
4496done
4497 done
4498IFS=$as_save_IFS
4499
4500 ;;
4501esac
4502fi
4503ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4504if test -n "$ac_pt_CXX"; then
4505 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4506$as_echo "$ac_pt_CXX" >&6; }
4507else
4508 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4509$as_echo "no" >&6; }
4510fi
4511
4512 if test "x$ac_pt_CXX" = x; then
4513 CXX="c++"
4514 else
4515 case $cross_compiling:$ac_tool_warned in
4516yes:)
4517{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4518$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4519ac_tool_warned=yes ;;
4520esac
4521 CXX=$ac_pt_CXX
4522 fi
4523else
4524 CXX="$ac_cv_path_CXX"
4525fi
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004526 ;;
4527 esac
4528 if test "$CXX" = "notfound"
4529 then
4530 CXX=""
4531 fi
4532fi
4533if test -z "$CXX"
4534then
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004535 if test -n "$ac_tool_prefix"; then
4536 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
4537 do
4538 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4539set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004540{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4541$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01004542if ${ac_cv_prog_CXX+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004543 $as_echo_n "(cached) " >&6
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004544else
4545 if test -n "$CXX"; then
4546 ac_cv_prog_CXX="$CXX" # Let the user override the test.
4547else
4548as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4549for as_dir in $PATH
4550do
4551 IFS=$as_save_IFS
4552 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004553 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01004554 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004555 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004556 $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 +00004557 break 2
4558 fi
4559done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004560 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004561IFS=$as_save_IFS
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004562
4563fi
4564fi
4565CXX=$ac_cv_prog_CXX
4566if test -n "$CXX"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004567 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4568$as_echo "$CXX" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004569else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004570 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4571$as_echo "no" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004572fi
4573
Martin v. Löwiseba40652007-08-30 20:10:57 +00004574
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004575 test -n "$CXX" && break
4576 done
4577fi
4578if test -z "$CXX"; then
4579 ac_ct_CXX=$CXX
4580 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
4581do
4582 # Extract the first word of "$ac_prog", so it can be a program name with args.
4583set dummy $ac_prog; ac_word=$2
4584{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4585$as_echo_n "checking for $ac_word... " >&6; }
4586if ${ac_cv_prog_ac_ct_CXX+:} false; then :
4587 $as_echo_n "(cached) " >&6
4588else
4589 if test -n "$ac_ct_CXX"; then
4590 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
4591else
4592as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4593for as_dir in $PATH
4594do
4595 IFS=$as_save_IFS
4596 test -z "$as_dir" && as_dir=.
4597 for ac_exec_ext in '' $ac_executable_extensions; do
4598 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4599 ac_cv_prog_ac_ct_CXX="$ac_prog"
4600 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4601 break 2
4602 fi
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004603done
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004604 done
4605IFS=$as_save_IFS
4606
4607fi
4608fi
4609ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
4610if test -n "$ac_ct_CXX"; then
4611 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
4612$as_echo "$ac_ct_CXX" >&6; }
4613else
4614 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4615$as_echo "no" >&6; }
4616fi
4617
4618
4619 test -n "$ac_ct_CXX" && break
4620done
4621
4622 if test "x$ac_ct_CXX" = x; then
4623 CXX="notfound"
4624 else
4625 case $cross_compiling:$ac_tool_warned in
4626yes:)
4627{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4628$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4629ac_tool_warned=yes ;;
4630esac
4631 CXX=$ac_ct_CXX
4632 fi
4633fi
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004634
4635 if test "$CXX" = "notfound"
4636 then
4637 CXX=""
4638 fi
4639fi
4640if test "$preset_cxx" != "$CXX"
4641then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004642 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004643
4644 By default, distutils will build C++ extension modules with \"$CXX\".
4645 If this is not intended, then set CXX on the configure command line.
4646 " >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004647$as_echo "$as_me: WARNING:
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004648
4649 By default, distutils will build C++ extension modules with \"$CXX\".
4650 If this is not intended, then set CXX on the configure command line.
4651 " >&2;}
4652fi
4653
doko@python.org4e63fbe2013-01-25 13:08:27 +01004654MULTIARCH=$($CC --print-multiarch 2>/dev/null)
4655
4656
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004657
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004658# checks for UNIX variants that set C preprocessor variables
Martin v. Löwis11437992002-04-12 09:54:03 +00004659
4660ac_ext=c
4661ac_cpp='$CPP $CPPFLAGS'
4662ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4663ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4664ac_compiler_gnu=$ac_cv_c_compiler_gnu
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004665{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4666$as_echo_n "checking how to run the C preprocessor... " >&6; }
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004667# On Suns, sometimes $CPP names a directory.
4668if test -n "$CPP" && test -d "$CPP"; then
4669 CPP=
4670fi
4671if test -z "$CPP"; then
Matthias Klose3cef2a92012-03-14 23:39:33 +01004672 if ${ac_cv_prog_CPP+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004673 $as_echo_n "(cached) " >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004674else
Martin v. Löwis11437992002-04-12 09:54:03 +00004675 # Double quotes because CPP needs to be expanded
4676 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4677 do
4678 ac_preproc_ok=false
4679for ac_c_preproc_warn_flag in '' yes
4680do
4681 # Use a header file that comes with gcc, so configuring glibc
4682 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00004683 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4684 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004685 # On the NeXT, cc -E runs the code through the compiler's parser,
Martin v. Löwis11437992002-04-12 09:54:03 +00004686 # not just through cpp. "Syntax error" is here to catch this case.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004687 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004688/* end confdefs.h. */
4689#ifdef __STDC__
4690# include <limits.h>
4691#else
4692# include <assert.h>
4693#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00004694 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00004695_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004696if ac_fn_c_try_cpp "$LINENO"; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004697
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004698else
Martin v. Löwis11437992002-04-12 09:54:03 +00004699 # Broken: fails on valid input.
4700continue
Jack Jansendd19cf82001-12-06 22:36:17 +00004701fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004702rm -f conftest.err conftest.i conftest.$ac_ext
Jack Jansendd19cf82001-12-06 22:36:17 +00004703
Martin v. Löwiseba40652007-08-30 20:10:57 +00004704 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00004705 # can be detected and how.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004706 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004707/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004708#include <ac_nonexistent.h>
4709_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004710if ac_fn_c_try_cpp "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004711 # Broken: success on invalid input.
4712continue
4713else
Martin v. Löwis11437992002-04-12 09:54:03 +00004714 # Passes both tests.
4715ac_preproc_ok=:
4716break
4717fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004718rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004719
4720done
4721# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004722rm -f conftest.i conftest.err conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004723if $ac_preproc_ok; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004724 break
4725fi
4726
4727 done
4728 ac_cv_prog_CPP=$CPP
4729
4730fi
4731 CPP=$ac_cv_prog_CPP
4732else
4733 ac_cv_prog_CPP=$CPP
4734fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004735{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4736$as_echo "$CPP" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004737ac_preproc_ok=false
4738for ac_c_preproc_warn_flag in '' yes
4739do
4740 # Use a header file that comes with gcc, so configuring glibc
4741 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00004742 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4743 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis11437992002-04-12 09:54:03 +00004744 # On the NeXT, cc -E runs the code through the compiler's parser,
4745 # not just through cpp. "Syntax error" is here to catch this case.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004746 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004747/* end confdefs.h. */
4748#ifdef __STDC__
4749# include <limits.h>
4750#else
4751# include <assert.h>
4752#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00004753 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00004754_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004755if ac_fn_c_try_cpp "$LINENO"; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004756
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004757else
Martin v. Löwis11437992002-04-12 09:54:03 +00004758 # Broken: fails on valid input.
4759continue
4760fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004761rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004762
Martin v. Löwiseba40652007-08-30 20:10:57 +00004763 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00004764 # can be detected and how.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004765 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004766/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004767#include <ac_nonexistent.h>
4768_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004769if ac_fn_c_try_cpp "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004770 # Broken: success on invalid input.
4771continue
4772else
Martin v. Löwis11437992002-04-12 09:54:03 +00004773 # Passes both tests.
4774ac_preproc_ok=:
4775break
4776fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004777rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004778
4779done
4780# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004781rm -f conftest.i conftest.err conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004782if $ac_preproc_ok; then :
4783
Martin v. Löwis11437992002-04-12 09:54:03 +00004784else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004785 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4786$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004787as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
Matthias Klose3cef2a92012-03-14 23:39:33 +01004788See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004789fi
4790
4791ac_ext=c
4792ac_cpp='$CPP $CPPFLAGS'
4793ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4794ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4795ac_compiler_gnu=$ac_cv_c_compiler_gnu
4796
4797
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004798{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4799$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01004800if ${ac_cv_path_GREP+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004801 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004802else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004803 if test -z "$GREP"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00004804 ac_path_GREP_found=false
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004805 # Loop through the user's path and test for each of PROGNAME-LIST
4806 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwiseba40652007-08-30 20:10:57 +00004807for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4808do
4809 IFS=$as_save_IFS
4810 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004811 for ac_prog in grep ggrep; do
4812 for ac_exec_ext in '' $ac_executable_extensions; do
4813 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
Charles-François Natalibe2b9072013-01-08 19:47:00 +01004814 as_fn_executable_p "$ac_path_GREP" || continue
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004815# Check for GNU ac_path_GREP and select it if it is found.
Martin v. Löwiseba40652007-08-30 20:10:57 +00004816 # Check for GNU $ac_path_GREP
4817case `"$ac_path_GREP" --version 2>&1` in
4818*GNU*)
4819 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4820*)
4821 ac_count=0
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004822 $as_echo_n 0123456789 >"conftest.in"
Martin v. Löwiseba40652007-08-30 20:10:57 +00004823 while :
4824 do
4825 cat "conftest.in" "conftest.in" >"conftest.tmp"
4826 mv "conftest.tmp" "conftest.in"
4827 cp "conftest.in" "conftest.nl"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004828 $as_echo 'GREP' >> "conftest.nl"
Martin v. Löwiseba40652007-08-30 20:10:57 +00004829 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4830 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004831 as_fn_arith $ac_count + 1 && ac_count=$as_val
Martin v. Löwiseba40652007-08-30 20:10:57 +00004832 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4833 # Best one so far, save it but keep looking for a better one
4834 ac_cv_path_GREP="$ac_path_GREP"
4835 ac_path_GREP_max=$ac_count
Skip Montanaro6dead952003-09-25 14:50:04 +00004836 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004837 # 10*(2^10) chars as input seems more than enough
4838 test $ac_count -gt 10 && break
4839 done
4840 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4841esac
4842
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004843 $ac_path_GREP_found && break 3
4844 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004845 done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004846 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004847IFS=$as_save_IFS
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004848 if test -z "$ac_cv_path_GREP"; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004849 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 +00004850 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004851else
4852 ac_cv_path_GREP=$GREP
4853fi
4854
Martin v. Löwiseba40652007-08-30 20:10:57 +00004855fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004856{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4857$as_echo "$ac_cv_path_GREP" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00004858 GREP="$ac_cv_path_GREP"
4859
4860
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004861{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
4862$as_echo_n "checking for egrep... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01004863if ${ac_cv_path_EGREP+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004864 $as_echo_n "(cached) " >&6
Martin v. Löwiseba40652007-08-30 20:10:57 +00004865else
4866 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
4867 then ac_cv_path_EGREP="$GREP -E"
4868 else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004869 if test -z "$EGREP"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00004870 ac_path_EGREP_found=false
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004871 # Loop through the user's path and test for each of PROGNAME-LIST
4872 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwiseba40652007-08-30 20:10:57 +00004873for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4874do
4875 IFS=$as_save_IFS
4876 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004877 for ac_prog in egrep; do
4878 for ac_exec_ext in '' $ac_executable_extensions; do
4879 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
Charles-François Natalibe2b9072013-01-08 19:47:00 +01004880 as_fn_executable_p "$ac_path_EGREP" || continue
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004881# Check for GNU ac_path_EGREP and select it if it is found.
Martin v. Löwiseba40652007-08-30 20:10:57 +00004882 # Check for GNU $ac_path_EGREP
4883case `"$ac_path_EGREP" --version 2>&1` in
4884*GNU*)
4885 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
4886*)
4887 ac_count=0
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004888 $as_echo_n 0123456789 >"conftest.in"
Martin v. Löwiseba40652007-08-30 20:10:57 +00004889 while :
4890 do
4891 cat "conftest.in" "conftest.in" >"conftest.tmp"
4892 mv "conftest.tmp" "conftest.in"
4893 cp "conftest.in" "conftest.nl"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004894 $as_echo 'EGREP' >> "conftest.nl"
Martin v. Löwiseba40652007-08-30 20:10:57 +00004895 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4896 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004897 as_fn_arith $ac_count + 1 && ac_count=$as_val
Martin v. Löwiseba40652007-08-30 20:10:57 +00004898 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
4899 # Best one so far, save it but keep looking for a better one
4900 ac_cv_path_EGREP="$ac_path_EGREP"
4901 ac_path_EGREP_max=$ac_count
4902 fi
4903 # 10*(2^10) chars as input seems more than enough
4904 test $ac_count -gt 10 && break
4905 done
4906 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4907esac
4908
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004909 $ac_path_EGREP_found && break 3
4910 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004911 done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004912 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004913IFS=$as_save_IFS
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004914 if test -z "$ac_cv_path_EGREP"; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004915 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 +00004916 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004917else
4918 ac_cv_path_EGREP=$EGREP
4919fi
4920
Martin v. Löwiseba40652007-08-30 20:10:57 +00004921 fi
4922fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004923{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
4924$as_echo "$ac_cv_path_EGREP" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00004925 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00004926
4927
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004928{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
4929$as_echo_n "checking for ANSI C header files... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01004930if ${ac_cv_header_stdc+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004931 $as_echo_n "(cached) " >&6
4932else
4933 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitrouf2caeed2009-05-24 20:23:57 +00004934/* end confdefs.h. */
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004935#include <stdlib.h>
4936#include <stdarg.h>
4937#include <string.h>
4938#include <float.h>
4939
4940int
4941main ()
4942{
4943
4944 ;
4945 return 0;
4946}
4947_ACEOF
4948if ac_fn_c_try_compile "$LINENO"; then :
4949 ac_cv_header_stdc=yes
4950else
4951 ac_cv_header_stdc=no
4952fi
4953rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4954
4955if test $ac_cv_header_stdc = yes; then
4956 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4957 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4958/* end confdefs.h. */
4959#include <string.h>
Antoine Pitrouf2caeed2009-05-24 20:23:57 +00004960
Antoine Pitrouf2caeed2009-05-24 20:23:57 +00004961_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004962if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004963 $EGREP "memchr" >/dev/null 2>&1; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004964
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004965else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004966 ac_cv_header_stdc=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004967fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00004968rm -f conftest*
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004969
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004970fi
4971
4972if test $ac_cv_header_stdc = yes; then
4973 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4974 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4975/* end confdefs.h. */
4976#include <stdlib.h>
4977
4978_ACEOF
4979if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4980 $EGREP "free" >/dev/null 2>&1; then :
4981
4982else
4983 ac_cv_header_stdc=no
4984fi
4985rm -f conftest*
4986
4987fi
4988
4989if test $ac_cv_header_stdc = yes; then
4990 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4991 if test "$cross_compiling" = yes; then :
4992 :
4993else
4994 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4995/* end confdefs.h. */
4996#include <ctype.h>
4997#include <stdlib.h>
4998#if ((' ' & 0x0FF) == 0x020)
4999# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5000# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5001#else
5002# define ISLOWER(c) \
5003 (('a' <= (c) && (c) <= 'i') \
5004 || ('j' <= (c) && (c) <= 'r') \
5005 || ('s' <= (c) && (c) <= 'z'))
5006# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5007#endif
5008
5009#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5010int
5011main ()
5012{
5013 int i;
5014 for (i = 0; i < 256; i++)
5015 if (XOR (islower (i), ISLOWER (i))
5016 || toupper (i) != TOUPPER (i))
5017 return 2;
5018 return 0;
5019}
5020_ACEOF
5021if ac_fn_c_try_run "$LINENO"; then :
5022
5023else
5024 ac_cv_header_stdc=no
5025fi
5026rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5027 conftest.$ac_objext conftest.beam conftest.$ac_ext
5028fi
5029
5030fi
5031fi
5032{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
5033$as_echo "$ac_cv_header_stdc" >&6; }
5034if test $ac_cv_header_stdc = yes; then
5035
5036$as_echo "#define STDC_HEADERS 1" >>confdefs.h
5037
5038fi
5039
5040# On IRIX 5.3, sys/types and inttypes.h are conflicting.
5041for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
5042 inttypes.h stdint.h unistd.h
5043do :
5044 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
5045ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
5046"
Georg Brandl71f4fbb2011-02-25 11:04:50 +00005047if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005048 cat >>confdefs.h <<_ACEOF
5049#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
5050_ACEOF
5051
5052fi
5053
5054done
5055
5056
5057
5058 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 +01005059if test "x$ac_cv_header_minix_config_h" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005060 MINIX=yes
5061else
5062 MINIX=
5063fi
5064
5065
5066 if test "$MINIX" = yes; then
5067
5068$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
5069
5070
5071$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
5072
5073
5074$as_echo "#define _MINIX 1" >>confdefs.h
5075
5076 fi
5077
5078
5079 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
5080$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01005081if ${ac_cv_safe_to_define___extensions__+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005082 $as_echo_n "(cached) " >&6
5083else
5084 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5085/* end confdefs.h. */
5086
Charles-François Natalibe2b9072013-01-08 19:47:00 +01005087# define __EXTENSIONS__ 1
5088 $ac_includes_default
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005089int
5090main ()
5091{
5092
5093 ;
5094 return 0;
5095}
5096_ACEOF
5097if ac_fn_c_try_compile "$LINENO"; then :
5098 ac_cv_safe_to_define___extensions__=yes
5099else
5100 ac_cv_safe_to_define___extensions__=no
5101fi
5102rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5103fi
5104{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
5105$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
5106 test $ac_cv_safe_to_define___extensions__ = yes &&
5107 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
5108
5109 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
5110
5111 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
5112
5113 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
5114
5115 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
5116
5117
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005118
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005119# Check for unsupported systems
5120case $ac_sys_system/$ac_sys_release in
5121atheos*|Linux*/1*)
5122 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
5123 echo See README for details.
5124 exit 1;;
5125esac
5126
5127
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005128{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-suffix" >&5
5129$as_echo_n "checking for --with-suffix... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005130
5131# Check whether --with-suffix was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005132if test "${with_suffix+set}" = set; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005133 withval=$with_suffix;
5134 case $withval in
5135 no) EXEEXT=;;
5136 yes) EXEEXT=.exe;;
5137 *) EXEEXT=$withval;;
5138 esac
5139fi
5140
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005141{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXEEXT" >&5
5142$as_echo "$EXEEXT" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005143
5144# Test whether we're running on a non-case-sensitive system, in which
5145# case we give a warning if no ext is given
5146
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005147{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for case-insensitive build directory" >&5
5148$as_echo_n "checking for case-insensitive build directory... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005149if test ! -d CaseSensitiveTestDir; then
5150mkdir CaseSensitiveTestDir
5151fi
5152
5153if test -d casesensitivetestdir
5154then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005155 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5156$as_echo "yes" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005157 BUILDEXEEXT=.exe
5158else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005159 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5160$as_echo "no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005161 BUILDEXEEXT=$EXEEXT
5162fi
5163rmdir CaseSensitiveTestDir
5164
5165case $MACHDEP in
5166bsdos*)
5167 case $CC in
5168 gcc) CC="$CC -D_HAVE_BSDI";;
5169 esac;;
5170esac
5171
5172case $ac_sys_system in
5173hp*|HP*)
5174 case $CC in
5175 cc|*/cc) CC="$CC -Ae";;
5176 esac;;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005177SunOS*)
5178 # Some functions have a prototype only with that define, e.g. confstr
5179
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005180$as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005181
5182 ;;
5183esac
5184
5185
5186
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005187{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBRARY" >&5
5188$as_echo_n "checking LIBRARY... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005189if test -z "$LIBRARY"
5190then
5191 LIBRARY='libpython$(VERSION).a'
5192fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005193{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBRARY" >&5
5194$as_echo "$LIBRARY" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005195
5196# LDLIBRARY is the name of the library to link against (as opposed to the
5197# name of the library into which to insert object files). BLDLIBRARY is also
5198# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
5199# is blank as the main program is not linked directly against LDLIBRARY.
5200# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
5201# systems without shared libraries, LDLIBRARY is the same as LIBRARY
5202# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
5203# DLLLIBRARY is the shared (i.e., DLL) library.
5204#
5205# RUNSHARED is used to run shared python without installed libraries
5206#
5207# INSTSONAME is the name of the shared library that will be use to install
5208# on the system - some systems like version suffix, others don't
5209
5210
5211
5212
5213
5214
5215LDLIBRARY="$LIBRARY"
5216BLDLIBRARY='$(LDLIBRARY)'
5217INSTSONAME='$(LDLIBRARY)'
5218DLLLIBRARY=''
5219LDLIBRARYDIR=''
5220RUNSHARED=''
5221
5222# LINKCC is the command that links the python executable -- default is $(CC).
5223# If CXX is set, and if it is needed to link a main function that was
5224# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
5225# python might then depend on the C++ runtime
5226# This is altered for AIX in order to build the export list before
5227# linking.
5228
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005229{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKCC" >&5
5230$as_echo_n "checking LINKCC... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005231if test -z "$LINKCC"
5232then
5233 LINKCC='$(PURIFY) $(MAINCC)'
5234 case $ac_sys_system in
5235 AIX*)
5236 exp_extra="\"\""
5237 if test $ac_sys_release -ge 5 -o \
5238 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
5239 exp_extra="."
5240 fi
5241 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005242 QNX*)
5243 # qcc must be used because the other compilers do not
5244 # support -N.
5245 LINKCC=qcc;;
5246 esac
5247fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005248{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKCC" >&5
5249$as_echo "$LINKCC" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005250
5251# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
5252# make sure we default having it set to "no": this is used by
5253# distutils.unixccompiler to know if it should add --enable-new-dtags
5254# to linker command lines, and failing to detect GNU ld simply results
5255# in the same bahaviour as before.
5256
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005257{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
5258$as_echo_n "checking for GNU ld... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005259ac_prog=ld
5260if test "$GCC" = yes; then
5261 ac_prog=`$CC -print-prog-name=ld`
5262fi
5263case `"$ac_prog" -V 2>&1 < /dev/null` in
5264 *GNU*)
5265 GNULD=yes;;
5266 *)
5267 GNULD=no;;
5268esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005269{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNULD" >&5
5270$as_echo "$GNULD" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005271
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005272{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-shared" >&5
5273$as_echo_n "checking for --enable-shared... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005274# Check whether --enable-shared was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005275if test "${enable_shared+set}" = set; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005276 enableval=$enable_shared;
5277fi
5278
5279
5280if test -z "$enable_shared"
5281then
5282 case $ac_sys_system in
5283 CYGWIN* | atheos*)
5284 enable_shared="yes";;
5285 *)
5286 enable_shared="no";;
5287 esac
5288fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005289{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
5290$as_echo "$enable_shared" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005291
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005292{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-profiling" >&5
5293$as_echo_n "checking for --enable-profiling... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005294# Check whether --enable-profiling was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005295if test "${enable_profiling+set}" = set; then :
doko@python.orgd65e2ba2013-01-31 23:52:03 +01005296 enableval=$enable_profiling;
5297fi
5298
5299if test "x$enable_profiling" = xyes; then
5300 ac_save_cc="$CC"
Benjamin Petersonb9be7bb2013-03-26 08:55:37 -04005301 CC="$CC -pg"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005302 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005303/* end confdefs.h. */
5304int main() { return 0; }
5305_ACEOF
doko@python.orgd65e2ba2013-01-31 23:52:03 +01005306if ac_fn_c_try_link "$LINENO"; then :
5307
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005308else
doko@python.orgd65e2ba2013-01-31 23:52:03 +01005309 enable_profiling=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005310fi
doko@python.orgd65e2ba2013-01-31 23:52:03 +01005311rm -f core conftest.err conftest.$ac_objext \
5312 conftest$ac_exeext conftest.$ac_ext
5313 CC="$ac_save_cc"
5314else
5315 enable_profiling=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005316fi
doko@python.orgd65e2ba2013-01-31 23:52:03 +01005317{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_profiling" >&5
5318$as_echo "$enable_profiling" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005319
doko@python.orgd65e2ba2013-01-31 23:52:03 +01005320if test "x$enable_profiling" = xyes; then
5321 BASECFLAGS="-pg $BASECFLAGS"
5322 LDFLAGS="-pg $LDFLAGS"
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005323fi
5324
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005325{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDLIBRARY" >&5
5326$as_echo_n "checking LDLIBRARY... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005327
5328# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
5329# library that we build, but we do not want to link against it (we
5330# will find it with a -framework option). For this reason there is an
5331# extra variable BLDLIBRARY against which Python and the extension
5332# modules are linked, BLDLIBRARY. This is normally the same as
5333# LDLIBRARY, but empty for MacOSX framework builds.
5334if test "$enable_framework"
5335then
5336 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
doko@ubuntu.com9ba90c92014-05-07 04:41:26 +02005337 RUNSHARED=DYLD_FRAMEWORK_PATH=`pwd`${DYLD_FRAMEWORK_PATH:+:${DYLD_FRAMEWORK_PATH}}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005338 BLDLIBRARY=''
5339else
5340 BLDLIBRARY='$(LDLIBRARY)'
5341fi
5342
5343# Other platforms follow
5344if test $enable_shared = "yes"; then
5345
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005346$as_echo "#define Py_ENABLE_SHARED 1" >>confdefs.h
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005347
5348 case $ac_sys_system in
5349 BeOS*)
5350 LDLIBRARY='libpython$(VERSION).so'
5351 ;;
5352 CYGWIN*)
5353 LDLIBRARY='libpython$(VERSION).dll.a'
5354 DLLLIBRARY='libpython$(VERSION).dll'
5355 ;;
5356 SunOS*)
5357 LDLIBRARY='libpython$(VERSION).so'
5358 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(VERSION)'
doko@ubuntu.com9ba90c92014-05-07 04:41:26 +02005359 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005360 INSTSONAME="$LDLIBRARY".$SOVERSION
5361 ;;
Charles-François Natali3de8c732011-07-24 22:33:35 +02005362 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*|OpenBSD*)
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005363 LDLIBRARY='libpython$(VERSION).so'
5364 BLDLIBRARY='-L. -lpython$(VERSION)'
doko@ubuntu.com9ba90c92014-05-07 04:41:26 +02005365 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005366 case $ac_sys_system in
5367 FreeBSD*)
5368 SOVERSION=`echo $SOVERSION|cut -d "." -f 1`
5369 ;;
5370 esac
5371 INSTSONAME="$LDLIBRARY".$SOVERSION
5372 ;;
5373 hp*|HP*)
5374 case `uname -m` in
5375 ia64)
5376 LDLIBRARY='libpython$(VERSION).so'
5377 ;;
5378 *)
5379 LDLIBRARY='libpython$(VERSION).sl'
5380 ;;
5381 esac
5382 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(VERSION)'
doko@ubuntu.com9ba90c92014-05-07 04:41:26 +02005383 RUNSHARED=SHLIB_PATH=`pwd`${SHLIB_PATH:+:${SHLIB_PATH}}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005384 ;;
5385 OSF*)
5386 LDLIBRARY='libpython$(VERSION).so'
5387 BLDLIBRARY='-rpath $(LIBDIR) -L. -lpython$(VERSION)'
doko@ubuntu.com9ba90c92014-05-07 04:41:26 +02005388 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005389 ;;
5390 atheos*)
5391 LDLIBRARY='libpython$(VERSION).so'
5392 BLDLIBRARY='-L. -lpython$(VERSION)'
5393 RUNSHARED=DLL_PATH=`pwd`:${DLL_PATH:-/atheos/sys/libs:/atheos/autolnk/lib}
5394 ;;
5395 Darwin*)
5396 LDLIBRARY='libpython$(VERSION).dylib'
5397 BLDLIBRARY='-L. -lpython$(VERSION)'
doko@ubuntu.com9ba90c92014-05-07 04:41:26 +02005398 RUNSHARED=DYLD_LIBRARY_PATH=`pwd`${DYLD_LIBRARY_PATH:+:${DYLD_LIBRARY_PATH}}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005399 ;;
Antoine Pitrouaabdceb2010-09-10 20:03:17 +00005400 AIX*)
5401 LDLIBRARY='libpython$(VERSION).so'
doko@ubuntu.com9ba90c92014-05-07 04:41:26 +02005402 RUNSHARED=LIBPATH=`pwd`${LIBPATH:+:${LIBPATH}}
Antoine Pitrouaabdceb2010-09-10 20:03:17 +00005403 ;;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005404
5405 esac
5406else # shared is disabled
5407 case $ac_sys_system in
5408 CYGWIN*)
5409 BLDLIBRARY='$(LIBRARY)'
5410 LDLIBRARY='libpython$(VERSION).dll.a'
5411 ;;
5412 esac
5413fi
5414
doko@python.orgd65e2ba2013-01-31 23:52:03 +01005415if test "$cross_compiling" = yes; then
5416 RUNSHARED=
5417fi
5418
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005419{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDLIBRARY" >&5
5420$as_echo "$LDLIBRARY" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005421
5422if test -n "$ac_tool_prefix"; then
5423 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
5424set dummy ${ac_tool_prefix}ranlib; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005425{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5426$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01005427if ${ac_cv_prog_RANLIB+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005428 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005429else
5430 if test -n "$RANLIB"; then
5431 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
5432else
5433as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5434for as_dir in $PATH
5435do
5436 IFS=$as_save_IFS
5437 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005438 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01005439 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005440 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005441 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005442 break 2
5443 fi
5444done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005445 done
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005446IFS=$as_save_IFS
5447
5448fi
5449fi
5450RANLIB=$ac_cv_prog_RANLIB
5451if test -n "$RANLIB"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005452 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
5453$as_echo "$RANLIB" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005454else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005455 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5456$as_echo "no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005457fi
5458
5459
5460fi
5461if test -z "$ac_cv_prog_RANLIB"; then
5462 ac_ct_RANLIB=$RANLIB
5463 # Extract the first word of "ranlib", so it can be a program name with args.
5464set dummy ranlib; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005465{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5466$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01005467if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005468 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005469else
5470 if test -n "$ac_ct_RANLIB"; then
5471 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
5472else
5473as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5474for as_dir in $PATH
5475do
5476 IFS=$as_save_IFS
5477 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005478 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01005479 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005480 ac_cv_prog_ac_ct_RANLIB="ranlib"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005481 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005482 break 2
5483 fi
5484done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005485 done
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005486IFS=$as_save_IFS
5487
5488fi
5489fi
5490ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
5491if test -n "$ac_ct_RANLIB"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005492 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
5493$as_echo "$ac_ct_RANLIB" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005494else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005495 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5496$as_echo "no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005497fi
5498
5499 if test "x$ac_ct_RANLIB" = x; then
5500 RANLIB=":"
5501 else
5502 case $cross_compiling:$ac_tool_warned in
5503yes:)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005504{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5505$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005506ac_tool_warned=yes ;;
5507esac
5508 RANLIB=$ac_ct_RANLIB
5509 fi
5510else
5511 RANLIB="$ac_cv_prog_RANLIB"
5512fi
5513
5514
doko@python.orgd65e2ba2013-01-31 23:52:03 +01005515if test -n "$ac_tool_prefix"; then
5516 for ac_prog in ar aal
5517 do
5518 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5519set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005520{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5521$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01005522if ${ac_cv_prog_AR+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005523 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005524else
5525 if test -n "$AR"; then
5526 ac_cv_prog_AR="$AR" # Let the user override the test.
5527else
5528as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5529for as_dir in $PATH
5530do
5531 IFS=$as_save_IFS
5532 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005533 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01005534 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@python.orgd65e2ba2013-01-31 23:52:03 +01005535 ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005536 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005537 break 2
5538 fi
5539done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005540 done
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005541IFS=$as_save_IFS
5542
5543fi
5544fi
5545AR=$ac_cv_prog_AR
5546if test -n "$AR"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005547 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
5548$as_echo "$AR" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005549else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005550 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5551$as_echo "no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005552fi
5553
5554
doko@python.orgd65e2ba2013-01-31 23:52:03 +01005555 test -n "$AR" && break
5556 done
5557fi
5558if test -z "$AR"; then
5559 ac_ct_AR=$AR
5560 for ac_prog in ar aal
5561do
5562 # Extract the first word of "$ac_prog", so it can be a program name with args.
5563set dummy $ac_prog; ac_word=$2
5564{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5565$as_echo_n "checking for $ac_word... " >&6; }
5566if ${ac_cv_prog_ac_ct_AR+:} false; then :
5567 $as_echo_n "(cached) " >&6
5568else
5569 if test -n "$ac_ct_AR"; then
5570 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
5571else
5572as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5573for as_dir in $PATH
5574do
5575 IFS=$as_save_IFS
5576 test -z "$as_dir" && as_dir=.
5577 for ac_exec_ext in '' $ac_executable_extensions; do
5578 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5579 ac_cv_prog_ac_ct_AR="$ac_prog"
5580 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5581 break 2
5582 fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005583done
doko@python.orgd65e2ba2013-01-31 23:52:03 +01005584 done
5585IFS=$as_save_IFS
5586
5587fi
5588fi
5589ac_ct_AR=$ac_cv_prog_ac_ct_AR
5590if test -n "$ac_ct_AR"; then
5591 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
5592$as_echo "$ac_ct_AR" >&6; }
5593else
5594 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5595$as_echo "no" >&6; }
5596fi
5597
5598
5599 test -n "$ac_ct_AR" && break
5600done
5601
5602 if test "x$ac_ct_AR" = x; then
5603 AR="ar"
5604 else
5605 case $cross_compiling:$ac_tool_warned in
5606yes:)
5607{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5608$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5609ac_tool_warned=yes ;;
5610esac
5611 AR=$ac_ct_AR
5612 fi
5613fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005614
5615
5616# tweak ARFLAGS only if the user didn't set it on the command line
5617
5618if test -z "$ARFLAGS"
5619then
5620 ARFLAGS="rc"
5621fi
5622
5623
5624# Extract the first word of "svnversion", so it can be a program name with args.
5625set dummy svnversion; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005626{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5627$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01005628if ${ac_cv_prog_SVNVERSION+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005629 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005630else
5631 if test -n "$SVNVERSION"; then
5632 ac_cv_prog_SVNVERSION="$SVNVERSION" # Let the user override the test.
5633else
5634as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5635for as_dir in $PATH
5636do
5637 IFS=$as_save_IFS
5638 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005639 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01005640 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005641 ac_cv_prog_SVNVERSION="found"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005642 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005643 break 2
5644 fi
5645done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005646 done
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005647IFS=$as_save_IFS
5648
5649 test -z "$ac_cv_prog_SVNVERSION" && ac_cv_prog_SVNVERSION="not-found"
5650fi
5651fi
5652SVNVERSION=$ac_cv_prog_SVNVERSION
5653if test -n "$SVNVERSION"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005654 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SVNVERSION" >&5
5655$as_echo "$SVNVERSION" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005656else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005657 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5658$as_echo "no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005659fi
5660
5661
5662if test $SVNVERSION = found
5663then
5664 SVNVERSION="svnversion \$(srcdir)"
5665else
5666 SVNVERSION="echo Unversioned directory"
5667fi
5668
Trent Nelsond86ceec2012-10-16 09:42:45 -04005669
Trent Nelsonabf20512012-10-17 04:32:49 -04005670if test "$abs_srcdir" != "$abs_builddir"; then
Trent Nelsond86ceec2012-10-16 09:42:45 -04005671 # If we're building out-of-tree make sure Include (in the current dir)
5672 # gets picked up before its $srcdir counterpart in order for Python-ast.h
5673 # and graminit.h to get picked up from the correct directory.
5674 # (A side effect of this is that these resources will automatically be
5675 # regenerated when building out-of-tree, regardless of whether or not
5676 # the $srcdir counterpart is up-to-date. This is an acceptable trade
5677 # off.)
5678 BASECPPFLAGS="-IInclude"
5679else
5680 BASECPPFLAGS=""
5681fi
5682
Georg Brandl3a5508e2011-03-06 10:42:21 +01005683
5684
5685
5686# Extract the first word of "hg", so it can be a program name with args.
5687set dummy hg; ac_word=$2
5688{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5689$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01005690if ${ac_cv_prog_HAS_HG+:} false; then :
Georg Brandl3a5508e2011-03-06 10:42:21 +01005691 $as_echo_n "(cached) " >&6
5692else
5693 if test -n "$HAS_HG"; then
5694 ac_cv_prog_HAS_HG="$HAS_HG" # Let the user override the test.
5695else
5696as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5697for as_dir in $PATH
5698do
5699 IFS=$as_save_IFS
5700 test -z "$as_dir" && as_dir=.
5701 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01005702 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Georg Brandl3a5508e2011-03-06 10:42:21 +01005703 ac_cv_prog_HAS_HG="found"
5704 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5705 break 2
5706 fi
5707done
5708 done
5709IFS=$as_save_IFS
5710
5711 test -z "$ac_cv_prog_HAS_HG" && ac_cv_prog_HAS_HG="not-found"
5712fi
5713fi
5714HAS_HG=$ac_cv_prog_HAS_HG
5715if test -n "$HAS_HG"; then
5716 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAS_HG" >&5
5717$as_echo "$HAS_HG" >&6; }
5718else
5719 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5720$as_echo "no" >&6; }
5721fi
5722
5723
5724if test $HAS_HG = found
5725then
5726 HGVERSION="hg id -i \$(srcdir)"
5727 HGTAG="hg id -t \$(srcdir)"
5728 HGBRANCH="hg id -b \$(srcdir)"
5729else
5730 HGVERSION=""
5731 HGTAG=""
5732 HGBRANCH=""
5733fi
5734
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005735case $MACHDEP in
5736bsdos*|hp*|HP*)
5737 # install -d does not work on BSDI or HP-UX
5738 if test -z "$INSTALL"
5739 then
5740 INSTALL="${srcdir}/install-sh -c"
5741 fi
5742esac
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005743# Find a good install program. We prefer a C program (faster),
5744# so one script is as good as another. But avoid the broken or
5745# incompatible versions:
5746# SysV /etc/install, /usr/sbin/install
5747# SunOS /usr/etc/install
5748# IRIX /sbin/install
5749# AIX /bin/install
5750# AmigaOS /C/install, which installs bootblocks on floppy discs
5751# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
5752# AFS /usr/afsws/bin/install, which mishandles nonexistent args
5753# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
5754# OS/2's system install, which has a completely different semantic
5755# ./install, which can be erroneously created by make from ./install.sh.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005756# Reject install programs that cannot install multiple files.
5757{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
5758$as_echo_n "checking for a BSD-compatible install... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005759if test -z "$INSTALL"; then
Matthias Klose3cef2a92012-03-14 23:39:33 +01005760if ${ac_cv_path_install+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005761 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005762else
5763 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5764for as_dir in $PATH
5765do
5766 IFS=$as_save_IFS
5767 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005768 # Account for people who put trailing slashes in PATH elements.
5769case $as_dir/ in #((
5770 ./ | .// | /[cC]/* | \
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005771 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005772 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005773 /usr/ucb/* ) ;;
5774 *)
5775 # OSF1 and SCO ODT 3.0 have their own names for install.
5776 # Don't use installbsd from OSF since it installs stuff as root
5777 # by default.
5778 for ac_prog in ginstall scoinst install; do
5779 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01005780 if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005781 if test $ac_prog = install &&
5782 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
5783 # AIX install. It has an incompatible calling convention.
5784 :
5785 elif test $ac_prog = install &&
5786 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
5787 # program-specific install script used by HP pwplus--don't use.
5788 :
5789 else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005790 rm -rf conftest.one conftest.two conftest.dir
5791 echo one > conftest.one
5792 echo two > conftest.two
5793 mkdir conftest.dir
5794 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
5795 test -s conftest.one && test -s conftest.two &&
5796 test -s conftest.dir/conftest.one &&
5797 test -s conftest.dir/conftest.two
5798 then
5799 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
5800 break 3
5801 fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005802 fi
5803 fi
5804 done
5805 done
5806 ;;
5807esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005808
5809 done
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005810IFS=$as_save_IFS
5811
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005812rm -rf conftest.one conftest.two conftest.dir
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005813
5814fi
5815 if test "${ac_cv_path_install+set}" = set; then
5816 INSTALL=$ac_cv_path_install
5817 else
5818 # As a last resort, use the slow shell script. Don't cache a
5819 # value for INSTALL within a source directory, because that will
5820 # break other packages using the cache if that directory is
5821 # removed, or if the value is a relative name.
5822 INSTALL=$ac_install_sh
5823 fi
5824fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005825{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
5826$as_echo "$INSTALL" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005827
5828# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
5829# It thinks the first close brace ends the variable substitution.
5830test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
5831
5832test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
5833
5834test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
5835
Trent Nelsonf6407a12012-08-30 14:56:13 +00005836{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
5837$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
5838if test -z "$MKDIR_P"; then
5839 if ${ac_cv_path_mkdir+:} false; then :
5840 $as_echo_n "(cached) " >&6
5841else
5842 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5843for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
5844do
5845 IFS=$as_save_IFS
5846 test -z "$as_dir" && as_dir=.
5847 for ac_prog in mkdir gmkdir; do
5848 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01005849 as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
Trent Nelsonf6407a12012-08-30 14:56:13 +00005850 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
5851 'mkdir (GNU coreutils) '* | \
5852 'mkdir (coreutils) '* | \
5853 'mkdir (fileutils) '4.1*)
5854 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
5855 break 3;;
5856 esac
5857 done
5858 done
5859 done
5860IFS=$as_save_IFS
5861
5862fi
5863
5864 test -d ./--version && rmdir ./--version
5865 if test "${ac_cv_path_mkdir+set}" = set; then
5866 MKDIR_P="$ac_cv_path_mkdir -p"
5867 else
5868 # As a last resort, use the slow shell script. Don't cache a
5869 # value for MKDIR_P within a source directory, because that will
5870 # break other packages using the cache if that directory is
5871 # removed, or if the value is a relative name.
5872 MKDIR_P="$ac_install_sh -d"
5873 fi
5874fi
5875{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
5876$as_echo "$MKDIR_P" >&6; }
5877
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005878
5879# Not every filesystem supports hard links
5880
5881if test -z "$LN" ; then
5882 case $ac_sys_system in
5883 BeOS*) LN="ln -s";;
5884 CYGWIN*) LN="ln -s";;
5885 atheos*) LN="ln -s";;
5886 *) LN=ln;;
5887 esac
5888fi
5889
5890# Check for --with-pydebug
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005891{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pydebug" >&5
5892$as_echo_n "checking for --with-pydebug... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005893
5894# Check whether --with-pydebug was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005895if test "${with_pydebug+set}" = set; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005896 withval=$with_pydebug;
5897if test "$withval" != no
5898then
5899
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005900$as_echo "#define Py_DEBUG 1" >>confdefs.h
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005901
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005902 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5903$as_echo "yes" >&6; };
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005904 Py_DEBUG='true'
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005905else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5906$as_echo "no" >&6; }; Py_DEBUG='false'
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005907fi
5908else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005909 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5910$as_echo "no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005911fi
5912
5913
5914# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
5915# merged with this chunk of code?
5916
5917# Optimizer/debugger flags
5918# ------------------------
5919# (The following bit of code is complicated enough - please keep things
5920# indented properly. Just pretend you're editing Python code. ;-)
5921
5922# There are two parallel sets of case statements below, one that checks to
5923# see if OPT was set and one that does BASECFLAGS setting based upon
5924# compiler and platform. BASECFLAGS tweaks need to be made even if the
5925# user set OPT.
5926
5927# tweak OPT based on compiler and platform, only if the user didn't set
5928# it on the command line
5929
Benjamin Petersond4b721b2010-03-23 20:58:37 +00005930if test "${OPT-unset}" = "unset"
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005931then
5932 case $GCC in
5933 yes)
5934 if test "$CC" != 'g++' ; then
5935 STRICT_PROTO="-Wstrict-prototypes"
5936 fi
5937 # For gcc 4.x we need to use -fwrapv so lets check if its supported
5938 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
5939 WRAP="-fwrapv"
5940 fi
Stefan Krah503e5e12011-09-14 15:19:42 +02005941
5942 # Clang also needs -fwrapv
Stefan Krah2bc1e8f2011-12-08 22:26:06 +01005943 case $CC in
5944 *clang*) WRAP="-fwrapv"
5945 ;;
5946 esac
Stefan Krah503e5e12011-09-14 15:19:42 +02005947
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005948 case $ac_cv_prog_cc_g in
5949 yes)
5950 if test "$Py_DEBUG" = 'true' ; then
5951 # Optimization messes up debuggers, so turn it off for
5952 # debug builds.
Mark Dickinsond2f3e3f2010-05-05 22:23:58 +00005953 OPT="-g -O0 -Wall $STRICT_PROTO"
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005954 else
5955 OPT="-g $WRAP -O3 -Wall $STRICT_PROTO"
5956 fi
5957 ;;
5958 *)
5959 OPT="-O3 -Wall $STRICT_PROTO"
5960 ;;
5961 esac
5962 case $ac_sys_system in
5963 SCO_SV*) OPT="$OPT -m486 -DSCO5"
5964 ;;
5965 esac
5966 ;;
5967
5968 *)
5969 OPT="-O"
5970 ;;
5971 esac
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005972fi
5973
5974
5975
5976# The -arch flags for universal builds on OSX
5977UNIVERSAL_ARCH_FLAGS=
5978
5979
5980# tweak BASECFLAGS based on compiler and platform
5981case $GCC in
5982yes)
5983 # Python violates C99 rules, by casting between incompatible
5984 # pointer types. GCC may generate bad code as a result of that,
5985 # so use -fno-strict-aliasing if supported.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005986 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -fno-strict-aliasing" >&5
5987$as_echo_n "checking whether $CC accepts -fno-strict-aliasing... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005988 ac_save_cc="$CC"
5989 CC="$CC -fno-strict-aliasing"
Matthias Klose3cef2a92012-03-14 23:39:33 +01005990 if ${ac_cv_no_strict_aliasing_ok+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005991 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00005992else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005993 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005994/* end confdefs.h. */
Gregory P. Smith373469a2009-11-01 21:03:38 +00005995
5996int
5997main ()
5998{
Mark Dickinson5e13e292010-05-11 08:55:06 +00005999
Gregory P. Smith373469a2009-11-01 21:03:38 +00006000 ;
6001 return 0;
6002}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006003_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006004if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006005 ac_cv_no_strict_aliasing_ok=yes
6006else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006007 ac_cv_no_strict_aliasing_ok=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006008fi
Gregory P. Smith373469a2009-11-01 21:03:38 +00006009rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00006010fi
6011
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006012 CC="$ac_save_cc"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006013 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_no_strict_aliasing_ok" >&5
6014$as_echo "$ac_cv_no_strict_aliasing_ok" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006015 if test $ac_cv_no_strict_aliasing_ok = yes
6016 then
6017 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
6018 fi
6019
6020 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
6021 # support. Without this, treatment of subnormals doesn't follow
6022 # the standard.
doko@python.orgd65e2ba2013-01-31 23:52:03 +01006023 case $host in
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006024 alpha*)
6025 BASECFLAGS="$BASECFLAGS -mieee"
6026 ;;
6027 esac
6028
6029 case $ac_sys_system in
6030 SCO_SV*)
6031 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
6032 ;;
6033 # is there any other compiler on Darwin besides gcc?
6034 Darwin*)
6035 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
6036 # used to be here, but non-Apple gcc doesn't accept them.
Ronald Oussorena55af9a2010-01-17 16:25:57 +00006037 if test "${CC}" = gcc
6038 then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006039 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which compiler should be used" >&5
6040$as_echo_n "checking which compiler should be used... " >&6; }
Ronald Oussorena55af9a2010-01-17 16:25:57 +00006041 case "${UNIVERSALSDK}" in
6042 */MacOSX10.4u.sdk)
6043 # Build using 10.4 SDK, force usage of gcc when the
6044 # compiler is gcc, otherwise the user will get very
6045 # confusing error messages when building on OSX 10.6
6046 CC=gcc-4.0
6047 CPP=cpp-4.0
6048 ;;
6049 esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006050 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
6051$as_echo "$CC" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006052 fi
6053
6054 # Calculate the right deployment target for this build.
6055 #
Ned Deilyc40b9032014-06-25 13:48:46 -07006056 cur_target_major=`sw_vers -productVersion | \
6057 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
6058 cur_target_minor=`sw_vers -productVersion | \
6059 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
6060 cur_target="${cur_target_major}.${cur_target_minor}"
6061 if test ${cur_target_major} -eq 10 && \
6062 test ${cur_target_minor} -ge 3
6063 then
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006064 cur_target=10.3
Ronald Oussoren25967582009-09-06 10:00:26 +00006065 if test ${enable_universalsdk}; then
6066 if test "${UNIVERSAL_ARCHS}" = "all"; then
6067 # Ensure that the default platform for a
6068 # 4-way universal build is OSX 10.5,
6069 # that's the first OS release where
6070 # 4-way builds make sense.
6071 cur_target='10.5'
Ronald Oussoren23d92532009-09-07 06:12:00 +00006072
6073 elif test "${UNIVERSAL_ARCHS}" = "3-way"; then
6074 cur_target='10.5'
6075
6076 elif test "${UNIVERSAL_ARCHS}" = "intel"; then
6077 cur_target='10.5'
6078
6079 elif test "${UNIVERSAL_ARCHS}" = "64-bit"; then
6080 cur_target='10.5'
Ronald Oussoren25967582009-09-06 10:00:26 +00006081 fi
6082 else
Ronald Oussorenbc0e83c2010-02-11 13:26:54 +00006083 if test `/usr/bin/arch` = "i386"; then
Ronald Oussoren25967582009-09-06 10:00:26 +00006084 # On Intel macs default to a deployment
6085 # target of 10.4, that's the first OSX
6086 # release with Intel support.
6087 cur_target="10.4"
6088 fi
6089 fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006090 fi
6091 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
6092
6093 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
6094 # environment with a value that is the same as what we'll use
6095 # in the Makefile to ensure that we'll get the same compiler
6096 # environment during configure and build time.
6097 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
6098 export MACOSX_DEPLOYMENT_TARGET
6099 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
6100
Ronald Oussorena55af9a2010-01-17 16:25:57 +00006101 if test "${enable_universalsdk}"; then
6102 UNIVERSAL_ARCH_FLAGS=""
6103 if test "$UNIVERSAL_ARCHS" = "32-bit" ; then
6104 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
6105 ARCH_RUN_32BIT=""
Ronald Oussoren75912852010-04-08 08:13:31 +00006106 LIPO_32BIT_FLAGS=""
Ronald Oussorena55af9a2010-01-17 16:25:57 +00006107
6108 elif test "$UNIVERSAL_ARCHS" = "64-bit" ; then
6109 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
6110 LIPO_32BIT_FLAGS=""
6111 ARCH_RUN_32BIT="true"
6112
6113 elif test "$UNIVERSAL_ARCHS" = "all" ; then
6114 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
6115 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Ronald Oussoren92397ce2010-01-17 19:32:00 +00006116 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
Ronald Oussorena55af9a2010-01-17 16:25:57 +00006117
6118 elif test "$UNIVERSAL_ARCHS" = "intel" ; then
6119 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
6120 LIPO_32BIT_FLAGS="-extract i386"
Ronald Oussoren92397ce2010-01-17 19:32:00 +00006121 ARCH_RUN_32BIT="/usr/bin/arch -i386"
Ronald Oussorena55af9a2010-01-17 16:25:57 +00006122
6123 elif test "$UNIVERSAL_ARCHS" = "3-way" ; then
6124 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
6125 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Ronald Oussoren9922f172010-02-11 13:19:34 +00006126 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
Ronald Oussorena55af9a2010-01-17 16:25:57 +00006127
6128 else
Georg Brandl71f4fbb2011-02-25 11:04:50 +00006129 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 +00006130
6131 fi
6132
6133
Ronald Oussoren974eb5e2010-04-18 17:59:37 +00006134 CFLAGS="${UNIVERSAL_ARCH_FLAGS} ${CFLAGS}"
6135 if test "${UNIVERSALSDK}" != "/"
6136 then
6137 CPPFLAGS="-isysroot ${UNIVERSALSDK} ${CPPFLAGS}"
6138 LDFLAGS="-isysroot ${UNIVERSALSDK} ${LDFLAGS}"
6139 CFLAGS="-isysroot ${UNIVERSALSDK} ${CFLAGS}"
Ronald Oussorena55af9a2010-01-17 16:25:57 +00006140 fi
6141
6142 fi
6143
6144
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006145 ;;
6146 OSF*)
6147 BASECFLAGS="$BASECFLAGS -mieee"
6148 ;;
6149 esac
6150 ;;
6151
6152*)
6153 case $ac_sys_system in
6154 OpenUNIX*|UnixWare*)
6155 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
6156 ;;
6157 OSF*)
6158 BASECFLAGS="$BASECFLAGS -ieee -std"
6159 ;;
6160 SCO_SV*)
6161 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
6162 ;;
6163 esac
6164 ;;
6165esac
6166
6167if test "$Py_DEBUG" = 'true'; then
6168 :
6169else
6170 OPT="-DNDEBUG $OPT"
6171fi
6172
6173if test "$ac_arch_flags"
6174then
6175 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
6176fi
6177
6178# disable check for icc since it seems to pass, but generates a warning
6179if test "$CC" = icc
6180then
6181 ac_cv_opt_olimit_ok=no
6182fi
6183
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006184{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -OPT:Olimit=0" >&5
6185$as_echo_n "checking whether $CC accepts -OPT:Olimit=0... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01006186if ${ac_cv_opt_olimit_ok+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006187 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006188else
6189 ac_save_cc="$CC"
6190CC="$CC -OPT:Olimit=0"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006191cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006192/* end confdefs.h. */
Gregory P. Smith373469a2009-11-01 21:03:38 +00006193
6194int
6195main ()
6196{
Mark Dickinson5e13e292010-05-11 08:55:06 +00006197
Gregory P. Smith373469a2009-11-01 21:03:38 +00006198 ;
6199 return 0;
6200}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006201_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006202if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006203 ac_cv_opt_olimit_ok=yes
6204else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006205 ac_cv_opt_olimit_ok=no
Matthias Klosec511b472010-05-08 11:01:39 +00006206
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006207fi
Gregory P. Smith373469a2009-11-01 21:03:38 +00006208rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006209CC="$ac_save_cc"
6210fi
6211
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006212{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_opt_olimit_ok" >&5
6213$as_echo "$ac_cv_opt_olimit_ok" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006214if test $ac_cv_opt_olimit_ok = yes; then
6215 case $ac_sys_system in
6216 # XXX is this branch needed? On MacOSX 10.2.2 the result of the
6217 # olimit_ok test is "no". Is it "yes" in some other Darwin-esque
6218 # environment?
6219 Darwin*)
6220 ;;
Trent Nelson34562e12012-10-17 18:01:12 -04006221 # XXX thankfully this useless troublemaker of a flag has been
6222 # eradicated in the 3.x line. For now, make sure it isn't picked
6223 # up by any of our other platforms that use CC.
6224 AIX*|SunOS*|HP-UX*|IRIX*)
6225 ;;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006226 *)
6227 BASECFLAGS="$BASECFLAGS -OPT:Olimit=0"
6228 ;;
6229 esac
6230else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006231 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Olimit 1500" >&5
6232$as_echo_n "checking whether $CC accepts -Olimit 1500... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01006233 if ${ac_cv_olimit_ok+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006234 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006235else
6236 ac_save_cc="$CC"
6237 CC="$CC -Olimit 1500"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006238 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006239/* end confdefs.h. */
Gregory P. Smith373469a2009-11-01 21:03:38 +00006240
6241int
6242main ()
6243{
Mark Dickinson5e13e292010-05-11 08:55:06 +00006244
Gregory P. Smith373469a2009-11-01 21:03:38 +00006245 ;
6246 return 0;
6247}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006248_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006249if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006250 ac_cv_olimit_ok=yes
6251else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006252 ac_cv_olimit_ok=no
Matthias Klosec511b472010-05-08 11:01:39 +00006253
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006254fi
Gregory P. Smith373469a2009-11-01 21:03:38 +00006255rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006256 CC="$ac_save_cc"
6257fi
6258
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006259 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_olimit_ok" >&5
6260$as_echo "$ac_cv_olimit_ok" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006261 if test $ac_cv_olimit_ok = yes; then
Stefan Krah67473262012-11-29 00:17:05 +01006262 case $ac_sys_system in
6263 # Issue #16534: On HP-UX ac_cv_olimit_ok=yes is a false positive.
6264 HP-UX*)
6265 ;;
6266 *)
6267 BASECFLAGS="$BASECFLAGS -Olimit 1500"
6268 ;;
6269 esac
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006270 fi
6271fi
6272
6273# Check whether GCC supports PyArg_ParseTuple format
6274if test "$GCC" = "yes"
6275then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006276 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc supports ParseTuple __format__" >&5
6277$as_echo_n "checking whether gcc supports ParseTuple __format__... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006278 save_CFLAGS=$CFLAGS
Benjamin Petersonc8759662013-05-11 13:00:05 -05006279 CFLAGS="$CFLAGS -Werror -Wformat"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006280 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006281/* end confdefs.h. */
6282
6283 void f(char*,...)__attribute((format(PyArg_ParseTuple, 1, 2)));
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006284int
6285main ()
6286{
6287
6288 ;
6289 return 0;
6290}
Matthias Klosec511b472010-05-08 11:01:39 +00006291
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006292_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006293if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006294
Matthias Klosec511b472010-05-08 11:01:39 +00006295
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006296$as_echo "#define HAVE_ATTRIBUTE_FORMAT_PARSETUPLE 1" >>confdefs.h
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006297
Matthias Klosec511b472010-05-08 11:01:39 +00006298 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006299$as_echo "yes" >&6; }
Matthias Klosec511b472010-05-08 11:01:39 +00006300
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006301else
Matthias Klosec511b472010-05-08 11:01:39 +00006302
6303 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006304$as_echo "no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006305
6306fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006307rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6308 CFLAGS=$save_CFLAGS
6309fi
6310
6311# On some compilers, pthreads are available without further options
6312# (e.g. MacOS X). On some of these systems, the compiler will not
6313# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
6314# So we have to see first whether pthreads are available without
6315# options before we can check whether -Kpthread improves anything.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006316{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads are available without options" >&5
6317$as_echo_n "checking whether pthreads are available without options... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01006318if ${ac_cv_pthread_is_default+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006319 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006320else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006321 if test "$cross_compiling" = yes; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006322 ac_cv_pthread_is_default=no
6323else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006324 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006325/* end confdefs.h. */
6326
Stefan Krahae66ca62012-11-22 22:36:57 +01006327#include <stdio.h>
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006328#include <pthread.h>
6329
6330void* routine(void* p){return NULL;}
6331
6332int main(){
6333 pthread_t p;
6334 if(pthread_create(&p,NULL,routine,NULL)!=0)
6335 return 1;
6336 (void)pthread_detach(p);
6337 return 0;
6338}
6339
6340_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006341if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006342
6343 ac_cv_pthread_is_default=yes
6344 ac_cv_kthread=no
6345 ac_cv_pthread=no
6346
6347else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006348 ac_cv_pthread_is_default=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006349fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006350rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6351 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006352fi
6353
6354
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006355fi
6356
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006357{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_is_default" >&5
6358$as_echo "$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006359
6360
6361if test $ac_cv_pthread_is_default = yes
6362then
6363 ac_cv_kpthread=no
6364else
6365# -Kpthread, if available, provides the right #defines
6366# and linker options to make pthread_create available
6367# Some compilers won't report that they do not support -Kpthread,
6368# so we need to run a program to see whether it really made the
6369# function available.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006370{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kpthread" >&5
6371$as_echo_n "checking whether $CC accepts -Kpthread... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01006372if ${ac_cv_kpthread+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006373 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006374else
6375 ac_save_cc="$CC"
6376CC="$CC -Kpthread"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006377if test "$cross_compiling" = yes; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006378 ac_cv_kpthread=no
6379else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006380 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006381/* end confdefs.h. */
6382
Stefan Krahae66ca62012-11-22 22:36:57 +01006383#include <stdio.h>
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006384#include <pthread.h>
6385
6386void* routine(void* p){return NULL;}
6387
6388int main(){
6389 pthread_t p;
6390 if(pthread_create(&p,NULL,routine,NULL)!=0)
6391 return 1;
6392 (void)pthread_detach(p);
6393 return 0;
6394}
6395
6396_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006397if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006398 ac_cv_kpthread=yes
6399else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006400 ac_cv_kpthread=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006401fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006402rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6403 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006404fi
6405
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006406CC="$ac_save_cc"
6407fi
6408
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006409{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kpthread" >&5
6410$as_echo "$ac_cv_kpthread" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006411fi
6412
6413if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
6414then
6415# -Kthread, if available, provides the right #defines
6416# and linker options to make pthread_create available
6417# Some compilers won't report that they do not support -Kthread,
6418# so we need to run a program to see whether it really made the
6419# function available.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006420{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kthread" >&5
6421$as_echo_n "checking whether $CC accepts -Kthread... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01006422if ${ac_cv_kthread+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006423 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006424else
6425 ac_save_cc="$CC"
6426CC="$CC -Kthread"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006427if test "$cross_compiling" = yes; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006428 ac_cv_kthread=no
6429else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006430 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006431/* end confdefs.h. */
6432
Stefan Krahae66ca62012-11-22 22:36:57 +01006433#include <stdio.h>
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006434#include <pthread.h>
6435
6436void* routine(void* p){return NULL;}
6437
6438int main(){
6439 pthread_t p;
6440 if(pthread_create(&p,NULL,routine,NULL)!=0)
6441 return 1;
6442 (void)pthread_detach(p);
6443 return 0;
6444}
6445
6446_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006447if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006448 ac_cv_kthread=yes
6449else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006450 ac_cv_kthread=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006451fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006452rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6453 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006454fi
6455
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006456CC="$ac_save_cc"
6457fi
6458
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006459{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kthread" >&5
6460$as_echo "$ac_cv_kthread" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006461fi
6462
6463if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
6464then
6465# -pthread, if available, provides the right #defines
6466# and linker options to make pthread_create available
6467# Some compilers won't report that they do not support -pthread,
6468# so we need to run a program to see whether it really made the
6469# function available.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006470{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -pthread" >&5
6471$as_echo_n "checking whether $CC accepts -pthread... " >&6; }
doko@python.orgfa3f9a32013-01-25 15:32:31 +01006472if ${ac_cv_pthread+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006473 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006474else
6475 ac_save_cc="$CC"
6476CC="$CC -pthread"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006477if test "$cross_compiling" = yes; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006478 ac_cv_pthread=no
6479else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006480 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006481/* end confdefs.h. */
6482
Stefan Krahae66ca62012-11-22 22:36:57 +01006483#include <stdio.h>
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006484#include <pthread.h>
6485
6486void* routine(void* p){return NULL;}
6487
6488int main(){
6489 pthread_t p;
6490 if(pthread_create(&p,NULL,routine,NULL)!=0)
6491 return 1;
6492 (void)pthread_detach(p);
6493 return 0;
6494}
6495
6496_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006497if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006498 ac_cv_pthread=yes
6499else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006500 ac_cv_pthread=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006501fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006502rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6503 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006504fi
6505
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006506CC="$ac_save_cc"
6507fi
6508
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006509{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread" >&5
6510$as_echo "$ac_cv_pthread" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006511fi
6512
6513# If we have set a CC compiler flag for thread support then
6514# check if it works for CXX, too.
6515ac_cv_cxx_thread=no
6516if test ! -z "$CXX"
6517then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006518{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX also accepts flags for thread support" >&5
6519$as_echo_n "checking whether $CXX also accepts flags for thread support... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006520ac_save_cxx="$CXX"
6521
6522if test "$ac_cv_kpthread" = "yes"
6523then
6524 CXX="$CXX -Kpthread"
6525 ac_cv_cxx_thread=yes
6526elif test "$ac_cv_kthread" = "yes"
6527then
6528 CXX="$CXX -Kthread"
6529 ac_cv_cxx_thread=yes
6530elif test "$ac_cv_pthread" = "yes"
6531then
6532 CXX="$CXX -pthread"
6533 ac_cv_cxx_thread=yes
6534fi
6535
6536if test $ac_cv_cxx_thread = yes
6537then
6538 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
6539 $CXX -c conftest.$ac_ext 2>&5
6540 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
6541 && test -s conftest$ac_exeext && ./conftest$ac_exeext
6542 then
6543 ac_cv_cxx_thread=yes
6544 else
6545 ac_cv_cxx_thread=no
6546 fi
6547 rm -fr conftest*
6548fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006549{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_thread" >&5
6550$as_echo "$ac_cv_cxx_thread" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006551fi
6552CXX="$ac_save_cxx"
6553
6554
6555# checks for header files
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006556{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
6557$as_echo_n "checking for ANSI C header files... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01006558if ${ac_cv_header_stdc+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006559 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006560else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006561 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006562/* end confdefs.h. */
6563#include <stdlib.h>
6564#include <stdarg.h>
6565#include <string.h>
6566#include <float.h>
6567
6568int
6569main ()
6570{
6571
6572 ;
6573 return 0;
6574}
6575_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006576if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006577 ac_cv_header_stdc=yes
6578else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006579 ac_cv_header_stdc=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006580fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006581rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6582
6583if test $ac_cv_header_stdc = yes; then
6584 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006585 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006586/* end confdefs.h. */
6587#include <string.h>
6588
6589_ACEOF
6590if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006591 $EGREP "memchr" >/dev/null 2>&1; then :
6592
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006593else
6594 ac_cv_header_stdc=no
6595fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00006596rm -f conftest*
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006597
6598fi
6599
6600if test $ac_cv_header_stdc = yes; then
6601 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006602 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006603/* end confdefs.h. */
6604#include <stdlib.h>
6605
6606_ACEOF
6607if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006608 $EGREP "free" >/dev/null 2>&1; then :
6609
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006610else
6611 ac_cv_header_stdc=no
6612fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00006613rm -f conftest*
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006614
6615fi
6616
6617if test $ac_cv_header_stdc = yes; then
6618 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006619 if test "$cross_compiling" = yes; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006620 :
6621else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006622 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006623/* end confdefs.h. */
6624#include <ctype.h>
6625#include <stdlib.h>
6626#if ((' ' & 0x0FF) == 0x020)
6627# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
6628# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
6629#else
6630# define ISLOWER(c) \
6631 (('a' <= (c) && (c) <= 'i') \
6632 || ('j' <= (c) && (c) <= 'r') \
6633 || ('s' <= (c) && (c) <= 'z'))
6634# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
6635#endif
6636
6637#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
6638int
6639main ()
6640{
6641 int i;
6642 for (i = 0; i < 256; i++)
6643 if (XOR (islower (i), ISLOWER (i))
6644 || toupper (i) != TOUPPER (i))
6645 return 2;
6646 return 0;
6647}
6648_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006649if ac_fn_c_try_run "$LINENO"; then :
6650
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006651else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006652 ac_cv_header_stdc=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006653fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006654rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6655 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006656fi
6657
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006658fi
6659fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006660{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
6661$as_echo "$ac_cv_header_stdc" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006662if test $ac_cv_header_stdc = yes; then
6663
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006664$as_echo "#define STDC_HEADERS 1" >>confdefs.h
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006665
6666fi
6667
doko@ubuntu.comf27ec3e2014-04-17 20:11:19 +02006668for ac_header in asm/types.h conio.h direct.h dlfcn.h errno.h \
Martin v. Löwis0e8bd7e2006-06-10 12:23:46 +00006669fcntl.h grp.h \
doko@ubuntu.comf27ec3e2014-04-17 20:11:19 +02006670ieeefp.h io.h langinfo.h libintl.h poll.h process.h pthread.h \
Martin v. Löwis40e9aed2006-10-02 15:20:37 +00006671shadow.h signal.h stdint.h stropts.h termios.h thread.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00006672unistd.h utime.h \
Christian Heimes0e9ab5f2008-03-21 23:49:44 +00006673sys/audioio.h sys/bsdtty.h sys/epoll.h sys/event.h sys/file.h sys/loadavg.h \
6674sys/lock.h sys/mkdev.h sys/modem.h \
Martin v. Löwis0e8bd7e2006-06-10 12:23:46 +00006675sys/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 +00006676sys/termio.h sys/time.h \
Martin v. Löwis0e8bd7e2006-06-10 12:23:46 +00006677sys/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 +00006678sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Christian Heimes3aa138f2013-06-18 13:25:24 +02006679bluetooth/bluetooth.h linux/tipc.h spawn.h util.h alloca.h
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006680do :
6681 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
6682ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
Georg Brandl71f4fbb2011-02-25 11:04:50 +00006683if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006684 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006685#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00006686_ACEOF
6687
6688fi
6689
Guido van Rossum627b2d71993-12-24 10:39:16 +00006690done
6691
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006692ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00006693for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006694 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
6695{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
6696$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01006697if eval \${$as_ac_Header+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006698 $as_echo_n "(cached) " >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00006699else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006700 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006701/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006702#include <sys/types.h>
6703#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00006704
Martin v. Löwis11437992002-04-12 09:54:03 +00006705int
6706main ()
6707{
6708if ((DIR *) 0)
6709return 0;
6710 ;
6711 return 0;
6712}
6713_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006714if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006715 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00006716else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006717 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006718fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006719rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006720fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006721eval ac_res=\$$as_ac_Header
6722 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
6723$as_echo "$ac_res" >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00006724if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006725 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006726#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00006727_ACEOF
6728
6729ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00006730fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006731
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006732done
6733# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
6734if test $ac_header_dirent = dirent.h; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006735 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
6736$as_echo_n "checking for library containing opendir... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01006737if ${ac_cv_search_opendir+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006738 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006739else
Martin v. Löwis11437992002-04-12 09:54:03 +00006740 ac_func_search_save_LIBS=$LIBS
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006741cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006742/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006743
Martin v. Löwiseba40652007-08-30 20:10:57 +00006744/* Override any GCC internal prototype to avoid an error.
6745 Use char because int might match the return type of a GCC
6746 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006747#ifdef __cplusplus
6748extern "C"
6749#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006750char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006751int
6752main ()
6753{
Martin v. Löwiseba40652007-08-30 20:10:57 +00006754return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006755 ;
6756 return 0;
6757}
6758_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00006759for ac_lib in '' dir; do
6760 if test -z "$ac_lib"; then
6761 ac_res="none required"
6762 else
6763 ac_res=-l$ac_lib
Skip Montanaro89e975f2007-08-22 19:05:21 +00006764 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Martin v. Löwiseba40652007-08-30 20:10:57 +00006765 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006766 if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00006767 ac_cv_search_opendir=$ac_res
Brett Cannon19fab762007-06-02 03:02:29 +00006768fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006769rm -f core conftest.err conftest.$ac_objext \
6770 conftest$ac_exeext
Matthias Klose3cef2a92012-03-14 23:39:33 +01006771 if ${ac_cv_search_opendir+:} false; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00006772 break
Skip Montanaro89e975f2007-08-22 19:05:21 +00006773fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006774done
Matthias Klose3cef2a92012-03-14 23:39:33 +01006775if ${ac_cv_search_opendir+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006776
Martin v. Löwiseba40652007-08-30 20:10:57 +00006777else
6778 ac_cv_search_opendir=no
6779fi
6780rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006781LIBS=$ac_func_search_save_LIBS
6782fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006783{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
6784$as_echo "$ac_cv_search_opendir" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006785ac_res=$ac_cv_search_opendir
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006786if test "$ac_res" != no; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00006787 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00006788
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006789fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006790
Michael W. Hudson54241132001-12-07 15:38:26 +00006791else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006792 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
6793$as_echo_n "checking for library containing opendir... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01006794if ${ac_cv_search_opendir+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006795 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006796else
6797 ac_func_search_save_LIBS=$LIBS
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006798cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006799/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006800
Martin v. Löwiseba40652007-08-30 20:10:57 +00006801/* Override any GCC internal prototype to avoid an error.
6802 Use char because int might match the return type of a GCC
6803 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006804#ifdef __cplusplus
6805extern "C"
6806#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006807char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006808int
6809main ()
6810{
Martin v. Löwiseba40652007-08-30 20:10:57 +00006811return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006812 ;
6813 return 0;
6814}
6815_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00006816for ac_lib in '' x; do
6817 if test -z "$ac_lib"; then
6818 ac_res="none required"
6819 else
6820 ac_res=-l$ac_lib
Skip Montanaro89e975f2007-08-22 19:05:21 +00006821 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Martin v. Löwiseba40652007-08-30 20:10:57 +00006822 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006823 if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00006824 ac_cv_search_opendir=$ac_res
Brett Cannon19fab762007-06-02 03:02:29 +00006825fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006826rm -f core conftest.err conftest.$ac_objext \
6827 conftest$ac_exeext
Matthias Klose3cef2a92012-03-14 23:39:33 +01006828 if ${ac_cv_search_opendir+:} false; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00006829 break
Skip Montanaro89e975f2007-08-22 19:05:21 +00006830fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006831done
Matthias Klose3cef2a92012-03-14 23:39:33 +01006832if ${ac_cv_search_opendir+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006833
Martin v. Löwiseba40652007-08-30 20:10:57 +00006834else
6835 ac_cv_search_opendir=no
6836fi
6837rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006838LIBS=$ac_func_search_save_LIBS
6839fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006840{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
6841$as_echo "$ac_cv_search_opendir" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006842ac_res=$ac_cv_search_opendir
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006843if test "$ac_res" != no; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00006844 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00006845
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006846fi
6847
6848fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00006849
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006850{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5
6851$as_echo_n "checking whether sys/types.h defines makedev... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01006852if ${ac_cv_header_sys_types_h_makedev+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006853 $as_echo_n "(cached) " >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006854else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006855 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006856/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006857#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006858int
6859main ()
6860{
6861return makedev(0, 0);
6862 ;
6863 return 0;
6864}
6865_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006866if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006867 ac_cv_header_sys_types_h_makedev=yes
6868else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006869 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006870fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006871rm -f core conftest.err conftest.$ac_objext \
6872 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006873
6874fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006875{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_types_h_makedev" >&5
6876$as_echo "$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006877
6878if test $ac_cv_header_sys_types_h_makedev = no; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006879ac_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 +01006880if test "x$ac_cv_header_sys_mkdev_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006881
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006882$as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006883
6884fi
6885
6886
6887
6888 if test $ac_cv_header_sys_mkdev_h = no; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006889 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 +01006890if test "x$ac_cv_header_sys_sysmacros_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006891
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006892$as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006893
6894fi
6895
6896
6897 fi
6898fi
6899
Michael W. Hudson54241132001-12-07 15:38:26 +00006900
Martin v. Löwis11017b12006-01-14 18:12:57 +00006901# On Linux, netlink.h requires asm/types.h
Martin v. Löwis11017b12006-01-14 18:12:57 +00006902for ac_header in linux/netlink.h
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006903do :
6904 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 +00006905#ifdef HAVE_ASM_TYPES_H
6906#include <asm/types.h>
6907#endif
6908#ifdef HAVE_SYS_SOCKET_H
6909#include <sys/socket.h>
6910#endif
6911
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006912"
Matthias Klose3cef2a92012-03-14 23:39:33 +01006913if test "x$ac_cv_header_linux_netlink_h" = xyes; then :
Martin v. Löwis11017b12006-01-14 18:12:57 +00006914 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006915#define HAVE_LINUX_NETLINK_H 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00006916_ACEOF
6917
6918fi
6919
6920done
6921
6922
Guido van Rossum627b2d71993-12-24 10:39:16 +00006923# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00006924was_it_defined=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006925{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_t in time.h" >&5
6926$as_echo_n "checking for clock_t in time.h... " >&6; }
6927cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006928/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006929#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006930
6931_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006932if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006933 $EGREP "clock_t" >/dev/null 2>&1; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +00006934 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006935else
Martin v. Löwis11437992002-04-12 09:54:03 +00006936
6937
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006938$as_echo "#define clock_t long" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00006939
Martin v. Löwisc45929e2002-04-06 10:10:49 +00006940
Guido van Rossum627b2d71993-12-24 10:39:16 +00006941fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00006942rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00006943
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006944{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
6945$as_echo "$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00006946
Neal Norwitz11690112002-07-30 01:08:28 +00006947# Check whether using makedev requires defining _OSF_SOURCE
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006948{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for makedev" >&5
6949$as_echo_n "checking for makedev... " >&6; }
6950cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006951/* end confdefs.h. */
Jesus Cea616de772010-04-28 10:32:30 +00006952
6953#if defined(MAJOR_IN_MKDEV)
6954#include <sys/mkdev.h>
6955#elif defined(MAJOR_IN_SYSMACROS)
6956#include <sys/sysmacros.h>
6957#else
Neal Norwitz6eb37f02003-02-23 23:28:15 +00006958#include <sys/types.h>
Jesus Cea616de772010-04-28 10:32:30 +00006959#endif
Neal Norwitz11690112002-07-30 01:08:28 +00006960int
6961main ()
6962{
6963 makedev(0, 0)
6964 ;
6965 return 0;
6966}
6967_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006968if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00006969 ac_cv_has_makedev=yes
6970else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006971 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006972fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006973rm -f core conftest.err conftest.$ac_objext \
6974 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00006975if test "$ac_cv_has_makedev" = "no"; then
6976 # we didn't link, try if _OSF_SOURCE will allow us to link
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006977 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006978/* end confdefs.h. */
Neal Norwitz11690112002-07-30 01:08:28 +00006979
Neal Norwitz6eb37f02003-02-23 23:28:15 +00006980#define _OSF_SOURCE 1
6981#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00006982
Neal Norwitz11690112002-07-30 01:08:28 +00006983int
6984main ()
6985{
6986 makedev(0, 0)
6987 ;
6988 return 0;
6989}
6990_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006991if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00006992 ac_cv_has_makedev=yes
6993else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006994 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006995fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006996rm -f core conftest.err conftest.$ac_objext \
6997 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00006998 if test "$ac_cv_has_makedev" = "yes"; then
6999
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007000$as_echo "#define _OSF_SOURCE 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00007001
7002 fi
7003fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007004{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_makedev" >&5
7005$as_echo "$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00007006if test "$ac_cv_has_makedev" = "yes"; then
7007
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007008$as_echo "#define HAVE_MAKEDEV 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00007009
7010fi
7011
Martin v. Löwis399a6892002-10-04 10:22:02 +00007012# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
7013# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
7014# defined, but the compiler does not support pragma redefine_extname,
7015# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
7016# structures (such as rlimit64) without declaring them. As a
7017# work-around, disable LFS on such configurations
7018
7019use_lfs=yes
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007020{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Solaris LFS bug" >&5
7021$as_echo_n "checking Solaris LFS bug... " >&6; }
7022cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007023/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00007024
7025#define _LARGEFILE_SOURCE 1
7026#define _FILE_OFFSET_BITS 64
7027#include <sys/resource.h>
7028
Martin v. Löwis399a6892002-10-04 10:22:02 +00007029int
7030main ()
7031{
7032struct rlimit foo;
7033 ;
7034 return 0;
7035}
7036_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007037if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis399a6892002-10-04 10:22:02 +00007038 sol_lfs_bug=no
7039else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007040 sol_lfs_bug=yes
Martin v. Löwis399a6892002-10-04 10:22:02 +00007041fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007042rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007043{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $sol_lfs_bug" >&5
7044$as_echo "$sol_lfs_bug" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00007045if test "$sol_lfs_bug" = "yes"; then
7046 use_lfs=no
7047fi
7048
7049if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00007050# Two defines needed to enable largefile support on various platforms
7051# These may affect some typedefs
Georg Brandl94800df2011-02-25 11:09:02 +00007052case $ac_sys_system/$ac_sys_release in
7053AIX*)
7054
7055$as_echo "#define _LARGE_FILES 1" >>confdefs.h
7056
7057 ;;
7058esac
Guido van Rossum810cc512001-09-09 23:51:39 +00007059
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007060$as_echo "#define _LARGEFILE_SOURCE 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007061
7062
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007063$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
Guido van Rossum810cc512001-09-09 23:51:39 +00007064
Martin v. Löwis399a6892002-10-04 10:22:02 +00007065fi
Michael W. Hudson54241132001-12-07 15:38:26 +00007066
Guido van Rossum84e7b241996-08-19 21:59:00 +00007067# Add some code to confdefs.h so that the test for off_t works on SCO
7068cat >> confdefs.h <<\EOF
7069#if defined(SCO_DS)
7070#undef _OFF_T
7071#endif
7072EOF
7073
Guido van Rossumef2255b2000-03-10 22:30:29 +00007074# Type availability checks
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007075ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
Matthias Klose3cef2a92012-03-14 23:39:33 +01007076if test "x$ac_cv_type_mode_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007077
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007078else
Martin v. Löwis11437992002-04-12 09:54:03 +00007079
7080cat >>confdefs.h <<_ACEOF
7081#define mode_t int
7082_ACEOF
7083
7084fi
7085
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007086ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
Matthias Klose3cef2a92012-03-14 23:39:33 +01007087if test "x$ac_cv_type_off_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007088
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007089else
Martin v. Löwis11437992002-04-12 09:54:03 +00007090
7091cat >>confdefs.h <<_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00007092#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00007093_ACEOF
7094
7095fi
7096
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007097ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
Matthias Klose3cef2a92012-03-14 23:39:33 +01007098if test "x$ac_cv_type_pid_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007099
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007100else
Martin v. Löwis11437992002-04-12 09:54:03 +00007101
7102cat >>confdefs.h <<_ACEOF
7103#define pid_t int
7104_ACEOF
7105
7106fi
7107
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00007108
Martin v. Löwis11437992002-04-12 09:54:03 +00007109cat >>confdefs.h <<_ACEOF
Matthias Klosecbf54b12010-05-08 11:04:18 +00007110#define RETSIGTYPE void
Martin v. Löwis11437992002-04-12 09:54:03 +00007111_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00007112
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007113ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
Matthias Klose3cef2a92012-03-14 23:39:33 +01007114if test "x$ac_cv_type_size_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007115
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007116else
Martin v. Löwis11437992002-04-12 09:54:03 +00007117
7118cat >>confdefs.h <<_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00007119#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00007120_ACEOF
7121
7122fi
7123
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007124{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
7125$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007126if ${ac_cv_type_uid_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007127 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007128else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007129 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007130/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007131#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007132
7133_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007134if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007135 $EGREP "uid_t" >/dev/null 2>&1; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007136 ac_cv_type_uid_t=yes
7137else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007138 ac_cv_type_uid_t=no
7139fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00007140rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00007141
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007142fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007143{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
7144$as_echo "$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00007145if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007146
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007147$as_echo "#define uid_t int" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007148
7149
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007150$as_echo "#define gid_t int" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007151
7152fi
7153
Mark Dickinson17c50cd2012-12-02 13:13:56 +00007154
7155# There are two separate checks for each of the exact-width integer types we
7156# need. First we check whether the type is available using the usual
7157# AC_CHECK_TYPE macro with the default includes (which includes <inttypes.h>
7158# and <stdint.h> where available). We then also use the special type checks of
7159# the form AC_TYPE_UINT32_T, which in the case that uint32_t is not available
7160# directly, #define's uint32_t to be a suitable type.
7161
7162ac_fn_c_check_type "$LINENO" "uint32_t" "ac_cv_type_uint32_t" "$ac_includes_default"
7163if test "x$ac_cv_type_uint32_t" = xyes; then :
7164
7165$as_echo "#define HAVE_UINT32_T 1" >>confdefs.h
7166
7167fi
7168
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007169ac_fn_c_find_uintX_t "$LINENO" "32" "ac_cv_c_uint32_t"
7170case $ac_cv_c_uint32_t in #(
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007171 no|yes) ;; #(
7172 *)
7173
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007174$as_echo "#define _UINT32_T 1" >>confdefs.h
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007175
7176
7177cat >>confdefs.h <<_ACEOF
7178#define uint32_t $ac_cv_c_uint32_t
7179_ACEOF
7180;;
7181 esac
7182
Mark Dickinson17c50cd2012-12-02 13:13:56 +00007183
7184ac_fn_c_check_type "$LINENO" "uint64_t" "ac_cv_type_uint64_t" "$ac_includes_default"
7185if test "x$ac_cv_type_uint64_t" = xyes; then :
7186
7187$as_echo "#define HAVE_UINT64_T 1" >>confdefs.h
7188
7189fi
7190
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007191ac_fn_c_find_uintX_t "$LINENO" "64" "ac_cv_c_uint64_t"
7192case $ac_cv_c_uint64_t in #(
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007193 no|yes) ;; #(
7194 *)
7195
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007196$as_echo "#define _UINT64_T 1" >>confdefs.h
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007197
7198
7199cat >>confdefs.h <<_ACEOF
7200#define uint64_t $ac_cv_c_uint64_t
7201_ACEOF
7202;;
7203 esac
7204
Mark Dickinson17c50cd2012-12-02 13:13:56 +00007205
7206ac_fn_c_check_type "$LINENO" "int32_t" "ac_cv_type_int32_t" "$ac_includes_default"
7207if test "x$ac_cv_type_int32_t" = xyes; then :
7208
7209$as_echo "#define HAVE_INT32_T 1" >>confdefs.h
7210
7211fi
7212
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007213ac_fn_c_find_intX_t "$LINENO" "32" "ac_cv_c_int32_t"
7214case $ac_cv_c_int32_t in #(
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007215 no|yes) ;; #(
7216 *)
7217
7218cat >>confdefs.h <<_ACEOF
7219#define int32_t $ac_cv_c_int32_t
7220_ACEOF
7221;;
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007222esac
7223
Mark Dickinson17c50cd2012-12-02 13:13:56 +00007224
7225ac_fn_c_check_type "$LINENO" "int64_t" "ac_cv_type_int64_t" "$ac_includes_default"
7226if test "x$ac_cv_type_int64_t" = xyes; then :
7227
7228$as_echo "#define HAVE_INT64_T 1" >>confdefs.h
7229
7230fi
7231
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007232ac_fn_c_find_intX_t "$LINENO" "64" "ac_cv_c_int64_t"
7233case $ac_cv_c_int64_t in #(
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007234 no|yes) ;; #(
7235 *)
7236
7237cat >>confdefs.h <<_ACEOF
7238#define int64_t $ac_cv_c_int64_t
7239_ACEOF
7240;;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00007241esac
Martin v. Löwis18e16552006-02-15 17:27:45 +00007242
Mark Dickinson17c50cd2012-12-02 13:13:56 +00007243
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007244ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
Matthias Klose3cef2a92012-03-14 23:39:33 +01007245if test "x$ac_cv_type_ssize_t" = xyes; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00007246
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007247$as_echo "#define HAVE_SSIZE_T 1" >>confdefs.h
Martin v. Löwis18e16552006-02-15 17:27:45 +00007248
7249fi
7250
Jack Jansendd19cf82001-12-06 22:36:17 +00007251
Michael W. Hudson54241132001-12-07 15:38:26 +00007252# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00007253# ANSI C requires sizeof(char) == 1, so no need to check it
Martin v. Löwiseba40652007-08-30 20:10:57 +00007254# The cast to long int works around a bug in the HP C Compiler
7255# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7256# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7257# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007258{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
7259$as_echo_n "checking size of int... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007260if ${ac_cv_sizeof_int+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007261 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007262else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007263 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 +00007264
Martin v. Löwis11437992002-04-12 09:54:03 +00007265else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007266 if test "$ac_cv_type_int" = yes; then
7267 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7268$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007269as_fn_error 77 "cannot compute sizeof (int)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007270See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007271 else
7272 ac_cv_sizeof_int=0
7273 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007274fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007275
Martin v. Löwis11437992002-04-12 09:54:03 +00007276fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007277{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
7278$as_echo "$ac_cv_sizeof_int" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007279
7280
7281
Martin v. Löwis11437992002-04-12 09:54:03 +00007282cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007283#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00007284_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007285
7286
Martin v. Löwiseba40652007-08-30 20:10:57 +00007287# The cast to long int works around a bug in the HP C Compiler
7288# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7289# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7290# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007291{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
7292$as_echo_n "checking size of long... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007293if ${ac_cv_sizeof_long+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007294 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007295else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007296 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 +00007297
Martin v. Löwis11437992002-04-12 09:54:03 +00007298else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007299 if test "$ac_cv_type_long" = yes; then
7300 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7301$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007302as_fn_error 77 "cannot compute sizeof (long)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007303See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007304 else
7305 ac_cv_sizeof_long=0
7306 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007307fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007308
Martin v. Löwis11437992002-04-12 09:54:03 +00007309fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007310{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
7311$as_echo "$ac_cv_sizeof_long" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007312
7313
7314
Martin v. Löwis11437992002-04-12 09:54:03 +00007315cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007316#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00007317_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007318
7319
Martin v. Löwiseba40652007-08-30 20:10:57 +00007320# The cast to long int works around a bug in the HP C Compiler
7321# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7322# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7323# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007324{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
7325$as_echo_n "checking size of void *... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007326if ${ac_cv_sizeof_void_p+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007327 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007328else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007329 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 +00007330
Martin v. Löwis11437992002-04-12 09:54:03 +00007331else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007332 if test "$ac_cv_type_void_p" = yes; then
7333 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7334$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007335as_fn_error 77 "cannot compute sizeof (void *)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007336See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007337 else
7338 ac_cv_sizeof_void_p=0
7339 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007340fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007341
Martin v. Löwis11437992002-04-12 09:54:03 +00007342fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007343{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
7344$as_echo "$ac_cv_sizeof_void_p" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007345
7346
7347
Martin v. Löwis11437992002-04-12 09:54:03 +00007348cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00007349#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00007350_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00007351
7352
Martin v. Löwiseba40652007-08-30 20:10:57 +00007353# The cast to long int works around a bug in the HP C Compiler
7354# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7355# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7356# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007357{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
7358$as_echo_n "checking size of short... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007359if ${ac_cv_sizeof_short+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007360 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007361else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007362 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 +00007363
Martin v. Löwis11437992002-04-12 09:54:03 +00007364else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007365 if test "$ac_cv_type_short" = yes; then
7366 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7367$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007368as_fn_error 77 "cannot compute sizeof (short)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007369See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007370 else
7371 ac_cv_sizeof_short=0
7372 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007373fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007374
Martin v. Löwis11437992002-04-12 09:54:03 +00007375fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007376{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
7377$as_echo "$ac_cv_sizeof_short" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007378
7379
7380
Martin v. Löwis11437992002-04-12 09:54:03 +00007381cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007382#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00007383_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007384
7385
Martin v. Löwiseba40652007-08-30 20:10:57 +00007386# The cast to long int works around a bug in the HP C Compiler
7387# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7388# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7389# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007390{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of float" >&5
7391$as_echo_n "checking size of float... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007392if ${ac_cv_sizeof_float+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007393 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007394else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007395 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 +00007396
Martin v. Löwis11437992002-04-12 09:54:03 +00007397else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007398 if test "$ac_cv_type_float" = yes; then
7399 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7400$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007401as_fn_error 77 "cannot compute sizeof (float)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007402See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007403 else
7404 ac_cv_sizeof_float=0
7405 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007406fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007407
Martin v. Löwis11437992002-04-12 09:54:03 +00007408fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007409{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_float" >&5
7410$as_echo "$ac_cv_sizeof_float" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007411
7412
7413
Martin v. Löwis11437992002-04-12 09:54:03 +00007414cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007415#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00007416_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007417
7418
Martin v. Löwiseba40652007-08-30 20:10:57 +00007419# The cast to long int works around a bug in the HP C Compiler
7420# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7421# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7422# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007423{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of double" >&5
7424$as_echo_n "checking size of double... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007425if ${ac_cv_sizeof_double+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007426 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007427else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007428 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 +00007429
Martin v. Löwis11437992002-04-12 09:54:03 +00007430else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007431 if test "$ac_cv_type_double" = yes; then
7432 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7433$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007434as_fn_error 77 "cannot compute sizeof (double)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007435See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007436 else
7437 ac_cv_sizeof_double=0
7438 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007439fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007440
Martin v. Löwis11437992002-04-12 09:54:03 +00007441fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007442{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5
7443$as_echo "$ac_cv_sizeof_double" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007444
7445
7446
Martin v. Löwis11437992002-04-12 09:54:03 +00007447cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007448#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00007449_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007450
7451
Martin v. Löwiseba40652007-08-30 20:10:57 +00007452# The cast to long int works around a bug in the HP C Compiler
7453# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7454# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7455# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007456{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of fpos_t" >&5
7457$as_echo_n "checking size of fpos_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007458if ${ac_cv_sizeof_fpos_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007459 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007460else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007461 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 +00007462
Martin v. Löwis11437992002-04-12 09:54:03 +00007463else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007464 if test "$ac_cv_type_fpos_t" = yes; then
7465 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7466$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007467as_fn_error 77 "cannot compute sizeof (fpos_t)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007468See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007469 else
7470 ac_cv_sizeof_fpos_t=0
7471 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007472fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007473
Martin v. Löwis11437992002-04-12 09:54:03 +00007474fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007475{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_fpos_t" >&5
7476$as_echo "$ac_cv_sizeof_fpos_t" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007477
7478
7479
Martin v. Löwis11437992002-04-12 09:54:03 +00007480cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007481#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007482_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007483
Michael W. Hudson54241132001-12-07 15:38:26 +00007484
Martin v. Löwiseba40652007-08-30 20:10:57 +00007485# The cast to long int works around a bug in the HP C Compiler
7486# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7487# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7488# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007489{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
7490$as_echo_n "checking size of size_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007491if ${ac_cv_sizeof_size_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007492 $as_echo_n "(cached) " >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00007493else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007494 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 +00007495
Martin v. Löwis18e16552006-02-15 17:27:45 +00007496else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007497 if test "$ac_cv_type_size_t" = yes; then
7498 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7499$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007500as_fn_error 77 "cannot compute sizeof (size_t)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007501See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007502 else
7503 ac_cv_sizeof_size_t=0
7504 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +00007505fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007506
Martin v. Löwis18e16552006-02-15 17:27:45 +00007507fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007508{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
7509$as_echo "$ac_cv_sizeof_size_t" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007510
7511
7512
Martin v. Löwis18e16552006-02-15 17:27:45 +00007513cat >>confdefs.h <<_ACEOF
7514#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
7515_ACEOF
7516
7517
Christian Heimes951cc0f2008-01-31 23:08:23 +00007518# The cast to long int works around a bug in the HP C Compiler
7519# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7520# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7521# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007522{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pid_t" >&5
7523$as_echo_n "checking size of pid_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007524if ${ac_cv_sizeof_pid_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007525 $as_echo_n "(cached) " >&6
Christian Heimes951cc0f2008-01-31 23:08:23 +00007526else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007527 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 +00007528
Christian Heimes951cc0f2008-01-31 23:08:23 +00007529else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007530 if test "$ac_cv_type_pid_t" = yes; then
7531 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7532$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007533as_fn_error 77 "cannot compute sizeof (pid_t)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007534See \`config.log' for more details" "$LINENO" 5; }
Christian Heimes951cc0f2008-01-31 23:08:23 +00007535 else
7536 ac_cv_sizeof_pid_t=0
7537 fi
7538fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007539
Christian Heimes951cc0f2008-01-31 23:08:23 +00007540fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007541{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pid_t" >&5
7542$as_echo "$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes951cc0f2008-01-31 23:08:23 +00007543
7544
7545
7546cat >>confdefs.h <<_ACEOF
7547#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
7548_ACEOF
7549
7550
Michael W. Hudson54241132001-12-07 15:38:26 +00007551
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007552{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support" >&5
7553$as_echo_n "checking for long long support... " >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007554have_long_long=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007555cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007556/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007557
Martin v. Löwis11437992002-04-12 09:54:03 +00007558int
7559main ()
7560{
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007561long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007562 ;
7563 return 0;
7564}
7565_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007566if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007567
7568
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007569$as_echo "#define HAVE_LONG_LONG 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007570
Martin v. Löwisc45929e2002-04-06 10:10:49 +00007571 have_long_long=yes
7572
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007573fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007574rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007575{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_long" >&5
7576$as_echo "$have_long_long" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +00007577if test "$have_long_long" = yes ; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00007578# The cast to long int works around a bug in the HP C Compiler
7579# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7580# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7581# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007582{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
7583$as_echo_n "checking size of long long... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007584if ${ac_cv_sizeof_long_long+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007585 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007586else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007587 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 +00007588
Martin v. Löwis11437992002-04-12 09:54:03 +00007589else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007590 if test "$ac_cv_type_long_long" = yes; then
7591 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7592$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007593as_fn_error 77 "cannot compute sizeof (long long)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007594See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007595 else
7596 ac_cv_sizeof_long_long=0
7597 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007598fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007599
Martin v. Löwis11437992002-04-12 09:54:03 +00007600fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007601{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
7602$as_echo "$ac_cv_sizeof_long_long" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007603
7604
7605
Martin v. Löwis11437992002-04-12 09:54:03 +00007606cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007607#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +00007608_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007609
Michael W. Hudson54241132001-12-07 15:38:26 +00007610
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007611fi
7612
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007613{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support" >&5
7614$as_echo_n "checking for long double support... " >&6; }
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007615have_long_double=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007616cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007617/* end confdefs.h. */
7618
7619int
7620main ()
7621{
Matthias Klosec511b472010-05-08 11:01:39 +00007622long double x; x = (long double)0;
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007623 ;
7624 return 0;
7625}
7626_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007627if ac_fn_c_try_compile "$LINENO"; then :
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007628
7629
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007630$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007631
7632 have_long_double=yes
7633
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007634fi
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007635rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007636{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_double" >&5
7637$as_echo "$have_long_double" >&6; }
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007638if test "$have_long_double" = yes ; then
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007639# The cast to long int works around a bug in the HP C Compiler
7640# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7641# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7642# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007643{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long double" >&5
7644$as_echo_n "checking size of long double... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007645if ${ac_cv_sizeof_long_double+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007646 $as_echo_n "(cached) " >&6
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007647else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007648 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 +00007649
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007650else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007651 if test "$ac_cv_type_long_double" = yes; then
7652 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7653$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007654as_fn_error 77 "cannot compute sizeof (long double)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007655See \`config.log' for more details" "$LINENO" 5; }
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007656 else
7657 ac_cv_sizeof_long_double=0
7658 fi
7659fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007660
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007661fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007662{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double" >&5
7663$as_echo "$ac_cv_sizeof_long_double" >&6; }
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007664
7665
7666
7667cat >>confdefs.h <<_ACEOF
7668#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
7669_ACEOF
7670
7671
7672fi
7673
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007674{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _Bool support" >&5
7675$as_echo_n "checking for _Bool support... " >&6; }
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007676have_c99_bool=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007677cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007678/* end confdefs.h. */
7679
7680int
7681main ()
7682{
7683_Bool x; x = (_Bool)0;
7684 ;
7685 return 0;
7686}
7687_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007688if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007689
7690
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007691$as_echo "#define HAVE_C99_BOOL 1" >>confdefs.h
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007692
7693 have_c99_bool=yes
7694
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007695fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007696rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007697{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_c99_bool" >&5
7698$as_echo "$have_c99_bool" >&6; }
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007699if test "$have_c99_bool" = yes ; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00007700# The cast to long int works around a bug in the HP C Compiler
7701# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7702# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7703# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007704{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of _Bool" >&5
7705$as_echo_n "checking size of _Bool... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007706if ${ac_cv_sizeof__Bool+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007707 $as_echo_n "(cached) " >&6
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007708else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007709 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 +00007710
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007711else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007712 if test "$ac_cv_type__Bool" = yes; then
7713 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7714$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007715as_fn_error 77 "cannot compute sizeof (_Bool)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007716See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007717 else
7718 ac_cv_sizeof__Bool=0
7719 fi
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007720fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007721
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007722fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007723{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof__Bool" >&5
7724$as_echo "$ac_cv_sizeof__Bool" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007725
7726
7727
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007728cat >>confdefs.h <<_ACEOF
7729#define SIZEOF__BOOL $ac_cv_sizeof__Bool
7730_ACEOF
7731
7732
7733fi
7734
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007735ac_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 +00007736 #include <stdint.h>
7737 #endif
Antoine Pitrou7be5a652010-10-10 08:14:41 +00007738 #ifdef HAVE_INTTYPES_H
7739 #include <inttypes.h>
7740 #endif
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007741"
Matthias Klose3cef2a92012-03-14 23:39:33 +01007742if test "x$ac_cv_type_uintptr_t" = xyes; then :
Martin v. Löwisebe26702006-10-02 14:55:51 +00007743
7744cat >>confdefs.h <<_ACEOF
7745#define HAVE_UINTPTR_T 1
7746_ACEOF
7747
Martin v. Löwiseba40652007-08-30 20:10:57 +00007748# The cast to long int works around a bug in the HP C Compiler
7749# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7750# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7751# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007752{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of uintptr_t" >&5
7753$as_echo_n "checking size of uintptr_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007754if ${ac_cv_sizeof_uintptr_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007755 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007756else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007757 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 +00007758
Martin v. Löwis11437992002-04-12 09:54:03 +00007759else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007760 if test "$ac_cv_type_uintptr_t" = yes; then
7761 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7762$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007763as_fn_error 77 "cannot compute sizeof (uintptr_t)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007764See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007765 else
7766 ac_cv_sizeof_uintptr_t=0
7767 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007768fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007769
Martin v. Löwis11437992002-04-12 09:54:03 +00007770fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007771{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uintptr_t" >&5
7772$as_echo "$ac_cv_sizeof_uintptr_t" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007773
7774
7775
Martin v. Löwis11437992002-04-12 09:54:03 +00007776cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007777#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007778_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007779
Michael W. Hudson54241132001-12-07 15:38:26 +00007780
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007781fi
7782
Martin v. Löwisebe26702006-10-02 14:55:51 +00007783
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007784# The cast to long int works around a bug in the HP C Compiler
7785# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7786# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7787# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007788{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
7789$as_echo_n "checking size of off_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007790if ${ac_cv_sizeof_off_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007791 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007792else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007793 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007794#ifdef HAVE_SYS_TYPES_H
7795#include <sys/types.h>
7796#endif
7797
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007798"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007799
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007800else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007801 if test "$ac_cv_type_off_t" = yes; then
7802 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7803$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007804as_fn_error 77 "cannot compute sizeof (off_t)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007805See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007806 else
7807 ac_cv_sizeof_off_t=0
7808 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007809fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007810
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007811fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007812{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
7813$as_echo "$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007814
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007815
7816
Martin v. Löwis11437992002-04-12 09:54:03 +00007817cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007818#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007819_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007820
Michael W. Hudson54241132001-12-07 15:38:26 +00007821
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007822
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007823{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable large file support" >&5
7824$as_echo_n "checking whether to enable large file support... " >&6; }
Mark Dickinson0ef0b912009-12-31 21:11:48 +00007825if test "$have_long_long" = yes
7826then
7827if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +00007828 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007829
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007830$as_echo "#define HAVE_LARGEFILE_SUPPORT 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007831
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007832 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7833$as_echo "yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007834else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007835 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7836$as_echo "no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007837fi
Mark Dickinson0ef0b912009-12-31 21:11:48 +00007838else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007839 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7840$as_echo "no" >&6; }
Mark Dickinson0ef0b912009-12-31 21:11:48 +00007841fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007842
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007843# The cast to long int works around a bug in the HP C Compiler
7844# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7845# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7846# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007847{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
7848$as_echo_n "checking size of time_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007849if ${ac_cv_sizeof_time_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007850 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007851else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007852 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007853#ifdef HAVE_SYS_TYPES_H
7854#include <sys/types.h>
7855#endif
7856#ifdef HAVE_TIME_H
7857#include <time.h>
7858#endif
7859
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007860"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007861
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007862else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007863 if test "$ac_cv_type_time_t" = yes; then
7864 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7865$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007866as_fn_error 77 "cannot compute sizeof (time_t)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007867See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007868 else
7869 ac_cv_sizeof_time_t=0
7870 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007871fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007872
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007873fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007874{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
7875$as_echo "$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007876
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007877
7878
Martin v. Löwis11437992002-04-12 09:54:03 +00007879cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007880#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007881_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007882
Michael W. Hudson54241132001-12-07 15:38:26 +00007883
7884
Trent Mick635f6fb2000-08-23 21:33:05 +00007885# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00007886ac_save_cc="$CC"
7887if test "$ac_cv_kpthread" = "yes"
7888then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00007889elif test "$ac_cv_kthread" = "yes"
7890then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00007891elif test "$ac_cv_pthread" = "yes"
7892then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00007893fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007894{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_t" >&5
7895$as_echo_n "checking for pthread_t... " >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00007896have_pthread_t=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007897cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007898/* end confdefs.h. */
Matthias Klosec511b472010-05-08 11:01:39 +00007899
7900 #include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007901int
7902main ()
7903{
Guido van Rossum12580492000-09-24 16:47:19 +00007904pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007905 ;
7906 return 0;
7907}
Matthias Klosec511b472010-05-08 11:01:39 +00007908
Martin v. Löwis11437992002-04-12 09:54:03 +00007909_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007910if ac_fn_c_try_compile "$LINENO"; then :
Trent Mick635f6fb2000-08-23 21:33:05 +00007911 have_pthread_t=yes
Trent Mick635f6fb2000-08-23 21:33:05 +00007912fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007913rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007914{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_pthread_t" >&5
7915$as_echo "$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00007916if test "$have_pthread_t" = yes ; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007917 # The cast to long int works around a bug in the HP C Compiler
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007918# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7919# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7920# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007921{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
7922$as_echo_n "checking size of pthread_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007923if ${ac_cv_sizeof_pthread_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007924 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007925else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007926 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t" "
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007927#ifdef HAVE_PTHREAD_H
7928#include <pthread.h>
7929#endif
7930
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007931"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007932
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007933else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007934 if test "$ac_cv_type_pthread_t" = yes; then
7935 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7936$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007937as_fn_error 77 "cannot compute sizeof (pthread_t)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007938See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007939 else
7940 ac_cv_sizeof_pthread_t=0
7941 fi
Trent Mick635f6fb2000-08-23 21:33:05 +00007942fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007943
Trent Mick635f6fb2000-08-23 21:33:05 +00007944fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007945{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
7946$as_echo "$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007947
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007948
7949
Martin v. Löwis11437992002-04-12 09:54:03 +00007950cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00007951#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007952_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00007953
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007954
Trent Mick635f6fb2000-08-23 21:33:05 +00007955fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00007956CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00007957
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007958{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-toolbox-glue" >&5
7959$as_echo_n "checking for --enable-toolbox-glue... " >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007960# Check whether --enable-toolbox-glue was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007961if test "${enable_toolbox_glue+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00007962 enableval=$enable_toolbox_glue;
7963fi
Jack Jansene578a632001-08-15 01:27:14 +00007964
7965
7966if test -z "$enable_toolbox_glue"
Martin v. Löwis11437992002-04-12 09:54:03 +00007967then
Jack Jansene578a632001-08-15 01:27:14 +00007968 case $ac_sys_system/$ac_sys_release in
7969 Darwin/*)
7970 enable_toolbox_glue="yes";;
7971 *)
7972 enable_toolbox_glue="no";;
7973 esac
7974fi
7975case "$enable_toolbox_glue" in
7976yes)
Jack Jansene578a632001-08-15 01:27:14 +00007977 extra_machdep_objs="Python/mactoolboxglue.o"
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00007978 extra_undefs="-u _PyMac_Error"
Martin v. Löwis11437992002-04-12 09:54:03 +00007979
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007980$as_echo "#define USE_TOOLBOX_OBJECT_GLUE 1" >>confdefs.h
Jack Jansene578a632001-08-15 01:27:14 +00007981
7982 ;;
7983*)
Jack Jansene578a632001-08-15 01:27:14 +00007984 extra_machdep_objs=""
Jack Jansen591cbed2001-08-15 13:55:15 +00007985 extra_undefs=""
Jack Jansene578a632001-08-15 01:27:14 +00007986 ;;
7987esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007988{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_toolbox_glue" >&5
7989$as_echo "$enable_toolbox_glue" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00007990
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007991
Ronald Oussoren0d236eb2008-06-06 21:31:33 +00007992
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007993case $ac_sys_system/$ac_sys_release in
Anthony Baxter82201742006-04-09 15:07:40 +00007994 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +00007995 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
7996 ;;
7997 Darwin/*)
7998 OTHER_LIBTOOL_OPT=""
7999 ;;
8000esac
8001
8002
Ronald Oussoren25967582009-09-06 10:00:26 +00008003
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008004case $ac_sys_system/$ac_sys_release in
Anthony Baxter82201742006-04-09 15:07:40 +00008005 Darwin/[01567]\..*)
Ronald Oussoren988117f2006-04-29 11:31:35 +00008006 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
8007 if test "${enable_universalsdk}"; then
8008 :
8009 else
Ronald Oussorenbc0e83c2010-02-11 13:26:54 +00008010 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Ronald Oussoren988117f2006-04-29 11:31:35 +00008011 fi
Jack Jansenb36687a2004-07-16 08:43:47 +00008012 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00008013 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00008014 Darwin/*)
Ronald Oussorena55af9a2010-01-17 16:25:57 +00008015 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008016 if test ${gcc_version} '<' 4.0
8017 then
8018 LIBTOOL_CRUFT="-lcc_dynamic"
8019 else
8020 LIBTOOL_CRUFT=""
8021 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008022 if test "$cross_compiling" = yes; then :
Ronald Oussoren23d92532009-09-07 06:12:00 +00008023 ac_osx_32bit=yes
Ronald Oussoren25967582009-09-06 10:00:26 +00008024else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008025 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren25967582009-09-06 10:00:26 +00008026/* end confdefs.h. */
Ronald Oussoren23d92532009-09-07 06:12:00 +00008027
Ronald Oussoren25967582009-09-06 10:00:26 +00008028 #include <unistd.h>
8029 int main(int argc, char*argv[])
8030 {
8031 if (sizeof(long) == 4) {
8032 return 0;
8033 } else {
8034 return 1;
8035 }
Ronald Oussoren84ddd722009-09-08 07:17:10 +00008036 }
Ronald Oussoren23d92532009-09-07 06:12:00 +00008037
Ronald Oussoren25967582009-09-06 10:00:26 +00008038_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008039if ac_fn_c_try_run "$LINENO"; then :
Ronald Oussoren25967582009-09-06 10:00:26 +00008040 ac_osx_32bit=yes
8041else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008042 ac_osx_32bit=no
Ronald Oussoren25967582009-09-06 10:00:26 +00008043fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008044rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8045 conftest.$ac_objext conftest.beam conftest.$ac_ext
Ronald Oussoren25967582009-09-06 10:00:26 +00008046fi
8047
8048
Ronald Oussoren25967582009-09-06 10:00:26 +00008049 if test "${ac_osx_32bit}" = "yes"; then
Ronald Oussorenbc0e83c2010-02-11 13:26:54 +00008050 case `/usr/bin/arch` in
Ronald Oussoren25967582009-09-06 10:00:26 +00008051 i386)
8052 MACOSX_DEFAULT_ARCH="i386"
8053 ;;
8054 ppc)
8055 MACOSX_DEFAULT_ARCH="ppc"
8056 ;;
8057 *)
Georg Brandl71f4fbb2011-02-25 11:04:50 +00008058 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren25967582009-09-06 10:00:26 +00008059 ;;
8060 esac
8061 else
Ronald Oussorenbc0e83c2010-02-11 13:26:54 +00008062 case `/usr/bin/arch` in
Ronald Oussoren25967582009-09-06 10:00:26 +00008063 i386)
8064 MACOSX_DEFAULT_ARCH="x86_64"
8065 ;;
8066 ppc)
8067 MACOSX_DEFAULT_ARCH="ppc64"
8068 ;;
8069 *)
Georg Brandl71f4fbb2011-02-25 11:04:50 +00008070 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren25967582009-09-06 10:00:26 +00008071 ;;
8072 esac
8073
8074 #ARCH_RUN_32BIT="true"
8075 fi
8076
8077 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +00008078 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00008079 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008080esac
8081
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008082{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-framework" >&5
8083$as_echo_n "checking for --enable-framework... " >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00008084if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008085then
Skip Montanarodecc6a42003-01-01 20:07:49 +00008086 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00008087 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00008088 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008089
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008090$as_echo "#define WITH_NEXT_FRAMEWORK 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008091
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008092 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8093$as_echo "yes" >&6; }
Ronald Oussoren450d5612009-06-08 21:12:41 +00008094 if test $enable_shared = "yes"
8095 then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00008096 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 +00008097 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008098else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008099 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8100$as_echo "no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008101fi
8102
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008103{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dyld" >&5
8104$as_echo_n "checking for dyld... " >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008105case $ac_sys_system/$ac_sys_release in
8106 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008107
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008108$as_echo "#define WITH_DYLD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008109
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008110 { $as_echo "$as_me:${as_lineno-$LINENO}: result: always on for Darwin" >&5
8111$as_echo "always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008112 ;;
8113 *)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008114 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8115$as_echo "no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00008116 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008117esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008118
Guido van Rossum0a516c91994-09-12 10:58:40 +00008119# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00008120
Michael W. Hudson54241132001-12-07 15:38:26 +00008121
8122
8123
8124
Ronald Oussoren75912852010-04-08 08:13:31 +00008125
Guido van Rossum0a516c91994-09-12 10:58:40 +00008126# SO is the extension of shared libraries `(including the dot!)
Guido van Rossumaef734b2001-01-10 21:09:12 +00008127# -- usually .so, .sl on HP-UX, .dll on Cygwin
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008128{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SO" >&5
8129$as_echo_n "checking SO... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008130if test -z "$SO"
8131then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008132 case $ac_sys_system in
Neal Norwitz58e28882006-05-19 07:00:58 +00008133 hp*|HP*)
8134 case `uname -m` in
8135 ia64) SO=.so;;
8136 *) SO=.sl;;
8137 esac
8138 ;;
Guido van Rossumaef734b2001-01-10 21:09:12 +00008139 CYGWIN*) SO=.dll;;
Guido van Rossum563e7081996-09-10 18:20:48 +00008140 *) SO=.so;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008141 esac
Martin v. Löwis368de8f2003-06-14 14:46:38 +00008142else
8143 # this might also be a termcap variable, see #610332
8144 echo
8145 echo '====================================================================='
8146 echo '+ +'
8147 echo '+ WARNING: You have set SO in your environment. +'
8148 echo '+ Do you really mean to change the extension for shared libraries? +'
8149 echo '+ Continuing in 10 seconds to let you to ponder. +'
8150 echo '+ +'
8151 echo '====================================================================='
8152 sleep 10
Guido van Rossum0a516c91994-09-12 10:58:40 +00008153fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008154{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SO" >&5
8155$as_echo "$SO" >&6; }
Neal Norwitz58e28882006-05-19 07:00:58 +00008156
Ronald Oussoren79f90492009-01-02 10:44:46 +00008157
Neal Norwitz58e28882006-05-19 07:00:58 +00008158cat >>confdefs.h <<_ACEOF
8159#define SHLIB_EXT "$SO"
8160_ACEOF
8161
Guido van Rossum0a516c91994-09-12 10:58:40 +00008162# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +00008163# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008164# (Shared libraries in this instance are shared modules to be loaded into
8165# Python, as opposed to building Python itself as a shared library.)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008166{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDSHARED" >&5
8167$as_echo_n "checking LDSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008168if test -z "$LDSHARED"
8169then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008170 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008171 AIX*)
Georg Brandl71f4fbb2011-02-25 11:04:50 +00008172 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:\$(srcdir)/Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +00008173 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008174 ;;
8175 BeOS*)
8176 BLDSHARED="\$(srcdir)/Modules/ld_so_beos $LDLIBRARY"
Guido van Rossumce608b02001-09-28 15:59:38 +00008177 LDSHARED="\$(BINLIBDEST)/config/ld_so_beos \$(LIBDIR)/$LDLIBRARY"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008178 ;;
Guido van Rossum07397971997-04-29 21:49:50 +00008179 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00008180 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +00008181 SunOS/5*)
Ronald Oussoren75912852010-04-08 08:13:31 +00008182 if test "$GCC" = "yes" ; then
8183 LDSHARED='$(CC) -shared'
8184 LDCXXSHARED='$(CXX) -shared'
8185 else
8186 LDSHARED='$(CC) -G'
8187 LDCXXSHARED='$(CXX) -G'
Greg Ward57c9a662000-05-26 12:22:54 +00008188 fi ;;
Thomas Hellerdc96a772008-04-04 10:07:55 +00008189 hp*|HP*)
Ronald Oussoren75912852010-04-08 08:13:31 +00008190 if test "$GCC" = "yes" ; then
8191 LDSHARED='$(CC) -shared'
8192 LDCXXSHARED='$(CXX) -shared'
8193 else
8194 LDSHARED='ld -b'
Thomas Hellerdc96a772008-04-04 10:07:55 +00008195 fi ;;
Guido van Rossumda88dad1995-01-26 00:46:29 +00008196 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
Jack Jansen418c3b12001-11-14 10:59:57 +00008197 Darwin/1.3*)
Stefan Krah3a3e2032010-11-28 15:30:05 +00008198 LDSHARED='$(CC) -bundle'
8199 LDCXXSHARED='$(CXX) -bundle'
Jack Jansena3891ea2001-09-07 14:25:12 +00008200 if test "$enable_framework" ; then
8201 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00008202 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
8203 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Ronald Oussoren75912852010-04-08 08:13:31 +00008204 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00008205 else
8206 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00008207 LDSHARED="$LDSHARED -undefined suppress"
Ronald Oussoren75912852010-04-08 08:13:31 +00008208 LDCXXSHARED="$LDCXXSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00008209 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00008210 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Stefan Krah3a3e2032010-11-28 15:30:05 +00008211 LDSHARED='$(CC) -bundle'
8212 LDCXXSHARED='$(CXX) -bundle'
Jack Jansene578a632001-08-15 01:27:14 +00008213 if test "$enable_framework" ; then
8214 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00008215 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
8216 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Ronald Oussoren75912852010-04-08 08:13:31 +00008217 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00008218 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00008219 # No framework, use the Python app as bundle-loader
8220 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00008221 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Ronald Oussoren75912852010-04-08 08:13:31 +00008222 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008223 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00008224 Darwin/*)
8225 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
8226 # This allows an extension to be used in any Python
Ronald Oussoren38f1b982007-09-02 09:46:07 +00008227
Ned Deilyc40b9032014-06-25 13:48:46 -07008228 dep_target_major=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
8229 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
8230 dep_target_minor=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
8231 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
8232 if test ${dep_target_major} -eq 10 && \
8233 test ${dep_target_minor} -le 2
Jack Jansen6b08a402004-06-03 12:41:45 +00008234 then
Ned Deilyc40b9032014-06-25 13:48:46 -07008235 # building for OS X 10.0 through 10.2
Stefan Krah3a3e2032010-11-28 15:30:05 +00008236 LDSHARED='$(CC) -bundle'
8237 LDCXXSHARED='$(CXX) -bundle'
Jack Jansen6b08a402004-06-03 12:41:45 +00008238 if test "$enable_framework" ; then
8239 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00008240 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
8241 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Ronald Oussoren75912852010-04-08 08:13:31 +00008242 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +00008243 else
8244 # No framework, use the Python app as bundle-loader
8245 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
8246 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Ronald Oussoren75912852010-04-08 08:13:31 +00008247 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Jack Jansen6b08a402004-06-03 12:41:45 +00008248 fi
Ned Deilyc40b9032014-06-25 13:48:46 -07008249 else
8250 # building for OS X 10.3 and later
8251 if test "${enable_universalsdk}"; then
8252 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
8253 fi
8254 LDSHARED='$(CC) -bundle -undefined dynamic_lookup'
8255 LDCXXSHARED='$(CXX) -bundle -undefined dynamic_lookup'
8256 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +00008257 fi
8258 ;;
Ronald Oussoren75912852010-04-08 08:13:31 +00008259 Linux*|GNU*|QNX*)
8260 LDSHARED='$(CC) -shared'
8261 LDCXXSHARED='$(CXX) -shared';;
8262 BSD/OS*/4*)
8263 LDSHARED="gcc -shared"
8264 LDCXXSHARED="g++ -shared";;
Martin v. Löwis222c5152006-06-03 07:37:13 +00008265 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00008266 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00008267 then
Stefan Krah3a3e2032010-11-28 15:30:05 +00008268 LDSHARED='$(CC) -shared'
8269 LDCXXSHARED='$(CXX) -shared'
Guido van Rossum0286ae82000-08-29 15:06:49 +00008270 else
Stefan Krah3a3e2032010-11-28 15:30:05 +00008271 LDSHARED="ld -Bshareable"
Guido van Rossum0286ae82000-08-29 15:06:49 +00008272 fi;;
Martin v. Löwis222c5152006-06-03 07:37:13 +00008273 OpenBSD*)
8274 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
8275 then
Stefan Krah3a3e2032010-11-28 15:30:05 +00008276 LDSHARED='$(CC) -shared $(CCSHARED)'
8277 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Martin v. Löwis222c5152006-06-03 07:37:13 +00008278 else
8279 case `uname -r` in
8280 [01].* | 2.[0-7] | 2.[0-7].*)
8281 LDSHARED="ld -Bshareable ${LDFLAGS}"
8282 ;;
8283 *)
Stefan Krah3a3e2032010-11-28 15:30:05 +00008284 LDSHARED='$(CC) -shared $(CCSHARED)'
8285 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Martin v. Löwis222c5152006-06-03 07:37:13 +00008286 ;;
8287 esac
8288 fi;;
Ronald Oussoren75912852010-04-08 08:13:31 +00008289 NetBSD*|DragonFly*)
Antoine Pitroucb402772011-01-02 20:51:34 +00008290 LDSHARED='$(CC) -shared'
8291 LDCXXSHARED='$(CXX) -shared';;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00008292 OpenUNIX*|UnixWare*)
Ronald Oussoren75912852010-04-08 08:13:31 +00008293 if test "$GCC" = "yes" ; then
8294 LDSHARED='$(CC) -shared'
8295 LDCXXSHARED='$(CXX) -shared'
8296 else
8297 LDSHARED='$(CC) -G'
8298 LDCXXSHARED='$(CXX) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00008299 fi;;
Ronald Oussoren75912852010-04-08 08:13:31 +00008300 SCO_SV*)
8301 LDSHARED='$(CC) -Wl,-G,-Bexport'
8302 LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
8303 CYGWIN*)
8304 LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
8305 LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
8306 atheos*)
8307 LDSHARED="gcc -shared"
8308 LDCXXSHARED="g++ -shared";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008309 *) LDSHARED="ld";;
8310 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008311fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008312{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDSHARED" >&5
8313$as_echo "$LDSHARED" >&6; }
Ronald Oussoren75912852010-04-08 08:13:31 +00008314LDCXXSHARED=${LDCXXSHARED-$LDSHARED}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008315BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00008316# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008317# library (module) -- this is only needed for a few systems
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008318{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CCSHARED" >&5
8319$as_echo_n "checking CCSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008320if test -z "$CCSHARED"
8321then
Guido van Rossum07397971997-04-29 21:49:50 +00008322 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00008323 SunOS*) if test "$GCC" = yes;
Martin v. Löwiseb623572007-03-12 10:50:39 +00008324 then CCSHARED="-fPIC";
8325 elif test `uname -p` = sparc;
8326 then CCSHARED="-xcode=pic32";
8327 else CCSHARED="-Kpic";
8328 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00008329 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00008330 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00008331 else CCSHARED="+z";
8332 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008333 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00008334 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00008335 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00008336 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00008337 if test "$GCC" = "yes"
8338 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008339 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00008340 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00008341 SCO_SV*)
8342 if test "$GCC" = "yes"
8343 then CCSHARED="-fPIC"
8344 else CCSHARED="-Kpic -belf"
8345 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008346 IRIX*/6*) case $CC in
8347 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00008348 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008349 esac;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008350 atheos*) CCSHARED="-fPIC";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008351 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008352fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008353{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCSHARED" >&5
8354$as_echo "$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008355# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008356# the python executable -- this is only needed for a few systems
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008357{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKFORSHARED" >&5
8358$as_echo_n "checking LINKFORSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008359if test -z "$LINKFORSHARED"
8360then
Guido van Rossum07397971997-04-29 21:49:50 +00008361 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008362 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008363 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00008364 LINKFORSHARED="-Wl,-E -Wl,+s";;
8365# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00008366 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008367 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008368 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00008369 Darwin/*)
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00008370 # -u _PyMac_Error is needed to pull in the mac toolbox glue,
8371 # which is
Jack Jansene578a632001-08-15 01:27:14 +00008372 # not used by the core itself but which needs to be in the core so
8373 # that dynamically loaded extension modules have access to it.
Jack Jansen97e3f002003-02-23 22:59:01 +00008374 # -prebind is no longer used, because it actually seems to give a
8375 # slowdown in stead of a speedup, maybe due to the large number of
8376 # dynamic loads Python does.
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00008377
8378 LINKFORSHARED="$extra_undefs"
Jack Jansene578a632001-08-15 01:27:14 +00008379 if test "$enable_framework"
8380 then
Jack Jansenda49e192005-01-07 13:08:22 +00008381 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00008382 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00008383 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00008384 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00008385 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00008386 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00008387 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +00008388 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
8389 then
8390 LINKFORSHARED="-Wl,--export-dynamic"
8391 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008392 SunOS/5*) case $CC in
8393 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00008394 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00008395 then
8396 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008397 fi;;
8398 esac;;
Jason Tishler30765592003-09-04 11:04:06 +00008399 CYGWIN*)
8400 if test $enable_shared = "no"
8401 then
8402 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
8403 fi;;
Martin v. Löwis8c255e42008-05-23 15:06:50 +00008404 QNX*)
8405 # -Wl,-E causes the symbols to be added to the dynamic
8406 # symbol table so that they can be found when a module
8407 # is loaded. -N 2048K causes the stack size to be set
8408 # to 2048 kilobytes so that the stack doesn't overflow
8409 # when running test_compile.py.
8410 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008411 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008412fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008413{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKFORSHARED" >&5
8414$as_echo "$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008415
Michael W. Hudson54241132001-12-07 15:38:26 +00008416
Ronald Oussoren0d236eb2008-06-06 21:31:33 +00008417
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008418{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAGSFORSHARED" >&5
8419$as_echo_n "checking CFLAGSFORSHARED... " >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00008420if test ! "$LIBRARY" = "$LDLIBRARY"
8421then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00008422 case $ac_sys_system in
8423 CYGWIN*)
8424 # Cygwin needs CCSHARED when building extension DLLs
8425 # but not when building the interpreter DLL.
8426 CFLAGSFORSHARED='';;
8427 *)
8428 CFLAGSFORSHARED='$(CCSHARED)'
8429 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00008430fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008431{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CFLAGSFORSHARED" >&5
8432$as_echo "$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00008433
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008434# SHLIBS are libraries (except -lc and -lm) to link to the python shared
8435# library (with --enable-shared).
8436# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00008437# symbols, this must be set to $(LIBS) (expanded by make). We do this even
8438# if it is not required, since it creates a dependency of the shared library
8439# to LIBS. This, in turn, means that applications linking the shared libpython
8440# don't need to link LIBS explicitly. The default should be only changed
8441# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008442
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008443{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SHLIBS" >&5
8444$as_echo_n "checking SHLIBS... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008445case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008446 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00008447 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008448esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008449{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIBS" >&5
8450$as_echo "$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008451
8452
Guido van Rossum627b2d71993-12-24 10:39:16 +00008453# checks for libraries
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008454{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
8455$as_echo_n "checking for dlopen in -ldl... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008456if ${ac_cv_lib_dl_dlopen+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008457 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008458else
Martin v. Löwis11437992002-04-12 09:54:03 +00008459 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008460LIBS="-ldl $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008461cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008462/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008463
Martin v. Löwiseba40652007-08-30 20:10:57 +00008464/* Override any GCC internal prototype to avoid an error.
8465 Use char because int might match the return type of a GCC
8466 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008467#ifdef __cplusplus
8468extern "C"
8469#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008470char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008471int
8472main ()
8473{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008474return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008475 ;
8476 return 0;
8477}
8478_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008479if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008480 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008481else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008482 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008483fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008484rm -f core conftest.err conftest.$ac_objext \
8485 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008486LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00008487fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008488{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
8489$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008490if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008491 cat >>confdefs.h <<_ACEOF
8492#define HAVE_LIBDL 1
8493_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00008494
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008495 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00008496
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008497fi
8498 # Dynamic linking for SunOS/Solaris and SYSV
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008499{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
8500$as_echo_n "checking for shl_load in -ldld... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008501if ${ac_cv_lib_dld_shl_load+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008502 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008503else
Martin v. Löwis11437992002-04-12 09:54:03 +00008504 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008505LIBS="-ldld $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008506cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008507/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008508
Martin v. Löwiseba40652007-08-30 20:10:57 +00008509/* Override any GCC internal prototype to avoid an error.
8510 Use char because int might match the return type of a GCC
8511 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008512#ifdef __cplusplus
8513extern "C"
8514#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008515char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008516int
8517main ()
8518{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008519return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008520 ;
8521 return 0;
8522}
8523_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008524if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008525 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008526else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008527 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008528fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008529rm -f core conftest.err conftest.$ac_objext \
8530 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008531LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00008532fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008533{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
8534$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008535if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008536 cat >>confdefs.h <<_ACEOF
8537#define HAVE_LIBDLD 1
8538_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00008539
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008540 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008541
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008542fi
8543 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +00008544
Ronald Oussoren79f90492009-01-02 10:44:46 +00008545# only check for sem_init if thread support is requested
Martin v. Löwis519adae2003-09-20 10:47:47 +00008546if test "$with_threads" = "yes" -o -z "$with_threads"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008547 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
8548$as_echo_n "checking for library containing sem_init... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008549if ${ac_cv_search_sem_init+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008550 $as_echo_n "(cached) " >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00008551else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00008552 ac_func_search_save_LIBS=$LIBS
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008553cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008554/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008555
Martin v. Löwiseba40652007-08-30 20:10:57 +00008556/* Override any GCC internal prototype to avoid an error.
8557 Use char because int might match the return type of a GCC
8558 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008559#ifdef __cplusplus
8560extern "C"
8561#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008562char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008563int
8564main ()
8565{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008566return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008567 ;
8568 return 0;
8569}
8570_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00008571for ac_lib in '' pthread rt posix4; do
8572 if test -z "$ac_lib"; then
8573 ac_res="none required"
8574 else
8575 ac_res=-l$ac_lib
Skip Montanaro89e975f2007-08-22 19:05:21 +00008576 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Martin v. Löwiseba40652007-08-30 20:10:57 +00008577 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008578 if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00008579 ac_cv_search_sem_init=$ac_res
Brett Cannon19fab762007-06-02 03:02:29 +00008580fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008581rm -f core conftest.err conftest.$ac_objext \
8582 conftest$ac_exeext
Matthias Klose3cef2a92012-03-14 23:39:33 +01008583 if ${ac_cv_search_sem_init+:} false; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00008584 break
Skip Montanaro89e975f2007-08-22 19:05:21 +00008585fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008586done
Matthias Klose3cef2a92012-03-14 23:39:33 +01008587if ${ac_cv_search_sem_init+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008588
Martin v. Löwiseba40652007-08-30 20:10:57 +00008589else
8590 ac_cv_search_sem_init=no
8591fi
8592rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00008593LIBS=$ac_func_search_save_LIBS
8594fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008595{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
8596$as_echo "$ac_cv_search_sem_init" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008597ac_res=$ac_cv_search_sem_init
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008598if test "$ac_res" != no; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00008599 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00008600
Martin v. Löwis41933dd2002-03-21 15:10:58 +00008601fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +00008602 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +00008603 # posix4 on Solaris 2.6
8604 # pthread (first!) on Linux
8605fi
8606
Martin v. Löwis19d17342003-06-14 21:03:05 +00008607# check if we need libintl for locale functions
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008608{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for textdomain in -lintl" >&5
8609$as_echo_n "checking for textdomain in -lintl... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008610if ${ac_cv_lib_intl_textdomain+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008611 $as_echo_n "(cached) " >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +00008612else
8613 ac_check_lib_save_LIBS=$LIBS
8614LIBS="-lintl $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008615cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008616/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00008617
Martin v. Löwiseba40652007-08-30 20:10:57 +00008618/* Override any GCC internal prototype to avoid an error.
8619 Use char because int might match the return type of a GCC
8620 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00008621#ifdef __cplusplus
8622extern "C"
8623#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +00008624char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00008625int
8626main ()
8627{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008628return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00008629 ;
8630 return 0;
8631}
8632_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008633if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00008634 ac_cv_lib_intl_textdomain=yes
8635else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008636 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +00008637fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008638rm -f core conftest.err conftest.$ac_objext \
8639 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +00008640LIBS=$ac_check_lib_save_LIBS
8641fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008642{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_textdomain" >&5
8643$as_echo "$ac_cv_lib_intl_textdomain" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008644if test "x$ac_cv_lib_intl_textdomain" = xyes; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00008645
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008646$as_echo "#define WITH_LIBINTL 1" >>confdefs.h
Martin v. Löwis19d17342003-06-14 21:03:05 +00008647
8648fi
8649
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008650
8651# checks for system dependent C++ extensions support
8652case "$ac_sys_system" in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008653 AIX*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for genuine AIX C++ extensions support" >&5
8654$as_echo_n "checking for genuine AIX C++ extensions support... " >&6; }
8655 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008656/* end confdefs.h. */
Matthias Klosec511b472010-05-08 11:01:39 +00008657
Georg Brandl94800df2011-02-25 11:09:02 +00008658 #include <load.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008659int
8660main ()
8661{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008662loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00008663 ;
8664 return 0;
8665}
Matthias Klosec511b472010-05-08 11:01:39 +00008666
Martin v. Löwis11437992002-04-12 09:54:03 +00008667_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008668if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008669
Matthias Klosec511b472010-05-08 11:01:39 +00008670
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008671$as_echo "#define AIX_GENUINE_CPLUSPLUS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008672
Matthias Klosec511b472010-05-08 11:01:39 +00008673 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008674$as_echo "yes" >&6; }
Matthias Klosec511b472010-05-08 11:01:39 +00008675
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008676else
Matthias Klosec511b472010-05-08 11:01:39 +00008677
8678 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008679$as_echo "no" >&6; }
Matthias Klosec511b472010-05-08 11:01:39 +00008680
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008681fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008682rm -f core conftest.err conftest.$ac_objext \
8683 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008684 *) ;;
8685esac
8686
Guido van Rossum70c7f481998-03-26 18:44:10 +00008687# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008688# BeOS' sockets are stashed in libnet.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008689{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_open in -lnsl" >&5
8690$as_echo_n "checking for t_open in -lnsl... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008691if ${ac_cv_lib_nsl_t_open+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008692 $as_echo_n "(cached) " >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008693else
Martin v. Löwis11437992002-04-12 09:54:03 +00008694 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008695LIBS="-lnsl $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008696cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008697/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008698
Martin v. Löwiseba40652007-08-30 20:10:57 +00008699/* Override any GCC internal prototype to avoid an error.
8700 Use char because int might match the return type of a GCC
8701 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008702#ifdef __cplusplus
8703extern "C"
8704#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008705char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008706int
8707main ()
8708{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008709return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008710 ;
8711 return 0;
8712}
8713_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008714if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008715 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008716else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008717 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008718fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008719rm -f core conftest.err conftest.$ac_objext \
8720 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008721LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008722fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008723{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_t_open" >&5
8724$as_echo "$ac_cv_lib_nsl_t_open" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008725if test "x$ac_cv_lib_nsl_t_open" = xyes; then :
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008726 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008727fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00008728 # SVR4
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008729{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
8730$as_echo_n "checking for socket in -lsocket... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008731if ${ac_cv_lib_socket_socket+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008732 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008733else
Martin v. Löwis11437992002-04-12 09:54:03 +00008734 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008735LIBS="-lsocket $LIBS $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008736cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008737/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008738
Martin v. Löwiseba40652007-08-30 20:10:57 +00008739/* Override any GCC internal prototype to avoid an error.
8740 Use char because int might match the return type of a GCC
8741 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008742#ifdef __cplusplus
8743extern "C"
8744#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008745char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008746int
8747main ()
8748{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008749return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008750 ;
8751 return 0;
8752}
8753_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008754if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008755 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008756else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008757 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008758fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008759rm -f core conftest.err conftest.$ac_objext \
8760 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008761LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008762fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008763{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
8764$as_echo "$ac_cv_lib_socket_socket" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008765if test "x$ac_cv_lib_socket_socket" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +00008766 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +00008767fi
8768 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +00008769
Jeremy Hyltoncb25d5e2000-07-27 21:23:28 +00008770case "$ac_sys_system" in
8771BeOS*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008772{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lnet" >&5
8773$as_echo_n "checking for socket in -lnet... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008774if ${ac_cv_lib_net_socket+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008775 $as_echo_n "(cached) " >&6
Guido van Rossumad678af1998-10-02 14:42:15 +00008776else
Martin v. Löwis11437992002-04-12 09:54:03 +00008777 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +00008778LIBS="-lnet $LIBS $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008779cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008780/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008781
Martin v. Löwiseba40652007-08-30 20:10:57 +00008782/* Override any GCC internal prototype to avoid an error.
8783 Use char because int might match the return type of a GCC
8784 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008785#ifdef __cplusplus
8786extern "C"
8787#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008788char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008789int
8790main ()
8791{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008792return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008793 ;
8794 return 0;
8795}
8796_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008797if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008798 ac_cv_lib_net_socket=yes
Guido van Rossumad678af1998-10-02 14:42:15 +00008799else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008800 ac_cv_lib_net_socket=no
Guido van Rossumad678af1998-10-02 14:42:15 +00008801fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008802rm -f core conftest.err conftest.$ac_objext \
8803 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008804LIBS=$ac_check_lib_save_LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +00008805fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008806{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_net_socket" >&5
8807$as_echo "$ac_cv_lib_net_socket" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008808if test "x$ac_cv_lib_net_socket" = xyes; then :
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008809 LIBS="-lnet $LIBS"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008810fi
8811 # BeOS
8812;;
8813esac
Guido van Rossum70c7f481998-03-26 18:44:10 +00008814
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008815{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libs" >&5
8816$as_echo_n "checking for --with-libs... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008817
Martin v. Löwiseba40652007-08-30 20:10:57 +00008818# Check whether --with-libs was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008819if test "${with_libs+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00008820 withval=$with_libs;
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008821{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
8822$as_echo "$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +00008823LIBS="$withval $LIBS"
8824
8825else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008826 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8827$as_echo "no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008828fi
8829
Guido van Rossum7f43da71994-08-01 12:15:30 +00008830
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00008831if test -n "$ac_tool_prefix"; then
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008832 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
8833set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008834{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8835$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008836if ${ac_cv_path_PKG_CONFIG+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008837 $as_echo_n "(cached) " >&6
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008838else
8839 case $PKG_CONFIG in
8840 [\\/]* | ?:[\\/]*)
8841 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
8842 ;;
8843 *)
8844 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8845for as_dir in $PATH
8846do
8847 IFS=$as_save_IFS
8848 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008849 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01008850 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008851 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008852 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008853 break 2
8854 fi
8855done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008856 done
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008857IFS=$as_save_IFS
8858
8859 ;;
8860esac
8861fi
8862PKG_CONFIG=$ac_cv_path_PKG_CONFIG
8863if test -n "$PKG_CONFIG"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008864 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
8865$as_echo "$PKG_CONFIG" >&6; }
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008866else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008867 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8868$as_echo "no" >&6; }
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008869fi
8870
8871
8872fi
8873if test -z "$ac_cv_path_PKG_CONFIG"; then
8874 ac_pt_PKG_CONFIG=$PKG_CONFIG
8875 # Extract the first word of "pkg-config", so it can be a program name with args.
8876set dummy pkg-config; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008877{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8878$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008879if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008880 $as_echo_n "(cached) " >&6
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008881else
8882 case $ac_pt_PKG_CONFIG in
8883 [\\/]* | ?:[\\/]*)
8884 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
8885 ;;
8886 *)
8887 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8888for as_dir in $PATH
8889do
8890 IFS=$as_save_IFS
8891 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008892 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01008893 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008894 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008895 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008896 break 2
8897 fi
8898done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008899 done
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008900IFS=$as_save_IFS
8901
8902 ;;
8903esac
8904fi
8905ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
8906if test -n "$ac_pt_PKG_CONFIG"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008907 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
8908$as_echo "$ac_pt_PKG_CONFIG" >&6; }
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008909else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008910 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8911$as_echo "no" >&6; }
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008912fi
8913
8914 if test "x$ac_pt_PKG_CONFIG" = x; then
8915 PKG_CONFIG=""
8916 else
8917 case $cross_compiling:$ac_tool_warned in
8918yes:)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008919{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8920$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008921ac_tool_warned=yes ;;
8922esac
8923 PKG_CONFIG=$ac_pt_PKG_CONFIG
8924 fi
8925else
8926 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
8927fi
8928
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00008929
8930# Check for use of the system expat library
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008931{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-expat" >&5
8932$as_echo_n "checking for --with-system-expat... " >&6; }
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00008933
8934# Check whether --with-system_expat was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008935if test "${with_system_expat+set}" = set; then :
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00008936 withval=$with_system_expat;
Benjamin Petersonf2d1b2a2010-10-31 16:53:53 +00008937else
8938 with_system_expat="no"
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00008939fi
8940
8941
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008942{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_expat" >&5
8943$as_echo "$with_system_expat" >&6; }
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00008944
8945# Check for use of the system libffi library
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008946{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-ffi" >&5
8947$as_echo_n "checking for --with-system-ffi... " >&6; }
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00008948
8949# Check whether --with-system_ffi was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008950if test "${with_system_ffi+set}" = set; then :
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00008951 withval=$with_system_ffi;
Benjamin Petersonf2d1b2a2010-10-31 16:53:53 +00008952else
8953 with_system_ffi="no"
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00008954fi
8955
8956
8957if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008958 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
8959else
8960 LIBFFI_INCLUDEDIR=""
8961fi
8962
8963
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008964{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_ffi" >&5
8965$as_echo "$with_system_ffi" >&6; }
Martin v. Löwis9176fc12006-04-11 11:12:43 +00008966
Ned Deilya2a9f572013-10-25 00:30:10 -07008967# Check for --with-tcltk-includes=path and --with-tcltk-libs=path
8968
8969
8970{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-includes" >&5
8971$as_echo_n "checking for --with-tcltk-includes... " >&6; }
8972
8973# Check whether --with-tcltk-includes was given.
8974if test "${with_tcltk_includes+set}" = set; then :
8975 withval=$with_tcltk_includes;
8976else
8977 with_tcltk_includes="default"
8978fi
8979
8980{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_includes" >&5
8981$as_echo "$with_tcltk_includes" >&6; }
8982{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-libs" >&5
8983$as_echo_n "checking for --with-tcltk-libs... " >&6; }
8984
8985# Check whether --with-tcltk-libs was given.
8986if test "${with_tcltk_libs+set}" = set; then :
8987 withval=$with_tcltk_libs;
8988else
8989 with_tcltk_libs="default"
8990fi
8991
8992{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_libs" >&5
8993$as_echo "$with_tcltk_libs" >&6; }
8994if test "x$with_tcltk_includes" = xdefault || test "x$with_tcltk_libs" = xdefault
8995then
8996 if test "x$with_tcltk_includes" != "x$with_tcltk_libs"
8997 then
8998 as_fn_error $? "use both --with-tcltk-includes='...' and --with-tcltk-libs='...' or neither" "$LINENO" 5
8999 fi
9000 TCLTK_INCLUDES=""
9001 TCLTK_LIBS=""
9002else
9003 TCLTK_INCLUDES="$with_tcltk_includes"
9004 TCLTK_LIBS="$with_tcltk_libs"
9005fi
9006
Benjamin Peterson867475c2009-04-29 20:36:25 +00009007# Check for --with-dbmliborder
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009008{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dbmliborder" >&5
9009$as_echo_n "checking for --with-dbmliborder... " >&6; }
Benjamin Peterson867475c2009-04-29 20:36:25 +00009010
9011# Check whether --with-dbmliborder was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009012if test "${with_dbmliborder+set}" = set; then :
Benjamin Peterson867475c2009-04-29 20:36:25 +00009013 withval=$with_dbmliborder;
9014if test x$with_dbmliborder = xyes
9015then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00009016as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Benjamin Peterson867475c2009-04-29 20:36:25 +00009017else
9018 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
9019 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
9020 then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00009021 as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Benjamin Peterson867475c2009-04-29 20:36:25 +00009022 fi
9023 done
9024fi
9025fi
9026
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009027{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dbmliborder" >&5
9028$as_echo "$with_dbmliborder" >&6; }
Benjamin Peterson867475c2009-04-29 20:36:25 +00009029
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00009030# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009031
9032
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009033{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-signal-module" >&5
9034$as_echo_n "checking for --with-signal-module... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009035
Martin v. Löwiseba40652007-08-30 20:10:57 +00009036# Check whether --with-signal-module was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009037if test "${with_signal_module+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00009038 withval=$with_signal_module;
9039fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009040
9041
9042if test -z "$with_signal_module"
9043then with_signal_module="yes"
9044fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009045{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_signal_module" >&5
9046$as_echo "$with_signal_module" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009047
9048if test "${with_signal_module}" = "yes"; then
9049 USE_SIGNAL_MODULE=""
9050 SIGNAL_OBJS=""
9051else
9052 USE_SIGNAL_MODULE="#"
9053 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
9054fi
9055
Guido van Rossum3d15bd82001-01-10 18:53:48 +00009056# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +00009057
Barry Warsawc0d24d82000-06-29 16:12:00 +00009058USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +00009059
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009060{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dec-threads" >&5
9061$as_echo_n "checking for --with-dec-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009062
Guido van Rossumec2f0731997-01-22 20:54:01 +00009063
Martin v. Löwiseba40652007-08-30 20:10:57 +00009064# Check whether --with-dec-threads was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009065if test "${with_dec_threads+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00009066 withval=$with_dec_threads;
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009067{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9068$as_echo "$withval" >&6; }
Guido van Rossumec2f0731997-01-22 20:54:01 +00009069LDLAST=-threads
Guido van Rossumf78abae1997-01-21 22:02:36 +00009070if test "${with_thread+set}" != set; then
Guido van Rossumec2f0731997-01-22 20:54:01 +00009071 with_thread="$withval";
Guido van Rossumf78abae1997-01-21 22:02:36 +00009072fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00009073else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009074 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9075$as_echo "no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009076fi
9077
Martin v. Löwis11437992002-04-12 09:54:03 +00009078
9079# Templates for things AC_DEFINEd more than once.
9080# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +00009081
9082
Martin v. Löwis11437992002-04-12 09:54:03 +00009083
9084
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009085{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-threads" >&5
9086$as_echo_n "checking for --with-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009087
Martin v. Löwiseba40652007-08-30 20:10:57 +00009088# Check whether --with-threads was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009089if test "${with_threads+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00009090 withval=$with_threads;
9091fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00009092
9093
Barry Warsawc0d24d82000-06-29 16:12:00 +00009094# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +00009095
Martin v. Löwiseba40652007-08-30 20:10:57 +00009096# Check whether --with-thread was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009097if test "${with_thread+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00009098 withval=$with_thread; with_threads=$with_thread
9099fi
9100
Barry Warsawc0d24d82000-06-29 16:12:00 +00009101
9102if test -z "$with_threads"
9103then with_threads="yes"
9104fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009105{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_threads" >&5
9106$as_echo "$with_threads" >&6; }
Barry Warsawc0d24d82000-06-29 16:12:00 +00009107
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009108
Barry Warsawc0d24d82000-06-29 16:12:00 +00009109if test "$with_threads" = "no"
9110then
9111 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009112elif test "$ac_cv_pthread_is_default" = yes
9113then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009114 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009115
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009116 # Defining _REENTRANT on system with POSIX threads should not hurt.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009117 $as_echo "#define _REENTRANT 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009118
9119 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +00009120 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009121elif test "$ac_cv_kpthread" = "yes"
9122then
9123 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00009124 if test "$ac_cv_cxx_thread" = "yes"; then
9125 CXX="$CXX -Kpthread"
9126 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009127 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum2242f2f2001-04-11 20:58:20 +00009128
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009129 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009130 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00009131elif test "$ac_cv_kthread" = "yes"
9132then
9133 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00009134 if test "$ac_cv_cxx_thread" = "yes"; then
9135 CXX="$CXX -Kthread"
9136 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009137 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis5f433f02003-05-05 05:05:30 +00009138
9139 posix_threads=yes
9140 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009141elif test "$ac_cv_pthread" = "yes"
9142then
9143 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00009144 if test "$ac_cv_cxx_thread" = "yes"; then
9145 CXX="$CXX -pthread"
9146 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009147 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009148
9149 posix_threads=yes
9150 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009151else
9152 if test ! -z "$with_threads" -a -d "$with_threads"
9153 then LDFLAGS="$LDFLAGS -L$with_threads"
9154 fi
9155 if test ! -z "$withval" -a -d "$withval"
9156 then LDFLAGS="$LDFLAGS -L$withval"
9157 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009158
9159 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +00009160 # define _POSIX_THREADS in unistd.h. Some apparently don't
9161 # (e.g. gnu pth with pthread emulation)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009162 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _POSIX_THREADS in unistd.h" >&5
9163$as_echo_n "checking for _POSIX_THREADS in unistd.h... " >&6; }
9164 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009165/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +00009166
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009167#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +00009168#ifdef _POSIX_THREADS
9169yes
9170#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009171
9172_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009173if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009174 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009175 unistd_defines_pthreads=yes
9176else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009177 unistd_defines_pthreads=no
9178fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00009179rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009180
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009181 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $unistd_defines_pthreads" >&5
9182$as_echo "$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009183
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009184 $as_echo "#define _REENTRANT 1" >>confdefs.h
Guido van Rossum9caf77a1996-08-01 00:52:26 +00009185
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009186 ac_fn_c_check_header_mongrel "$LINENO" "cthreads.h" "ac_cv_header_cthreads_h" "$ac_includes_default"
Matthias Klose3cef2a92012-03-14 23:39:33 +01009187if test "x$ac_cv_header_cthreads_h" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009188 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +00009189
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009190 $as_echo "#define C_THREADS 1" >>confdefs.h
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009191
Martin v. Löwis11437992002-04-12 09:54:03 +00009192
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009193$as_echo "#define HURD_C_THREADS 1" >>confdefs.h
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009194
9195 LIBS="$LIBS -lthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009196 THREADOBJ="Python/thread.o"
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009197else
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009198
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009199 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 +01009200if test "x$ac_cv_header_mach_cthreads_h" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009201 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +00009202
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009203 $as_echo "#define C_THREADS 1" >>confdefs.h
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009204
Martin v. Löwis11437992002-04-12 09:54:03 +00009205
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009206$as_echo "#define MACH_C_THREADS 1" >>confdefs.h
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009207
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009208 THREADOBJ="Python/thread.o"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009209else
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009210
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009211 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pth" >&5
9212$as_echo_n "checking for --with-pth... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009213
Martin v. Löwiseba40652007-08-30 20:10:57 +00009214# Check whether --with-pth was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009215if test "${with_pth+set}" = set; then :
9216 withval=$with_pth; { $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9217$as_echo "$withval" >&6; }
9218 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009219
9220
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009221$as_echo "#define HAVE_PTH 1" >>confdefs.h
Guido van Rossum9e8181b2000-09-19 00:46:46 +00009222
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00009223 LIBS="-lpth $LIBS"
9224 THREADOBJ="Python/thread.o"
Guido van Rossum9e8181b2000-09-19 00:46:46 +00009225else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009226 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9227$as_echo "no" >&6; }
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009228
9229 # Just looking for pthread_create in libpthread is not enough:
9230 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
9231 # So we really have to include pthread.h, and then link.
9232 _libs=$LIBS
9233 LIBS="$LIBS -lpthread"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009234 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
9235$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
9236 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009237/* end confdefs.h. */
Stefan Krahae66ca62012-11-22 22:36:57 +01009238
9239#include <stdio.h>
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009240#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +00009241
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009242void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +00009243int
9244main ()
9245{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009246
9247pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +00009248 ;
9249 return 0;
9250}
9251_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009252if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009253
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009254 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9255$as_echo "yes" >&6; }
9256 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum02a1c402000-02-25 19:26:31 +00009257
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009258 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009259 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +00009260else
Martin v. Löwis11437992002-04-12 09:54:03 +00009261
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009262 LIBS=$_libs
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009263 ac_fn_c_check_func "$LINENO" "pthread_detach" "ac_cv_func_pthread_detach"
Matthias Klose3cef2a92012-03-14 23:39:33 +01009264if test "x$ac_cv_func_pthread_detach" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009265 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumad678af1998-10-02 14:42:15 +00009266
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009267 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009268 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +00009269else
Guido van Rossumad678af1998-10-02 14:42:15 +00009270
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009271 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 +01009272if test "x$ac_cv_header_atheos_threads_h" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009273 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009274
9275
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009276$as_echo "#define ATHEOS_THREADS 1" >>confdefs.h
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009277
9278 THREADOBJ="Python/thread.o"
9279else
9280
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009281 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 +01009282if test "x$ac_cv_header_kernel_OS_h" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009283 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009284
9285
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009286$as_echo "#define BEOS_THREADS 1" >>confdefs.h
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009287
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009288 THREADOBJ="Python/thread.o"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009289else
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009290
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009291 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5
9292$as_echo_n "checking for pthread_create in -lpthreads... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009293if ${ac_cv_lib_pthreads_pthread_create+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009294 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009295else
Martin v. Löwis11437992002-04-12 09:54:03 +00009296 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009297LIBS="-lpthreads $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009298cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009299/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009300
Martin v. Löwiseba40652007-08-30 20:10:57 +00009301/* Override any GCC internal prototype to avoid an error.
9302 Use char because int might match the return type of a GCC
9303 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009304#ifdef __cplusplus
9305extern "C"
9306#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009307char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009308int
9309main ()
9310{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009311return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009312 ;
9313 return 0;
9314}
9315_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009316if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009317 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +00009318else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009319 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +00009320fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009321rm -f core conftest.err conftest.$ac_objext \
9322 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009323LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00009324fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009325{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5
9326$as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009327if test "x$ac_cv_lib_pthreads_pthread_create" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009328 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Greg Steinadf63d62000-07-05 10:38:09 +00009329
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009330 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00009331 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009332 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +00009333else
Greg Steinadf63d62000-07-05 10:38:09 +00009334
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009335 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5
9336$as_echo_n "checking for pthread_create in -lc_r... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009337if ${ac_cv_lib_c_r_pthread_create+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009338 $as_echo_n "(cached) " >&6
Greg Steinadf63d62000-07-05 10:38:09 +00009339else
Martin v. Löwis11437992002-04-12 09:54:03 +00009340 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00009341LIBS="-lc_r $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009342cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009343/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009344
Martin v. Löwiseba40652007-08-30 20:10:57 +00009345/* Override any GCC internal prototype to avoid an error.
9346 Use char because int might match the return type of a GCC
9347 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009348#ifdef __cplusplus
9349extern "C"
9350#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009351char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009352int
9353main ()
9354{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009355return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009356 ;
9357 return 0;
9358}
9359_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009360if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009361 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +00009362else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009363 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +00009364fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009365rm -f core conftest.err conftest.$ac_objext \
9366 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009367LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +00009368fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009369{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5
9370$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009371if test "x$ac_cv_lib_c_r_pthread_create" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009372 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum49545951997-12-02 19:28:29 +00009373
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009374 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00009375 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009376 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +00009377else
Guido van Rossum07bd90e2000-05-08 13:41:38 +00009378
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009379 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_create_system in -lpthread" >&5
9380$as_echo_n "checking for __pthread_create_system in -lpthread... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009381if ${ac_cv_lib_pthread___pthread_create_system+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009382 $as_echo_n "(cached) " >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009383else
Martin v. Löwis11437992002-04-12 09:54:03 +00009384 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009385LIBS="-lpthread $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009386cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009387/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009388
Martin v. Löwiseba40652007-08-30 20:10:57 +00009389/* Override any GCC internal prototype to avoid an error.
9390 Use char because int might match the return type of a GCC
9391 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009392#ifdef __cplusplus
9393extern "C"
9394#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009395char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009396int
9397main ()
9398{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009399return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009400 ;
9401 return 0;
9402}
9403_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009404if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009405 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009406else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009407 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009408fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009409rm -f core conftest.err conftest.$ac_objext \
9410 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009411LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009412fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009413{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_create_system" >&5
9414$as_echo "$ac_cv_lib_pthread___pthread_create_system" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009415if test "x$ac_cv_lib_pthread___pthread_create_system" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009416 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009417
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009418 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00009419 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009420 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009421else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009422
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009423 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lcma" >&5
9424$as_echo_n "checking for pthread_create in -lcma... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009425if ${ac_cv_lib_cma_pthread_create+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009426 $as_echo_n "(cached) " >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +00009427else
Martin v. Löwis11437992002-04-12 09:54:03 +00009428 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00009429LIBS="-lcma $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009430cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009431/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009432
Martin v. Löwiseba40652007-08-30 20:10:57 +00009433/* Override any GCC internal prototype to avoid an error.
9434 Use char because int might match the return type of a GCC
9435 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009436#ifdef __cplusplus
9437extern "C"
9438#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009439char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009440int
9441main ()
9442{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009443return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009444 ;
9445 return 0;
9446}
9447_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009448if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009449 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +00009450else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009451 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +00009452fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009453rm -f core conftest.err conftest.$ac_objext \
9454 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009455LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00009456fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009457{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cma_pthread_create" >&5
9458$as_echo "$ac_cv_lib_cma_pthread_create" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009459if test "x$ac_cv_lib_cma_pthread_create" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009460 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumb93a8621998-05-07 13:27:32 +00009461
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009462 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00009463 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009464 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +00009465else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +00009466
Martin v. Löwis130fb172001-07-19 11:00:41 +00009467 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +00009468fi
9469
Guido van Rossum627b2d71993-12-24 10:39:16 +00009470
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009471fi
9472
Guido van Rossum0be3e491997-05-22 20:33:33 +00009473fi
9474
Guido van Rossum49545951997-12-02 19:28:29 +00009475fi
9476
Guido van Rossumb93a8621998-05-07 13:27:32 +00009477fi
9478
Guido van Rossum07bd90e2000-05-08 13:41:38 +00009479
Michael W. Hudson54241132001-12-07 15:38:26 +00009480fi
9481
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009482
9483fi
9484
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009485fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009486rm -f core conftest.err conftest.$ac_objext \
9487 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009488fi
9489
Martin v. Löwis11437992002-04-12 09:54:03 +00009490fi
9491
9492
9493fi
9494
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009495
Michael W. Hudson54241132001-12-07 15:38:26 +00009496
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009497 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usconfig in -lmpc" >&5
9498$as_echo_n "checking for usconfig in -lmpc... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009499if ${ac_cv_lib_mpc_usconfig+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009500 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009501else
Martin v. Löwis11437992002-04-12 09:54:03 +00009502 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009503LIBS="-lmpc $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009504cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009505/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009506
Martin v. Löwiseba40652007-08-30 20:10:57 +00009507/* Override any GCC internal prototype to avoid an error.
9508 Use char because int might match the return type of a GCC
9509 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009510#ifdef __cplusplus
9511extern "C"
9512#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009513char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009514int
9515main ()
9516{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009517return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009518 ;
9519 return 0;
9520}
9521_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009522if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009523 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009524else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009525 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009526fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009527rm -f core conftest.err conftest.$ac_objext \
9528 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009529LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009530fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009531{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpc_usconfig" >&5
9532$as_echo "$ac_cv_lib_mpc_usconfig" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009533if test "x$ac_cv_lib_mpc_usconfig" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009534 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00009535
Martin v. Löwis130fb172001-07-19 11:00:41 +00009536 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009537 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009538 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +00009539fi
9540
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00009541
Neal Norwitza978ab02002-11-02 16:58:05 +00009542 if test "$posix_threads" != "yes"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009543 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thr_create in -lthread" >&5
9544$as_echo_n "checking for thr_create in -lthread... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009545if ${ac_cv_lib_thread_thr_create+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009546 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009547else
Martin v. Löwis11437992002-04-12 09:54:03 +00009548 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009549LIBS="-lthread $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009550cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009551/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009552
Martin v. Löwiseba40652007-08-30 20:10:57 +00009553/* Override any GCC internal prototype to avoid an error.
9554 Use char because int might match the return type of a GCC
9555 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009556#ifdef __cplusplus
9557extern "C"
9558#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009559char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009560int
9561main ()
9562{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009563return thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009564 ;
9565 return 0;
9566}
9567_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009568if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009569 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009570else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009571 ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009572fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009573rm -f core conftest.err conftest.$ac_objext \
9574 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009575LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009576fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009577{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_thread_thr_create" >&5
9578$as_echo "$ac_cv_lib_thread_thr_create" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009579if test "x$ac_cv_lib_thread_thr_create" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009580 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00009581
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00009582 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009583 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00009584 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +00009585fi
9586
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00009587 fi
Michael W. Hudson54241132001-12-07 15:38:26 +00009588
Martin v. Löwis130fb172001-07-19 11:00:41 +00009589 if test "$USE_THREAD_MODULE" != "#"
9590 then
9591 # If the above checks didn't disable threads, (at least) OSF1
9592 # needs this '-threads' argument during linking.
9593 case $ac_sys_system in
9594 OSF1) LDLAST=-threads;;
9595 esac
Jeremy Hylton1a2ca862000-10-16 16:59:12 +00009596 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009597fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00009598
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009599if test "$posix_threads" = "yes"; then
9600 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00009601
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009602$as_echo "#define _POSIX_THREADS 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009603
9604 fi
9605
9606 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
9607 case $ac_sys_system/$ac_sys_release in
Charles-François Natali4929eb92011-07-21 19:41:04 +02009608 SunOS/5.6)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009609$as_echo "#define HAVE_PTHREAD_DESTRUCTOR 1" >>confdefs.h
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00009610
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009611 ;;
9612 SunOS/5.8)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009613$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009614
9615 ;;
Charles-François Natali4929eb92011-07-21 19:41:04 +02009616 AIX/*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009617$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Christian Heimescba36bb2008-01-30 22:54:18 +00009618
9619 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009620 esac
9621
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009622 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
9623$as_echo_n "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009624 if ${ac_cv_pthread_system_supported+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009625 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009626else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009627 if test "$cross_compiling" = yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009628 ac_cv_pthread_system_supported=no
9629else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009630 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009631/* end confdefs.h. */
Stefan Krahae66ca62012-11-22 22:36:57 +01009632
9633 #include <stdio.h>
9634 #include <pthread.h>
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009635 void *foo(void *parm) {
9636 return NULL;
9637 }
9638 main() {
9639 pthread_attr_t attr;
9640 pthread_t id;
9641 if (pthread_attr_init(&attr)) exit(-1);
9642 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
9643 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
9644 exit(0);
9645 }
9646_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009647if ac_fn_c_try_run "$LINENO"; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009648 ac_cv_pthread_system_supported=yes
9649else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009650 ac_cv_pthread_system_supported=no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009651fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009652rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9653 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009654fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00009655
Martin v. Löwiseba40652007-08-30 20:10:57 +00009656
Guido van Rossum627b2d71993-12-24 10:39:16 +00009657fi
9658
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009659 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_system_supported" >&5
9660$as_echo "$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009661 if test "$ac_cv_pthread_system_supported" = "yes"; then
9662
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009663$as_echo "#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009664
9665 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009666 for ac_func in pthread_sigmask
9667do :
9668 ac_fn_c_check_func "$LINENO" "pthread_sigmask" "ac_cv_func_pthread_sigmask"
Matthias Klose3cef2a92012-03-14 23:39:33 +01009669if test "x$ac_cv_func_pthread_sigmask" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009670 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009671#define HAVE_PTHREAD_SIGMASK 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009672_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +00009673 case $ac_sys_system in
9674 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009675
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009676$as_echo "#define HAVE_BROKEN_PTHREAD_SIGMASK 1" >>confdefs.h
Jason Tishlerfac083d2003-07-22 15:20:49 +00009677
9678 ;;
9679 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009680fi
9681done
9682
Christian Heimes0d604cf2013-08-21 13:26:05 +02009683 for ac_func in pthread_atfork
9684do :
9685 ac_fn_c_check_func "$LINENO" "pthread_atfork" "ac_cv_func_pthread_atfork"
9686if test "x$ac_cv_func_pthread_atfork" = xyes; then :
9687 cat >>confdefs.h <<_ACEOF
9688#define HAVE_PTHREAD_ATFORK 1
9689_ACEOF
9690
9691fi
9692done
9693
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009694fi
9695
9696
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009697# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +00009698
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009699{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if --enable-ipv6 is specified" >&5
9700$as_echo_n "checking if --enable-ipv6 is specified... " >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009701# Check whether --enable-ipv6 was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009702if test "${enable_ipv6+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00009703 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009704 no)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009705 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9706$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009707 ipv6=no
9708 ;;
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009709 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9710$as_echo "yes" >&6; }
9711 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009712
9713 ipv6=yes
9714 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009715 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009716else
Martin v. Löwis11437992002-04-12 09:54:03 +00009717
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009718 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009719/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009720 /* AF_INET6 available check */
9721#include <sys/types.h>
9722#include <sys/socket.h>
Charles-François Natalibe2b9072013-01-08 19:47:00 +01009723int
9724main ()
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009725{
Charles-François Natalibe2b9072013-01-08 19:47:00 +01009726int domain = AF_INET6;
9727 ;
9728 return 0;
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009729}
Martin v. Löwis11437992002-04-12 09:54:03 +00009730_ACEOF
Charles-François Natalibe2b9072013-01-08 19:47:00 +01009731if ac_fn_c_try_compile "$LINENO"; then :
Matthias Klosec511b472010-05-08 11:01:39 +00009732
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009733 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9734$as_echo "yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009735 ipv6=yes
Matthias Klosec511b472010-05-08 11:01:39 +00009736
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009737else
Matthias Klosec511b472010-05-08 11:01:39 +00009738
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009739 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9740$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009741 ipv6=no
Matthias Klosec511b472010-05-08 11:01:39 +00009742
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009743fi
Charles-François Natalibe2b9072013-01-08 19:47:00 +01009744rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009745
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009746if test "$ipv6" = "yes"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009747 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RFC2553 API is available" >&5
9748$as_echo_n "checking if RFC2553 API is available... " >&6; }
9749 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009750/* end confdefs.h. */
Matthias Klosec511b472010-05-08 11:01:39 +00009751
9752 #include <sys/types.h>
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009753#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009754int
9755main ()
9756{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009757struct sockaddr_in6 x;
Matthias Klosec511b472010-05-08 11:01:39 +00009758 x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +00009759 ;
9760 return 0;
9761}
Matthias Klosec511b472010-05-08 11:01:39 +00009762
Martin v. Löwis11437992002-04-12 09:54:03 +00009763_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009764if ac_fn_c_try_compile "$LINENO"; then :
Matthias Klosec511b472010-05-08 11:01:39 +00009765
9766 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009767$as_echo "yes" >&6; }
Matthias Klosec511b472010-05-08 11:01:39 +00009768 ipv6=yes
9769
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009770else
Matthias Klosec511b472010-05-08 11:01:39 +00009771
9772 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009773$as_echo "no" >&6; }
Matthias Klosec511b472010-05-08 11:01:39 +00009774 ipv6=no
9775
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009776fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009777rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009778fi
9779
9780if test "$ipv6" = "yes"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009781 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009782
9783fi
9784
Martin v. Löwiseba40652007-08-30 20:10:57 +00009785fi
9786
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009787
9788ipv6type=unknown
9789ipv6lib=none
9790ipv6trylibc=no
9791
9792if test "$ipv6" = "yes"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009793 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5
9794$as_echo_n "checking ipv6 stack type... " >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +00009795 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
9796 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009797 case $i in
9798 inria)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009799 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009800/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009801
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009802#include <netinet/in.h>
9803#ifdef IPV6_INRIA_VERSION
9804yes
9805#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009806_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009807if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009808 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00009809 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009810fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00009811rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009812
9813 ;;
9814 kame)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009815 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009816/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009817
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009818#include <netinet/in.h>
9819#ifdef __KAME__
9820yes
9821#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009822_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009823if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009824 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009825 ipv6type=$i;
9826 ipv6lib=inet6
9827 ipv6libdir=/usr/local/v6/lib
9828 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009829fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00009830rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009831
9832 ;;
9833 linux-glibc)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009834 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009835/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009836
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009837#include <features.h>
9838#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
9839yes
9840#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009841_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009842if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009843 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009844 ipv6type=$i;
9845 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009846fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00009847rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009848
9849 ;;
9850 linux-inet6)
9851 if test -d /usr/inet6; then
9852 ipv6type=$i
9853 ipv6lib=inet6
9854 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +00009855 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009856 fi
9857 ;;
9858 solaris)
9859 if test -f /etc/netconfig; then
Antoine Pitrou31e85952011-01-03 18:57:14 +00009860 if $GREP -q tcp6 /etc/netconfig; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009861 ipv6type=$i
9862 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009863 fi
9864 fi
9865 ;;
9866 toshiba)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009867 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009868/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009869
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009870#include <sys/param.h>
9871#ifdef _TOSHIBA_INET6
9872yes
9873#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009874_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009875if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009876 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009877 ipv6type=$i;
9878 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00009879 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009880fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00009881rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009882
9883 ;;
9884 v6d)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009885 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009886/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009887
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009888#include </usr/local/v6/include/sys/v6config.h>
9889#ifdef __V6D__
9890yes
9891#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009892_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009893if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009894 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009895 ipv6type=$i;
9896 ipv6lib=v6;
9897 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +00009898 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009899fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00009900rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009901
9902 ;;
9903 zeta)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009904 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009905/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009906
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009907#include <sys/param.h>
9908#ifdef _ZETA_MINAMI_INET6
9909yes
9910#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009911_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009912if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009913 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009914 ipv6type=$i;
9915 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00009916 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009917fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00009918rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009919
9920 ;;
9921 esac
9922 if test "$ipv6type" != "unknown"; then
9923 break
9924 fi
9925 done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009926 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5
9927$as_echo "$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009928fi
9929
9930if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
9931 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
9932 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
9933 echo "using lib$ipv6lib"
9934 else
9935 if test $ipv6trylibc = "yes"; then
9936 echo "using libc"
9937 else
9938 echo 'Fatal: no $ipv6lib library found. cannot continue.'
9939 echo "You need to fetch lib$ipv6lib.a from appropriate"
9940 echo 'ipv6 kit and compile beforehand.'
9941 exit 1
9942 fi
9943 fi
9944fi
9945
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009946{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for OSX 10.5 SDK or later" >&5
9947$as_echo_n "checking for OSX 10.5 SDK or later... " >&6; }
9948cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren0d236eb2008-06-06 21:31:33 +00009949/* end confdefs.h. */
Matthias Klosec511b472010-05-08 11:01:39 +00009950
9951 #include <Carbon/Carbon.h>
Ronald Oussoren0d236eb2008-06-06 21:31:33 +00009952int
9953main ()
9954{
9955FSIORefNum fRef = 0
9956 ;
9957 return 0;
9958}
Mark Dickinson0712b562010-05-08 19:13:21 +00009959
Ronald Oussoren0d236eb2008-06-06 21:31:33 +00009960_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009961if ac_fn_c_try_compile "$LINENO"; then :
Matthias Klosec511b472010-05-08 11:01:39 +00009962
Ronald Oussoren0d236eb2008-06-06 21:31:33 +00009963
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009964$as_echo "#define HAVE_OSX105_SDK 1" >>confdefs.h
Ronald Oussoren0d236eb2008-06-06 21:31:33 +00009965
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009966 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9967$as_echo "yes" >&6; }
Ronald Oussoren0d236eb2008-06-06 21:31:33 +00009968
Mark Dickinson0712b562010-05-08 19:13:21 +00009969else
9970
9971 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9972$as_echo "no" >&6; }
9973
Ronald Oussoren0d236eb2008-06-06 21:31:33 +00009974fi
Ronald Oussoren0d236eb2008-06-06 21:31:33 +00009975rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9976
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009977# Check for --with-doc-strings
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009978{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-doc-strings" >&5
9979$as_echo_n "checking for --with-doc-strings... " >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009980
Martin v. Löwiseba40652007-08-30 20:10:57 +00009981# Check whether --with-doc-strings was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009982if test "${with_doc_strings+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00009983 withval=$with_doc_strings;
9984fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009985
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009986
9987if test -z "$with_doc_strings"
9988then with_doc_strings="yes"
9989fi
9990if test "$with_doc_strings" != "no"
9991then
9992
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009993$as_echo "#define WITH_DOC_STRINGS 1" >>confdefs.h
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009994
9995fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009996{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_doc_strings" >&5
9997$as_echo "$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009998
Neil Schemenauera35c6882001-02-27 04:45:05 +00009999# Check for Python-specific malloc support
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010000{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tsc" >&5
10001$as_echo_n "checking for --with-tsc... " >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010002
Martin v. Löwiseba40652007-08-30 20:10:57 +000010003# Check whether --with-tsc was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010004if test "${with_tsc+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +000010005 withval=$with_tsc;
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010006if test "$withval" != no
10007then
10008
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010009$as_echo "#define WITH_TSC 1" >>confdefs.h
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010010
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010011 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10012$as_echo "yes" >&6; }
10013else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10014$as_echo "no" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010015fi
10016else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010017 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10018$as_echo "no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000010019fi
10020
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010021
10022# Check for Python-specific malloc support
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010023{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pymalloc" >&5
10024$as_echo_n "checking for --with-pymalloc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010025
Martin v. Löwiseba40652007-08-30 20:10:57 +000010026# Check whether --with-pymalloc was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010027if test "${with_pymalloc+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +000010028 withval=$with_pymalloc;
10029fi
Michael W. Hudson54241132001-12-07 15:38:26 +000010030
Neil Schemenauera35c6882001-02-27 04:45:05 +000010031
Neil Schemenauer16c22972002-03-22 15:34:49 +000010032if test -z "$with_pymalloc"
10033then with_pymalloc="yes"
10034fi
10035if test "$with_pymalloc" != "no"
10036then
Martin v. Löwis11437992002-04-12 09:54:03 +000010037
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010038$as_echo "#define WITH_PYMALLOC 1" >>confdefs.h
Neil Schemenauer16c22972002-03-22 15:34:49 +000010039
10040fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010041{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pymalloc" >&5
10042$as_echo "$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +000010043
Benjamin Peterson91c12eb2009-12-03 02:52:39 +000010044# Check for Valgrind support
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010045{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-valgrind" >&5
10046$as_echo_n "checking for --with-valgrind... " >&6; }
Benjamin Peterson91c12eb2009-12-03 02:52:39 +000010047
10048# Check whether --with-valgrind was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010049if test "${with_valgrind+set}" = set; then :
Benjamin Peterson91c12eb2009-12-03 02:52:39 +000010050 withval=$with_valgrind;
10051else
10052 with_valgrind=no
10053fi
10054
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010055{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_valgrind" >&5
10056$as_echo "$with_valgrind" >&6; }
Benjamin Peterson91c12eb2009-12-03 02:52:39 +000010057if test "$with_valgrind" != no; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010058 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 +010010059if test "x$ac_cv_header_valgrind_valgrind_h" = xyes; then :
Benjamin Peterson91c12eb2009-12-03 02:52:39 +000010060
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010061$as_echo "#define WITH_VALGRIND 1" >>confdefs.h
Benjamin Peterson91c12eb2009-12-03 02:52:39 +000010062
10063else
Georg Brandl71f4fbb2011-02-25 11:04:50 +000010064 as_fn_error $? "Valgrind support requested but headers not available" "$LINENO" 5
Benjamin Peterson91c12eb2009-12-03 02:52:39 +000010065
10066fi
10067
10068
10069fi
10070
Barry Warsawef82cd72000-06-30 16:21:01 +000010071# Check for --with-wctype-functions
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010072{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-wctype-functions" >&5
10073$as_echo_n "checking for --with-wctype-functions... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010074
Martin v. Löwiseba40652007-08-30 20:10:57 +000010075# Check whether --with-wctype-functions was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010076if test "${with_wctype_functions+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +000010077 withval=$with_wctype_functions;
Barry Warsawef82cd72000-06-30 16:21:01 +000010078if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000010079then
10080
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010081$as_echo "#define WANT_WCTYPE_FUNCTIONS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000010082
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010083 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10084$as_echo "yes" >&6; }
10085else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10086$as_echo "no" >&6; }
Barry Warsawef82cd72000-06-30 16:21:01 +000010087fi
10088else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010089 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10090$as_echo "no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000010091fi
10092
Barry Warsawef82cd72000-06-30 16:21:01 +000010093
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010094# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000010095
Guido van Rossum98935bf2001-09-05 19:13:16 +000010096DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000010097
Guido van Rossume97ee181999-12-20 21:27:22 +000010098# the dlopen() function means we might want to use dynload_shlib.o. some
10099# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +000010100for ac_func in dlopen
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010101do :
10102 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
Matthias Klose3cef2a92012-03-14 23:39:33 +010010103if test "x$ac_cv_func_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010104 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010105#define HAVE_DLOPEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010106_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000010107
Guido van Rossume97ee181999-12-20 21:27:22 +000010108fi
Thomas Wouters3a584202000-08-05 23:28:51 +000010109done
Guido van Rossume97ee181999-12-20 21:27:22 +000010110
Michael W. Hudson54241132001-12-07 15:38:26 +000010111
Guido van Rossume97ee181999-12-20 21:27:22 +000010112# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
10113# loading of modules.
10114
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010115{ $as_echo "$as_me:${as_lineno-$LINENO}: checking DYNLOADFILE" >&5
10116$as_echo_n "checking DYNLOADFILE... " >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000010117if test -z "$DYNLOADFILE"
10118then
10119 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000010120 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
10121 if test "$ac_cv_func_dlopen" = yes
10122 then DYNLOADFILE="dynload_shlib.o"
10123 else DYNLOADFILE="dynload_aix.o"
10124 fi
10125 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000010126 BeOS*) DYNLOADFILE="dynload_beos.o";;
10127 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Anthony Baxter82201742006-04-09 15:07:40 +000010128 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
10129 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010130 atheos*) DYNLOADFILE="dynload_atheos.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000010131 *)
10132 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
10133 # out any dynamic loading
10134 if test "$ac_cv_func_dlopen" = yes
10135 then DYNLOADFILE="dynload_shlib.o"
10136 else DYNLOADFILE="dynload_stub.o"
10137 fi
10138 ;;
10139 esac
10140fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010141{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DYNLOADFILE" >&5
10142$as_echo "$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000010143if test "$DYNLOADFILE" != "dynload_stub.o"
10144then
Martin v. Löwis11437992002-04-12 09:54:03 +000010145
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010146$as_echo "#define HAVE_DYNAMIC_LOADING 1" >>confdefs.h
Guido van Rossume97ee181999-12-20 21:27:22 +000010147
10148fi
10149
Neil Schemenauer4e425612001-06-19 15:44:15 +000010150# MACHDEP_OBJS can be set to platform-specific object files needed by Python
10151
Michael W. Hudson54241132001-12-07 15:38:26 +000010152
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010153{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP_OBJS" >&5
10154$as_echo_n "checking MACHDEP_OBJS... " >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000010155if test -z "$MACHDEP_OBJS"
10156then
Jack Jansene578a632001-08-15 01:27:14 +000010157 MACHDEP_OBJS=$extra_machdep_objs
10158else
10159 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000010160fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010161{ $as_echo "$as_me:${as_lineno-$LINENO}: result: MACHDEP_OBJS" >&5
10162$as_echo "MACHDEP_OBJS" >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000010163
Guido van Rossum627b2d71993-12-24 10:39:16 +000010164# checks for library functions
Martin v. Löwisaef18b12008-03-24 13:31:16 +000010165for ac_func in alarm setitimer getitimer bind_textdomain_codeset chown \
10166 clock confstr ctermid execv fchmod fchown fork fpathconf ftime ftruncate \
Martin v. Löwis438b5342002-12-27 10:16:42 +000010167 gai_strerror getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwis50ea4562009-11-27 13:56:01 +000010168 getpriority getresuid getresgid getpwent getspnam getspent getsid getwd \
Benjamin Petersond16e01c2014-02-04 10:20:26 -050010169 initgroups kill killpg lchmod lchown lstat mkfifo mknod mktime mmap \
Martin v. Löwisa5f09072002-10-11 05:37:59 +000010170 mremap nice pathconf pause plock poll pthread_init \
Guido van Rossum162e38c2003-02-19 15:25:10 +000010171 putenv readlink realpath \
Jesse Noller355b1262009-04-02 00:03:28 +000010172 select sem_open sem_timedwait sem_getvalue sem_unlink setegid seteuid \
10173 setgid \
Martin v. Löwis4daacb12003-03-28 18:37:01 +000010174 setlocale setregid setreuid setsid setpgid setpgrp setuid setvbuf snprintf \
Martin v. Löwis50ea4562009-11-27 13:56:01 +000010175 setlocale setregid setreuid setresuid setresgid \
10176 setsid setpgid setpgrp setuid setvbuf snprintf \
Skip Montanaro7e11a012004-02-07 12:55:46 +000010177 sigaction siginterrupt sigrelse strftime \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000010178 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Neal Norwitz05a45592006-03-20 06:30:08 +000010179 truncate uname unsetenv utimes waitpid wait3 wait4 wcscoll _getpty
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010180do :
10181 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10182ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Georg Brandl71f4fbb2011-02-25 11:04:50 +000010183if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010184 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010185#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010186_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000010187
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010188fi
10189done
10190
Michael W. Hudson54241132001-12-07 15:38:26 +000010191
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010192# For some functions, having a definition is not sufficient, since
10193# we want to take their address.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010194{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chroot" >&5
10195$as_echo_n "checking for chroot... " >&6; }
10196cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010197/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010198#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010199int
10200main ()
10201{
10202void *x=chroot
10203 ;
10204 return 0;
10205}
10206_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010207if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010208
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010209$as_echo "#define HAVE_CHROOT 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010210
Matthias Klosec511b472010-05-08 11:01:39 +000010211 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010212$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010213else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010214 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10215$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010216
10217fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010218rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010219{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for link" >&5
10220$as_echo_n "checking for link... " >&6; }
10221cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010222/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010223#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010224int
10225main ()
10226{
10227void *x=link
10228 ;
10229 return 0;
10230}
10231_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010232if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010233
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010234$as_echo "#define HAVE_LINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010235
Matthias Klosec511b472010-05-08 11:01:39 +000010236 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010237$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010238else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010239 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10240$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010241
10242fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010243rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010244{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for symlink" >&5
10245$as_echo_n "checking for symlink... " >&6; }
10246cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010247/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010248#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010249int
10250main ()
10251{
10252void *x=symlink
10253 ;
10254 return 0;
10255}
10256_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010257if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010258
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010259$as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010260
Matthias Klosec511b472010-05-08 11:01:39 +000010261 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010262$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010263else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010264 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10265$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010266
10267fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010268rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010269{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fchdir" >&5
10270$as_echo_n "checking for fchdir... " >&6; }
10271cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010272/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010273#include <unistd.h>
10274int
10275main ()
10276{
10277void *x=fchdir
10278 ;
10279 return 0;
10280}
10281_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010282if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010283
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010284$as_echo "#define HAVE_FCHDIR 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010285
Matthias Klosec511b472010-05-08 11:01:39 +000010286 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010287$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010288else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010289 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10290$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010291
10292fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010293rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010294{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fsync" >&5
10295$as_echo_n "checking for fsync... " >&6; }
10296cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010297/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010298#include <unistd.h>
10299int
10300main ()
10301{
10302void *x=fsync
10303 ;
10304 return 0;
10305}
10306_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010307if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010308
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010309$as_echo "#define HAVE_FSYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010310
Matthias Klosec511b472010-05-08 11:01:39 +000010311 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010312$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010313else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010314 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10315$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010316
10317fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010318rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010319{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fdatasync" >&5
10320$as_echo_n "checking for fdatasync... " >&6; }
10321cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010322/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010323#include <unistd.h>
10324int
10325main ()
10326{
10327void *x=fdatasync
10328 ;
10329 return 0;
10330}
10331_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010332if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010333
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010334$as_echo "#define HAVE_FDATASYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010335
Matthias Klosec511b472010-05-08 11:01:39 +000010336 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010337$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010338else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010339 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10340$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010341
10342fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010343rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010344{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll" >&5
10345$as_echo_n "checking for epoll... " >&6; }
10346cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000010347/* end confdefs.h. */
10348#include <sys/epoll.h>
10349int
10350main ()
10351{
10352void *x=epoll_create
10353 ;
10354 return 0;
10355}
10356_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010357if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010358
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010359$as_echo "#define HAVE_EPOLL 1" >>confdefs.h
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000010360
Matthias Klosec511b472010-05-08 11:01:39 +000010361 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010362$as_echo "yes" >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000010363else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010364 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10365$as_echo "no" >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000010366
10367fi
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000010368rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010369{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kqueue" >&5
10370$as_echo_n "checking for kqueue... " >&6; }
10371cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000010372/* end confdefs.h. */
10373
10374#include <sys/types.h>
10375#include <sys/event.h>
10376
10377int
10378main ()
10379{
10380int x=kqueue()
10381 ;
10382 return 0;
10383}
10384_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010385if ac_fn_c_try_compile "$LINENO"; then :
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000010386
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010387$as_echo "#define HAVE_KQUEUE 1" >>confdefs.h
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000010388
Matthias Klosec511b472010-05-08 11:01:39 +000010389 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010390$as_echo "yes" >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000010391else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010392 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10393$as_echo "no" >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000010394
10395fi
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000010396rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000010397# On some systems (eg. FreeBSD 5), we would find a definition of the
10398# functions ctermid_r, setgroups in the library, but no prototype
10399# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
10400# address to avoid compiler warnings and potential miscompilations
10401# because of the missing prototypes.
10402
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010403{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ctermid_r" >&5
10404$as_echo_n "checking for ctermid_r... " >&6; }
10405cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010406/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000010407
Martin v. Löwisd5843682002-11-21 20:41:28 +000010408#include <stdio.h>
10409
Martin v. Löwisd5843682002-11-21 20:41:28 +000010410int
10411main ()
10412{
10413void* p = ctermid_r
10414 ;
10415 return 0;
10416}
10417_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010418if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000010419
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010420$as_echo "#define HAVE_CTERMID_R 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000010421
Matthias Klosec511b472010-05-08 11:01:39 +000010422 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010423$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010424else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010425 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10426$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010427
10428fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010429rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10430
Antoine Pitroub170f172010-09-10 18:47:36 +000010431{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock declaration" >&5
10432$as_echo_n "checking for flock declaration... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010433if ${ac_cv_flock_decl+:} false; then :
Antoine Pitroub170f172010-09-10 18:47:36 +000010434 $as_echo_n "(cached) " >&6
10435else
10436 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010437/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010438#include <sys/file.h>
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010439int
10440main ()
10441{
10442void* p = flock
Antoine Pitroub170f172010-09-10 18:47:36 +000010443
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010444 ;
10445 return 0;
10446}
10447_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010448if ac_fn_c_try_compile "$LINENO"; then :
Antoine Pitroub170f172010-09-10 18:47:36 +000010449 ac_cv_flock_decl=yes
10450else
10451 ac_cv_flock_decl=no
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010452
10453fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010454rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitrou85729812010-09-07 14:55:24 +000010455
Antoine Pitroub170f172010-09-10 18:47:36 +000010456fi
10457{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_flock_decl" >&5
10458$as_echo "$ac_cv_flock_decl" >&6; }
10459if test "x${ac_cv_flock_decl}" = xyes; then
10460 for ac_func in flock
10461do :
10462 ac_fn_c_check_func "$LINENO" "flock" "ac_cv_func_flock"
Matthias Klose3cef2a92012-03-14 23:39:33 +010010463if test "x$ac_cv_func_flock" = xyes; then :
Antoine Pitroub170f172010-09-10 18:47:36 +000010464 cat >>confdefs.h <<_ACEOF
10465#define HAVE_FLOCK 1
Antoine Pitrou85729812010-09-07 14:55:24 +000010466_ACEOF
Antoine Pitroub170f172010-09-10 18:47:36 +000010467
Antoine Pitrou85729812010-09-07 14:55:24 +000010468else
Antoine Pitroub170f172010-09-10 18:47:36 +000010469 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock in -lbsd" >&5
Antoine Pitrou85729812010-09-07 14:55:24 +000010470$as_echo_n "checking for flock in -lbsd... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010471if ${ac_cv_lib_bsd_flock+:} false; then :
Antoine Pitrou85729812010-09-07 14:55:24 +000010472 $as_echo_n "(cached) " >&6
10473else
10474 ac_check_lib_save_LIBS=$LIBS
10475LIBS="-lbsd $LIBS"
10476cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10477/* end confdefs.h. */
10478
10479/* Override any GCC internal prototype to avoid an error.
10480 Use char because int might match the return type of a GCC
10481 builtin and then its argument prototype would still apply. */
10482#ifdef __cplusplus
10483extern "C"
10484#endif
10485char flock ();
10486int
10487main ()
10488{
10489return flock ();
10490 ;
10491 return 0;
10492}
10493_ACEOF
10494if ac_fn_c_try_link "$LINENO"; then :
10495 ac_cv_lib_bsd_flock=yes
10496else
10497 ac_cv_lib_bsd_flock=no
10498fi
10499rm -f core conftest.err conftest.$ac_objext \
10500 conftest$ac_exeext conftest.$ac_ext
10501LIBS=$ac_check_lib_save_LIBS
10502fi
10503{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_flock" >&5
10504$as_echo "$ac_cv_lib_bsd_flock" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010505if test "x$ac_cv_lib_bsd_flock" = xyes; then :
Antoine Pitroub170f172010-09-10 18:47:36 +000010506 $as_echo "#define HAVE_FLOCK 1" >>confdefs.h
Antoine Pitrou85729812010-09-07 14:55:24 +000010507
10508
10509$as_echo "#define FLOCK_NEEDS_LIBBSD 1" >>confdefs.h
10510
10511
10512fi
10513
10514
10515fi
Antoine Pitroub170f172010-09-10 18:47:36 +000010516done
10517
Antoine Pitrou85729812010-09-07 14:55:24 +000010518fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010519
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010520{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
10521$as_echo_n "checking for getpagesize... " >&6; }
10522cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010523/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010524
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010525#include <unistd.h>
10526
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010527int
10528main ()
10529{
10530void* p = getpagesize
10531 ;
10532 return 0;
10533}
10534_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010535if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010536
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010537$as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010538
Matthias Klosec511b472010-05-08 11:01:39 +000010539 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010540$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010541else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010542 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10543$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010544
10545fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010546rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010547
Charles-François Natali93a11752011-11-27 13:01:35 +010010548{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken unsetenv" >&5
10549$as_echo_n "checking for broken unsetenv... " >&6; }
10550cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10551/* end confdefs.h. */
10552
10553#include <stdlib.h>
10554
10555int
10556main ()
10557{
10558int res = unsetenv("DUMMY")
10559 ;
10560 return 0;
10561}
10562_ACEOF
10563if ac_fn_c_try_compile "$LINENO"; then :
10564 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10565$as_echo "no" >&6; }
10566else
10567
10568$as_echo "#define HAVE_BROKEN_UNSETENV 1" >>confdefs.h
10569
10570 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10571$as_echo "yes" >&6; }
10572
10573fi
10574rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10575
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010576for ac_prog in true
10577do
10578 # Extract the first word of "$ac_prog", so it can be a program name with args.
10579set dummy $ac_prog; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010580{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10581$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010582if ${ac_cv_prog_TRUE+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010583 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010584else
10585 if test -n "$TRUE"; then
10586 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
10587else
10588as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10589for as_dir in $PATH
10590do
10591 IFS=$as_save_IFS
10592 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010593 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +010010594 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010595 ac_cv_prog_TRUE="$ac_prog"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010596 $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 +000010597 break 2
10598 fi
10599done
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010600 done
Martin v. Löwiseba40652007-08-30 20:10:57 +000010601IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010602
10603fi
10604fi
10605TRUE=$ac_cv_prog_TRUE
10606if test -n "$TRUE"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010607 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TRUE" >&5
10608$as_echo "$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010609else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010610 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10611$as_echo "no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010612fi
10613
Martin v. Löwiseba40652007-08-30 20:10:57 +000010614
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010615 test -n "$TRUE" && break
10616done
10617test -n "$TRUE" || TRUE="/bin/true"
10618
10619
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010620{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lc" >&5
10621$as_echo_n "checking for inet_aton in -lc... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010622if ${ac_cv_lib_c_inet_aton+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010623 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010624else
10625 ac_check_lib_save_LIBS=$LIBS
10626LIBS="-lc $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010627cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010628/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010629
Martin v. Löwiseba40652007-08-30 20:10:57 +000010630/* Override any GCC internal prototype to avoid an error.
10631 Use char because int might match the return type of a GCC
10632 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010633#ifdef __cplusplus
10634extern "C"
10635#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010636char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010637int
10638main ()
10639{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010640return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010641 ;
10642 return 0;
10643}
10644_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010645if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010646 ac_cv_lib_c_inet_aton=yes
10647else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010648 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010649fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010650rm -f core conftest.err conftest.$ac_objext \
10651 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010652LIBS=$ac_check_lib_save_LIBS
10653fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010654{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_inet_aton" >&5
10655$as_echo "$ac_cv_lib_c_inet_aton" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010656if test "x$ac_cv_lib_c_inet_aton" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010657 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010658else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010659 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5
10660$as_echo_n "checking for inet_aton in -lresolv... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010661if ${ac_cv_lib_resolv_inet_aton+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010662 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010663else
10664 ac_check_lib_save_LIBS=$LIBS
10665LIBS="-lresolv $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010666cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010667/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010668
Martin v. Löwiseba40652007-08-30 20:10:57 +000010669/* Override any GCC internal prototype to avoid an error.
10670 Use char because int might match the return type of a GCC
10671 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010672#ifdef __cplusplus
10673extern "C"
10674#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010675char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010676int
10677main ()
10678{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010679return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010680 ;
10681 return 0;
10682}
10683_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010684if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010685 ac_cv_lib_resolv_inet_aton=yes
10686else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010687 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010688fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010689rm -f core conftest.err conftest.$ac_objext \
10690 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010691LIBS=$ac_check_lib_save_LIBS
10692fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010693{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5
10694$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010695if test "x$ac_cv_lib_resolv_inet_aton" = xyes; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010696 cat >>confdefs.h <<_ACEOF
10697#define HAVE_LIBRESOLV 1
10698_ACEOF
10699
10700 LIBS="-lresolv $LIBS"
10701
10702fi
10703
10704
10705fi
10706
10707
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010708# On Tru64, chflags seems to be present, but calling it will
10709# exit Python
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010710{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chflags" >&5
10711$as_echo_n "checking for chflags... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010712if ${ac_cv_have_chflags+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010713 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010714else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010715 if test "$cross_compiling" = yes; then :
Gregory P. Smith49437c22009-11-02 01:38:35 +000010716 ac_cv_have_chflags=cross
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010717else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010718 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010719/* end confdefs.h. */
Ned Deily43e10542011-06-27 23:41:53 -070010720
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010721#include <sys/stat.h>
10722#include <unistd.h>
10723int main(int argc, char*argv[])
10724{
10725 if(chflags(argv[0], 0) != 0)
10726 return 1;
10727 return 0;
10728}
Ned Deily43e10542011-06-27 23:41:53 -070010729
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010730_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010731if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010732 ac_cv_have_chflags=yes
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010733else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010734 ac_cv_have_chflags=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010735fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010736rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10737 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +000010738fi
10739
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010740
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010741fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010742{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_chflags" >&5
10743$as_echo "$ac_cv_have_chflags" >&6; }
Gregory P. Smith49437c22009-11-02 01:38:35 +000010744if test "$ac_cv_have_chflags" = cross ; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010745 ac_fn_c_check_func "$LINENO" "chflags" "ac_cv_func_chflags"
Matthias Klose3cef2a92012-03-14 23:39:33 +010010746if test "x$ac_cv_func_chflags" = xyes; then :
Gregory P. Smith49437c22009-11-02 01:38:35 +000010747 ac_cv_have_chflags="yes"
10748else
10749 ac_cv_have_chflags="no"
10750fi
10751
10752fi
10753if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010754
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010755$as_echo "#define HAVE_CHFLAGS 1" >>confdefs.h
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010756
10757fi
10758
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010759{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lchflags" >&5
10760$as_echo_n "checking for lchflags... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010761if ${ac_cv_have_lchflags+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010762 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010763else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010764 if test "$cross_compiling" = yes; then :
Gregory P. Smith49437c22009-11-02 01:38:35 +000010765 ac_cv_have_lchflags=cross
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010766else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010767 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010768/* end confdefs.h. */
Ned Deily43e10542011-06-27 23:41:53 -070010769
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010770#include <sys/stat.h>
10771#include <unistd.h>
10772int main(int argc, char*argv[])
10773{
10774 if(lchflags(argv[0], 0) != 0)
10775 return 1;
10776 return 0;
10777}
Ned Deily43e10542011-06-27 23:41:53 -070010778
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010779_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010780if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010781 ac_cv_have_lchflags=yes
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010782else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010783 ac_cv_have_lchflags=no
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010784fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010785rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10786 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010787fi
10788
10789
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010790fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010791{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lchflags" >&5
10792$as_echo "$ac_cv_have_lchflags" >&6; }
Gregory P. Smith49437c22009-11-02 01:38:35 +000010793if test "$ac_cv_have_lchflags" = cross ; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010794 ac_fn_c_check_func "$LINENO" "lchflags" "ac_cv_func_lchflags"
Matthias Klose3cef2a92012-03-14 23:39:33 +010010795if test "x$ac_cv_func_lchflags" = xyes; then :
Gregory P. Smith49437c22009-11-02 01:38:35 +000010796 ac_cv_have_lchflags="yes"
10797else
10798 ac_cv_have_lchflags="no"
10799fi
10800
10801fi
10802if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010803
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010804$as_echo "#define HAVE_LCHFLAGS 1" >>confdefs.h
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010805
10806fi
10807
Ronald Oussorenf8752642006-07-06 10:13:35 +000010808case $ac_sys_system/$ac_sys_release in
10809Darwin/*)
10810 _CUR_CFLAGS="${CFLAGS}"
10811 _CUR_LDFLAGS="${LDFLAGS}"
10812 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
10813 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
10814 ;;
10815esac
10816
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010817{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5
10818$as_echo_n "checking for inflateCopy in -lz... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010819if ${ac_cv_lib_z_inflateCopy+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010820 $as_echo_n "(cached) " >&6
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000010821else
10822 ac_check_lib_save_LIBS=$LIBS
10823LIBS="-lz $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010824cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000010825/* end confdefs.h. */
10826
Martin v. Löwiseba40652007-08-30 20:10:57 +000010827/* Override any GCC internal prototype to avoid an error.
10828 Use char because int might match the return type of a GCC
10829 builtin and then its argument prototype would still apply. */
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000010830#ifdef __cplusplus
10831extern "C"
10832#endif
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000010833char inflateCopy ();
10834int
10835main ()
10836{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010837return inflateCopy ();
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000010838 ;
10839 return 0;
10840}
10841_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010842if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000010843 ac_cv_lib_z_inflateCopy=yes
10844else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010845 ac_cv_lib_z_inflateCopy=no
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000010846fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010847rm -f core conftest.err conftest.$ac_objext \
10848 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000010849LIBS=$ac_check_lib_save_LIBS
10850fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010851{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5
10852$as_echo "$ac_cv_lib_z_inflateCopy" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010853if test "x$ac_cv_lib_z_inflateCopy" = xyes; then :
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000010854
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010855$as_echo "#define HAVE_ZLIB_COPY 1" >>confdefs.h
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000010856
10857fi
10858
10859
Ronald Oussorenf8752642006-07-06 10:13:35 +000010860case $ac_sys_system/$ac_sys_release in
10861Darwin/*)
10862 CFLAGS="${_CUR_CFLAGS}"
10863 LDFLAGS="${_CUR_LDFLAGS}"
10864 ;;
10865esac
10866
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010867{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hstrerror" >&5
10868$as_echo_n "checking for hstrerror... " >&6; }
10869cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010870/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000010871
Martin v. Löwise9416172003-05-03 10:12:45 +000010872#include <netdb.h>
10873
Martin v. Löwise9416172003-05-03 10:12:45 +000010874int
10875main ()
10876{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010877void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000010878 ;
10879 return 0;
10880}
10881_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010882if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000010883
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010884$as_echo "#define HAVE_HSTRERROR 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000010885
Matthias Klosec511b472010-05-08 11:01:39 +000010886 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010887$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010888else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010889 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10890$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010891
10892fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010893rm -f core conftest.err conftest.$ac_objext \
10894 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010895
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010896{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5
10897$as_echo_n "checking for inet_aton... " >&6; }
10898cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010899/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000010900
Martin v. Löwis86d66262006-02-17 08:40:11 +000010901#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000010902#include <sys/socket.h>
10903#include <netinet/in.h>
10904#include <arpa/inet.h>
10905
Martin v. Löwise9416172003-05-03 10:12:45 +000010906int
10907main ()
10908{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010909void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000010910 ;
10911 return 0;
10912}
10913_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010914if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000010915
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010916$as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000010917
Matthias Klosec511b472010-05-08 11:01:39 +000010918 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010919$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010920else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010921 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10922$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010923
10924fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010925rm -f core conftest.err conftest.$ac_objext \
10926 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010927
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010928{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_pton" >&5
10929$as_echo_n "checking for inet_pton... " >&6; }
10930cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010931/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000010932
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000010933#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000010934#include <sys/socket.h>
10935#include <netinet/in.h>
10936#include <arpa/inet.h>
10937
Martin v. Löwise9416172003-05-03 10:12:45 +000010938int
10939main ()
10940{
10941void* p = inet_pton
10942 ;
10943 return 0;
10944}
10945_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010946if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000010947
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010948$as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000010949
Matthias Klosec511b472010-05-08 11:01:39 +000010950 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010951$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010952else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010953 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10954$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010955
10956fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010957rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000010958
Martin v. Löwisd6640d42003-07-06 09:29:52 +000010959# On some systems, setgroups is in unistd.h, on others, in grp.h
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010960{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for setgroups" >&5
10961$as_echo_n "checking for setgroups... " >&6; }
10962cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010963/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000010964
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000010965#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000010966#ifdef HAVE_GRP_H
10967#include <grp.h>
10968#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000010969
Martin v. Löwisd5843682002-11-21 20:41:28 +000010970int
10971main ()
10972{
10973void* p = setgroups
10974 ;
10975 return 0;
10976}
10977_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010978if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000010979
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010980$as_echo "#define HAVE_SETGROUPS 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000010981
Matthias Klosec511b472010-05-08 11:01:39 +000010982 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010983$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010984else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010985 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10986$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010987
10988fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010989rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000010990
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010991# check for openpty and forkpty
10992
10993for ac_func in openpty
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010994do :
10995 ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty"
Matthias Klose3cef2a92012-03-14 23:39:33 +010010996if test "x$ac_cv_func_openpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010997 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010998#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010999_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011000
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011001else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011002 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5
11003$as_echo_n "checking for openpty in -lutil... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011004if ${ac_cv_lib_util_openpty+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011005 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000011006else
Martin v. Löwis11437992002-04-12 09:54:03 +000011007 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011008LIBS="-lutil $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011009cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011010/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011011
Martin v. Löwiseba40652007-08-30 20:10:57 +000011012/* Override any GCC internal prototype to avoid an error.
11013 Use char because int might match the return type of a GCC
11014 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011015#ifdef __cplusplus
11016extern "C"
11017#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011018char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011019int
11020main ()
11021{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011022return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011023 ;
11024 return 0;
11025}
11026_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011027if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011028 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000011029else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011030 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011031fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011032rm -f core conftest.err conftest.$ac_objext \
11033 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011034LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011035fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011036{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5
11037$as_echo "$ac_cv_lib_util_openpty" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011038if test "x$ac_cv_lib_util_openpty" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011039 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000011040 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011041else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011042 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lbsd" >&5
11043$as_echo_n "checking for openpty in -lbsd... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011044if ${ac_cv_lib_bsd_openpty+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011045 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011046else
11047 ac_check_lib_save_LIBS=$LIBS
11048LIBS="-lbsd $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011049cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011050/* end confdefs.h. */
11051
Martin v. Löwiseba40652007-08-30 20:10:57 +000011052/* Override any GCC internal prototype to avoid an error.
11053 Use char because int might match the return type of a GCC
11054 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011055#ifdef __cplusplus
11056extern "C"
11057#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011058char openpty ();
11059int
11060main ()
11061{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011062return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011063 ;
11064 return 0;
11065}
11066_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011067if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011068 ac_cv_lib_bsd_openpty=yes
11069else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011070 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011071fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011072rm -f core conftest.err conftest.$ac_objext \
11073 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011074LIBS=$ac_check_lib_save_LIBS
11075fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011076{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_openpty" >&5
11077$as_echo "$ac_cv_lib_bsd_openpty" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011078if test "x$ac_cv_lib_bsd_openpty" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011079 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011080 LIBS="$LIBS -lbsd"
11081fi
11082
11083
11084fi
11085
Fred Drake8cef4cf2000-06-28 16:40:38 +000011086
11087fi
11088done
11089
11090for ac_func in forkpty
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011091do :
11092 ac_fn_c_check_func "$LINENO" "forkpty" "ac_cv_func_forkpty"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011093if test "x$ac_cv_func_forkpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011094 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011095#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011096_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011097
Fred Drake8cef4cf2000-06-28 16:40:38 +000011098else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011099 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5
11100$as_echo_n "checking for forkpty in -lutil... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011101if ${ac_cv_lib_util_forkpty+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011102 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000011103else
Martin v. Löwis11437992002-04-12 09:54:03 +000011104 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011105LIBS="-lutil $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011106cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011107/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011108
Martin v. Löwiseba40652007-08-30 20:10:57 +000011109/* Override any GCC internal prototype to avoid an error.
11110 Use char because int might match the return type of a GCC
11111 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011112#ifdef __cplusplus
11113extern "C"
11114#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011115char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011116int
11117main ()
11118{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011119return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011120 ;
11121 return 0;
11122}
11123_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011124if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011125 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000011126else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011127 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011128fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011129rm -f core conftest.err conftest.$ac_objext \
11130 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011131LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011132fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011133{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5
11134$as_echo "$ac_cv_lib_util_forkpty" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011135if test "x$ac_cv_lib_util_forkpty" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011136 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000011137 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011138else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011139 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lbsd" >&5
11140$as_echo_n "checking for forkpty in -lbsd... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011141if ${ac_cv_lib_bsd_forkpty+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011142 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011143else
11144 ac_check_lib_save_LIBS=$LIBS
11145LIBS="-lbsd $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011146cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011147/* end confdefs.h. */
11148
Martin v. Löwiseba40652007-08-30 20:10:57 +000011149/* Override any GCC internal prototype to avoid an error.
11150 Use char because int might match the return type of a GCC
11151 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011152#ifdef __cplusplus
11153extern "C"
11154#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011155char forkpty ();
11156int
11157main ()
11158{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011159return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011160 ;
11161 return 0;
11162}
11163_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011164if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011165 ac_cv_lib_bsd_forkpty=yes
11166else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011167 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011168fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011169rm -f core conftest.err conftest.$ac_objext \
11170 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011171LIBS=$ac_check_lib_save_LIBS
11172fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011173{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_forkpty" >&5
11174$as_echo "$ac_cv_lib_bsd_forkpty" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011175if test "x$ac_cv_lib_bsd_forkpty" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011176 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011177 LIBS="$LIBS -lbsd"
11178fi
11179
11180
11181fi
11182
Fred Drake8cef4cf2000-06-28 16:40:38 +000011183
11184fi
11185done
11186
Jack Jansendd19cf82001-12-06 22:36:17 +000011187
Brett Cannonaa5778d2008-03-18 04:09:00 +000011188# Stuff for expat.
Brett Cannonaa5778d2008-03-18 04:09:00 +000011189for ac_func in memmove
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011190do :
11191 ac_fn_c_check_func "$LINENO" "memmove" "ac_cv_func_memmove"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011192if test "x$ac_cv_func_memmove" = xyes; then :
Brett Cannonaa5778d2008-03-18 04:09:00 +000011193 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011194#define HAVE_MEMMOVE 1
Brett Cannonaa5778d2008-03-18 04:09:00 +000011195_ACEOF
11196
11197fi
11198done
11199
11200
Michael W. Hudson54241132001-12-07 15:38:26 +000011201# check for long file support functions
Fred Drake8cef4cf2000-06-28 16:40:38 +000011202for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011203do :
11204 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11205ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Georg Brandl71f4fbb2011-02-25 11:04:50 +000011206if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011207 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011208#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011209_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000011210
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011211fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000011212done
11213
Michael W. Hudson54241132001-12-07 15:38:26 +000011214
Georg Brandl71f4fbb2011-02-25 11:04:50 +000011215ac_fn_c_check_func "$LINENO" "dup2" "ac_cv_func_dup2"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011216if test "x$ac_cv_func_dup2" = xyes; then :
Georg Brandl71f4fbb2011-02-25 11:04:50 +000011217 $as_echo "#define HAVE_DUP2 1" >>confdefs.h
Martin v. Löwis1142de32002-03-29 16:28:31 +000011218
Martin v. Löwis1142de32002-03-29 16:28:31 +000011219else
Martin v. Löwiseba40652007-08-30 20:10:57 +000011220 case " $LIBOBJS " in
Georg Brandl71f4fbb2011-02-25 11:04:50 +000011221 *" dup2.$ac_objext "* ) ;;
11222 *) LIBOBJS="$LIBOBJS dup2.$ac_objext"
Martin v. Löwiseba40652007-08-30 20:10:57 +000011223 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000011224esac
11225
Martin v. Löwis1142de32002-03-29 16:28:31 +000011226fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +000011227
11228ac_fn_c_check_func "$LINENO" "getcwd" "ac_cv_func_getcwd"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011229if test "x$ac_cv_func_getcwd" = xyes; then :
Georg Brandl71f4fbb2011-02-25 11:04:50 +000011230 $as_echo "#define HAVE_GETCWD 1" >>confdefs.h
11231
11232else
11233 case " $LIBOBJS " in
11234 *" getcwd.$ac_objext "* ) ;;
11235 *) LIBOBJS="$LIBOBJS getcwd.$ac_objext"
11236 ;;
11237esac
11238
11239fi
11240
11241ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011242if test "x$ac_cv_func_strdup" = xyes; then :
Georg Brandl71f4fbb2011-02-25 11:04:50 +000011243 $as_echo "#define HAVE_STRDUP 1" >>confdefs.h
11244
11245else
11246 case " $LIBOBJS " in
11247 *" strdup.$ac_objext "* ) ;;
11248 *) LIBOBJS="$LIBOBJS strdup.$ac_objext"
11249 ;;
11250esac
11251
11252fi
Martin v. Löwis1142de32002-03-29 16:28:31 +000011253
11254
11255for ac_func in getpgrp
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011256do :
11257 ac_fn_c_check_func "$LINENO" "getpgrp" "ac_cv_func_getpgrp"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011258if test "x$ac_cv_func_getpgrp" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011259 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011260#define HAVE_GETPGRP 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011261_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011262 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011263/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011264#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011265int
11266main ()
11267{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011268getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000011269 ;
11270 return 0;
11271}
11272_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011273if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011274
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011275$as_echo "#define GETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000011276
Guido van Rossum627b2d71993-12-24 10:39:16 +000011277fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011278rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011279
Guido van Rossum627b2d71993-12-24 10:39:16 +000011280fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011281done
Guido van Rossum627b2d71993-12-24 10:39:16 +000011282
Jack Jansen150753c2003-03-29 22:07:47 +000011283for ac_func in setpgrp
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011284do :
11285 ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011286if test "x$ac_cv_func_setpgrp" = xyes; then :
Jack Jansen150753c2003-03-29 22:07:47 +000011287 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011288#define HAVE_SETPGRP 1
Jack Jansen150753c2003-03-29 22:07:47 +000011289_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011290 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011291/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000011292#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000011293int
11294main ()
11295{
11296setpgrp(0,0);
11297 ;
11298 return 0;
11299}
11300_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011301if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011302
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011303$as_echo "#define SETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000011304
Guido van Rossum8eee56f1994-10-20 22:18:37 +000011305fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011306rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000011307
11308fi
11309done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000011310
Thomas Wouters3a584202000-08-05 23:28:51 +000011311for ac_func in gettimeofday
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011312do :
11313 ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011314if test "x$ac_cv_func_gettimeofday" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011315 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011316#define HAVE_GETTIMEOFDAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011317_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011318 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011319/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000011320#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011321int
11322main ()
11323{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011324gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000011325 ;
11326 return 0;
11327}
11328_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011329if ac_fn_c_try_compile "$LINENO"; then :
11330
Guido van Rossum627b2d71993-12-24 10:39:16 +000011331else
Skip Montanaro6dead952003-09-25 14:50:04 +000011332
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011333$as_echo "#define GETTIMEOFDAY_NO_TZ 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000011334
Martin v. Löwis11437992002-04-12 09:54:03 +000011335
Guido van Rossum627b2d71993-12-24 10:39:16 +000011336fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011337rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011338
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011339fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011340done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011341
Michael W. Hudson54241132001-12-07 15:38:26 +000011342
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011343{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for major" >&5
11344$as_echo_n "checking for major... " >&6; }
11345cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011346/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011347
Neal Norwitz6eb37f02003-02-23 23:28:15 +000011348#if defined(MAJOR_IN_MKDEV)
11349#include <sys/mkdev.h>
11350#elif defined(MAJOR_IN_SYSMACROS)
11351#include <sys/sysmacros.h>
11352#else
11353#include <sys/types.h>
11354#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011355
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011356int
11357main ()
11358{
11359
11360 makedev(major(0),minor(0));
11361
11362 ;
11363 return 0;
11364}
11365_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011366if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011367
11368
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011369$as_echo "#define HAVE_DEVICE_MACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011370
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011371 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11372$as_echo "yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011373
11374else
Skip Montanaro6dead952003-09-25 14:50:04 +000011375
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011376 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11377$as_echo "no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011378
11379fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011380rm -f core conftest.err conftest.$ac_objext \
11381 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000011382
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011383# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000011384# for [no]getaddrinfo in netdb.h.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011385{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
11386$as_echo_n "checking for getaddrinfo... " >&6; }
11387cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011388/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011389
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000011390#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011391#include <sys/socket.h>
11392#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000011393#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011394
Martin v. Löwis11437992002-04-12 09:54:03 +000011395int
11396main ()
11397{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011398getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000011399 ;
11400 return 0;
11401}
11402_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011403if ac_fn_c_try_link "$LINENO"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011404 have_getaddrinfo=yes
11405else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011406 have_getaddrinfo=no
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011407fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011408rm -f core conftest.err conftest.$ac_objext \
11409 conftest$ac_exeext conftest.$ac_ext
11410{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getaddrinfo" >&5
11411$as_echo "$have_getaddrinfo" >&6; }
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011412if test $have_getaddrinfo = yes
11413then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011414 { $as_echo "$as_me:${as_lineno-$LINENO}: checking getaddrinfo bug" >&5
11415$as_echo_n "checking getaddrinfo bug... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011416 if ${ac_cv_buggy_getaddrinfo+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011417 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011418else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011419 if test "$cross_compiling" = yes; then :
doko@python.orgd65e2ba2013-01-31 23:52:03 +010011420
11421if test "${enable_ipv6+set}" = set; then
11422 ac_cv_buggy_getaddrinfo="no -- configured with --(en|dis)able-ipv6"
11423else
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011424 ac_cv_buggy_getaddrinfo=yes
doko@python.orgd65e2ba2013-01-31 23:52:03 +010011425fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011426else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011427 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011428/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011429
Stefan Krah0afe4e42012-11-22 23:56:51 +010011430#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011431#include <sys/types.h>
11432#include <netdb.h>
11433#include <string.h>
11434#include <sys/socket.h>
11435#include <netinet/in.h>
11436
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011437int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011438{
11439 int passive, gaierr, inet4 = 0, inet6 = 0;
11440 struct addrinfo hints, *ai, *aitop;
11441 char straddr[INET6_ADDRSTRLEN], strport[16];
11442
11443 for (passive = 0; passive <= 1; passive++) {
11444 memset(&hints, 0, sizeof(hints));
11445 hints.ai_family = AF_UNSPEC;
11446 hints.ai_flags = passive ? AI_PASSIVE : 0;
11447 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000011448 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011449 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
11450 (void)gai_strerror(gaierr);
11451 goto bad;
11452 }
11453 for (ai = aitop; ai; ai = ai->ai_next) {
11454 if (ai->ai_addr == NULL ||
11455 ai->ai_addrlen == 0 ||
11456 getnameinfo(ai->ai_addr, ai->ai_addrlen,
11457 straddr, sizeof(straddr), strport, sizeof(strport),
11458 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
11459 goto bad;
11460 }
11461 switch (ai->ai_family) {
11462 case AF_INET:
11463 if (strcmp(strport, "54321") != 0) {
11464 goto bad;
11465 }
11466 if (passive) {
11467 if (strcmp(straddr, "0.0.0.0") != 0) {
11468 goto bad;
11469 }
11470 } else {
11471 if (strcmp(straddr, "127.0.0.1") != 0) {
11472 goto bad;
11473 }
11474 }
11475 inet4++;
11476 break;
11477 case AF_INET6:
11478 if (strcmp(strport, "54321") != 0) {
11479 goto bad;
11480 }
11481 if (passive) {
11482 if (strcmp(straddr, "::") != 0) {
11483 goto bad;
11484 }
11485 } else {
11486 if (strcmp(straddr, "::1") != 0) {
11487 goto bad;
11488 }
11489 }
11490 inet6++;
11491 break;
11492 case AF_UNSPEC:
11493 goto bad;
11494 break;
11495 default:
11496 /* another family support? */
11497 break;
11498 }
11499 }
11500 }
11501
11502 if (!(inet4 == 0 || inet4 == 2))
11503 goto bad;
11504 if (!(inet6 == 0 || inet6 == 2))
11505 goto bad;
11506
11507 if (aitop)
11508 freeaddrinfo(aitop);
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011509 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011510
11511 bad:
11512 if (aitop)
11513 freeaddrinfo(aitop);
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011514 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011515}
11516
Martin v. Löwis11437992002-04-12 09:54:03 +000011517_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011518if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011519 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011520else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011521 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011522fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011523rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11524 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011525fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011526
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011527fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011528
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011529fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011530
Benjamin Peterson75fed812010-11-01 01:47:19 +000011531{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_buggy_getaddrinfo" >&5
11532$as_echo "$ac_cv_buggy_getaddrinfo" >&6; }
11533
Mark Dickinson0ef0b912009-12-31 21:11:48 +000011534if test $have_getaddrinfo = no -o "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011535then
11536 if test $ipv6 = yes
11537 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011538 echo 'Fatal: You must get working getaddrinfo() function.'
11539 echo ' or you can specify "--disable-ipv6"'.
11540 exit 1
11541 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011542else
Martin v. Löwis11437992002-04-12 09:54:03 +000011543
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011544$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011545
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011546fi
Benjamin Peterson75fed812010-11-01 01:47:19 +000011547
Jack Jansen9a66b6d2001-08-08 13:56:14 +000011548for ac_func in getnameinfo
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011549do :
11550 ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011551if test "x$ac_cv_func_getnameinfo" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011552 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011553#define HAVE_GETNAMEINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011554_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011555
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011556fi
11557done
11558
Michael W. Hudson54241132001-12-07 15:38:26 +000011559
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011560# checks for structures
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011561{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
11562$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011563if ${ac_cv_header_time+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011564 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011565else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011566 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011567/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011568#include <sys/types.h>
11569#include <sys/time.h>
11570#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011571
Martin v. Löwis11437992002-04-12 09:54:03 +000011572int
11573main ()
11574{
11575if ((struct tm *) 0)
11576return 0;
11577 ;
11578 return 0;
11579}
11580_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011581if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011582 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000011583else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011584 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011585fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011586rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011587fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011588{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
11589$as_echo "$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000011590if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011591
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011592$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011593
11594fi
11595
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011596{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
11597$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011598if ${ac_cv_struct_tm+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011599 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011600else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011601 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011602/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011603#include <sys/types.h>
11604#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011605
Martin v. Löwis11437992002-04-12 09:54:03 +000011606int
11607main ()
11608{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011609struct tm tm;
11610 int *p = &tm.tm_sec;
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011611 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000011612 ;
11613 return 0;
11614}
11615_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011616if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011617 ac_cv_struct_tm=time.h
11618else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011619 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011620fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011621rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011622fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011623{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
11624$as_echo "$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000011625if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011626
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011627$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011628
11629fi
11630
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011631ac_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 +000011632#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000011633
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011634"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011635if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011636
11637cat >>confdefs.h <<_ACEOF
11638#define HAVE_STRUCT_TM_TM_ZONE 1
11639_ACEOF
11640
11641
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011642fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011643
Martin v. Löwis11437992002-04-12 09:54:03 +000011644if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
11645
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011646$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011647
11648else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011649 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
11650"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011651if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011652 ac_have_decl=1
Martin v. Löwiseba40652007-08-30 20:10:57 +000011653else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011654 ac_have_decl=0
Martin v. Löwiseba40652007-08-30 20:10:57 +000011655fi
11656
Martin v. Löwiseba40652007-08-30 20:10:57 +000011657cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011658#define HAVE_DECL_TZNAME $ac_have_decl
Martin v. Löwiseba40652007-08-30 20:10:57 +000011659_ACEOF
11660
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011661 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
11662$as_echo_n "checking for tzname... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011663if ${ac_cv_var_tzname+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011664 $as_echo_n "(cached) " >&6
Martin v. Löwiseba40652007-08-30 20:10:57 +000011665else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011666 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011667/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000011668#include <time.h>
Martin v. Löwiseba40652007-08-30 20:10:57 +000011669#if !HAVE_DECL_TZNAME
11670extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000011671#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011672
Martin v. Löwis11437992002-04-12 09:54:03 +000011673int
11674main ()
11675{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011676return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000011677 ;
11678 return 0;
11679}
11680_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011681if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011682 ac_cv_var_tzname=yes
11683else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011684 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011685fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011686rm -f core conftest.err conftest.$ac_objext \
11687 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000011688fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011689{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
11690$as_echo "$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000011691 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011692
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011693$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000011694
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011695 fi
11696fi
11697
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011698ac_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 +010011699if test "x$ac_cv_member_struct_stat_st_rdev" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011700
11701cat >>confdefs.h <<_ACEOF
11702#define HAVE_STRUCT_STAT_ST_RDEV 1
11703_ACEOF
11704
11705
Guido van Rossum98bf58f2001-10-18 20:34:25 +000011706fi
11707
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011708ac_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 +010011709if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000011710
Martin v. Löwis11437992002-04-12 09:54:03 +000011711cat >>confdefs.h <<_ACEOF
11712#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
11713_ACEOF
11714
11715
Guido van Rossum98bf58f2001-10-18 20:34:25 +000011716fi
11717
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011718ac_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 +010011719if test "x$ac_cv_member_struct_stat_st_flags" = xyes; then :
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000011720
11721cat >>confdefs.h <<_ACEOF
11722#define HAVE_STRUCT_STAT_ST_FLAGS 1
11723_ACEOF
11724
11725
11726fi
11727
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011728ac_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 +010011729if test "x$ac_cv_member_struct_stat_st_gen" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000011730
11731cat >>confdefs.h <<_ACEOF
11732#define HAVE_STRUCT_STAT_ST_GEN 1
11733_ACEOF
11734
11735
11736fi
11737
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011738ac_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 +010011739if test "x$ac_cv_member_struct_stat_st_birthtime" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000011740
11741cat >>confdefs.h <<_ACEOF
11742#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
11743_ACEOF
11744
11745
11746fi
11747
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011748ac_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 +010011749if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000011750
Martin v. Löwis11437992002-04-12 09:54:03 +000011751cat >>confdefs.h <<_ACEOF
11752#define HAVE_STRUCT_STAT_ST_BLOCKS 1
11753_ACEOF
11754
11755
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011756$as_echo "#define HAVE_ST_BLOCKS 1" >>confdefs.h
Guido van Rossum98bf58f2001-10-18 20:34:25 +000011757
11758else
Martin v. Löwiseba40652007-08-30 20:10:57 +000011759 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000011760 *" fileblocks.$ac_objext "* ) ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000011761 *) LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
11762 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000011763esac
11764
Guido van Rossum98bf58f2001-10-18 20:34:25 +000011765fi
11766
Michael W. Hudson54241132001-12-07 15:38:26 +000011767
Martin v. Löwis11437992002-04-12 09:54:03 +000011768
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011769{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5
11770$as_echo_n "checking for time.h that defines altzone... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011771if ${ac_cv_header_time_altzone+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011772 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011773else
Matthias Klosec511b472010-05-08 11:01:39 +000011774
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011775 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011776/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000011777#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011778int
11779main ()
11780{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011781return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000011782 ;
11783 return 0;
11784}
11785_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011786if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011787 ac_cv_header_time_altzone=yes
11788else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011789 ac_cv_header_time_altzone=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011790fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011791rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosec511b472010-05-08 11:01:39 +000011792
Martin v. Löwiseba40652007-08-30 20:10:57 +000011793fi
11794
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011795{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5
11796$as_echo "$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011797if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011798
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011799$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011800
11801fi
11802
Guido van Rossumda88dad1995-01-26 00:46:29 +000011803was_it_defined=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011804{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
11805$as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
11806cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011807/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000011808
11809#include <sys/types.h>
11810#include <sys/select.h>
11811#include <sys/time.h>
11812
Martin v. Löwis11437992002-04-12 09:54:03 +000011813int
11814main ()
11815{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011816;
Martin v. Löwis11437992002-04-12 09:54:03 +000011817 ;
11818 return 0;
11819}
11820_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011821if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011822
11823
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011824$as_echo "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011825
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011826 was_it_defined=yes
11827
Martin v. Löwiseba40652007-08-30 20:10:57 +000011828fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011829rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011830{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
11831$as_echo "$was_it_defined" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000011832
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011833{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for addrinfo" >&5
11834$as_echo_n "checking for addrinfo... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011835if ${ac_cv_struct_addrinfo+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011836 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011837else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011838 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011839/* end confdefs.h. */
Matthias Klosec511b472010-05-08 11:01:39 +000011840#include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011841int
11842main ()
11843{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011844struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000011845 ;
11846 return 0;
11847}
11848_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011849if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011850 ac_cv_struct_addrinfo=yes
11851else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011852 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011853fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011854rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11855fi
11856
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011857{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5
11858$as_echo "$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011859if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011860
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011861$as_echo "#define HAVE_ADDRINFO 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011862
11863fi
11864
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011865{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5
11866$as_echo_n "checking for sockaddr_storage... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011867if ${ac_cv_struct_sockaddr_storage+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011868 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011869else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011870 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011871/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011872
11873# include <sys/types.h>
11874# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011875int
11876main ()
11877{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011878struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000011879 ;
11880 return 0;
11881}
11882_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011883if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011884 ac_cv_struct_sockaddr_storage=yes
11885else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011886 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011887fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011888rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11889fi
11890
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011891{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5
11892$as_echo "$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011893if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011894
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011895$as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011896
11897fi
11898
Guido van Rossum627b2d71993-12-24 10:39:16 +000011899# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000011900
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011901{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
11902$as_echo_n "checking whether char is unsigned... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011903if ${ac_cv_c_char_unsigned+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011904 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000011905else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011906 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011907/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011908$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000011909int
11910main ()
11911{
11912static int test_array [1 - 2 * !(((char) -1) < 0)];
Charles-François Natalibe2b9072013-01-08 19:47:00 +010011913test_array [0] = 0;
11914return test_array [0];
Martin v. Löwis11437992002-04-12 09:54:03 +000011915
11916 ;
11917 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000011918}
Martin v. Löwis11437992002-04-12 09:54:03 +000011919_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011920if ac_fn_c_try_compile "$LINENO"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000011921 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000011922else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011923 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011924fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011925rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000011926fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011927{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
11928$as_echo "$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011929if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011930 $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011931
11932fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000011933
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011934{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
11935$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011936if ${ac_cv_c_const+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011937 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000011938else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011939 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011940/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011941
Martin v. Löwis11437992002-04-12 09:54:03 +000011942int
11943main ()
11944{
Charles-François Natalibe2b9072013-01-08 19:47:00 +010011945
Martin v. Löwis11437992002-04-12 09:54:03 +000011946#ifndef __cplusplus
Charles-François Natalibe2b9072013-01-08 19:47:00 +010011947 /* Ultrix mips cc rejects this sort of thing. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011948 typedef int charset[2];
Charles-François Natalibe2b9072013-01-08 19:47:00 +010011949 const charset cs = { 0, 0 };
Martin v. Löwis11437992002-04-12 09:54:03 +000011950 /* SunOS 4.1.1 cc rejects this. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000011951 char const *const *pcpcc;
11952 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000011953 /* NEC SVR4.0.2 mips cc rejects this. */
11954 struct point {int x, y;};
11955 static struct point const zero = {0,0};
11956 /* AIX XL C 1.02.0.0 rejects this.
11957 It does not let you subtract one const X* pointer from another in
11958 an arm of an if-expression whose if-part is not a constant
11959 expression */
11960 const char *g = "string";
Martin v. Löwiseba40652007-08-30 20:10:57 +000011961 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000011962 /* HPUX 7.0 cc rejects these. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000011963 ++pcpcc;
11964 ppc = (char**) pcpcc;
11965 pcpcc = (char const *const *) ppc;
Charles-François Natalibe2b9072013-01-08 19:47:00 +010011966 { /* SCO 3.2v4 cc rejects this sort of thing. */
11967 char tx;
11968 char *t = &tx;
Martin v. Löwis11437992002-04-12 09:54:03 +000011969 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011970
Martin v. Löwis11437992002-04-12 09:54:03 +000011971 *t++ = 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +000011972 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011973 }
11974 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
11975 int x[] = {25, 17};
11976 const int *foo = &x[0];
11977 ++foo;
11978 }
11979 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
11980 typedef const int *iptr;
11981 iptr p = 0;
11982 ++p;
11983 }
Charles-François Natalibe2b9072013-01-08 19:47:00 +010011984 { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
Martin v. Löwis11437992002-04-12 09:54:03 +000011985 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
Charles-François Natalibe2b9072013-01-08 19:47:00 +010011986 struct s { int j; const int *ap[3]; } bx;
11987 struct s *b = &bx; b->j = 5;
Martin v. Löwis11437992002-04-12 09:54:03 +000011988 }
11989 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
11990 const int foo = 10;
Martin v. Löwiseba40652007-08-30 20:10:57 +000011991 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011992 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000011993 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000011994#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000011995
Martin v. Löwis11437992002-04-12 09:54:03 +000011996 ;
11997 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000011998}
Martin v. Löwis11437992002-04-12 09:54:03 +000011999_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012000if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012001 ac_cv_c_const=yes
12002else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012003 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012004fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012005rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012006fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012007{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
12008$as_echo "$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012009if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012010
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012011$as_echo "#define const /**/" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012012
12013fi
12014
Michael W. Hudson54241132001-12-07 15:38:26 +000012015
Guido van Rossumda88dad1995-01-26 00:46:29 +000012016works=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012017{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5
12018$as_echo_n "checking for working volatile... " >&6; }
12019cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012020/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000012021
Martin v. Löwis11437992002-04-12 09:54:03 +000012022int
12023main ()
12024{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012025volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012026 ;
12027 return 0;
12028}
12029_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012030if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000012031 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000012032else
Skip Montanaro6dead952003-09-25 14:50:04 +000012033
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012034$as_echo "#define volatile /**/" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000012035
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012036
Guido van Rossum627b2d71993-12-24 10:39:16 +000012037fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012038rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012039{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
12040$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000012041
Guido van Rossumda88dad1995-01-26 00:46:29 +000012042works=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012043{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working signed char" >&5
12044$as_echo_n "checking for working signed char... " >&6; }
12045cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012046/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000012047
Martin v. Löwis11437992002-04-12 09:54:03 +000012048int
12049main ()
12050{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012051signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000012052 ;
12053 return 0;
12054}
12055_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012056if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000012057 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000012058else
Skip Montanaro6dead952003-09-25 14:50:04 +000012059
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012060$as_echo "#define signed /**/" >>confdefs.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000012061
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012062
Guido van Rossum7f43da71994-08-01 12:15:30 +000012063fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012064rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012065{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
12066$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000012067
Guido van Rossumda88dad1995-01-26 00:46:29 +000012068have_prototypes=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012069{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototypes" >&5
12070$as_echo_n "checking for prototypes... " >&6; }
12071cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012072/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012073int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012074int
12075main ()
12076{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012077return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000012078 ;
12079 return 0;
12080}
12081_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012082if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012083
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012084$as_echo "#define HAVE_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012085
Matthias Klosec511b472010-05-08 11:01:39 +000012086 have_prototypes=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000012087fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012088rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012089{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_prototypes" >&5
12090$as_echo "$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012091
Guido van Rossumda88dad1995-01-26 00:46:29 +000012092works=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012093{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for variable length prototypes and stdarg.h" >&5
12094$as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; }
12095cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012096/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012097
12098#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000012099int foo(int x, ...) {
12100 va_list va;
12101 va_start(va, x);
12102 va_arg(va, int);
12103 va_arg(va, char *);
12104 va_arg(va, double);
12105 return 0;
12106}
Guido van Rossum7f43da71994-08-01 12:15:30 +000012107
Martin v. Löwis11437992002-04-12 09:54:03 +000012108int
12109main ()
12110{
Guido van Rossum90eea071996-08-30 20:58:57 +000012111return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000012112 ;
12113 return 0;
12114}
12115_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012116if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012117
12118
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012119$as_echo "#define HAVE_STDARG_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012120
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012121 works=yes
12122
Guido van Rossum627b2d71993-12-24 10:39:16 +000012123fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012124rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012125{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
12126$as_echo "$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012127
Martin v. Löwisd6320502004-08-12 13:45:08 +000012128# check for socketpair
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012129{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair" >&5
12130$as_echo_n "checking for socketpair... " >&6; }
12131cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000012132/* end confdefs.h. */
12133
12134#include <sys/types.h>
12135#include <sys/socket.h>
12136
12137int
12138main ()
12139{
12140void *x=socketpair
12141 ;
12142 return 0;
12143}
12144_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012145if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd6320502004-08-12 13:45:08 +000012146
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012147$as_echo "#define HAVE_SOCKETPAIR 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +000012148
Matthias Klosec511b472010-05-08 11:01:39 +000012149 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012150$as_echo "yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000012151else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012152 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12153$as_echo "no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000012154
12155fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012156rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000012157
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012158# check if sockaddr has sa_len member
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012159{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr has sa_len member" >&5
12160$as_echo_n "checking if sockaddr has sa_len member... " >&6; }
12161cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012162/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012163#include <sys/types.h>
12164#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012165int
12166main ()
12167{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012168struct sockaddr x;
12169x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012170 ;
12171 return 0;
12172}
12173_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012174if ac_fn_c_try_compile "$LINENO"; then :
12175 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12176$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012177
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012178$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012179
12180else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012181 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12182$as_echo "no" >&6; }
Matthias Klosec511b472010-05-08 11:01:39 +000012183
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012184fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012185rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012186
Guido van Rossumda88dad1995-01-26 00:46:29 +000012187va_list_is_array=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012188{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether va_list is an array" >&5
12189$as_echo_n "checking whether va_list is an array... " >&6; }
12190cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012191/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012192
12193#ifdef HAVE_STDARG_PROTOTYPES
12194#include <stdarg.h>
12195#else
12196#include <varargs.h>
12197#endif
12198
Martin v. Löwis11437992002-04-12 09:54:03 +000012199int
12200main ()
12201{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012202va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000012203 ;
12204 return 0;
12205}
12206_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012207if ac_fn_c_try_compile "$LINENO"; then :
12208
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012209else
Skip Montanaro6dead952003-09-25 14:50:04 +000012210
Martin v. Löwis11437992002-04-12 09:54:03 +000012211
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012212$as_echo "#define VA_LIST_IS_ARRAY 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012213
Guido van Rossumda88dad1995-01-26 00:46:29 +000012214 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012215
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012216fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012217rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012218{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $va_list_is_array" >&5
12219$as_echo "$va_list_is_array" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012220
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012221# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000012222
12223
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012224ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r"
Matthias Klose3cef2a92012-03-14 23:39:33 +010012225if test "x$ac_cv_func_gethostbyname_r" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012226
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012227 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000012228
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012229 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 6 args" >&5
12230$as_echo_n "checking gethostbyname_r with 6 args... " >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012231 OLD_CFLAGS=$CFLAGS
12232 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012233 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012234/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012235
12236# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012237
Martin v. Löwis11437992002-04-12 09:54:03 +000012238int
12239main ()
12240{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012241
12242 char *name;
12243 struct hostent *he, *res;
12244 char buffer[2048];
12245 int buflen = 2048;
12246 int h_errnop;
12247
12248 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000012249
12250 ;
12251 return 0;
12252}
12253_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012254if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012255
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012256 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000012257
Martin v. Löwis11437992002-04-12 09:54:03 +000012258
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012259$as_echo "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012260
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012261 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12262$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012263
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012264else
Skip Montanaro6dead952003-09-25 14:50:04 +000012265
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012266 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12267$as_echo "no" >&6; }
12268 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 5 args" >&5
12269$as_echo_n "checking gethostbyname_r with 5 args... " >&6; }
12270 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012271/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012272
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012273# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012274
Martin v. Löwis11437992002-04-12 09:54:03 +000012275int
12276main ()
12277{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012278
12279 char *name;
12280 struct hostent *he;
Matthias Klosec511b472010-05-08 11:01:39 +000012281 char buffer[2048];
12282 int buflen = 2048;
12283 int h_errnop;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012284
Matthias Klosec511b472010-05-08 11:01:39 +000012285 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000012286
12287 ;
12288 return 0;
12289}
12290_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012291if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012292
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012293 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000012294
Martin v. Löwis11437992002-04-12 09:54:03 +000012295
Matthias Klosec511b472010-05-08 11:01:39 +000012296$as_echo "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012297
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012298 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12299$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012300
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012301else
Skip Montanaro6dead952003-09-25 14:50:04 +000012302
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012303 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12304$as_echo "no" >&6; }
Matthias Klosec511b472010-05-08 11:01:39 +000012305 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 3 args" >&5
12306$as_echo_n "checking gethostbyname_r with 3 args... " >&6; }
12307 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12308/* end confdefs.h. */
12309
12310# include <netdb.h>
12311
12312int
12313main ()
12314{
12315
12316 char *name;
12317 struct hostent *he;
12318 struct hostent_data data;
12319
12320 (void) gethostbyname_r(name, he, &data);
12321
12322 ;
12323 return 0;
12324}
12325_ACEOF
12326if ac_fn_c_try_compile "$LINENO"; then :
12327
12328 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
12329
12330
12331$as_echo "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h
12332
12333 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12334$as_echo "yes" >&6; }
12335
12336else
12337
12338 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12339$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012340
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012341fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012342rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012343
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012344fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012345rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012346
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012347fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012348rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012349 CFLAGS=$OLD_CFLAGS
12350
12351else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012352
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012353 for ac_func in gethostbyname
12354do :
12355 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
Matthias Klose3cef2a92012-03-14 23:39:33 +010012356if test "x$ac_cv_func_gethostbyname" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012357 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012358#define HAVE_GETHOSTBYNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012359_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012360
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012361fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012362done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012363
Michael W. Hudson54241132001-12-07 15:38:26 +000012364
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012365fi
12366
Michael W. Hudson54241132001-12-07 15:38:26 +000012367
12368
12369
12370
12371
12372
Guido van Rossum627b2d71993-12-24 10:39:16 +000012373# checks for system services
12374# (none yet)
12375
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012376# Linux requires this for correct f.p. operations
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012377ac_fn_c_check_func "$LINENO" "__fpu_control" "ac_cv_func___fpu_control"
Matthias Klose3cef2a92012-03-14 23:39:33 +010012378if test "x$ac_cv_func___fpu_control" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012379
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000012380else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012381 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5
12382$as_echo_n "checking for __fpu_control in -lieee... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012383if ${ac_cv_lib_ieee___fpu_control+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012384 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012385else
Martin v. Löwis11437992002-04-12 09:54:03 +000012386 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012387LIBS="-lieee $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012388cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012389/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012390
Martin v. Löwiseba40652007-08-30 20:10:57 +000012391/* Override any GCC internal prototype to avoid an error.
12392 Use char because int might match the return type of a GCC
12393 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012394#ifdef __cplusplus
12395extern "C"
12396#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012397char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012398int
12399main ()
12400{
Martin v. Löwiseba40652007-08-30 20:10:57 +000012401return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012402 ;
12403 return 0;
12404}
12405_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012406if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012407 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000012408else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012409 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012410fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012411rm -f core conftest.err conftest.$ac_objext \
12412 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012413LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012414fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012415{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee___fpu_control" >&5
12416$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012417if test "x$ac_cv_lib_ieee___fpu_control" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012418 cat >>confdefs.h <<_ACEOF
12419#define HAVE_LIBIEEE 1
12420_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012421
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012422 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012423
Guido van Rossum627b2d71993-12-24 10:39:16 +000012424fi
12425
Michael W. Hudson54241132001-12-07 15:38:26 +000012426
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000012427fi
12428
Michael W. Hudson54241132001-12-07 15:38:26 +000012429
Guido van Rossum7f253911997-05-09 02:42:48 +000012430# Check for --with-fpectl
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012431{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-fpectl" >&5
12432$as_echo_n "checking for --with-fpectl... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012433
Martin v. Löwiseba40652007-08-30 20:10:57 +000012434# Check whether --with-fpectl was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012435if test "${with_fpectl+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +000012436 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000012437if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000012438then
12439
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012440$as_echo "#define WANT_SIGFPE_HANDLER 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012441
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012442 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12443$as_echo "yes" >&6; }
12444else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12445$as_echo "no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000012446fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000012447else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012448 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12449$as_echo "no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012450fi
12451
Guido van Rossum7f253911997-05-09 02:42:48 +000012452
Guido van Rossum7f43da71994-08-01 12:15:30 +000012453# check for --with-libm=...
12454
Guido van Rossum563e7081996-09-10 18:20:48 +000012455case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000012456Darwin) ;;
Guido van Rossumec95c7b1998-08-04 17:59:56 +000012457BeOS) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000012458*) LIBM=-lm
12459esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012460{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libm=STRING" >&5
12461$as_echo_n "checking for --with-libm=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012462
Martin v. Löwiseba40652007-08-30 20:10:57 +000012463# Check whether --with-libm was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012464if test "${with_libm+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +000012465 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000012466if test "$withval" = no
12467then LIBM=
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012468 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBM empty" >&5
12469$as_echo "force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000012470elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000012471then LIBM=$withval
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012472 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBM=\"$withval\"" >&5
12473$as_echo "set LIBM=\"$withval\"" >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +000012474else as_fn_error $? "proper usage is --with-libm=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000012475fi
Guido van Rossum7f253911997-05-09 02:42:48 +000012476else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012477 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBM=\"$LIBM\"" >&5
12478$as_echo "default LIBM=\"$LIBM\"" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012479fi
12480
Guido van Rossum7f43da71994-08-01 12:15:30 +000012481
12482# check for --with-libc=...
12483
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012484{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libc=STRING" >&5
12485$as_echo_n "checking for --with-libc=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012486
Martin v. Löwiseba40652007-08-30 20:10:57 +000012487# Check whether --with-libc was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012488if test "${with_libc+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +000012489 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000012490if test "$withval" = no
12491then LIBC=
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012492 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBC empty" >&5
12493$as_echo "force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000012494elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000012495then LIBC=$withval
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012496 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBC=\"$withval\"" >&5
12497$as_echo "set LIBC=\"$withval\"" >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +000012498else as_fn_error $? "proper usage is --with-libc=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000012499fi
Guido van Rossum7f253911997-05-09 02:42:48 +000012500else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012501 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBC=\"$LIBC\"" >&5
12502$as_echo "default LIBC=\"$LIBC\"" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012503fi
12504
Guido van Rossum7f43da71994-08-01 12:15:30 +000012505
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012506# **************************************************
12507# * Check for various properties of floating point *
12508# **************************************************
Mark Dickinson265d7382008-04-21 22:32:24 +000012509
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012510{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are little-endian IEEE 754 binary64" >&5
12511$as_echo_n "checking whether C doubles are little-endian IEEE 754 binary64... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012512if ${ac_cv_little_endian_double+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012513 $as_echo_n "(cached) " >&6
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012514else
12515
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012516if test "$cross_compiling" = yes; then :
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012517 ac_cv_little_endian_double=no
12518else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012519 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012520/* end confdefs.h. */
12521
12522#include <string.h>
12523int main() {
12524 double x = 9006104071832581.0;
12525 if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
12526 return 0;
12527 else
12528 return 1;
12529}
12530
12531_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012532if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012533 ac_cv_little_endian_double=yes
12534else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012535 ac_cv_little_endian_double=no
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012536fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012537rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12538 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012539fi
12540
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012541fi
12542
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012543{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_little_endian_double" >&5
12544$as_echo "$ac_cv_little_endian_double" >&6; }
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012545if test "$ac_cv_little_endian_double" = yes
12546then
12547
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012548$as_echo "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012549
12550fi
12551
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012552{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are big-endian IEEE 754 binary64" >&5
12553$as_echo_n "checking whether C doubles are big-endian IEEE 754 binary64... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012554if ${ac_cv_big_endian_double+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012555 $as_echo_n "(cached) " >&6
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012556else
12557
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012558if test "$cross_compiling" = yes; then :
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012559 ac_cv_big_endian_double=no
12560else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012561 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012562/* end confdefs.h. */
12563
12564#include <string.h>
12565int main() {
12566 double x = 9006104071832581.0;
12567 if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
12568 return 0;
12569 else
12570 return 1;
12571}
12572
12573_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012574if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012575 ac_cv_big_endian_double=yes
12576else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012577 ac_cv_big_endian_double=no
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012578fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012579rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12580 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012581fi
12582
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012583fi
12584
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012585{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_big_endian_double" >&5
12586$as_echo "$ac_cv_big_endian_double" >&6; }
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012587if test "$ac_cv_big_endian_double" = yes
12588then
12589
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012590$as_echo "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012591
12592fi
12593
12594# Some ARM platforms use a mixed-endian representation for doubles.
12595# While Python doesn't currently have full support for these platforms
12596# (see e.g., issue 1762561), we can at least make sure that float <-> string
12597# conversions work.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012598{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5
12599$as_echo_n "checking whether C doubles are ARM mixed-endian IEEE 754 binary64... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012600if ${ac_cv_mixed_endian_double+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012601 $as_echo_n "(cached) " >&6
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012602else
12603
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012604if test "$cross_compiling" = yes; then :
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012605 ac_cv_mixed_endian_double=no
12606else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012607 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012608/* end confdefs.h. */
12609
12610#include <string.h>
12611int main() {
12612 double x = 9006104071832581.0;
12613 if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
12614 return 0;
12615 else
12616 return 1;
12617}
12618
12619_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012620if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012621 ac_cv_mixed_endian_double=yes
12622else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012623 ac_cv_mixed_endian_double=no
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012624fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012625rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12626 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012627fi
12628
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012629fi
12630
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012631{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mixed_endian_double" >&5
12632$as_echo "$ac_cv_mixed_endian_double" >&6; }
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012633if test "$ac_cv_mixed_endian_double" = yes
12634then
12635
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012636$as_echo "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012637
12638fi
12639
12640# The short float repr introduced in Python 3.1 requires the
12641# correctly-rounded string <-> double conversion functions from
12642# Python/dtoa.c, which in turn require that the FPU uses 53-bit
12643# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsona548dee2009-11-15 13:12:43 +000012644# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012645# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsona548dee2009-11-15 13:12:43 +000012646
12647# This inline assembler syntax may also work for suncc and icc,
12648# so we try it on all platforms.
12649
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012650{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
12651$as_echo_n "checking whether we can use gcc inline assembler to get and set x87 control word... " >&6; }
12652cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012653/* end confdefs.h. */
12654
12655int
12656main ()
12657{
12658
Mark Dickinsona548dee2009-11-15 13:12:43 +000012659 unsigned short cw;
12660 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
12661 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012662
12663 ;
12664 return 0;
12665}
12666_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012667if ac_fn_c_try_compile "$LINENO"; then :
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012668 have_gcc_asm_for_x87=yes
12669else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012670 have_gcc_asm_for_x87=no
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012671fi
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012672rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012673{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x87" >&5
12674$as_echo "$have_gcc_asm_for_x87" >&6; }
Mark Dickinsona548dee2009-11-15 13:12:43 +000012675if test "$have_gcc_asm_for_x87" = yes
12676then
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012677
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012678$as_echo "#define HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012679
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012680fi
Mark Dickinson7a3d8642008-04-22 00:54:27 +000012681
Mark Dickinson04b27232009-01-04 12:29:36 +000012682# Detect whether system arithmetic is subject to x87-style double
12683# rounding issues. The result of this test has little meaning on non
12684# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
12685# mode is round-to-nearest and double rounding issues are present, and
12686# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012687{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x87-style double rounding" >&5
12688$as_echo_n "checking for x87-style double rounding... " >&6; }
Mark Dickinson99abd142009-10-24 13:44:16 +000012689# $BASECFLAGS may affect the result
12690ac_save_cc="$CC"
12691CC="$CC $BASECFLAGS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012692if test "$cross_compiling" = yes; then :
Mark Dickinson04b27232009-01-04 12:29:36 +000012693 ac_cv_x87_double_rounding=no
12694else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012695 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson04b27232009-01-04 12:29:36 +000012696/* end confdefs.h. */
12697
12698#include <stdlib.h>
12699#include <math.h>
12700int main() {
12701 volatile double x, y, z;
12702 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
12703 x = 0.99999999999999989; /* 1-2**-53 */
12704 y = 1./x;
12705 if (y != 1.)
12706 exit(0);
12707 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
12708 x = 1e16;
12709 y = 2.99999;
12710 z = x + y;
12711 if (z != 1e16+4.)
12712 exit(0);
12713 /* both tests show evidence of double rounding */
12714 exit(1);
12715}
12716
12717_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012718if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson04b27232009-01-04 12:29:36 +000012719 ac_cv_x87_double_rounding=no
12720else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012721 ac_cv_x87_double_rounding=yes
Mark Dickinson04b27232009-01-04 12:29:36 +000012722fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012723rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12724 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson04b27232009-01-04 12:29:36 +000012725fi
12726
Mark Dickinson99abd142009-10-24 13:44:16 +000012727CC="$ac_save_cc"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012728{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5
12729$as_echo "$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson04b27232009-01-04 12:29:36 +000012730if test "$ac_cv_x87_double_rounding" = yes
12731then
12732
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012733$as_echo "#define X87_DOUBLE_ROUNDING 1" >>confdefs.h
Mark Dickinson04b27232009-01-04 12:29:36 +000012734
12735fi
12736
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012737# ************************************
12738# * Check for mathematical functions *
12739# ************************************
12740
12741LIBS_SAVE=$LIBS
12742LIBS="$LIBS $LIBM"
12743
Mark Dickinson265d7382008-04-21 22:32:24 +000012744# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
12745# -0. on some architectures.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012746{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether tanh preserves the sign of zero" >&5
12747$as_echo_n "checking whether tanh preserves the sign of zero... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012748if ${ac_cv_tanh_preserves_zero_sign+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012749 $as_echo_n "(cached) " >&6
Mark Dickinson265d7382008-04-21 22:32:24 +000012750else
12751
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012752if test "$cross_compiling" = yes; then :
Mark Dickinson265d7382008-04-21 22:32:24 +000012753 ac_cv_tanh_preserves_zero_sign=no
12754else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012755 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson265d7382008-04-21 22:32:24 +000012756/* end confdefs.h. */
12757
12758#include <math.h>
Mark Dickinson7a3d8642008-04-22 00:54:27 +000012759#include <stdlib.h>
Mark Dickinson265d7382008-04-21 22:32:24 +000012760int main() {
12761 /* return 0 if either negative zeros don't exist
12762 on this platform or if negative zeros exist
12763 and tanh(-0.) == -0. */
12764 if (atan2(0., -1.) == atan2(-0., -1.) ||
12765 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
12766 else exit(1);
12767}
12768
12769_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012770if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson265d7382008-04-21 22:32:24 +000012771 ac_cv_tanh_preserves_zero_sign=yes
12772else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012773 ac_cv_tanh_preserves_zero_sign=no
Mark Dickinson265d7382008-04-21 22:32:24 +000012774fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012775rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12776 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson265d7382008-04-21 22:32:24 +000012777fi
12778
Mark Dickinson265d7382008-04-21 22:32:24 +000012779fi
12780
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012781{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_tanh_preserves_zero_sign" >&5
12782$as_echo "$ac_cv_tanh_preserves_zero_sign" >&6; }
Mark Dickinson265d7382008-04-21 22:32:24 +000012783if test "$ac_cv_tanh_preserves_zero_sign" = yes
12784then
12785
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012786$as_echo "#define TANH_PRESERVES_ZERO_SIGN 1" >>confdefs.h
Mark Dickinson265d7382008-04-21 22:32:24 +000012787
12788fi
12789
Mark Dickinson65898e02009-09-05 10:27:00 +000012790for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012791do :
12792 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12793ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Georg Brandl71f4fbb2011-02-25 11:04:50 +000012794if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinson65898e02009-09-05 10:27:00 +000012795 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012796#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Mark Dickinson65898e02009-09-05 10:27:00 +000012797_ACEOF
12798
12799fi
12800done
12801
Mark Dickinson65898e02009-09-05 10:27:00 +000012802for ac_func in hypot lgamma log1p round tgamma
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012803do :
12804 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12805ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Georg Brandl71f4fbb2011-02-25 11:04:50 +000012806if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Christian Heimes0a8143f2007-12-18 23:22:54 +000012807 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012808#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Christian Heimes0a8143f2007-12-18 23:22:54 +000012809_ACEOF
12810
12811fi
12812done
12813
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012814ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
12815"
Matthias Klose3cef2a92012-03-14 23:39:33 +010012816if test "x$ac_cv_have_decl_isinf" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012817 ac_have_decl=1
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012818else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012819 ac_have_decl=0
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012820fi
12821
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012822cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012823#define HAVE_DECL_ISINF $ac_have_decl
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012824_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012825ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h>
12826"
Matthias Klose3cef2a92012-03-14 23:39:33 +010012827if test "x$ac_cv_have_decl_isnan" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012828 ac_have_decl=1
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012829else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012830 ac_have_decl=0
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012831fi
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012832
12833cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012834#define HAVE_DECL_ISNAN $ac_have_decl
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012835_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012836ac_fn_c_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include <math.h>
12837"
Matthias Klose3cef2a92012-03-14 23:39:33 +010012838if test "x$ac_cv_have_decl_isfinite" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012839 ac_have_decl=1
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012840else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012841 ac_have_decl=0
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012842fi
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012843
12844cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012845#define HAVE_DECL_ISFINITE $ac_have_decl
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012846_ACEOF
12847
12848
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000012849LIBS=$LIBS_SAVE
12850
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012851# For multiprocessing module, check that sem_open
12852# actually works. For FreeBSD versions <= 7.2,
12853# the kernel module that provides POSIX semaphores
12854# isn't loaded by default, so an attempt to call
12855# sem_open results in a 'Signal 12' error.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012856{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX semaphores are enabled" >&5
12857$as_echo_n "checking whether POSIX semaphores are enabled... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012858if ${ac_cv_posix_semaphores_enabled+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012859 $as_echo_n "(cached) " >&6
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012860else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012861 if test "$cross_compiling" = yes; then :
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012862 ac_cv_posix_semaphores_enabled=yes
12863else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012864 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012865/* end confdefs.h. */
12866
12867#include <unistd.h>
12868#include <fcntl.h>
12869#include <stdio.h>
12870#include <semaphore.h>
12871#include <sys/stat.h>
12872
12873int main(void) {
12874 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
12875 if (a == SEM_FAILED) {
12876 perror("sem_open");
12877 return 1;
12878 }
12879 sem_close(a);
Mark Dickinson59dc89e2009-12-13 21:06:06 +000012880 sem_unlink("/autoconf");
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012881 return 0;
12882}
12883
12884_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012885if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012886 ac_cv_posix_semaphores_enabled=yes
12887else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012888 ac_cv_posix_semaphores_enabled=no
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012889fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012890rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12891 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012892fi
12893
12894
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012895fi
12896
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012897{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_semaphores_enabled" >&5
12898$as_echo "$ac_cv_posix_semaphores_enabled" >&6; }
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012899if test $ac_cv_posix_semaphores_enabled = no
12900then
12901
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012902$as_echo "#define POSIX_SEMAPHORES_NOT_ENABLED 1" >>confdefs.h
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012903
12904fi
12905
12906# Multiprocessing check for broken sem_getvalue
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012907{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken sem_getvalue" >&5
12908$as_echo_n "checking for broken sem_getvalue... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012909if ${ac_cv_broken_sem_getvalue+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012910 $as_echo_n "(cached) " >&6
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012911else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012912 if test "$cross_compiling" = yes; then :
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012913 ac_cv_broken_sem_getvalue=yes
12914else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012915 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012916/* end confdefs.h. */
12917
12918#include <unistd.h>
12919#include <fcntl.h>
12920#include <stdio.h>
12921#include <semaphore.h>
12922#include <sys/stat.h>
12923
12924int main(void){
Mark Dickinson59dc89e2009-12-13 21:06:06 +000012925 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012926 int count;
12927 int res;
12928 if(a==SEM_FAILED){
12929 perror("sem_open");
12930 return 1;
12931
12932 }
12933 res = sem_getvalue(a, &count);
12934 sem_close(a);
Mark Dickinson59dc89e2009-12-13 21:06:06 +000012935 sem_unlink("/autocftw");
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012936 return res==-1 ? 1 : 0;
12937}
12938
12939_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012940if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012941 ac_cv_broken_sem_getvalue=no
12942else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012943 ac_cv_broken_sem_getvalue=yes
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012944fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012945rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12946 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012947fi
12948
12949
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012950fi
12951
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012952{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_sem_getvalue" >&5
12953$as_echo "$ac_cv_broken_sem_getvalue" >&6; }
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012954if test $ac_cv_broken_sem_getvalue = yes
12955then
12956
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012957$as_echo "#define HAVE_BROKEN_SEM_GETVALUE 1" >>confdefs.h
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012958
12959fi
12960
Mark Dickinsonefc82f72009-03-20 15:51:55 +000012961# determine what size digit to use for Python's longs
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012962{ $as_echo "$as_me:${as_lineno-$LINENO}: checking digit size for Python's longs" >&5
12963$as_echo_n "checking digit size for Python's longs... " >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +000012964# Check whether --enable-big-digits was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012965if test "${enable_big_digits+set}" = set; then :
Mark Dickinsonefc82f72009-03-20 15:51:55 +000012966 enableval=$enable_big_digits; case $enable_big_digits in
12967yes)
12968 enable_big_digits=30 ;;
12969no)
12970 enable_big_digits=15 ;;
1297115|30)
12972 ;;
12973*)
Matthias Klose3cef2a92012-03-14 23:39:33 +010012974 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 +000012975esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012976{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_big_digits" >&5
12977$as_echo "$enable_big_digits" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +000012978
12979cat >>confdefs.h <<_ACEOF
12980#define PYLONG_BITS_IN_DIGIT $enable_big_digits
12981_ACEOF
12982
12983
12984else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012985 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
12986$as_echo "no value specified" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +000012987fi
12988
12989
Guido van Rossumef2255b2000-03-10 22:30:29 +000012990# check for wchar.h
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012991ac_fn_c_check_header_mongrel "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
Matthias Klose3cef2a92012-03-14 23:39:33 +010012992if test "x$ac_cv_header_wchar_h" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012993
12994
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012995$as_echo "#define HAVE_WCHAR_H 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012996
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012997 wchar_h="yes"
12998
Guido van Rossumef2255b2000-03-10 22:30:29 +000012999else
Martin v. Löwis11437992002-04-12 09:54:03 +000013000 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000013001
13002fi
13003
Michael W. Hudson54241132001-12-07 15:38:26 +000013004
Martin v. Löwis11437992002-04-12 09:54:03 +000013005
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013006# determine wchar_t size
13007if test "$wchar_h" = yes
13008then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013009 # The cast to long int works around a bug in the HP C Compiler
Martin v. Löwiseba40652007-08-30 20:10:57 +000013010# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
13011# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
13012# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013013{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
13014$as_echo_n "checking size of wchar_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013015if ${ac_cv_sizeof_wchar_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013016 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000013017else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013018 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "#include <wchar.h>
13019"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013020
Martin v. Löwis11437992002-04-12 09:54:03 +000013021else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013022 if test "$ac_cv_type_wchar_t" = yes; then
13023 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
13024$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +000013025as_fn_error 77 "cannot compute sizeof (wchar_t)
Matthias Klose3cef2a92012-03-14 23:39:33 +010013026See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000013027 else
13028 ac_cv_sizeof_wchar_t=0
13029 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013030fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013031
Martin v. Löwis11437992002-04-12 09:54:03 +000013032fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013033{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
13034$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000013035
13036
13037
Martin v. Löwis11437992002-04-12 09:54:03 +000013038cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013039#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000013040_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013041
Michael W. Hudson54241132001-12-07 15:38:26 +000013042
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013043fi
13044
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013045{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UCS-4 tcl" >&5
13046$as_echo_n "checking for UCS-4 tcl... " >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013047have_ucs4_tcl=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013048cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013049/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013050
13051#include <tcl.h>
13052#if TCL_UTF_MAX != 6
13053# error "NOT UCS4_TCL"
13054#endif
13055int
13056main ()
13057{
13058
13059 ;
13060 return 0;
13061}
13062_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013063if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013064
13065
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013066$as_echo "#define HAVE_UCS4_TCL 1" >>confdefs.h
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013067
13068 have_ucs4_tcl=yes
13069
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013070fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013071rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013072{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ucs4_tcl" >&5
13073$as_echo "$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013074
Skip Montanaro6dead952003-09-25 14:50:04 +000013075# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013076if test "$wchar_h" = yes
13077then
13078 # check whether wchar_t is signed or not
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013079 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is signed" >&5
13080$as_echo_n "checking whether wchar_t is signed... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013081 if ${ac_cv_wchar_t_signed+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013082 $as_echo_n "(cached) " >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013083else
13084
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013085 if test "$cross_compiling" = yes; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013086 ac_cv_wchar_t_signed=yes
13087else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013088 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013089/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013090
13091 #include <wchar.h>
13092 int main()
13093 {
Martin v. Löwis44fe0e42006-04-11 07:15:30 +000013094 /* Success: exit code 0 */
13095 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013096 }
13097
13098_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013099if ac_fn_c_try_run "$LINENO"; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013100 ac_cv_wchar_t_signed=yes
13101else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013102 ac_cv_wchar_t_signed=no
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013103fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013104rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13105 conftest.$ac_objext conftest.beam conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013106fi
13107
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013108fi
13109
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013110 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wchar_t_signed" >&5
13111$as_echo "$ac_cv_wchar_t_signed" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000013112fi
13113
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013114{ $as_echo "$as_me:${as_lineno-$LINENO}: checking what type to use for unicode" >&5
13115$as_echo_n "checking what type to use for unicode... " >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000013116# Check whether --enable-unicode was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013117if test "${enable_unicode+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +000013118 enableval=$enable_unicode;
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013119else
13120 enable_unicode=yes
Martin v. Löwiseba40652007-08-30 20:10:57 +000013121fi
13122
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013123
13124if test $enable_unicode = yes
13125then
Martin v. Löwisfd917792001-06-27 20:22:04 +000013126 # Without any arguments, Py_UNICODE defaults to two-byte mode
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013127 case "$have_ucs4_tcl" in
13128 yes) enable_unicode="ucs4"
13129 ;;
13130 *) enable_unicode="ucs2"
13131 ;;
13132 esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013133fi
13134
Martin v. Löwis0036cba2002-04-12 09:58:45 +000013135
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013136case "$enable_unicode" in
13137ucs2) unicode_size="2"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013138 $as_echo "#define Py_UNICODE_SIZE 2" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013139
13140 ;;
13141ucs4) unicode_size="4"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013142 $as_echo "#define Py_UNICODE_SIZE 4" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013143
13144 ;;
Martin v. Löwised11a5d2012-05-20 10:42:17 +020013145no) ;; # To allow --disable-unicode
Matthias Klose3cef2a92012-03-14 23:39:33 +010013146*) 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 +000013147esac
13148
Michael W. Hudson54241132001-12-07 15:38:26 +000013149
Martin v. Löwis11437992002-04-12 09:54:03 +000013150
13151
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013152if test "$enable_unicode" = "no"
13153then
Martin v. Löwis339d0f72001-08-17 18:39:25 +000013154 UNICODE_OBJS=""
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013155 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not used" >&5
13156$as_echo "not used" >&6; }
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013157else
Martin v. Löwis339d0f72001-08-17 18:39:25 +000013158 UNICODE_OBJS="Objects/unicodeobject.o Objects/unicodectype.o"
Martin v. Löwis11437992002-04-12 09:54:03 +000013159
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013160$as_echo "#define Py_USING_UNICODE 1" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013161
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013162
13163 # wchar_t is only usable if it maps to an unsigned type
13164 if test "$unicode_size" = "$ac_cv_sizeof_wchar_t" \
Matthias Klose7dbeed72004-12-24 08:22:17 +000013165 -a "$ac_cv_wchar_t_signed" = "no"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013166 then
13167 PY_UNICODE_TYPE="wchar_t"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013168
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013169$as_echo "#define HAVE_USABLE_WCHAR_T 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013170
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013171 $as_echo "#define PY_UNICODE_TYPE wchar_t" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013172
13173 elif test "$ac_cv_sizeof_short" = "$unicode_size"
13174 then
13175 PY_UNICODE_TYPE="unsigned short"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013176 $as_echo "#define PY_UNICODE_TYPE unsigned short" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013177
13178 elif test "$ac_cv_sizeof_long" = "$unicode_size"
13179 then
13180 PY_UNICODE_TYPE="unsigned long"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013181 $as_echo "#define PY_UNICODE_TYPE unsigned long" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013182
13183 else
13184 PY_UNICODE_TYPE="no type found"
13185 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013186 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PY_UNICODE_TYPE" >&5
13187$as_echo "$PY_UNICODE_TYPE" >&6; }
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013188fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000013189
13190# check for endianness
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013191 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
13192$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013193if ${ac_cv_c_bigendian+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013194 $as_echo_n "(cached) " >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000013195else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013196 ac_cv_c_bigendian=unknown
13197 # See if we're dealing with a universal compiler.
13198 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13199/* end confdefs.h. */
13200#ifndef __APPLE_CC__
13201 not a universal capable compiler
13202 #endif
13203 typedef int dummy;
13204
Skip Montanaro6dead952003-09-25 14:50:04 +000013205_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013206if ac_fn_c_try_compile "$LINENO"; then :
13207
13208 # Check for potential -arch flags. It is not universal unless
13209 # there are at least two -arch flags with different values.
13210 ac_arch=
13211 ac_prev=
13212 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
13213 if test -n "$ac_prev"; then
13214 case $ac_word in
13215 i?86 | x86_64 | ppc | ppc64)
13216 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
13217 ac_arch=$ac_word
13218 else
13219 ac_cv_c_bigendian=universal
13220 break
13221 fi
13222 ;;
13223 esac
13224 ac_prev=
13225 elif test "x$ac_word" = "x-arch"; then
13226 ac_prev=arch
13227 fi
13228 done
13229fi
13230rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13231 if test $ac_cv_c_bigendian = unknown; then
13232 # See if sys/param.h defines the BYTE_ORDER macro.
13233 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013234/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000013235#include <sys/types.h>
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013236 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000013237
Martin v. Löwis11437992002-04-12 09:54:03 +000013238int
13239main ()
13240{
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013241#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
13242 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
13243 && LITTLE_ENDIAN)
13244 bogus endian macros
13245 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013246
13247 ;
13248 return 0;
13249}
13250_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013251if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000013252 # It does; now see whether it defined to BIG_ENDIAN or not.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013253 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013254/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000013255#include <sys/types.h>
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013256 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000013257
Martin v. Löwis11437992002-04-12 09:54:03 +000013258int
13259main ()
13260{
Guido van Rossumef2255b2000-03-10 22:30:29 +000013261#if BYTE_ORDER != BIG_ENDIAN
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013262 not big endian
13263 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013264
13265 ;
13266 return 0;
13267}
13268_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013269if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000013270 ac_cv_c_bigendian=yes
13271else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013272 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000013273fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013274rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013275fi
13276rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13277 fi
13278 if test $ac_cv_c_bigendian = unknown; then
13279 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
13280 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013281/* end confdefs.h. */
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013282#include <limits.h>
13283
Martin v. Löwis11437992002-04-12 09:54:03 +000013284int
13285main ()
13286{
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013287#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
13288 bogus endian macros
13289 #endif
13290
Martin v. Löwis11437992002-04-12 09:54:03 +000013291 ;
13292 return 0;
13293}
13294_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013295if ac_fn_c_try_compile "$LINENO"; then :
13296 # It does; now see whether it defined to _BIG_ENDIAN or not.
13297 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13298/* end confdefs.h. */
13299#include <limits.h>
13300
13301int
13302main ()
13303{
13304#ifndef _BIG_ENDIAN
13305 not big endian
13306 #endif
13307
13308 ;
13309 return 0;
13310}
13311_ACEOF
13312if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013313 ac_cv_c_bigendian=yes
Alexandre Vassalottia2db6872009-07-17 07:46:46 +000013314else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013315 ac_cv_c_bigendian=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013316fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013317rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13318fi
13319rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13320 fi
13321 if test $ac_cv_c_bigendian = unknown; then
13322 # Compile a test program.
13323 if test "$cross_compiling" = yes; then :
13324 # Try to guess by grepping values from an object file.
13325 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13326/* end confdefs.h. */
13327short int ascii_mm[] =
13328 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
13329 short int ascii_ii[] =
13330 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
13331 int use_ascii (int i) {
13332 return ascii_mm[i] + ascii_ii[i];
13333 }
13334 short int ebcdic_ii[] =
13335 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
13336 short int ebcdic_mm[] =
13337 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
13338 int use_ebcdic (int i) {
13339 return ebcdic_mm[i] + ebcdic_ii[i];
13340 }
13341 extern int foo;
Martin v. Löwiseba40652007-08-30 20:10:57 +000013342
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013343int
13344main ()
13345{
13346return use_ascii (foo) == use_ebcdic (foo);
13347 ;
13348 return 0;
13349}
13350_ACEOF
13351if ac_fn_c_try_compile "$LINENO"; then :
13352 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
13353 ac_cv_c_bigendian=yes
13354 fi
13355 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
13356 if test "$ac_cv_c_bigendian" = unknown; then
13357 ac_cv_c_bigendian=no
13358 else
13359 # finding both strings is unlikely to happen, but who knows?
13360 ac_cv_c_bigendian=unknown
13361 fi
13362 fi
13363fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013364rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013365else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013366 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013367/* end confdefs.h. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000013368$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000013369int
13370main ()
13371{
Martin v. Löwiseba40652007-08-30 20:10:57 +000013372
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013373 /* Are we little or big endian? From Harbison&Steele. */
13374 union
13375 {
13376 long int l;
13377 char c[sizeof (long int)];
13378 } u;
13379 u.l = 1;
13380 return u.c[sizeof (long int) - 1] == 1;
Martin v. Löwiseba40652007-08-30 20:10:57 +000013381
13382 ;
13383 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000013384}
Martin v. Löwis11437992002-04-12 09:54:03 +000013385_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013386if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000013387 ac_cv_c_bigendian=no
13388else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013389 ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000013390fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013391rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13392 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000013393fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013394
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013395 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013396fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013397{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
13398$as_echo "$ac_cv_c_bigendian" >&6; }
13399 case $ac_cv_c_bigendian in #(
13400 yes)
13401 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
13402;; #(
13403 no)
13404 ;; #(
13405 universal)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013406
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013407$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Alexandre Vassalottia2db6872009-07-17 07:46:46 +000013408
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013409 ;; #(
13410 *)
Georg Brandl71f4fbb2011-02-25 11:04:50 +000013411 as_fn_error $? "unknown endianness
Matthias Klose3cef2a92012-03-14 23:39:33 +010013412 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013413 esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000013414
Michael W. Hudson54241132001-12-07 15:38:26 +000013415
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013416# Check whether right shifting a negative integer extends the sign bit
13417# or fills with zeros (like the Cray J90, according to Tim Peters).
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013418{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether right shift extends the sign bit" >&5
13419$as_echo_n "checking whether right shift extends the sign bit... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013420if ${ac_cv_rshift_extends_sign+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013421 $as_echo_n "(cached) " >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000013422else
Martin v. Löwis11437992002-04-12 09:54:03 +000013423
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013424if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000013425 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013426else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013427 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013428/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013429
13430int main()
13431{
Vladimir Marangozova6180282000-07-12 05:05:06 +000013432 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013433}
13434
Martin v. Löwis11437992002-04-12 09:54:03 +000013435_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013436if ac_fn_c_try_run "$LINENO"; then :
Vladimir Marangozova6180282000-07-12 05:05:06 +000013437 ac_cv_rshift_extends_sign=yes
13438else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013439 ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000013440fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013441rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13442 conftest.$ac_objext conftest.beam conftest.$ac_ext
Vladimir Marangozova6180282000-07-12 05:05:06 +000013443fi
13444
Martin v. Löwiseba40652007-08-30 20:10:57 +000013445fi
13446
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013447{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rshift_extends_sign" >&5
13448$as_echo "$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000013449if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013450then
Martin v. Löwis11437992002-04-12 09:54:03 +000013451
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013452$as_echo "#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1" >>confdefs.h
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013453
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013454fi
13455
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013456# check for getc_unlocked and related locking functions
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013457{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getc_unlocked() and friends" >&5
13458$as_echo_n "checking for getc_unlocked() and friends... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013459if ${ac_cv_have_getc_unlocked+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013460 $as_echo_n "(cached) " >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013461else
Martin v. Löwis11437992002-04-12 09:54:03 +000013462
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013463cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013464/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013465#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013466int
13467main ()
13468{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013469
13470 FILE *f = fopen("/dev/null", "r");
13471 flockfile(f);
13472 getc_unlocked(f);
13473 funlockfile(f);
13474
Martin v. Löwis11437992002-04-12 09:54:03 +000013475 ;
13476 return 0;
13477}
13478_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013479if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013480 ac_cv_have_getc_unlocked=yes
13481else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013482 ac_cv_have_getc_unlocked=no
13483fi
13484rm -f core conftest.err conftest.$ac_objext \
13485 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013486fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013487
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013488{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getc_unlocked" >&5
13489$as_echo "$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013490if test "$ac_cv_have_getc_unlocked" = yes
13491then
Martin v. Löwis11437992002-04-12 09:54:03 +000013492
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013493$as_echo "#define HAVE_GETC_UNLOCKED 1" >>confdefs.h
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013494
13495fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013496
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013497# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000013498# save the value of LIBS so we don't actually link Python with readline
13499LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013500
Gregory P. Smithcc023f12008-09-07 05:15:58 +000013501# On some systems we need to link readline to a termcap compatible
13502# library. NOTE: Keep the precedence of listed libraries synchronised
13503# with setup.py.
13504py_cv_lib_readline=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013505{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link readline libs" >&5
13506$as_echo_n "checking how to link readline libs... " >&6; }
Gregory P. Smithcc023f12008-09-07 05:15:58 +000013507for py_libtermcap in "" ncursesw ncurses curses termcap; do
13508 if test -z "$py_libtermcap"; then
13509 READLINE_LIBS="-lreadline"
13510 else
13511 READLINE_LIBS="-lreadline -l$py_libtermcap"
13512 fi
13513 LIBS="$READLINE_LIBS $LIBS_no_readline"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013514 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013515/* end confdefs.h. */
13516
Martin v. Löwiseba40652007-08-30 20:10:57 +000013517/* Override any GCC internal prototype to avoid an error.
13518 Use char because int might match the return type of a GCC
13519 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013520#ifdef __cplusplus
13521extern "C"
13522#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013523char readline ();
13524int
13525main ()
13526{
Martin v. Löwiseba40652007-08-30 20:10:57 +000013527return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013528 ;
13529 return 0;
13530}
13531_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013532if ac_fn_c_try_link "$LINENO"; then :
Gregory P. Smithcc023f12008-09-07 05:15:58 +000013533 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013534fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013535rm -f core conftest.err conftest.$ac_objext \
13536 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smithcc023f12008-09-07 05:15:58 +000013537 if test $py_cv_lib_readline = yes; then
13538 break
13539 fi
13540done
13541# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
13542#AC_SUBST([READLINE_LIBS])
Gregory P. Smithe080cdf2008-09-07 19:19:04 +000013543if test $py_cv_lib_readline = no; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013544 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
13545$as_echo "none" >&6; }
Gregory P. Smithcc023f12008-09-07 05:15:58 +000013546else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013547 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_LIBS" >&5
13548$as_echo "$READLINE_LIBS" >&6; }
Gregory P. Smithcc023f12008-09-07 05:15:58 +000013549
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013550$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013551
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013552fi
13553
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013554# check for readline 2.1
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013555{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_callback_handler_install in -lreadline" >&5
13556$as_echo_n "checking for rl_callback_handler_install in -lreadline... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013557if ${ac_cv_lib_readline_rl_callback_handler_install+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013558 $as_echo_n "(cached) " >&6
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013559else
13560 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000013561LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013562cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013563/* end confdefs.h. */
13564
Martin v. Löwiseba40652007-08-30 20:10:57 +000013565/* Override any GCC internal prototype to avoid an error.
13566 Use char because int might match the return type of a GCC
13567 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013568#ifdef __cplusplus
13569extern "C"
13570#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013571char rl_callback_handler_install ();
13572int
13573main ()
13574{
Martin v. Löwiseba40652007-08-30 20:10:57 +000013575return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013576 ;
13577 return 0;
13578}
13579_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013580if ac_fn_c_try_link "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013581 ac_cv_lib_readline_rl_callback_handler_install=yes
13582else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013583 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013584fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013585rm -f core conftest.err conftest.$ac_objext \
13586 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013587LIBS=$ac_check_lib_save_LIBS
13588fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013589{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
13590$as_echo "$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013591if test "x$ac_cv_lib_readline_rl_callback_handler_install" = xyes; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013592
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013593$as_echo "#define HAVE_RL_CALLBACK 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013594
13595fi
13596
13597
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013598# check for readline 2.2
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013599cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013600/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013601#include <readline/readline.h>
13602_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013603if ac_fn_c_try_cpp "$LINENO"; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013604 have_readline=yes
13605else
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013606 have_readline=no
Matthias Klosec511b472010-05-08 11:01:39 +000013607
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013608fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +000013609rm -f conftest.err conftest.i conftest.$ac_ext
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013610if test $have_readline = yes
13611then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013612 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013613/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013614#include <readline/readline.h>
13615
13616_ACEOF
13617if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013618 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013619
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013620$as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013621
13622fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +000013623rm -f conftest*
Antoine Pitroud9ff74e2009-10-26 19:16:46 +000013624
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013625 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroud9ff74e2009-10-26 19:16:46 +000013626/* end confdefs.h. */
13627#include <readline/readline.h>
13628
13629_ACEOF
13630if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013631 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then :
Antoine Pitroud9ff74e2009-10-26 19:16:46 +000013632
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013633$as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h
Antoine Pitroud9ff74e2009-10-26 19:16:46 +000013634
13635fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +000013636rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013637
13638fi
13639
Martin v. Löwis0daad592001-09-30 21:09:59 +000013640# check for readline 4.0
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013641{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -lreadline" >&5
13642$as_echo_n "checking for rl_pre_input_hook in -lreadline... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013643if ${ac_cv_lib_readline_rl_pre_input_hook+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013644 $as_echo_n "(cached) " >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000013645else
Martin v. Löwis11437992002-04-12 09:54:03 +000013646 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000013647LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013648cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013649/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013650
Martin v. Löwiseba40652007-08-30 20:10:57 +000013651/* Override any GCC internal prototype to avoid an error.
13652 Use char because int might match the return type of a GCC
13653 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013654#ifdef __cplusplus
13655extern "C"
13656#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013657char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013658int
13659main ()
13660{
Martin v. Löwiseba40652007-08-30 20:10:57 +000013661return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013662 ;
13663 return 0;
13664}
13665_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013666if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013667 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000013668else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013669 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000013670fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013671rm -f core conftest.err conftest.$ac_objext \
13672 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013673LIBS=$ac_check_lib_save_LIBS
13674fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013675{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
13676$as_echo "$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013677if test "x$ac_cv_lib_readline_rl_pre_input_hook" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000013678
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013679$as_echo "#define HAVE_RL_PRE_INPUT_HOOK 1" >>confdefs.h
Martin v. Löwis0daad592001-09-30 21:09:59 +000013680
Martin v. Löwis0daad592001-09-30 21:09:59 +000013681fi
13682
Michael W. Hudson54241132001-12-07 15:38:26 +000013683
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000013684# also in 4.0
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013685{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -lreadline" >&5
13686$as_echo_n "checking for rl_completion_display_matches_hook in -lreadline... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013687if ${ac_cv_lib_readline_rl_completion_display_matches_hook+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013688 $as_echo_n "(cached) " >&6
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000013689else
13690 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000013691LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013692cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000013693/* end confdefs.h. */
13694
13695/* Override any GCC internal prototype to avoid an error.
13696 Use char because int might match the return type of a GCC
13697 builtin and then its argument prototype would still apply. */
13698#ifdef __cplusplus
13699extern "C"
13700#endif
13701char rl_completion_display_matches_hook ();
13702int
13703main ()
13704{
13705return rl_completion_display_matches_hook ();
13706 ;
13707 return 0;
13708}
13709_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013710if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000013711 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
13712else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013713 ac_cv_lib_readline_rl_completion_display_matches_hook=no
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000013714fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013715rm -f core conftest.err conftest.$ac_objext \
13716 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000013717LIBS=$ac_check_lib_save_LIBS
13718fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013719{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
13720$as_echo "$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013721if test "x$ac_cv_lib_readline_rl_completion_display_matches_hook" = xyes; then :
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000013722
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013723$as_echo "#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000013724
13725fi
13726
13727
Martin v. Löwis0daad592001-09-30 21:09:59 +000013728# check for readline 4.2
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013729{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5
13730$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013731if ${ac_cv_lib_readline_rl_completion_matches+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013732 $as_echo_n "(cached) " >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000013733else
Martin v. Löwis11437992002-04-12 09:54:03 +000013734 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000013735LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013736cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013737/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013738
Martin v. Löwiseba40652007-08-30 20:10:57 +000013739/* Override any GCC internal prototype to avoid an error.
13740 Use char because int might match the return type of a GCC
13741 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013742#ifdef __cplusplus
13743extern "C"
13744#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013745char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013746int
13747main ()
13748{
Martin v. Löwiseba40652007-08-30 20:10:57 +000013749return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013750 ;
13751 return 0;
13752}
13753_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013754if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013755 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000013756else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013757 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000013758fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013759rm -f core conftest.err conftest.$ac_objext \
13760 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013761LIBS=$ac_check_lib_save_LIBS
13762fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013763{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_matches" >&5
13764$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013765if test "x$ac_cv_lib_readline_rl_completion_matches" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000013766
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013767$as_echo "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h
Guido van Rossum353ae582001-07-10 16:45:32 +000013768
Guido van Rossum353ae582001-07-10 16:45:32 +000013769fi
13770
Jack Jansendd19cf82001-12-06 22:36:17 +000013771
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013772# also in readline 4.2
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013773cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013774/* end confdefs.h. */
13775#include <readline/readline.h>
13776_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013777if ac_fn_c_try_cpp "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013778 have_readline=yes
13779else
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013780 have_readline=no
Matthias Klosec511b472010-05-08 11:01:39 +000013781
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013782fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +000013783rm -f conftest.err conftest.i conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013784if test $have_readline = yes
13785then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013786 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013787/* end confdefs.h. */
13788#include <readline/readline.h>
13789
13790_ACEOF
13791if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013792 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013793
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013794$as_echo "#define HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013795
13796fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +000013797rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013798
13799fi
13800
Martin v. Löwis82bca632006-02-10 20:49:30 +000013801# End of readline checks: restore LIBS
13802LIBS=$LIBS_no_readline
13803
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013804{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken nice()" >&5
13805$as_echo_n "checking for broken nice()... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013806if ${ac_cv_broken_nice+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013807 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000013808else
Martin v. Löwis11437992002-04-12 09:54:03 +000013809
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013810if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000013811 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013812else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013813 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013814/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013815
13816int main()
13817{
13818 int val1 = nice(1);
13819 if (val1 != -1 && val1 == nice(2))
13820 exit(0);
13821 exit(1);
13822}
13823
Martin v. Löwis11437992002-04-12 09:54:03 +000013824_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013825if ac_fn_c_try_run "$LINENO"; then :
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013826 ac_cv_broken_nice=yes
13827else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013828 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013829fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013830rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13831 conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013832fi
13833
Martin v. Löwiseba40652007-08-30 20:10:57 +000013834fi
13835
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013836{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_nice" >&5
13837$as_echo "$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013838if test "$ac_cv_broken_nice" = yes
13839then
Martin v. Löwis11437992002-04-12 09:54:03 +000013840
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013841$as_echo "#define HAVE_BROKEN_NICE 1" >>confdefs.h
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013842
13843fi
13844
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013845{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken poll()" >&5
13846$as_echo_n "checking for broken poll()... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013847if ${ac_cv_broken_poll+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013848 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013849else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013850 if test "$cross_compiling" = yes; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013851 ac_cv_broken_poll=no
13852else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013853 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013854/* end confdefs.h. */
13855
13856#include <poll.h>
13857
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013858int main()
13859{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013860 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013861 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013862
13863 close (42);
13864
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013865 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013866 if (poll_test < 0)
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013867 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013868 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013869 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013870 else
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013871 return 1;
13872}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013873
13874_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013875if ac_fn_c_try_run "$LINENO"; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013876 ac_cv_broken_poll=yes
13877else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013878 ac_cv_broken_poll=no
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013879fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013880rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13881 conftest.$ac_objext conftest.beam conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013882fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013883
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013884fi
13885
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013886{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_poll" >&5
13887$as_echo "$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013888if test "$ac_cv_broken_poll" = yes
13889then
13890
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013891$as_echo "#define HAVE_BROKEN_POLL 1" >>confdefs.h
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013892
13893fi
13894
Brett Cannon43802422005-02-10 20:48:03 +000013895# 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 +000013896# (which is not required by ISO C or UNIX spec) and/or if we support
13897# tzname[]
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013898ac_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 +000013899#include <$ac_cv_struct_tm>
13900
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013901"
Matthias Klose3cef2a92012-03-14 23:39:33 +010013902if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Brett Cannon43802422005-02-10 20:48:03 +000013903
13904cat >>confdefs.h <<_ACEOF
13905#define HAVE_STRUCT_TM_TM_ZONE 1
13906_ACEOF
13907
13908
13909fi
13910
13911if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
13912
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013913$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000013914
13915else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013916 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
13917"
Matthias Klose3cef2a92012-03-14 23:39:33 +010013918if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013919 ac_have_decl=1
Martin v. Löwiseba40652007-08-30 20:10:57 +000013920else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013921 ac_have_decl=0
Martin v. Löwiseba40652007-08-30 20:10:57 +000013922fi
13923
Martin v. Löwiseba40652007-08-30 20:10:57 +000013924cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013925#define HAVE_DECL_TZNAME $ac_have_decl
Martin v. Löwiseba40652007-08-30 20:10:57 +000013926_ACEOF
13927
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013928 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
13929$as_echo_n "checking for tzname... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013930if ${ac_cv_var_tzname+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013931 $as_echo_n "(cached) " >&6
Martin v. Löwiseba40652007-08-30 20:10:57 +000013932else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013933 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000013934/* end confdefs.h. */
13935#include <time.h>
Martin v. Löwiseba40652007-08-30 20:10:57 +000013936#if !HAVE_DECL_TZNAME
13937extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000013938#endif
13939
13940int
13941main ()
13942{
Martin v. Löwiseba40652007-08-30 20:10:57 +000013943return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000013944 ;
13945 return 0;
13946}
13947_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013948if ac_fn_c_try_link "$LINENO"; then :
Brett Cannon43802422005-02-10 20:48:03 +000013949 ac_cv_var_tzname=yes
13950else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013951 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000013952fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013953rm -f core conftest.err conftest.$ac_objext \
13954 conftest$ac_exeext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000013955fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013956{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
13957$as_echo "$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000013958 if test $ac_cv_var_tzname = yes; then
13959
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013960$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000013961
13962 fi
13963fi
13964
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013965
Martin v. Löwis1d459062005-03-14 21:23:33 +000013966# check tzset(3) exists and works like we expect it to
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013967{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working tzset()" >&5
13968$as_echo_n "checking for working tzset()... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013969if ${ac_cv_working_tzset+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013970 $as_echo_n "(cached) " >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013971else
13972
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013973if test "$cross_compiling" = yes; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013974 ac_cv_working_tzset=no
13975else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013976 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013977/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013978
13979#include <stdlib.h>
13980#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000013981#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000013982
13983#if HAVE_TZNAME
13984extern char *tzname[];
13985#endif
13986
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013987int main()
13988{
Brett Cannon18367812003-09-19 00:59:16 +000013989 /* Note that we need to ensure that not only does tzset(3)
13990 do 'something' with localtime, but it works as documented
13991 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000013992 This includes making sure that tzname is set properly if
13993 tm->tm_zone does not exist since it is the alternative way
13994 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000013995
13996 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000013997 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000013998 */
13999
Martin v. Löwis1d459062005-03-14 21:23:33 +000014000 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000014001 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
14002
Neal Norwitz7f2588c2003-04-11 15:35:53 +000014003 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014004 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000014005 if (localtime(&groundhogday)->tm_hour != 0)
14006 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000014007#if HAVE_TZNAME
14008 /* For UTC, tzname[1] is sometimes "", sometimes " " */
14009 if (strcmp(tzname[0], "UTC") ||
14010 (tzname[1][0] != 0 && tzname[1][0] != ' '))
14011 exit(1);
14012#endif
Brett Cannon18367812003-09-19 00:59:16 +000014013
Neal Norwitz7f2588c2003-04-11 15:35:53 +000014014 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014015 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000014016 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014017 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000014018#if HAVE_TZNAME
14019 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
14020 exit(1);
14021#endif
Brett Cannon18367812003-09-19 00:59:16 +000014022
14023 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
14024 tzset();
14025 if (localtime(&groundhogday)->tm_hour != 11)
14026 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000014027#if HAVE_TZNAME
14028 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
14029 exit(1);
14030#endif
14031
14032#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000014033 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
14034 exit(1);
14035 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
14036 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000014037#endif
Brett Cannon18367812003-09-19 00:59:16 +000014038
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014039 exit(0);
14040}
14041
14042_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014043if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014044 ac_cv_working_tzset=yes
14045else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014046 ac_cv_working_tzset=no
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014047fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014048rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14049 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014050fi
14051
Martin v. Löwiseba40652007-08-30 20:10:57 +000014052fi
14053
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014054{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_tzset" >&5
14055$as_echo "$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014056if test "$ac_cv_working_tzset" = yes
14057then
14058
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014059$as_echo "#define HAVE_WORKING_TZSET 1" >>confdefs.h
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014060
14061fi
14062
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014063# Look for subsecond timestamps in struct stat
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014064{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec in struct stat" >&5
14065$as_echo_n "checking for tv_nsec in struct stat... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010014066if ${ac_cv_stat_tv_nsec+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014067 $as_echo_n "(cached) " >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014068else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014069 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014070/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014071#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014072int
14073main ()
14074{
14075
14076struct stat st;
14077st.st_mtim.tv_nsec = 1;
14078
14079 ;
14080 return 0;
14081}
14082_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014083if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa32c9942002-09-09 16:17:47 +000014084 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014085else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014086 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014087fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014088rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14089fi
14090
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014091{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec" >&5
14092$as_echo "$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014093if test "$ac_cv_stat_tv_nsec" = yes
14094then
14095
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014096$as_echo "#define HAVE_STAT_TV_NSEC 1" >>confdefs.h
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014097
14098fi
14099
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014100# Look for BSD style subsecond timestamps in struct stat
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014101{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec2 in struct stat" >&5
14102$as_echo_n "checking for tv_nsec2 in struct stat... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010014103if ${ac_cv_stat_tv_nsec2+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014104 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014105else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014106 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014107/* end confdefs.h. */
14108#include <sys/stat.h>
14109int
14110main ()
14111{
14112
14113struct stat st;
14114st.st_mtimespec.tv_nsec = 1;
14115
14116 ;
14117 return 0;
14118}
14119_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014120if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014121 ac_cv_stat_tv_nsec2=yes
14122else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014123 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014124fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014125rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14126fi
14127
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014128{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec2" >&5
14129$as_echo "$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014130if test "$ac_cv_stat_tv_nsec2" = yes
14131then
14132
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014133$as_echo "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014134
14135fi
14136
doko@ubuntu.comf27ec3e2014-04-17 20:11:19 +020014137# first curses configure check
14138ac_save_cppflags="$CPPFLAGS"
14139CPPFLAGS="$CPPFLAGS -I/usr/include/ncursesw"
14140
14141for ac_header in curses.h ncurses.h
14142do :
14143 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
14144ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
14145if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
14146 cat >>confdefs.h <<_ACEOF
14147#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
14148_ACEOF
14149
14150fi
14151
14152done
14153
14154
14155# On Solaris, term.h requires curses.h
14156for ac_header in term.h
14157do :
14158 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "
14159#ifdef HAVE_CURSES_H
14160#include <curses.h>
14161#endif
14162
14163"
14164if test "x$ac_cv_header_term_h" = xyes; then :
14165 cat >>confdefs.h <<_ACEOF
14166#define HAVE_TERM_H 1
14167_ACEOF
14168
14169fi
14170
14171done
14172
14173
Jack Jansen666b1e72001-10-31 12:11:48 +000014174# On HP/UX 11.0, mvwdelch is a block with a return statement
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014175{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mvwdelch is an expression" >&5
14176$as_echo_n "checking whether mvwdelch is an expression... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010014177if ${ac_cv_mvwdelch_is_expression+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014178 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000014179else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014180 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014181/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000014182#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014183int
14184main ()
14185{
Jack Jansen666b1e72001-10-31 12:11:48 +000014186
14187 int rtn;
14188 rtn = mvwdelch(0,0,0);
14189
Martin v. Löwis11437992002-04-12 09:54:03 +000014190 ;
14191 return 0;
14192}
14193_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014194if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000014195 ac_cv_mvwdelch_is_expression=yes
14196else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014197 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000014198fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014199rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14200fi
14201
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014202{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mvwdelch_is_expression" >&5
14203$as_echo "$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000014204
14205if test "$ac_cv_mvwdelch_is_expression" = yes
14206then
Martin v. Löwis11437992002-04-12 09:54:03 +000014207
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014208$as_echo "#define MVWDELCH_IS_EXPRESSION 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000014209
14210fi
14211
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014212{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WINDOW has _flags" >&5
14213$as_echo_n "checking whether WINDOW has _flags... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010014214if ${ac_cv_window_has_flags+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014215 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000014216else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014217 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014218/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000014219#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014220int
14221main ()
14222{
Jack Jansen666b1e72001-10-31 12:11:48 +000014223
14224 WINDOW *w;
14225 w->_flags = 0;
14226
Martin v. Löwis11437992002-04-12 09:54:03 +000014227 ;
14228 return 0;
14229}
14230_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014231if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000014232 ac_cv_window_has_flags=yes
14233else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014234 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000014235fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014236rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14237fi
14238
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014239{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_window_has_flags" >&5
14240$as_echo "$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000014241
Jack Jansen666b1e72001-10-31 12:11:48 +000014242
14243if test "$ac_cv_window_has_flags" = yes
14244then
Martin v. Löwis11437992002-04-12 09:54:03 +000014245
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014246$as_echo "#define WINDOW_HAS_FLAGS 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000014247
14248fi
14249
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014250{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_term_resized" >&5
14251$as_echo_n "checking for is_term_resized... " >&6; }
14252cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Walter Dörwald4994d952006-06-19 08:07:50 +000014253/* end confdefs.h. */
14254#include <curses.h>
14255int
14256main ()
14257{
14258void *x=is_term_resized
14259 ;
14260 return 0;
14261}
14262_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014263if ac_fn_c_try_compile "$LINENO"; then :
Walter Dörwald4994d952006-06-19 08:07:50 +000014264
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014265$as_echo "#define HAVE_CURSES_IS_TERM_RESIZED 1" >>confdefs.h
Walter Dörwald4994d952006-06-19 08:07:50 +000014266
Matthias Klosec511b472010-05-08 11:01:39 +000014267 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014268$as_echo "yes" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000014269else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014270 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14271$as_echo "no" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000014272
14273fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014274rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14275
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014276{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resize_term" >&5
14277$as_echo_n "checking for resize_term... " >&6; }
14278cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Walter Dörwald4994d952006-06-19 08:07:50 +000014279/* end confdefs.h. */
14280#include <curses.h>
14281int
14282main ()
14283{
14284void *x=resize_term
14285 ;
14286 return 0;
14287}
14288_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014289if ac_fn_c_try_compile "$LINENO"; then :
Walter Dörwald4994d952006-06-19 08:07:50 +000014290
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014291$as_echo "#define HAVE_CURSES_RESIZE_TERM 1" >>confdefs.h
Walter Dörwald4994d952006-06-19 08:07:50 +000014292
Matthias Klosec511b472010-05-08 11:01:39 +000014293 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014294$as_echo "yes" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000014295else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014296 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14297$as_echo "no" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000014298
14299fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014300rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14301
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014302{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resizeterm" >&5
14303$as_echo_n "checking for resizeterm... " >&6; }
14304cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Walter Dörwald4994d952006-06-19 08:07:50 +000014305/* end confdefs.h. */
14306#include <curses.h>
14307int
14308main ()
14309{
14310void *x=resizeterm
14311 ;
14312 return 0;
14313}
14314_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014315if ac_fn_c_try_compile "$LINENO"; then :
Walter Dörwald4994d952006-06-19 08:07:50 +000014316
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014317$as_echo "#define HAVE_CURSES_RESIZETERM 1" >>confdefs.h
Walter Dörwald4994d952006-06-19 08:07:50 +000014318
Matthias Klosec511b472010-05-08 11:01:39 +000014319 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014320$as_echo "yes" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000014321else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014322 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14323$as_echo "no" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000014324
14325fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014326rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
doko@ubuntu.comf27ec3e2014-04-17 20:11:19 +020014327# last curses configure check
14328CPPFLAGS=$ac_save_cppflags
Martin v. Löwiseba40652007-08-30 20:10:57 +000014329
doko@python.orgd65e2ba2013-01-31 23:52:03 +010014330{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for device files" >&5
14331$as_echo "$as_me: checking for device files" >&6;}
14332
14333if test "x$cross_compiling" = xyes; then
14334 if test "${ac_cv_file__dev_ptmx+set}" != set; then
14335 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
14336$as_echo_n "checking for /dev/ptmx... " >&6; }
14337 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
14338$as_echo "not set" >&6; }
14339 as_fn_error $? "set ac_cv_file__dev_ptmx to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
14340 fi
14341 if test "${ac_cv_file__dev_ptc+set}" != set; then
14342 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
14343$as_echo_n "checking for /dev/ptc... " >&6; }
14344 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
14345$as_echo "not set" >&6; }
14346 as_fn_error $? "set ac_cv_file__dev_ptc to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
14347 fi
14348fi
14349
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014350{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
14351$as_echo_n "checking for /dev/ptmx... " >&6; }
doko@python.orgd65e2ba2013-01-31 23:52:03 +010014352if ${ac_cv_file__dev_ptmx+:} false; then :
14353 $as_echo_n "(cached) " >&6
14354else
14355 test "$cross_compiling" = yes &&
14356 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
14357if test -r "/dev/ptmx"; then
14358 ac_cv_file__dev_ptmx=yes
14359else
14360 ac_cv_file__dev_ptmx=no
14361fi
14362fi
14363{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptmx" >&5
14364$as_echo "$ac_cv_file__dev_ptmx" >&6; }
14365if test "x$ac_cv_file__dev_ptmx" = xyes; then :
Martin v. Löwisfefbc202006-10-17 18:59:23 +000014366
doko@python.orgd65e2ba2013-01-31 23:52:03 +010014367fi
14368
14369if test "x$ac_cv_file__dev_ptmx" = xyes; then
Martin v. Löwis24a880b2002-12-31 12:55:15 +000014370
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014371$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
Martin v. Löwis24a880b2002-12-31 12:55:15 +000014372
Martin v. Löwis24a880b2002-12-31 12:55:15 +000014373fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014374{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
14375$as_echo_n "checking for /dev/ptc... " >&6; }
doko@python.orgd65e2ba2013-01-31 23:52:03 +010014376if ${ac_cv_file__dev_ptc+:} false; then :
14377 $as_echo_n "(cached) " >&6
14378else
14379 test "$cross_compiling" = yes &&
14380 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
14381if test -r "/dev/ptc"; then
14382 ac_cv_file__dev_ptc=yes
14383else
14384 ac_cv_file__dev_ptc=no
14385fi
14386fi
14387{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptc" >&5
14388$as_echo "$ac_cv_file__dev_ptc" >&6; }
14389if test "x$ac_cv_file__dev_ptc" = xyes; then :
Martin v. Löwisfefbc202006-10-17 18:59:23 +000014390
doko@python.orgd65e2ba2013-01-31 23:52:03 +010014391fi
14392
14393if test "x$ac_cv_file__dev_ptc" = xyes; then
Neal Norwitz865400f2003-03-21 01:42:58 +000014394
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014395$as_echo "#define HAVE_DEV_PTC 1" >>confdefs.h
Neal Norwitz865400f2003-03-21 01:42:58 +000014396
Neal Norwitz865400f2003-03-21 01:42:58 +000014397fi
14398
Mark Dickinson82864d12009-11-15 16:18:58 +000014399if test "$have_long_long" = yes
14400then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014401 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for %lld and %llu printf() format support" >&5
14402$as_echo_n "checking for %lld and %llu printf() format support... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010014403 if ${ac_cv_have_long_long_format+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014404 $as_echo_n "(cached) " >&6
Mark Dickinson82864d12009-11-15 16:18:58 +000014405else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014406 if test "$cross_compiling" = yes; then :
doko@python.orgd65e2ba2013-01-31 23:52:03 +010014407 ac_cv_have_long_long_format="cross -- assuming no"
14408 if test x$GCC = xyes; then
14409 save_CFLAGS=$CFLAGS
14410 CFLAGS="$CFLAGS -Werror -Wformat"
14411 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14412/* end confdefs.h. */
14413
14414 #include <stdio.h>
14415 #include <stddef.h>
14416
14417int
14418main ()
14419{
14420
14421 char *buffer;
14422 sprintf(buffer, "%lld", (long long)123);
14423 sprintf(buffer, "%lld", (long long)-123);
14424 sprintf(buffer, "%llu", (unsigned long long)123);
14425
14426 ;
14427 return 0;
14428}
14429_ACEOF
14430if ac_fn_c_try_compile "$LINENO"; then :
14431 ac_cv_have_long_long_format=yes
14432
14433fi
14434rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14435 CFLAGS=$save_CFLAGS
14436 fi
Mark Dickinson82864d12009-11-15 16:18:58 +000014437else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014438 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson82864d12009-11-15 16:18:58 +000014439/* end confdefs.h. */
14440
14441 #include <stdio.h>
14442 #include <stddef.h>
14443 #include <string.h>
14444
14445 #ifdef HAVE_SYS_TYPES_H
14446 #include <sys/types.h>
14447 #endif
14448
14449 int main()
14450 {
14451 char buffer[256];
14452
14453 if (sprintf(buffer, "%lld", (long long)123) < 0)
14454 return 1;
14455 if (strcmp(buffer, "123"))
14456 return 1;
14457
14458 if (sprintf(buffer, "%lld", (long long)-123) < 0)
14459 return 1;
14460 if (strcmp(buffer, "-123"))
14461 return 1;
14462
14463 if (sprintf(buffer, "%llu", (unsigned long long)123) < 0)
14464 return 1;
14465 if (strcmp(buffer, "123"))
14466 return 1;
14467
14468 return 0;
14469 }
14470
14471_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014472if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson82864d12009-11-15 16:18:58 +000014473 ac_cv_have_long_long_format=yes
14474else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014475 ac_cv_have_long_long_format=no
Mark Dickinson82864d12009-11-15 16:18:58 +000014476fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014477rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14478 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson82864d12009-11-15 16:18:58 +000014479fi
14480
14481
Mark Dickinson82864d12009-11-15 16:18:58 +000014482fi
14483
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014484 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_long_long_format" >&5
14485$as_echo "$ac_cv_have_long_long_format" >&6; }
Mark Dickinson82864d12009-11-15 16:18:58 +000014486fi
14487
Mark Dickinson5ce84742009-12-31 20:48:04 +000014488if test "$ac_cv_have_long_long_format" = yes
Mark Dickinson82864d12009-11-15 16:18:58 +000014489then
14490
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014491$as_echo "#define PY_FORMAT_LONG_LONG \"ll\"" >>confdefs.h
Mark Dickinson82864d12009-11-15 16:18:58 +000014492
14493fi
14494
Ronald Oussoren315cd0c2009-11-19 16:25:21 +000014495if test $ac_sys_system = Darwin
14496then
14497 LIBS="$LIBS -framework CoreFoundation"
14498fi
14499
Mark Dickinson82864d12009-11-15 16:18:58 +000014500
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014501{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for %zd printf() format support" >&5
14502$as_echo_n "checking for %zd printf() format support... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010014503if ${ac_cv_have_size_t_format+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014504 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014505else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014506 if test "$cross_compiling" = yes; then :
Gregory P. Smithc9ff3a72009-11-02 02:03:16 +000014507 ac_cv_have_size_t_format="cross -- assuming yes"
14508
Brett Cannon09d12362006-05-11 05:11:33 +000014509else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014510 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Brett Cannon09d12362006-05-11 05:11:33 +000014511/* end confdefs.h. */
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014512
Brett Cannon09d12362006-05-11 05:11:33 +000014513#include <stdio.h>
14514#include <stddef.h>
14515#include <string.h>
14516
Christian Heimesdb3d6cb2007-12-16 21:39:43 +000014517#ifdef HAVE_SYS_TYPES_H
14518#include <sys/types.h>
14519#endif
Neal Norwitz4a8fbdb2006-09-22 08:16:26 +000014520
14521#ifdef HAVE_SSIZE_T
14522typedef ssize_t Py_ssize_t;
14523#elif SIZEOF_VOID_P == SIZEOF_LONG
14524typedef long Py_ssize_t;
14525#else
14526typedef int Py_ssize_t;
14527#endif
Brett Cannon09d12362006-05-11 05:11:33 +000014528
Christian Heimesdb3d6cb2007-12-16 21:39:43 +000014529int main()
14530{
14531 char buffer[256];
14532
Brett Cannon09d12362006-05-11 05:11:33 +000014533 if(sprintf(buffer, "%zd", (size_t)123) < 0)
14534 return 1;
14535
Neal Norwitz4a8fbdb2006-09-22 08:16:26 +000014536 if (strcmp(buffer, "123"))
14537 return 1;
14538
14539 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
14540 return 1;
14541
14542 if (strcmp(buffer, "-123"))
Brett Cannon09d12362006-05-11 05:11:33 +000014543 return 1;
14544
14545 return 0;
14546}
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014547
Brett Cannon09d12362006-05-11 05:11:33 +000014548_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014549if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014550 ac_cv_have_size_t_format=yes
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014551else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014552 ac_cv_have_size_t_format=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014553fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014554rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14555 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +000014556fi
14557
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014558fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014559{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t_format" >&5
14560$as_echo "$ac_cv_have_size_t_format" >&6; }
Gregory P. Smithc9ff3a72009-11-02 02:03:16 +000014561if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014562
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014563$as_echo "#define PY_FORMAT_SIZE_T \"z\"" >>confdefs.h
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014564
14565fi
14566
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014567ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
Martin v. Löwis01c04012002-11-11 14:58:44 +000014568#ifdef HAVE_SYS_TYPES_H
14569#include <sys/types.h>
14570#endif
14571#ifdef HAVE_SYS_SOCKET_H
14572#include <sys/socket.h>
14573#endif
14574
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014575"
Matthias Klose3cef2a92012-03-14 23:39:33 +010014576if test "x$ac_cv_type_socklen_t" = xyes; then :
Martin v. Löwis01c04012002-11-11 14:58:44 +000014577
Martin v. Löwis11437992002-04-12 09:54:03 +000014578else
Guido van Rossum95713eb2000-05-18 20:53:31 +000014579
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014580$as_echo "#define socklen_t int" >>confdefs.h
Guido van Rossum95713eb2000-05-18 20:53:31 +000014581
14582fi
14583
Michael W. Hudson54241132001-12-07 15:38:26 +000014584
Benjamin Peterson7497e912010-10-16 00:53:39 +000014585case $ac_sys_system in
14586AIX*)
14587
14588$as_echo "#define HAVE_BROKEN_PIPE_BUF 1" >>confdefs.h
14589 ;;
14590esac
14591
14592
Michael W. Hudson54241132001-12-07 15:38:26 +000014593
14594
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000014595for h in `(cd $srcdir;echo Python/thread_*.h)`
14596do
14597 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
14598done
14599
Michael W. Hudson54241132001-12-07 15:38:26 +000014600
Neal Norwitzd24499d2005-12-18 21:36:39 +000014601SRCDIRS="Parser Grammar Objects Python Modules Mac"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014602{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5
14603$as_echo_n "checking for build directories... " >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000014604for dir in $SRCDIRS; do
14605 if test ! -d $dir; then
14606 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000014607 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000014608done
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014609{ $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
14610$as_echo "done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000014611
Ned Deily3f1d0b32014-11-20 02:11:03 -080014612# ensurepip option
14613{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ensurepip" >&5
14614$as_echo_n "checking for ensurepip... " >&6; }
14615
14616# Check whether --with-ensurepip was given.
14617if test "${with_ensurepip+set}" = set; then :
14618 withval=$with_ensurepip;
14619else
14620 with_ensurepip=no
14621fi
14622
14623case $with_ensurepip in #(
14624 yes|upgrade) :
14625 ENSUREPIP=upgrade ;; #(
14626 install) :
14627 ENSUREPIP=install ;; #(
14628 no) :
14629 ENSUREPIP=no ;; #(
14630 *) :
14631 as_fn_error $? "--with-ensurepip=upgrade|install|no" "$LINENO" 5 ;;
14632esac
14633{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENSUREPIP" >&5
14634$as_echo "$ENSUREPIP" >&6; }
14635
14636
Guido van Rossum627b2d71993-12-24 10:39:16 +000014637# generate output files
Antoine Pitrouf2caeed2009-05-24 20:23:57 +000014638ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config Misc/python.pc"
Martin v. Löwis88afe662002-10-26 13:47:44 +000014639
Antoine Pitrouaabdceb2010-09-10 20:03:17 +000014640ac_config_files="$ac_config_files Modules/ld_so_aix"
14641
Martin v. Löwis11437992002-04-12 09:54:03 +000014642cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014643# This file is a shell script that caches the results of configure
14644# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000014645# scripts and configure runs, see configure's option --config-cache.
14646# It is not useful on other systems. If it contains results you don't
14647# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014648#
Martin v. Löwis11437992002-04-12 09:54:03 +000014649# config.status only pays attention to the cache file if you give it
14650# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014651#
Skip Montanaro6dead952003-09-25 14:50:04 +000014652# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000014653# loading this file, other *unset* `ac_cv_foo' will be assigned the
14654# following values.
14655
14656_ACEOF
14657
Guido van Rossumf78abae1997-01-21 22:02:36 +000014658# The following way of writing the cache mishandles newlines in values,
14659# but we know of no workaround that is simple, portable, and efficient.
Martin v. Löwiseba40652007-08-30 20:10:57 +000014660# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014661# Ultrix sh set writes to stderr and can't be redirected directly,
14662# and sets the high bit in the cache file unless we assign to the vars.
Martin v. Löwiseba40652007-08-30 20:10:57 +000014663(
14664 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
14665 eval ac_val=\$$ac_var
14666 case $ac_val in #(
14667 *${as_nl}*)
14668 case $ac_var in #(
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014669 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
14670$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000014671 esac
14672 case $ac_var in #(
14673 _ | IFS | as_nl) ;; #(
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014674 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
14675 *) { eval $ac_var=; unset $ac_var;} ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000014676 esac ;;
14677 esac
14678 done
14679
Martin v. Löwis11437992002-04-12 09:54:03 +000014680 (set) 2>&1 |
Martin v. Löwiseba40652007-08-30 20:10:57 +000014681 case $as_nl`(ac_space=' '; set) 2>&1` in #(
14682 *${as_nl}ac_space=\ *)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014683 # `set' does not quote correctly, so add quotes: double-quote
14684 # substitution turns \\\\ into \\, and sed turns \\ into \.
Martin v. Löwis11437992002-04-12 09:54:03 +000014685 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014686 "s/'/'\\\\''/g;
14687 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Martin v. Löwiseba40652007-08-30 20:10:57 +000014688 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000014689 *)
14690 # `set' quotes correctly as required by POSIX, so do not add quotes.
Martin v. Löwiseba40652007-08-30 20:10:57 +000014691 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000014692 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000014693 esac |
14694 sort
14695) |
Martin v. Löwis11437992002-04-12 09:54:03 +000014696 sed '
Martin v. Löwiseba40652007-08-30 20:10:57 +000014697 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000014698 t clear
Martin v. Löwiseba40652007-08-30 20:10:57 +000014699 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000014700 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
14701 t end
Martin v. Löwiseba40652007-08-30 20:10:57 +000014702 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
14703 :end' >>confcache
14704if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
14705 if test -w "$cache_file"; then
Matthias Klose3cef2a92012-03-14 23:39:33 +010014706 if test "x$cache_file" != "x/dev/null"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014707 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
14708$as_echo "$as_me: updating cache $cache_file" >&6;}
Matthias Klose3cef2a92012-03-14 23:39:33 +010014709 if test ! -f "$cache_file" || test -h "$cache_file"; then
14710 cat confcache >"$cache_file"
14711 else
14712 case $cache_file in #(
14713 */* | ?:*)
14714 mv -f confcache "$cache_file"$$ &&
14715 mv -f "$cache_file"$$ "$cache_file" ;; #(
14716 *)
14717 mv -f confcache "$cache_file" ;;
14718 esac
14719 fi
14720 fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014721 else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014722 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
14723$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014724 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014725fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014726rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000014727
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014728test "x$prefix" = xNONE && prefix=$ac_default_prefix
14729# Let make expand exec_prefix.
14730test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000014731
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014732DEFS=-DHAVE_CONFIG_H
14733
Skip Montanaro6dead952003-09-25 14:50:04 +000014734ac_libobjs=
14735ac_ltlibobjs=
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014736U=
Skip Montanaro6dead952003-09-25 14:50:04 +000014737for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
14738 # 1. Remove the extension, and $U if already installed.
Martin v. Löwiseba40652007-08-30 20:10:57 +000014739 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014740 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
Martin v. Löwiseba40652007-08-30 20:10:57 +000014741 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
14742 # will be set to the directory where LIBOBJS objects are built.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014743 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
14744 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000014745done
14746LIBOBJS=$ac_libobjs
14747
14748LTLIBOBJS=$ac_ltlibobjs
14749
14750
Martin v. Löwis11437992002-04-12 09:54:03 +000014751
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014752
Matthias Klose3cef2a92012-03-14 23:39:33 +010014753: "${CONFIG_STATUS=./config.status}"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014754ac_write_fail=0
Martin v. Löwis11437992002-04-12 09:54:03 +000014755ac_clean_files_save=$ac_clean_files
14756ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014757{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
14758$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
14759as_write_fail=0
14760cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014761#! $SHELL
14762# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000014763# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014764# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000014765# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000014766
Martin v. Löwis11437992002-04-12 09:54:03 +000014767debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000014768ac_cs_recheck=false
14769ac_cs_silent=false
Jack Jansendd19cf82001-12-06 22:36:17 +000014770
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014771SHELL=\${CONFIG_SHELL-$SHELL}
14772export SHELL
14773_ASEOF
14774cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
14775## -------------------- ##
14776## M4sh Initialization. ##
14777## -------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000014778
Martin v. Löwiseba40652007-08-30 20:10:57 +000014779# Be more Bourne compatible
14780DUALCASE=1; export DUALCASE # for MKS sh
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014781if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014782 emulate sh
14783 NULLCMD=:
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014784 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000014785 # is contrary to our usage. Disable this feature.
14786 alias -g '${1+"$@"}'='"$@"'
Martin v. Löwiseba40652007-08-30 20:10:57 +000014787 setopt NO_GLOB_SUBST
Skip Montanaro89e975f2007-08-22 19:05:21 +000014788else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014789 case `(set -o) 2>/dev/null` in #(
14790 *posix*) :
14791 set -o posix ;; #(
14792 *) :
14793 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000014794esac
Martin v. Löwis11437992002-04-12 09:54:03 +000014795fi
Michael W. Hudson54241132001-12-07 15:38:26 +000014796
Skip Montanaro6dead952003-09-25 14:50:04 +000014797
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014798as_nl='
14799'
14800export as_nl
14801# Printing a long string crashes Solaris 7 /usr/bin/printf.
14802as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
14803as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
14804as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
14805# Prefer a ksh shell builtin over an external printf program on Solaris,
14806# but without wasting forks for bash or zsh.
14807if test -z "$BASH_VERSION$ZSH_VERSION" \
14808 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
14809 as_echo='print -r --'
14810 as_echo_n='print -rn --'
14811elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
14812 as_echo='printf %s\n'
14813 as_echo_n='printf %s'
14814else
14815 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
14816 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
14817 as_echo_n='/usr/ucb/echo -n'
14818 else
14819 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
14820 as_echo_n_body='eval
14821 arg=$1;
14822 case $arg in #(
14823 *"$as_nl"*)
14824 expr "X$arg" : "X\\(.*\\)$as_nl";
14825 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
14826 esac;
14827 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
14828 '
14829 export as_echo_n_body
14830 as_echo_n='sh -c $as_echo_n_body as_echo'
14831 fi
14832 export as_echo_body
14833 as_echo='sh -c $as_echo_body as_echo'
14834fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014835
14836# The user is always right.
14837if test "${PATH_SEPARATOR+set}" != set; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014838 PATH_SEPARATOR=:
14839 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
14840 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
14841 PATH_SEPARATOR=';'
14842 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000014843fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014844
Martin v. Löwiseba40652007-08-30 20:10:57 +000014845
14846# IFS
14847# We need space, tab and new line, in precisely that order. Quoting is
14848# there to prevent editors from complaining about space-tab.
14849# (If _AS_PATH_WALK were called with IFS unset, it would disable word
14850# splitting by setting IFS to empty value.)
Martin v. Löwiseba40652007-08-30 20:10:57 +000014851IFS=" "" $as_nl"
14852
14853# Find who we are. Look in the path if we contain no directory separator.
Matthias Klose3cef2a92012-03-14 23:39:33 +010014854as_myself=
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014855case $0 in #((
Martin v. Löwiseba40652007-08-30 20:10:57 +000014856 *[\\/]* ) as_myself=$0 ;;
14857 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000014858for as_dir in $PATH
14859do
14860 IFS=$as_save_IFS
14861 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014862 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
14863 done
Martin v. Löwiseba40652007-08-30 20:10:57 +000014864IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000014865
Martin v. Löwiseba40652007-08-30 20:10:57 +000014866 ;;
14867esac
14868# We did not find ourselves, most probably we were run as `sh COMMAND'
14869# in which case we are not to be found in the path.
14870if test "x$as_myself" = x; then
14871 as_myself=$0
14872fi
14873if test ! -f "$as_myself"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014874 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
14875 exit 1
Martin v. Löwiseba40652007-08-30 20:10:57 +000014876fi
14877
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014878# Unset variables that we do not need and which cause bugs (e.g. in
14879# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
14880# suppresses any "Segmentation fault" message there. '((' could
14881# trigger a bug in pdksh 5.2.14.
14882for as_var in BASH_ENV ENV MAIL MAILPATH
14883do eval test x\${$as_var+set} = xset \
14884 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Martin v. Löwiseba40652007-08-30 20:10:57 +000014885done
14886PS1='$ '
14887PS2='> '
14888PS4='+ '
14889
14890# NLS nuisances.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014891LC_ALL=C
14892export LC_ALL
14893LANGUAGE=C
14894export LANGUAGE
Martin v. Löwiseba40652007-08-30 20:10:57 +000014895
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014896# CDPATH.
14897(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
14898
14899
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014900# as_fn_error STATUS ERROR [LINENO LOG_FD]
14901# ----------------------------------------
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014902# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
14903# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014904# script with STATUS, using 1 if that was 0.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014905as_fn_error ()
14906{
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014907 as_status=$1; test $as_status -eq 0 && as_status=1
14908 if test "$4"; then
14909 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
14910 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014911 fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014912 $as_echo "$as_me: error: $2" >&2
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014913 as_fn_exit $as_status
14914} # as_fn_error
14915
14916
14917# as_fn_set_status STATUS
14918# -----------------------
14919# Set $? to STATUS, without forking.
14920as_fn_set_status ()
14921{
14922 return $1
14923} # as_fn_set_status
14924
14925# as_fn_exit STATUS
14926# -----------------
14927# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
14928as_fn_exit ()
14929{
14930 set +e
14931 as_fn_set_status $1
14932 exit $1
14933} # as_fn_exit
14934
14935# as_fn_unset VAR
14936# ---------------
14937# Portably unset VAR.
14938as_fn_unset ()
14939{
14940 { eval $1=; unset $1;}
14941}
14942as_unset=as_fn_unset
14943# as_fn_append VAR VALUE
14944# ----------------------
14945# Append the text in VALUE to the end of the definition contained in VAR. Take
14946# advantage of any shell optimizations that allow amortized linear growth over
14947# repeated appends, instead of the typical quadratic growth present in naive
14948# implementations.
14949if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
14950 eval 'as_fn_append ()
14951 {
14952 eval $1+=\$2
14953 }'
14954else
14955 as_fn_append ()
14956 {
14957 eval $1=\$$1\$2
14958 }
14959fi # as_fn_append
14960
14961# as_fn_arith ARG...
14962# ------------------
14963# Perform arithmetic evaluation on the ARGs, and store the result in the
14964# global $as_val. Take advantage of shells that can avoid forks. The arguments
14965# must be portable across $(()) and expr.
14966if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
14967 eval 'as_fn_arith ()
14968 {
14969 as_val=$(( $* ))
14970 }'
14971else
14972 as_fn_arith ()
14973 {
14974 as_val=`expr "$@" || test $? -eq 1`
14975 }
14976fi # as_fn_arith
14977
14978
Martin v. Löwiseba40652007-08-30 20:10:57 +000014979if expr a : '\(a\)' >/dev/null 2>&1 &&
14980 test "X`expr 00001 : '.*\(...\)'`" = X001; then
14981 as_expr=expr
14982else
14983 as_expr=false
14984fi
14985
14986if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
14987 as_basename=basename
14988else
14989 as_basename=false
14990fi
14991
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014992if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
14993 as_dirname=dirname
14994else
14995 as_dirname=false
14996fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014997
Martin v. Löwiseba40652007-08-30 20:10:57 +000014998as_me=`$as_basename -- "$0" ||
14999$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
15000 X"$0" : 'X\(//\)$' \| \
15001 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015002$as_echo X/"$0" |
Martin v. Löwiseba40652007-08-30 20:10:57 +000015003 sed '/^.*\/\([^/][^/]*\)\/*$/{
15004 s//\1/
15005 q
15006 }
15007 /^X\/\(\/\/\)$/{
15008 s//\1/
15009 q
15010 }
15011 /^X\/\(\/\).*/{
15012 s//\1/
15013 q
15014 }
15015 s/.*/./; q'`
15016
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015017# Avoid depending upon Character Ranges.
15018as_cr_letters='abcdefghijklmnopqrstuvwxyz'
15019as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
15020as_cr_Letters=$as_cr_letters$as_cr_LETTERS
15021as_cr_digits='0123456789'
15022as_cr_alnum=$as_cr_Letters$as_cr_digits
Martin v. Löwiseba40652007-08-30 20:10:57 +000015023
15024ECHO_C= ECHO_N= ECHO_T=
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015025case `echo -n x` in #(((((
Martin v. Löwiseba40652007-08-30 20:10:57 +000015026-n*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015027 case `echo 'xy\c'` in
Martin v. Löwiseba40652007-08-30 20:10:57 +000015028 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015029 xy) ECHO_C='\c';;
15030 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
15031 ECHO_T=' ';;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015032 esac;;
15033*)
15034 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000015035esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015036
Martin v. Löwis11437992002-04-12 09:54:03 +000015037rm -f conf$$ conf$$.exe conf$$.file
Martin v. Löwiseba40652007-08-30 20:10:57 +000015038if test -d conf$$.dir; then
15039 rm -f conf$$.dir/conf$$.file
15040else
15041 rm -f conf$$.dir
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015042 mkdir conf$$.dir 2>/dev/null
Martin v. Löwiseba40652007-08-30 20:10:57 +000015043fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015044if (echo >conf$$.file) 2>/dev/null; then
15045 if ln -s conf$$.file conf$$ 2>/dev/null; then
15046 as_ln_s='ln -s'
15047 # ... but there are two gotchas:
15048 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
15049 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
Charles-François Natalibe2b9072013-01-08 19:47:00 +010015050 # In both cases, we have to default to `cp -pR'.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015051 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Charles-François Natalibe2b9072013-01-08 19:47:00 +010015052 as_ln_s='cp -pR'
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015053 elif ln conf$$.file conf$$ 2>/dev/null; then
15054 as_ln_s=ln
15055 else
Charles-François Natalibe2b9072013-01-08 19:47:00 +010015056 as_ln_s='cp -pR'
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015057 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015058else
Charles-François Natalibe2b9072013-01-08 19:47:00 +010015059 as_ln_s='cp -pR'
Martin v. Löwis11437992002-04-12 09:54:03 +000015060fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015061rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
15062rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000015063
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015064
15065# as_fn_mkdir_p
15066# -------------
15067# Create "$as_dir" as a directory, including parents if necessary.
15068as_fn_mkdir_p ()
15069{
15070
15071 case $as_dir in #(
15072 -*) as_dir=./$as_dir;;
15073 esac
15074 test -d "$as_dir" || eval $as_mkdir_p || {
15075 as_dirs=
15076 while :; do
15077 case $as_dir in #(
15078 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
15079 *) as_qdir=$as_dir;;
15080 esac
15081 as_dirs="'$as_qdir' $as_dirs"
15082 as_dir=`$as_dirname -- "$as_dir" ||
15083$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
15084 X"$as_dir" : 'X\(//\)[^/]' \| \
15085 X"$as_dir" : 'X\(//\)$' \| \
15086 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
15087$as_echo X"$as_dir" |
15088 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
15089 s//\1/
15090 q
15091 }
15092 /^X\(\/\/\)[^/].*/{
15093 s//\1/
15094 q
15095 }
15096 /^X\(\/\/\)$/{
15097 s//\1/
15098 q
15099 }
15100 /^X\(\/\).*/{
15101 s//\1/
15102 q
15103 }
15104 s/.*/./; q'`
15105 test -d "$as_dir" && break
15106 done
15107 test -z "$as_dirs" || eval "mkdir $as_dirs"
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015108 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015109
15110
15111} # as_fn_mkdir_p
Skip Montanaro6dead952003-09-25 14:50:04 +000015112if mkdir -p . 2>/dev/null; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015113 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +000015114else
Skip Montanarof0d5f792004-08-15 14:08:23 +000015115 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000015116 as_mkdir_p=false
15117fi
15118
Charles-François Natalibe2b9072013-01-08 19:47:00 +010015119
15120# as_fn_executable_p FILE
15121# -----------------------
15122# Test if FILE is an executable regular file.
15123as_fn_executable_p ()
15124{
15125 test -f "$1" && test -x "$1"
15126} # as_fn_executable_p
15127as_test_x='test -x'
15128as_executable_p=as_fn_executable_p
Martin v. Löwis11437992002-04-12 09:54:03 +000015129
15130# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000015131as_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 +000015132
15133# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000015134as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000015135
15136
Martin v. Löwis11437992002-04-12 09:54:03 +000015137exec 6>&1
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015138## ----------------------------------- ##
15139## Main body of $CONFIG_STATUS script. ##
15140## ----------------------------------- ##
15141_ASEOF
15142test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015143
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015144cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15145# Save the log message, to keep $0 and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000015146# report actual input values of CONFIG_FILES etc. instead of their
Martin v. Löwiseba40652007-08-30 20:10:57 +000015147# values after options handling.
15148ac_log="
Martin v. Löwis174440b2008-10-03 08:59:41 +000015149This file was extended by python $as_me 2.7, which was
Charles-François Natalibe2b9072013-01-08 19:47:00 +010015150generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000015151
15152 CONFIG_FILES = $CONFIG_FILES
15153 CONFIG_HEADERS = $CONFIG_HEADERS
15154 CONFIG_LINKS = $CONFIG_LINKS
15155 CONFIG_COMMANDS = $CONFIG_COMMANDS
15156 $ $0 $@
15157
Martin v. Löwiseba40652007-08-30 20:10:57 +000015158on `(hostname || uname -n) 2>/dev/null | sed 1q`
15159"
15160
Martin v. Löwis11437992002-04-12 09:54:03 +000015161_ACEOF
15162
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015163case $ac_config_files in *"
15164"*) set x $ac_config_files; shift; ac_config_files=$*;;
15165esac
15166
15167case $ac_config_headers in *"
15168"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
15169esac
15170
15171
15172cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015173# Files that config.status was made for.
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015174config_files="$ac_config_files"
15175config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000015176
Martin v. Löwiseba40652007-08-30 20:10:57 +000015177_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000015178
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015179cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015180ac_cs_usage="\
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015181\`$as_me' instantiates files and other configuration actions
15182from templates according to the current configuration. Unless the files
15183and actions are specified as TAGs, all are instantiated by default.
Martin v. Löwis11437992002-04-12 09:54:03 +000015184
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015185Usage: $0 [OPTION]... [TAG]...
Martin v. Löwis11437992002-04-12 09:54:03 +000015186
15187 -h, --help print this help, then exit
Martin v. Löwiseba40652007-08-30 20:10:57 +000015188 -V, --version print version number and configuration settings, then exit
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015189 --config print configuration, then exit
15190 -q, --quiet, --silent
15191 do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000015192 -d, --debug don't remove temporary files
15193 --recheck update $as_me by reconfiguring in the same conditions
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015194 --file=FILE[:TEMPLATE]
15195 instantiate the configuration file FILE
15196 --header=FILE[:TEMPLATE]
15197 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000015198
15199Configuration files:
15200$config_files
15201
15202Configuration headers:
15203$config_headers
15204
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015205Report bugs to <http://bugs.python.org/>."
Skip Montanaro89e975f2007-08-22 19:05:21 +000015206
Martin v. Löwiseba40652007-08-30 20:10:57 +000015207_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015208cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15209ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
Martin v. Löwis11437992002-04-12 09:54:03 +000015210ac_cs_version="\\
Martin v. Löwis174440b2008-10-03 08:59:41 +000015211python config.status 2.7
Charles-François Natalibe2b9072013-01-08 19:47:00 +010015212configured by $0, generated by GNU Autoconf 2.69,
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015213 with options \\"\$ac_cs_config\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000015214
Charles-François Natalibe2b9072013-01-08 19:47:00 +010015215Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000015216This config.status script is free software; the Free Software Foundation
15217gives unlimited permission to copy, distribute and modify it."
Martin v. Löwiseba40652007-08-30 20:10:57 +000015218
15219ac_pwd='$ac_pwd'
15220srcdir='$srcdir'
15221INSTALL='$INSTALL'
Trent Nelsonf6407a12012-08-30 14:56:13 +000015222MKDIR_P='$MKDIR_P'
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015223test -n "\$AWK" || AWK=awk
Martin v. Löwis11437992002-04-12 09:54:03 +000015224_ACEOF
15225
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015226cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15227# The default lists apply if the user does not specify any file.
Martin v. Löwis11437992002-04-12 09:54:03 +000015228ac_need_defaults=:
15229while test $# != 0
15230do
15231 case $1 in
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015232 --*=?*)
Martin v. Löwiseba40652007-08-30 20:10:57 +000015233 ac_option=`expr "X$1" : 'X\([^=]*\)='`
15234 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000015235 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000015236 ;;
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015237 --*=)
15238 ac_option=`expr "X$1" : 'X\([^=]*\)='`
15239 ac_optarg=
15240 ac_shift=:
15241 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015242 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000015243 ac_option=$1
15244 ac_optarg=$2
15245 ac_shift=shift
15246 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015247 esac
15248
Skip Montanaro6dead952003-09-25 14:50:04 +000015249 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000015250 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000015251 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
15252 ac_cs_recheck=: ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015253 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015254 $as_echo "$ac_cs_version"; exit ;;
15255 --config | --confi | --conf | --con | --co | --c )
15256 $as_echo "$ac_cs_config"; exit ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015257 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000015258 debug=: ;;
15259 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000015260 $ac_shift
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015261 case $ac_optarg in
15262 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015263 '') as_fn_error $? "missing file argument" ;;
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015264 esac
15265 as_fn_append CONFIG_FILES " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000015266 ac_need_defaults=false;;
15267 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000015268 $ac_shift
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015269 case $ac_optarg in
15270 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
15271 esac
15272 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000015273 ac_need_defaults=false;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015274 --he | --h)
15275 # Conflict between --help and --header
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015276 as_fn_error $? "ambiguous option: \`$1'
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015277Try \`$0 --help' for more information.";;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015278 --help | --hel | -h )
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015279 $as_echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000015280 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
15281 | -silent | --silent | --silen | --sile | --sil | --si | --s)
15282 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015283
15284 # This is an error.
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015285 -*) as_fn_error $? "unrecognized option: \`$1'
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015286Try \`$0 --help' for more information." ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015287
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015288 *) as_fn_append ac_config_targets " $1"
Martin v. Löwiseba40652007-08-30 20:10:57 +000015289 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015290
15291 esac
15292 shift
15293done
15294
Skip Montanaro6dead952003-09-25 14:50:04 +000015295ac_configure_extra_args=
15296
15297if $ac_cs_silent; then
15298 exec 6>/dev/null
15299 ac_configure_extra_args="$ac_configure_extra_args --silent"
15300fi
15301
15302_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015303cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Skip Montanaro6dead952003-09-25 14:50:04 +000015304if \$ac_cs_recheck; then
Charles-François Natalibe2b9072013-01-08 19:47:00 +010015305 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015306 shift
15307 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
15308 CONFIG_SHELL='$SHELL'
Martin v. Löwiseba40652007-08-30 20:10:57 +000015309 export CONFIG_SHELL
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015310 exec "\$@"
Skip Montanaro6dead952003-09-25 14:50:04 +000015311fi
15312
Martin v. Löwis11437992002-04-12 09:54:03 +000015313_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015314cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwiseba40652007-08-30 20:10:57 +000015315exec 5>>config.log
15316{
15317 echo
15318 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
15319## Running $as_me. ##
15320_ASBOX
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015321 $as_echo "$ac_log"
Martin v. Löwiseba40652007-08-30 20:10:57 +000015322} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015323
Martin v. Löwiseba40652007-08-30 20:10:57 +000015324_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015325cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwiseba40652007-08-30 20:10:57 +000015326_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000015327
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015328cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwiseba40652007-08-30 20:10:57 +000015329
15330# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000015331for ac_config_target in $ac_config_targets
15332do
Martin v. Löwiseba40652007-08-30 20:10:57 +000015333 case $ac_config_target in
15334 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
15335 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
15336 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
15337 "Mac/IDLE/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/IDLE/Makefile" ;;
Ronald Oussoren580c7fe2008-05-02 19:45:11 +000015338 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
15339 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015340 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
15341 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
Antoine Pitrouf2caeed2009-05-24 20:23:57 +000015342 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
Antoine Pitrouaabdceb2010-09-10 20:03:17 +000015343 "Modules/ld_so_aix") CONFIG_FILES="$CONFIG_FILES Modules/ld_so_aix" ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015344
Matthias Klose3cef2a92012-03-14 23:39:33 +010015345 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015346 esac
15347done
15348
Martin v. Löwiseba40652007-08-30 20:10:57 +000015349
Martin v. Löwis11437992002-04-12 09:54:03 +000015350# If the user did not use the arguments to specify the items to instantiate,
15351# then the envvar interface is used. Set only those that are not.
15352# We use the long form for the default assignment because of an extremely
15353# bizarre bug on SunOS 4.1.3.
15354if $ac_need_defaults; then
15355 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
15356 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
15357fi
15358
Skip Montanaro6dead952003-09-25 14:50:04 +000015359# Have a temporary directory for convenience. Make it in the build tree
Martin v. Löwiseba40652007-08-30 20:10:57 +000015360# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000015361# creating and moving files from /tmp can sometimes cause problems.
Martin v. Löwiseba40652007-08-30 20:10:57 +000015362# Hook for its removal unless debugging.
15363# Note that there is a small window in which the directory will not be cleaned:
15364# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000015365$debug ||
15366{
Matthias Klose3cef2a92012-03-14 23:39:33 +010015367 tmp= ac_tmp=
Martin v. Löwiseba40652007-08-30 20:10:57 +000015368 trap 'exit_status=$?
Matthias Klose3cef2a92012-03-14 23:39:33 +010015369 : "${ac_tmp:=$tmp}"
15370 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
Martin v. Löwiseba40652007-08-30 20:10:57 +000015371' 0
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015372 trap 'as_fn_exit 1' 1 2 13 15
Martin v. Löwis11437992002-04-12 09:54:03 +000015373}
Martin v. Löwis11437992002-04-12 09:54:03 +000015374# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000015375
Martin v. Löwis11437992002-04-12 09:54:03 +000015376{
Martin v. Löwiseba40652007-08-30 20:10:57 +000015377 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Matthias Klose3cef2a92012-03-14 23:39:33 +010015378 test -d "$tmp"
Martin v. Löwis11437992002-04-12 09:54:03 +000015379} ||
15380{
Martin v. Löwiseba40652007-08-30 20:10:57 +000015381 tmp=./conf$$-$RANDOM
15382 (umask 077 && mkdir "$tmp")
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015383} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
Matthias Klose3cef2a92012-03-14 23:39:33 +010015384ac_tmp=$tmp
Martin v. Löwis11437992002-04-12 09:54:03 +000015385
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015386# Set up the scripts for CONFIG_FILES section.
15387# No need to generate them if there are no CONFIG_FILES.
15388# This happens for instance with `./config.status config.h'.
Martin v. Löwiseba40652007-08-30 20:10:57 +000015389if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015390
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015391
15392ac_cr=`echo X | tr X '\015'`
15393# On cygwin, bash can eat \r inside `` if the user requested igncr.
15394# But we know of no other shell where ac_cr would be empty at this
15395# point, so we can use a bashism as a fallback.
15396if test "x$ac_cr" = x; then
15397 eval ac_cr=\$\'\\r\'
15398fi
15399ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
15400if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015401 ac_cs_awk_cr='\\r'
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015402else
15403 ac_cs_awk_cr=$ac_cr
15404fi
15405
Matthias Klose3cef2a92012-03-14 23:39:33 +010015406echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
Martin v. Löwis11437992002-04-12 09:54:03 +000015407_ACEOF
15408
Martin v. Löwiseba40652007-08-30 20:10:57 +000015409
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015410{
15411 echo "cat >conf$$subs.awk <<_ACEOF" &&
15412 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
15413 echo "_ACEOF"
15414} >conf$$subs.sh ||
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015415 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
15416ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
Martin v. Löwiseba40652007-08-30 20:10:57 +000015417ac_delim='%!_!# '
15418for ac_last_try in false false false false false :; do
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015419 . ./conf$$subs.sh ||
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015420 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015421
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015422 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
15423 if test $ac_delim_n = $ac_delim_num; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015424 break
15425 elif $ac_last_try; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015426 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015427 else
15428 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000015429 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015430done
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015431rm -f conf$$subs.sh
Martin v. Löwiseba40652007-08-30 20:10:57 +000015432
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015433cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Matthias Klose3cef2a92012-03-14 23:39:33 +010015434cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
Martin v. Löwiseba40652007-08-30 20:10:57 +000015435_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015436sed -n '
15437h
15438s/^/S["/; s/!.*/"]=/
15439p
15440g
15441s/^[^!]*!//
15442:repl
15443t repl
15444s/'"$ac_delim"'$//
15445t delim
15446:nl
15447h
15448s/\(.\{148\}\)..*/\1/
15449t more1
15450s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
15451p
15452n
15453b repl
15454:more1
15455s/["\\]/\\&/g; s/^/"/; s/$/"\\/
15456p
15457g
15458s/.\{148\}//
15459t nl
15460:delim
15461h
15462s/\(.\{148\}\)..*/\1/
15463t more2
15464s/["\\]/\\&/g; s/^/"/; s/$/"/
15465p
15466b
15467:more2
15468s/["\\]/\\&/g; s/^/"/; s/$/"\\/
15469p
15470g
15471s/.\{148\}//
15472t delim
15473' <conf$$subs.awk | sed '
15474/^[^""]/{
15475 N
15476 s/\n//
15477}
15478' >>$CONFIG_STATUS || ac_write_fail=1
15479rm -f conf$$subs.awk
15480cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15481_ACAWK
Matthias Klose3cef2a92012-03-14 23:39:33 +010015482cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015483 for (key in S) S_is_set[key] = 1
15484 FS = ""
15485
15486}
15487{
15488 line = $ 0
15489 nfields = split(line, field, "@")
15490 substed = 0
15491 len = length(field[1])
15492 for (i = 2; i < nfields; i++) {
15493 key = field[i]
15494 keylen = length(key)
15495 if (S_is_set[key]) {
15496 value = S[key]
15497 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
15498 len += length(value) + length(field[++i])
15499 substed = 1
15500 } else
15501 len += 1 + keylen
15502 }
15503
15504 print line
15505}
15506
15507_ACAWK
Martin v. Löwiseba40652007-08-30 20:10:57 +000015508_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015509cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15510if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
15511 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
15512else
15513 cat
Matthias Klose3cef2a92012-03-14 23:39:33 +010015514fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015515 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015516_ACEOF
15517
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015518# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
15519# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
Martin v. Löwiseba40652007-08-30 20:10:57 +000015520# trailing colons and then remove the whole line if VPATH becomes empty
15521# (actually we leave an empty line to preserve line numbers).
15522if test "x$srcdir" = x.; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015523 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
15524h
15525s///
15526s/^/:/
15527s/[ ]*$/:/
15528s/:\$(srcdir):/:/g
15529s/:\${srcdir}:/:/g
15530s/:@srcdir@:/:/g
15531s/^:*//
Martin v. Löwiseba40652007-08-30 20:10:57 +000015532s/:*$//
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015533x
15534s/\(=[ ]*\).*/\1/
15535G
15536s/\n//
Martin v. Löwiseba40652007-08-30 20:10:57 +000015537s/^[^=]*=[ ]*$//
15538}'
15539fi
15540
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015541cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015542fi # test -n "$CONFIG_FILES"
15543
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015544# Set up the scripts for CONFIG_HEADERS section.
15545# No need to generate them if there are no CONFIG_HEADERS.
15546# This happens for instance with `./config.status Makefile'.
15547if test -n "$CONFIG_HEADERS"; then
Matthias Klose3cef2a92012-03-14 23:39:33 +010015548cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015549BEGIN {
15550_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000015551
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015552# Transform confdefs.h into an awk script `defines.awk', embedded as
15553# here-document in config.status, that substitutes the proper values into
15554# config.h.in to produce config.h.
15555
15556# Create a delimiter string that does not exist in confdefs.h, to ease
15557# handling of long lines.
15558ac_delim='%!_!# '
15559for ac_last_try in false false :; do
Matthias Klose3cef2a92012-03-14 23:39:33 +010015560 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
15561 if test -z "$ac_tt"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015562 break
15563 elif $ac_last_try; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015564 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015565 else
15566 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
15567 fi
15568done
15569
15570# For the awk script, D is an array of macro values keyed by name,
15571# likewise P contains macro parameters if any. Preserve backslash
15572# newline sequences.
15573
15574ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
15575sed -n '
15576s/.\{148\}/&'"$ac_delim"'/g
15577t rset
15578:rset
15579s/^[ ]*#[ ]*define[ ][ ]*/ /
15580t def
15581d
15582:def
15583s/\\$//
15584t bsnl
15585s/["\\]/\\&/g
15586s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
15587D["\1"]=" \3"/p
15588s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
15589d
15590:bsnl
15591s/["\\]/\\&/g
15592s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
15593D["\1"]=" \3\\\\\\n"\\/p
15594t cont
15595s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
15596t cont
15597d
15598:cont
15599n
15600s/.\{148\}/&'"$ac_delim"'/g
15601t clear
15602:clear
15603s/\\$//
15604t bsnlc
15605s/["\\]/\\&/g; s/^/"/; s/$/"/p
15606d
15607:bsnlc
15608s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
15609b cont
15610' <confdefs.h | sed '
15611s/'"$ac_delim"'/"\\\
15612"/g' >>$CONFIG_STATUS || ac_write_fail=1
15613
15614cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15615 for (key in D) D_is_set[key] = 1
15616 FS = ""
15617}
15618/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
15619 line = \$ 0
15620 split(line, arg, " ")
15621 if (arg[1] == "#") {
15622 defundef = arg[2]
15623 mac1 = arg[3]
15624 } else {
15625 defundef = substr(arg[1], 2)
15626 mac1 = arg[2]
15627 }
15628 split(mac1, mac2, "(") #)
15629 macro = mac2[1]
15630 prefix = substr(line, 1, index(line, defundef) - 1)
15631 if (D_is_set[macro]) {
15632 # Preserve the white space surrounding the "#".
15633 print prefix "define", macro P[macro] D[macro]
15634 next
15635 } else {
15636 # Replace #undef with comments. This is necessary, for example,
15637 # in the case of _POSIX_SOURCE, which is predefined and required
15638 # on some systems where configure will not decide to define it.
15639 if (defundef == "undef") {
15640 print "/*", prefix defundef, macro, "*/"
15641 next
15642 }
15643 }
15644}
15645{ print }
15646_ACAWK
15647_ACEOF
15648cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015649 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015650fi # test -n "$CONFIG_HEADERS"
15651
15652
15653eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
15654shift
15655for ac_tag
Martin v. Löwiseba40652007-08-30 20:10:57 +000015656do
15657 case $ac_tag in
15658 :[FHLC]) ac_mode=$ac_tag; continue;;
15659 esac
15660 case $ac_mode$ac_tag in
15661 :[FHL]*:*);;
Matthias Klose3cef2a92012-03-14 23:39:33 +010015662 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015663 :[FH]-) ac_tag=-:-;;
15664 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
15665 esac
15666 ac_save_IFS=$IFS
15667 IFS=:
15668 set x $ac_tag
15669 IFS=$ac_save_IFS
15670 shift
15671 ac_file=$1
15672 shift
15673
15674 case $ac_mode in
15675 :L) ac_source=$1;;
15676 :[FH])
15677 ac_file_inputs=
15678 for ac_f
15679 do
15680 case $ac_f in
Matthias Klose3cef2a92012-03-14 23:39:33 +010015681 -) ac_f="$ac_tmp/stdin";;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015682 *) # Look for the file first in the build tree, then in the source tree
15683 # (if the path is not absolute). The absolute path cannot be DOS-style,
15684 # because $ac_f cannot contain `:'.
15685 test -f "$ac_f" ||
15686 case $ac_f in
15687 [\\/$]*) false;;
15688 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
15689 esac ||
Matthias Klose3cef2a92012-03-14 23:39:33 +010015690 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015691 esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015692 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
15693 as_fn_append ac_file_inputs " '$ac_f'"
Martin v. Löwiseba40652007-08-30 20:10:57 +000015694 done
15695
15696 # Let's still pretend it is `configure' which instantiates (i.e., don't
15697 # use $as_me), people would be surprised to read:
15698 # /* config.h. Generated by config.status. */
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015699 configure_input='Generated from '`
15700 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
15701 `' by configure.'
Martin v. Löwiseba40652007-08-30 20:10:57 +000015702 if test x"$ac_file" != x-; then
15703 configure_input="$ac_file. $configure_input"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015704 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
15705$as_echo "$as_me: creating $ac_file" >&6;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000015706 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015707 # Neutralize special characters interpreted by sed in replacement strings.
15708 case $configure_input in #(
15709 *\&* | *\|* | *\\* )
15710 ac_sed_conf_input=`$as_echo "$configure_input" |
15711 sed 's/[\\\\&|]/\\\\&/g'`;; #(
15712 *) ac_sed_conf_input=$configure_input;;
15713 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000015714
15715 case $ac_tag in
Matthias Klose3cef2a92012-03-14 23:39:33 +010015716 *:-:* | *:-) cat >"$ac_tmp/stdin" \
15717 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015718 esac
15719 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015720 esac
15721
Martin v. Löwiseba40652007-08-30 20:10:57 +000015722 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000015723$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015724 X"$ac_file" : 'X\(//\)[^/]' \| \
15725 X"$ac_file" : 'X\(//\)$' \| \
Martin v. Löwiseba40652007-08-30 20:10:57 +000015726 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015727$as_echo X"$ac_file" |
Martin v. Löwiseba40652007-08-30 20:10:57 +000015728 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
15729 s//\1/
15730 q
15731 }
15732 /^X\(\/\/\)[^/].*/{
15733 s//\1/
15734 q
15735 }
15736 /^X\(\/\/\)$/{
15737 s//\1/
15738 q
15739 }
15740 /^X\(\/\).*/{
15741 s//\1/
15742 q
15743 }
15744 s/.*/./; q'`
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015745 as_dir="$ac_dir"; as_fn_mkdir_p
Martin v. Löwis11437992002-04-12 09:54:03 +000015746 ac_builddir=.
15747
Martin v. Löwiseba40652007-08-30 20:10:57 +000015748case "$ac_dir" in
15749.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
15750*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015751 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Martin v. Löwiseba40652007-08-30 20:10:57 +000015752 # A ".." for each directory in $ac_dir_suffix.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015753 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Martin v. Löwiseba40652007-08-30 20:10:57 +000015754 case $ac_top_builddir_sub in
15755 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
15756 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
15757 esac ;;
15758esac
15759ac_abs_top_builddir=$ac_pwd
15760ac_abs_builddir=$ac_pwd$ac_dir_suffix
15761# for backward compatibility:
15762ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000015763
15764case $srcdir in
Martin v. Löwiseba40652007-08-30 20:10:57 +000015765 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000015766 ac_srcdir=.
Martin v. Löwiseba40652007-08-30 20:10:57 +000015767 ac_top_srcdir=$ac_top_builddir_sub
15768 ac_abs_top_srcdir=$ac_pwd ;;
15769 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000015770 ac_srcdir=$srcdir$ac_dir_suffix;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015771 ac_top_srcdir=$srcdir
15772 ac_abs_top_srcdir=$srcdir ;;
15773 *) # Relative name.
15774 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
15775 ac_top_srcdir=$ac_top_build_prefix$srcdir
15776 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015777esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000015778ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000015779
Martin v. Löwis11437992002-04-12 09:54:03 +000015780
Martin v. Löwiseba40652007-08-30 20:10:57 +000015781 case $ac_mode in
15782 :F)
15783 #
15784 # CONFIG_FILE
15785 #
Martin v. Löwis11437992002-04-12 09:54:03 +000015786
15787 case $INSTALL in
15788 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015789 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015790 esac
Trent Nelsonf6407a12012-08-30 14:56:13 +000015791 ac_MKDIR_P=$MKDIR_P
15792 case $MKDIR_P in
15793 [\\/$]* | ?:[\\/]* ) ;;
15794 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
15795 esac
Brett Cannon19fab762007-06-02 03:02:29 +000015796_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000015797
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015798cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwiseba40652007-08-30 20:10:57 +000015799# If the template does not know about datarootdir, expand it.
15800# FIXME: This hack should be removed a few years after 2.60.
15801ac_datarootdir_hack=; ac_datarootdir_seen=
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015802ac_sed_dataroot='
15803/datarootdir/ {
Martin v. Löwiseba40652007-08-30 20:10:57 +000015804 p
15805 q
15806}
15807/@datadir@/p
15808/@docdir@/p
15809/@infodir@/p
15810/@localedir@/p
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015811/@mandir@/p'
15812case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
Martin v. Löwiseba40652007-08-30 20:10:57 +000015813*datarootdir*) ac_datarootdir_seen=yes;;
15814*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015815 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
15816$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000015817_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015818cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwiseba40652007-08-30 20:10:57 +000015819 ac_datarootdir_hack='
15820 s&@datadir@&$datadir&g
15821 s&@docdir@&$docdir&g
15822 s&@infodir@&$infodir&g
15823 s&@localedir@&$localedir&g
15824 s&@mandir@&$mandir&g
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015825 s&\\\${datarootdir}&$datarootdir&g' ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015826esac
15827_ACEOF
15828
15829# Neutralize VPATH when `$srcdir' = `.'.
15830# Shell code in configure.ac might set extrasub.
15831# FIXME: do we really want to maintain this feature?
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015832cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15833ac_sed_extra="$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000015834$extrasub
15835_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015836cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015837:t
15838/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015839s|@configure_input@|$ac_sed_conf_input|;t t
Martin v. Löwiseba40652007-08-30 20:10:57 +000015840s&@top_builddir@&$ac_top_builddir_sub&;t t
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015841s&@top_build_prefix@&$ac_top_build_prefix&;t t
Martin v. Löwiseba40652007-08-30 20:10:57 +000015842s&@srcdir@&$ac_srcdir&;t t
15843s&@abs_srcdir@&$ac_abs_srcdir&;t t
15844s&@top_srcdir@&$ac_top_srcdir&;t t
15845s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
15846s&@builddir@&$ac_builddir&;t t
15847s&@abs_builddir@&$ac_abs_builddir&;t t
15848s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
15849s&@INSTALL@&$ac_INSTALL&;t t
Trent Nelsonf6407a12012-08-30 14:56:13 +000015850s&@MKDIR_P@&$ac_MKDIR_P&;t t
Martin v. Löwiseba40652007-08-30 20:10:57 +000015851$ac_datarootdir_hack
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015852"
Matthias Klose3cef2a92012-03-14 23:39:33 +010015853eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
15854 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015855
Martin v. Löwiseba40652007-08-30 20:10:57 +000015856test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
Matthias Klose3cef2a92012-03-14 23:39:33 +010015857 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
15858 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
15859 "$ac_tmp/out"`; test -z "$ac_out"; } &&
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015860 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015861which seems to be undefined. Please make sure it is defined" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015862$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015863which seems to be undefined. Please make sure it is defined" >&2;}
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015864
Matthias Klose3cef2a92012-03-14 23:39:33 +010015865 rm -f "$ac_tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000015866 case $ac_file in
Matthias Klose3cef2a92012-03-14 23:39:33 +010015867 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
15868 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015869 esac \
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015870 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015871 ;;
15872 :H)
15873 #
15874 # CONFIG_HEADER
15875 #
Martin v. Löwis11437992002-04-12 09:54:03 +000015876 if test x"$ac_file" != x-; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015877 {
15878 $as_echo "/* $configure_input */" \
Matthias Klose3cef2a92012-03-14 23:39:33 +010015879 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
15880 } >"$ac_tmp/config.h" \
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015881 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Matthias Klose3cef2a92012-03-14 23:39:33 +010015882 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015883 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
15884$as_echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000015885 else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015886 rm -f "$ac_file"
Matthias Klose3cef2a92012-03-14 23:39:33 +010015887 mv "$ac_tmp/config.h" "$ac_file" \
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015888 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000015889 fi
15890 else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015891 $as_echo "/* $configure_input */" \
Matthias Klose3cef2a92012-03-14 23:39:33 +010015892 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015893 || as_fn_error $? "could not create -" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000015894 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015895 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000015896
Martin v. Löwiseba40652007-08-30 20:10:57 +000015897
15898 esac
15899
Antoine Pitrouaabdceb2010-09-10 20:03:17 +000015900
15901 case $ac_file$ac_mode in
15902 "Modules/ld_so_aix":F) chmod +x Modules/ld_so_aix ;;
15903
15904 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000015905done # for ac_tag
15906
Guido van Rossum627b2d71993-12-24 10:39:16 +000015907
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015908as_fn_exit 0
Martin v. Löwis11437992002-04-12 09:54:03 +000015909_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000015910ac_clean_files=$ac_clean_files_save
15911
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015912test $ac_write_fail = 0 ||
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015913 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015914
Martin v. Löwis11437992002-04-12 09:54:03 +000015915
15916# configure is writing to config.log, and then calls config.status.
15917# config.status does its own redirection, appending to config.log.
15918# Unfortunately, on DOS this fails, as config.log is still kept open
15919# by configure, so config.status won't be able to write to it; its
15920# output is simply discarded. So we exec the FD to /dev/null,
15921# effectively closing config.log, so it can be properly (re)opened and
15922# appended to by config.status. When coming back to configure, we
15923# need to make the FD available again.
15924if test "$no_create" != yes; then
15925 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000015926 ac_config_status_args=
15927 test "$silent" = yes &&
15928 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000015929 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000015930 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000015931 exec 5>>config.log
15932 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
15933 # would make configure fail if this is the last instruction.
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015934 $ac_cs_success || as_fn_exit 1
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015935fi
15936if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
15937 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
15938$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000015939fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000015940
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000015941
Martin v. Löwisf7afe952006-04-14 15:16:15 +000015942echo "creating Modules/Setup"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000015943if test ! -f Modules/Setup
15944then
15945 cp $srcdir/Modules/Setup.dist Modules/Setup
15946fi
15947
Martin v. Löwisf7afe952006-04-14 15:16:15 +000015948echo "creating Modules/Setup.local"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000015949if test ! -f Modules/Setup.local
15950then
15951 echo "# Edit this file for local setup changes" >Modules/Setup.local
15952fi
15953
15954echo "creating Makefile"
15955$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
15956 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000015957 Modules/Setup.local Modules/Setup
Skip Montanaro89e975f2007-08-22 19:05:21 +000015958
15959case $ac_sys_system in
15960BeOS)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015961 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
Skip Montanaro89e975f2007-08-22 19:05:21 +000015962
15963 Support for BeOS is deprecated as of Python 2.6.
15964 See PEP 11 for the gory details.
15965 " >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015966$as_echo "$as_me: WARNING:
Skip Montanaro89e975f2007-08-22 19:05:21 +000015967
15968 Support for BeOS is deprecated as of Python 2.6.
15969 See PEP 11 for the gory details.
15970 " >&2;}
15971 ;;
15972*) ;;
15973esac
15974
Neil Schemenauerc761fc82001-02-19 04:50:49 +000015975mv config.c Modules