blob: 4a698f352a9d2ff3f66f64f7fbc4926c8dd44c4f [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Matthias Klose3cef2a92012-03-14 23:39:33 +01002# From configure.ac Revision.
Guido van Rossum627b2d71993-12-24 10:39:16 +00003# Guess values for system-dependent variables and create Makefiles.
Charles-François Natalibe2b9072013-01-08 19:47:00 +01004# Generated by GNU Autoconf 2.69 for python 2.7.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005#
Georg Brandl464432d2009-05-20 18:24:08 +00006# Report bugs to <http://bugs.python.org/>.
Martin v. Löwis1d459062005-03-14 21:23:33 +00007#
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008#
Charles-François Natalibe2b9072013-01-08 19:47:00 +01009# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010#
11#
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012# This configure script is free software; the Free Software Foundation
13# gives unlimited permission to copy, distribute and modify it.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014## -------------------- ##
15## M4sh Initialization. ##
16## -------------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +000017
Martin v. Löwiseba40652007-08-30 20:10:57 +000018# Be more Bourne compatible
19DUALCASE=1; export DUALCASE # for MKS sh
Matthias Klosea0bea5d2010-05-08 10:00:28 +000020if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000021 emulate sh
22 NULLCMD=:
Matthias Klosea0bea5d2010-05-08 10:00:28 +000023 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000024 # is contrary to our usage. Disable this feature.
25 alias -g '${1+"$@"}'='"$@"'
Martin v. Löwiseba40652007-08-30 20:10:57 +000026 setopt NO_GLOB_SUBST
Skip Montanaro89e975f2007-08-22 19:05:21 +000027else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000028 case `(set -o) 2>/dev/null` in #(
29 *posix*) :
30 set -o posix ;; #(
31 *) :
32 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000033esac
Martin v. Löwis11437992002-04-12 09:54:03 +000034fi
35
Skip Montanaro6dead952003-09-25 14:50:04 +000036
Matthias Klosea0bea5d2010-05-08 10:00:28 +000037as_nl='
38'
39export as_nl
40# Printing a long string crashes Solaris 7 /usr/bin/printf.
41as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
42as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
43as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
44# Prefer a ksh shell builtin over an external printf program on Solaris,
45# but without wasting forks for bash or zsh.
46if test -z "$BASH_VERSION$ZSH_VERSION" \
47 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
48 as_echo='print -r --'
49 as_echo_n='print -rn --'
50elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
51 as_echo='printf %s\n'
52 as_echo_n='printf %s'
53else
54 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
55 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
56 as_echo_n='/usr/ucb/echo -n'
57 else
58 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
59 as_echo_n_body='eval
60 arg=$1;
61 case $arg in #(
62 *"$as_nl"*)
63 expr "X$arg" : "X\\(.*\\)$as_nl";
64 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
65 esac;
66 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
67 '
68 export as_echo_n_body
69 as_echo_n='sh -c $as_echo_n_body as_echo'
70 fi
71 export as_echo_body
72 as_echo='sh -c $as_echo_body as_echo'
73fi
Martin v. Löwis11437992002-04-12 09:54:03 +000074
75# The user is always right.
76if test "${PATH_SEPARATOR+set}" != set; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000077 PATH_SEPARATOR=:
78 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
79 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
80 PATH_SEPARATOR=';'
81 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000082fi
Martin v. Löwis11437992002-04-12 09:54:03 +000083
Martin v. Löwiseba40652007-08-30 20:10:57 +000084
85# IFS
86# We need space, tab and new line, in precisely that order. Quoting is
87# there to prevent editors from complaining about space-tab.
88# (If _AS_PATH_WALK were called with IFS unset, it would disable word
89# splitting by setting IFS to empty value.)
Martin v. Löwiseba40652007-08-30 20:10:57 +000090IFS=" "" $as_nl"
91
92# Find who we are. Look in the path if we contain no directory separator.
Matthias Klose3cef2a92012-03-14 23:39:33 +010093as_myself=
Matthias Klosea0bea5d2010-05-08 10:00:28 +000094case $0 in #((
Martin v. Löwiseba40652007-08-30 20:10:57 +000095 *[\\/]* ) as_myself=$0 ;;
96 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000097for as_dir in $PATH
98do
99 IFS=$as_save_IFS
100 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000101 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
102 done
Martin v. Löwiseba40652007-08-30 20:10:57 +0000103IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +0000104
Martin v. Löwiseba40652007-08-30 20:10:57 +0000105 ;;
106esac
107# We did not find ourselves, most probably we were run as `sh COMMAND'
108# in which case we are not to be found in the path.
109if test "x$as_myself" = x; then
110 as_myself=$0
111fi
112if test ! -f "$as_myself"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000113 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
114 exit 1
Martin v. Löwiseba40652007-08-30 20:10:57 +0000115fi
116
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000117# Unset variables that we do not need and which cause bugs (e.g. in
118# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
119# suppresses any "Segmentation fault" message there. '((' could
120# trigger a bug in pdksh 5.2.14.
121for as_var in BASH_ENV ENV MAIL MAILPATH
122do eval test x\${$as_var+set} = xset \
123 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Martin v. Löwiseba40652007-08-30 20:10:57 +0000124done
125PS1='$ '
126PS2='> '
127PS4='+ '
128
129# NLS nuisances.
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000130LC_ALL=C
131export LC_ALL
132LANGUAGE=C
133export LANGUAGE
Martin v. Löwiseba40652007-08-30 20:10:57 +0000134
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000135# CDPATH.
136(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
137
Charles-François Natalibe2b9072013-01-08 19:47:00 +0100138# Use a proper internal environment variable to ensure we don't fall
139 # into an infinite loop, continuously re-executing ourselves.
140 if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
141 _as_can_reexec=no; export _as_can_reexec;
142 # We cannot yet assume a decent shell, so we have to provide a
143# neutralization value for shells without unset; and this also
144# works around shells that cannot unset nonexistent variables.
145# Preserve -v and -x to the replacement shell.
146BASH_ENV=/dev/null
147ENV=/dev/null
148(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
149case $- in # ((((
150 *v*x* | *x*v* ) as_opts=-vx ;;
151 *v* ) as_opts=-v ;;
152 *x* ) as_opts=-x ;;
153 * ) as_opts= ;;
154esac
155exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
156# Admittedly, this is quite paranoid, since all the known shells bail
157# out after a failed `exec'.
158$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
159as_fn_exit 255
160 fi
161 # We don't want this to propagate to other subprocesses.
162 { _as_can_reexec=; unset _as_can_reexec;}
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000163if test "x$CONFIG_SHELL" = x; then
164 as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
165 emulate sh
166 NULLCMD=:
167 # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
168 # is contrary to our usage. Disable this feature.
169 alias -g '\${1+\"\$@\"}'='\"\$@\"'
170 setopt NO_GLOB_SUBST
171else
172 case \`(set -o) 2>/dev/null\` in #(
173 *posix*) :
174 set -o posix ;; #(
175 *) :
176 ;;
177esac
178fi
179"
180 as_required="as_fn_return () { (exit \$1); }
181as_fn_success () { as_fn_return 0; }
182as_fn_failure () { as_fn_return 1; }
183as_fn_ret_success () { return 0; }
184as_fn_ret_failure () { return 1; }
185
186exitcode=0
187as_fn_success || { exitcode=1; echo as_fn_success failed.; }
188as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
189as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
190as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
191if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
192
193else
194 exitcode=1; echo positional parameters were not saved.
195fi
Charles-François Natalibe2b9072013-01-08 19:47:00 +0100196test x\$exitcode = x0 || exit 1
197test -x / || exit 1"
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000198 as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
199 as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
200 eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
201 test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
202test \$(( 1 + 1 )) = 2 || exit 1"
203 if (eval "$as_required") 2>/dev/null; then :
204 as_have_required=yes
205else
206 as_have_required=no
207fi
208 if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
209
210else
211 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
212as_found=false
213for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
214do
215 IFS=$as_save_IFS
216 test -z "$as_dir" && as_dir=.
217 as_found=:
218 case $as_dir in #(
219 /*)
220 for as_base in sh bash ksh sh5; do
221 # Try only shells that exist, to save several forks.
222 as_shell=$as_dir/$as_base
223 if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
224 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
225 CONFIG_SHELL=$as_shell as_have_required=yes
226 if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
227 break 2
228fi
229fi
230 done;;
231 esac
232 as_found=false
233done
234$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
235 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
236 CONFIG_SHELL=$SHELL as_have_required=yes
237fi; }
238IFS=$as_save_IFS
239
240
241 if test "x$CONFIG_SHELL" != x; then :
Charles-François Natalibe2b9072013-01-08 19:47:00 +0100242 export CONFIG_SHELL
243 # We cannot yet assume a decent shell, so we have to provide a
244# neutralization value for shells without unset; and this also
245# works around shells that cannot unset nonexistent variables.
246# Preserve -v and -x to the replacement shell.
247BASH_ENV=/dev/null
248ENV=/dev/null
249(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
250case $- in # ((((
251 *v*x* | *x*v* ) as_opts=-vx ;;
252 *v* ) as_opts=-v ;;
253 *x* ) as_opts=-x ;;
254 * ) as_opts= ;;
255esac
256exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
257# Admittedly, this is quite paranoid, since all the known shells bail
258# out after a failed `exec'.
259$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
260exit 255
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000261fi
262
263 if test x$as_have_required = xno; then :
264 $as_echo "$0: This script requires a shell more modern than all"
265 $as_echo "$0: the shells that I found on your system."
266 if test x${ZSH_VERSION+set} = xset ; then
267 $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
268 $as_echo "$0: be upgraded to zsh 4.3.4 or later."
269 else
270 $as_echo "$0: Please tell bug-autoconf@gnu.org and
271$0: http://bugs.python.org/ about your system, including
272$0: any error possibly output before this message. Then
273$0: install a modern shell, or manually run the script
274$0: under such a shell if you do have one."
275 fi
276 exit 1
277fi
278fi
279fi
280SHELL=${CONFIG_SHELL-/bin/sh}
281export SHELL
282# Unset more variables known to interfere with behavior of common tools.
283CLICOLOR_FORCE= GREP_OPTIONS=
284unset CLICOLOR_FORCE GREP_OPTIONS
285
286## --------------------- ##
287## M4sh Shell Functions. ##
288## --------------------- ##
289# as_fn_unset VAR
290# ---------------
291# Portably unset VAR.
292as_fn_unset ()
293{
294 { eval $1=; unset $1;}
295}
296as_unset=as_fn_unset
297
298# as_fn_set_status STATUS
299# -----------------------
300# Set $? to STATUS, without forking.
301as_fn_set_status ()
302{
303 return $1
304} # as_fn_set_status
305
306# as_fn_exit STATUS
307# -----------------
308# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
309as_fn_exit ()
310{
311 set +e
312 as_fn_set_status $1
313 exit $1
314} # as_fn_exit
315
316# as_fn_mkdir_p
317# -------------
318# Create "$as_dir" as a directory, including parents if necessary.
319as_fn_mkdir_p ()
320{
321
322 case $as_dir in #(
323 -*) as_dir=./$as_dir;;
324 esac
325 test -d "$as_dir" || eval $as_mkdir_p || {
326 as_dirs=
327 while :; do
328 case $as_dir in #(
329 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
330 *) as_qdir=$as_dir;;
331 esac
332 as_dirs="'$as_qdir' $as_dirs"
333 as_dir=`$as_dirname -- "$as_dir" ||
334$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
335 X"$as_dir" : 'X\(//\)[^/]' \| \
336 X"$as_dir" : 'X\(//\)$' \| \
337 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
338$as_echo X"$as_dir" |
339 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
340 s//\1/
341 q
342 }
343 /^X\(\/\/\)[^/].*/{
344 s//\1/
345 q
346 }
347 /^X\(\/\/\)$/{
348 s//\1/
349 q
350 }
351 /^X\(\/\).*/{
352 s//\1/
353 q
354 }
355 s/.*/./; q'`
356 test -d "$as_dir" && break
357 done
358 test -z "$as_dirs" || eval "mkdir $as_dirs"
Georg Brandl71f4fbb2011-02-25 11:04:50 +0000359 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000360
361
362} # as_fn_mkdir_p
Charles-François Natalibe2b9072013-01-08 19:47:00 +0100363
364# as_fn_executable_p FILE
365# -----------------------
366# Test if FILE is an executable regular file.
367as_fn_executable_p ()
368{
369 test -f "$1" && test -x "$1"
370} # as_fn_executable_p
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000371# as_fn_append VAR VALUE
372# ----------------------
373# Append the text in VALUE to the end of the definition contained in VAR. Take
374# advantage of any shell optimizations that allow amortized linear growth over
375# repeated appends, instead of the typical quadratic growth present in naive
376# implementations.
377if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
378 eval 'as_fn_append ()
379 {
380 eval $1+=\$2
381 }'
382else
383 as_fn_append ()
384 {
385 eval $1=\$$1\$2
386 }
387fi # as_fn_append
388
389# as_fn_arith ARG...
390# ------------------
391# Perform arithmetic evaluation on the ARGs, and store the result in the
392# global $as_val. Take advantage of shells that can avoid forks. The arguments
393# must be portable across $(()) and expr.
394if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
395 eval 'as_fn_arith ()
396 {
397 as_val=$(( $* ))
398 }'
399else
400 as_fn_arith ()
401 {
402 as_val=`expr "$@" || test $? -eq 1`
403 }
404fi # as_fn_arith
405
406
Georg Brandl71f4fbb2011-02-25 11:04:50 +0000407# as_fn_error STATUS ERROR [LINENO LOG_FD]
408# ----------------------------------------
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000409# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
410# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Georg Brandl71f4fbb2011-02-25 11:04:50 +0000411# script with STATUS, using 1 if that was 0.
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000412as_fn_error ()
413{
Georg Brandl71f4fbb2011-02-25 11:04:50 +0000414 as_status=$1; test $as_status -eq 0 && as_status=1
415 if test "$4"; then
416 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
417 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000418 fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +0000419 $as_echo "$as_me: error: $2" >&2
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000420 as_fn_exit $as_status
421} # as_fn_error
422
Martin v. Löwiseba40652007-08-30 20:10:57 +0000423if expr a : '\(a\)' >/dev/null 2>&1 &&
424 test "X`expr 00001 : '.*\(...\)'`" = X001; then
425 as_expr=expr
426else
427 as_expr=false
428fi
429
430if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
431 as_basename=basename
432else
433 as_basename=false
434fi
435
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000436if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
437 as_dirname=dirname
438else
439 as_dirname=false
440fi
Martin v. Löwiseba40652007-08-30 20:10:57 +0000441
Martin v. Löwiseba40652007-08-30 20:10:57 +0000442as_me=`$as_basename -- "$0" ||
443$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
444 X"$0" : 'X\(//\)$' \| \
445 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000446$as_echo X/"$0" |
Martin v. Löwiseba40652007-08-30 20:10:57 +0000447 sed '/^.*\/\([^/][^/]*\)\/*$/{
448 s//\1/
449 q
450 }
451 /^X\/\(\/\/\)$/{
452 s//\1/
453 q
454 }
455 /^X\/\(\/\).*/{
456 s//\1/
457 q
458 }
459 s/.*/./; q'`
460
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000461# Avoid depending upon Character Ranges.
462as_cr_letters='abcdefghijklmnopqrstuvwxyz'
463as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
464as_cr_Letters=$as_cr_letters$as_cr_LETTERS
465as_cr_digits='0123456789'
466as_cr_alnum=$as_cr_Letters$as_cr_digits
Martin v. Löwiseba40652007-08-30 20:10:57 +0000467
468
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000469 as_lineno_1=$LINENO as_lineno_1a=$LINENO
470 as_lineno_2=$LINENO as_lineno_2a=$LINENO
471 eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
472 test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
473 # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
Martin v. Löwiseba40652007-08-30 20:10:57 +0000474 sed -n '
475 p
476 /[$]LINENO/=
477 ' <$as_myself |
Martin v. Löwis11437992002-04-12 09:54:03 +0000478 sed '
Martin v. Löwiseba40652007-08-30 20:10:57 +0000479 s/[$]LINENO.*/&-/
480 t lineno
481 b
482 :lineno
Martin v. Löwis11437992002-04-12 09:54:03 +0000483 N
Martin v. Löwiseba40652007-08-30 20:10:57 +0000484 :loop
485 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
Martin v. Löwis11437992002-04-12 09:54:03 +0000486 t loop
Martin v. Löwiseba40652007-08-30 20:10:57 +0000487 s/-\n.*//
Martin v. Löwis11437992002-04-12 09:54:03 +0000488 ' >$as_me.lineno &&
Martin v. Löwiseba40652007-08-30 20:10:57 +0000489 chmod +x "$as_me.lineno" ||
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000490 { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
Martin v. Löwis11437992002-04-12 09:54:03 +0000491
Charles-François Natalibe2b9072013-01-08 19:47:00 +0100492 # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
493 # already done that, so ensure we don't try to do so again and fall
494 # in an infinite loop. This has already happened in practice.
495 _as_can_reexec=no; export _as_can_reexec
Martin v. Löwis11437992002-04-12 09:54:03 +0000496 # Don't try to exec as it changes $[0], causing all sort of problems
497 # (the dirname of $[0] is not the place where we might find the
Martin v. Löwiseba40652007-08-30 20:10:57 +0000498 # original and so on. Autoconf is especially sensitive to this).
499 . "./$as_me.lineno"
Martin v. Löwis11437992002-04-12 09:54:03 +0000500 # Exit status is that of the last command.
501 exit
502}
503
Martin v. Löwiseba40652007-08-30 20:10:57 +0000504ECHO_C= ECHO_N= ECHO_T=
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000505case `echo -n x` in #(((((
Martin v. Löwiseba40652007-08-30 20:10:57 +0000506-n*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000507 case `echo 'xy\c'` in
Martin v. Löwiseba40652007-08-30 20:10:57 +0000508 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000509 xy) ECHO_C='\c';;
510 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
511 ECHO_T=' ';;
Martin v. Löwiseba40652007-08-30 20:10:57 +0000512 esac;;
513*)
514 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +0000515esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +0000516
Martin v. Löwis11437992002-04-12 09:54:03 +0000517rm -f conf$$ conf$$.exe conf$$.file
Martin v. Löwiseba40652007-08-30 20:10:57 +0000518if test -d conf$$.dir; then
519 rm -f conf$$.dir/conf$$.file
520else
521 rm -f conf$$.dir
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000522 mkdir conf$$.dir 2>/dev/null
Martin v. Löwiseba40652007-08-30 20:10:57 +0000523fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000524if (echo >conf$$.file) 2>/dev/null; then
525 if ln -s conf$$.file conf$$ 2>/dev/null; then
526 as_ln_s='ln -s'
527 # ... but there are two gotchas:
528 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
529 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
Charles-François Natalibe2b9072013-01-08 19:47:00 +0100530 # In both cases, we have to default to `cp -pR'.
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000531 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Charles-François Natalibe2b9072013-01-08 19:47:00 +0100532 as_ln_s='cp -pR'
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000533 elif ln conf$$.file conf$$ 2>/dev/null; then
534 as_ln_s=ln
535 else
Charles-François Natalibe2b9072013-01-08 19:47:00 +0100536 as_ln_s='cp -pR'
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000537 fi
Martin v. Löwis11437992002-04-12 09:54:03 +0000538else
Charles-François Natalibe2b9072013-01-08 19:47:00 +0100539 as_ln_s='cp -pR'
Martin v. Löwis11437992002-04-12 09:54:03 +0000540fi
Martin v. Löwiseba40652007-08-30 20:10:57 +0000541rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
542rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +0000543
Skip Montanaro6dead952003-09-25 14:50:04 +0000544if mkdir -p . 2>/dev/null; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000545 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +0000546else
Skip Montanarof0d5f792004-08-15 14:08:23 +0000547 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +0000548 as_mkdir_p=false
549fi
550
Charles-François Natalibe2b9072013-01-08 19:47:00 +0100551as_test_x='test -x'
552as_executable_p=as_fn_executable_p
Martin v. Löwis11437992002-04-12 09:54:03 +0000553
554# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +0000555as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +0000556
557# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +0000558as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +0000559
560
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000561test -n "$DJDIR" || exec 7<&0 </dev/null
562exec 6>&1
Martin v. Löwis11437992002-04-12 09:54:03 +0000563
564# Name of the host.
Georg Brandl71f4fbb2011-02-25 11:04:50 +0000565# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
Martin v. Löwis11437992002-04-12 09:54:03 +0000566# so uname gets run too.
567ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
568
Martin v. Löwis11437992002-04-12 09:54:03 +0000569#
570# Initializations.
571#
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000572ac_default_prefix=/usr/local
Martin v. Löwiseba40652007-08-30 20:10:57 +0000573ac_clean_files=
Skip Montanaro6dead952003-09-25 14:50:04 +0000574ac_config_libobj_dir=.
Martin v. Löwiseba40652007-08-30 20:10:57 +0000575LIBOBJS=
Martin v. Löwis11437992002-04-12 09:54:03 +0000576cross_compiling=no
577subdirs=
578MFLAGS=
579MAKEFLAGS=
Martin v. Löwis11437992002-04-12 09:54:03 +0000580
Martin v. Löwis11437992002-04-12 09:54:03 +0000581# Identity of this package.
Martin v. Löwis88afe662002-10-26 13:47:44 +0000582PACKAGE_NAME='python'
583PACKAGE_TARNAME='python'
Martin v. Löwis174440b2008-10-03 08:59:41 +0000584PACKAGE_VERSION='2.7'
585PACKAGE_STRING='python 2.7'
Georg Brandl464432d2009-05-20 18:24:08 +0000586PACKAGE_BUGREPORT='http://bugs.python.org/'
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000587PACKAGE_URL=''
Martin v. Löwis11437992002-04-12 09:54:03 +0000588
589ac_unique_file="Include/object.h"
590# Factoring default headers for most tests.
591ac_includes_default="\
592#include <stdio.h>
Martin v. Löwiseba40652007-08-30 20:10:57 +0000593#ifdef HAVE_SYS_TYPES_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000594# include <sys/types.h>
595#endif
Martin v. Löwiseba40652007-08-30 20:10:57 +0000596#ifdef HAVE_SYS_STAT_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000597# include <sys/stat.h>
598#endif
Martin v. Löwiseba40652007-08-30 20:10:57 +0000599#ifdef STDC_HEADERS
Martin v. Löwis11437992002-04-12 09:54:03 +0000600# include <stdlib.h>
601# include <stddef.h>
602#else
Martin v. Löwiseba40652007-08-30 20:10:57 +0000603# ifdef HAVE_STDLIB_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000604# include <stdlib.h>
605# endif
606#endif
Martin v. Löwiseba40652007-08-30 20:10:57 +0000607#ifdef HAVE_STRING_H
608# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000609# include <memory.h>
610# endif
611# include <string.h>
612#endif
Martin v. Löwiseba40652007-08-30 20:10:57 +0000613#ifdef HAVE_STRINGS_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000614# include <strings.h>
615#endif
Martin v. Löwiseba40652007-08-30 20:10:57 +0000616#ifdef HAVE_INTTYPES_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000617# include <inttypes.h>
Martin v. Löwis11437992002-04-12 09:54:03 +0000618#endif
Martin v. Löwiseba40652007-08-30 20:10:57 +0000619#ifdef HAVE_STDINT_H
620# include <stdint.h>
621#endif
622#ifdef HAVE_UNISTD_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000623# include <unistd.h>
624#endif"
625
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000626ac_subst_vars='LTLIBOBJS
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +0000627SRCDIRS
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000628THREADHEADERS
629UNICODE_OBJS
630LIBC
631LIBM
632HAVE_GETHOSTBYNAME
633HAVE_GETHOSTBYNAME_R
634HAVE_GETHOSTBYNAME_R_3_ARG
635HAVE_GETHOSTBYNAME_R_5_ARG
636HAVE_GETHOSTBYNAME_R_6_ARG
637LIBOBJS
638TRUE
639MACHDEP_OBJS
640DYNLOADFILE
641DLINCLDIR
642THREADOBJ
643LDLAST
644USE_THREAD_MODULE
645SIGNAL_OBJS
646USE_SIGNAL_MODULE
Ned Deilya2a9f572013-10-25 00:30:10 -0700647TCLTK_LIBS
648TCLTK_INCLUDES
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000649LIBFFI_INCLUDEDIR
650PKG_CONFIG
651SHLIBS
652CFLAGSFORSHARED
653LINKFORSHARED
654CCSHARED
655BLDSHARED
656LDCXXSHARED
657LDSHARED
658SO
659LIBTOOL_CRUFT
660OTHER_LIBTOOL_OPT
661UNIVERSAL_ARCH_FLAGS
662BASECFLAGS
663OPT
664LN
Trent Nelsonf6407a12012-08-30 14:56:13 +0000665MKDIR_P
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000666INSTALL_DATA
667INSTALL_SCRIPT
668INSTALL_PROGRAM
Georg Brandl3a5508e2011-03-06 10:42:21 +0100669HAS_HG
670HGBRANCH
671HGTAG
672HGVERSION
Trent Nelsond86ceec2012-10-16 09:42:45 -0400673BASECPPFLAGS
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000674SVNVERSION
675ARFLAGS
doko@python.orgd65e2ba2013-01-31 23:52:03 +0100676ac_ct_AR
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000677AR
678RANLIB
679GNULD
680LINKCC
681RUNSHARED
682INSTSONAME
683LDLIBRARYDIR
684BLDLIBRARY
685DLLLIBRARY
686LDLIBRARY
687LIBRARY
688BUILDEXEEXT
689EGREP
690GREP
691CPP
doko@python.org4e63fbe2013-01-25 13:08:27 +0100692MULTIARCH
doko@python.orgd65e2ba2013-01-31 23:52:03 +0100693ac_ct_CXX
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000694MAINCC
695CXX
696OBJEXT
697EXEEXT
698ac_ct_CC
699CPPFLAGS
700LDFLAGS
701CFLAGS
702CC
703EXPORT_MACOSX_DEPLOYMENT_TARGET
704CONFIGURE_MACOSX_DEPLOYMENT_TARGET
705EXTRAMACHDEPPATH
706EXTRAPLATDIR
707SGI_ABI
doko@python.orgd65e2ba2013-01-31 23:52:03 +0100708_PYTHON_HOST_PLATFORM
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000709MACHDEP
710FRAMEWORKINSTALLAPPSPREFIX
711FRAMEWORKUNIXTOOLSPREFIX
712FRAMEWORKALTINSTALLLAST
713FRAMEWORKALTINSTALLFIRST
714FRAMEWORKINSTALLLAST
715FRAMEWORKINSTALLFIRST
716PYTHONFRAMEWORKINSTALLDIR
717PYTHONFRAMEWORKPREFIX
718PYTHONFRAMEWORKDIR
719PYTHONFRAMEWORKIDENTIFIER
720PYTHONFRAMEWORK
721LIPO_32BIT_FLAGS
722ARCH_RUN_32BIT
723UNIVERSALSDK
724CONFIG_ARGS
725SOVERSION
726VERSION
doko@python.orgd65e2ba2013-01-31 23:52:03 +0100727PYTHON_FOR_BUILD
728host_os
729host_vendor
730host_cpu
731host
732build_os
733build_vendor
734build_cpu
735build
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000736target_alias
737host_alias
738build_alias
739LIBS
740ECHO_T
741ECHO_N
742ECHO_C
743DEFS
744mandir
745localedir
746libdir
747psdir
748pdfdir
749dvidir
750htmldir
751infodir
752docdir
753oldincludedir
754includedir
755localstatedir
756sharedstatedir
757sysconfdir
758datadir
759datarootdir
760libexecdir
761sbindir
762bindir
763program_transform_name
764prefix
765exec_prefix
766PACKAGE_URL
767PACKAGE_BUGREPORT
768PACKAGE_STRING
769PACKAGE_VERSION
770PACKAGE_TARNAME
771PACKAGE_NAME
772PATH_SEPARATOR
773SHELL'
Skip Montanaro6dead952003-09-25 14:50:04 +0000774ac_subst_files=''
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000775ac_user_opts='
776enable_option_checking
777enable_universalsdk
778with_universal_archs
779with_framework_name
780enable_framework
781with_gcc
782with_cxx_main
783with_suffix
784enable_shared
785enable_profiling
786with_pydebug
787enable_toolbox_glue
788with_libs
789with_system_expat
790with_system_ffi
Ned Deilya2a9f572013-10-25 00:30:10 -0700791with_tcltk_includes
792with_tcltk_libs
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000793with_dbmliborder
794with_signal_module
795with_dec_threads
796with_threads
797with_thread
798with_pth
799enable_ipv6
800with_doc_strings
801with_tsc
802with_pymalloc
803with_valgrind
804with_wctype_functions
805with_fpectl
806with_libm
807with_libc
808enable_big_digits
809enable_unicode
810'
Martin v. Löwiseba40652007-08-30 20:10:57 +0000811 ac_precious_vars='build_alias
812host_alias
813target_alias
814CC
815CFLAGS
816LDFLAGS
817LIBS
818CPPFLAGS
819CPP'
820
Guido van Rossum627b2d71993-12-24 10:39:16 +0000821
Guido van Rossum7f43da71994-08-01 12:15:30 +0000822# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000823ac_init_help=
824ac_init_version=false
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000825ac_unrecognized_opts=
826ac_unrecognized_sep=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000827# The variables have the same names as the options, with
828# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000829cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000830exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000831no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000832no_recursion=
833prefix=NONE
834program_prefix=NONE
835program_suffix=NONE
836program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000837silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000838site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000839srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000840verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000841x_includes=NONE
842x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000843
844# Installation directory options.
845# These are left unexpanded so users can "make install exec_prefix=/foo"
846# and all the variables that are supposed to be based on exec_prefix
847# by default will actually change.
848# Use braces instead of parens because sh, perl, etc. also accept them.
Martin v. Löwiseba40652007-08-30 20:10:57 +0000849# (The list follows the same order as the GNU Coding Standards.)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000850bindir='${exec_prefix}/bin'
851sbindir='${exec_prefix}/sbin'
852libexecdir='${exec_prefix}/libexec'
Martin v. Löwiseba40652007-08-30 20:10:57 +0000853datarootdir='${prefix}/share'
854datadir='${datarootdir}'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000855sysconfdir='${prefix}/etc'
856sharedstatedir='${prefix}/com'
857localstatedir='${prefix}/var'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000858includedir='${prefix}/include'
859oldincludedir='/usr/include'
Martin v. Löwiseba40652007-08-30 20:10:57 +0000860docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
861infodir='${datarootdir}/info'
862htmldir='${docdir}'
863dvidir='${docdir}'
864pdfdir='${docdir}'
865psdir='${docdir}'
866libdir='${exec_prefix}/lib'
867localedir='${datarootdir}/locale'
868mandir='${datarootdir}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000869
Guido van Rossum7f43da71994-08-01 12:15:30 +0000870ac_prev=
Martin v. Löwiseba40652007-08-30 20:10:57 +0000871ac_dashdash=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000872for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000873do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000874 # If the previous option needs an argument, assign it.
875 if test -n "$ac_prev"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +0000876 eval $ac_prev=\$ac_option
Guido van Rossum7f43da71994-08-01 12:15:30 +0000877 ac_prev=
878 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000879 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000880
Martin v. Löwiseba40652007-08-30 20:10:57 +0000881 case $ac_option in
Georg Brandl71f4fbb2011-02-25 11:04:50 +0000882 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
883 *=) ac_optarg= ;;
884 *) ac_optarg=yes ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +0000885 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000886
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000887 # Accept the important Cygnus configure options, so we can diagnose typos.
888
Martin v. Löwiseba40652007-08-30 20:10:57 +0000889 case $ac_dashdash$ac_option in
890 --)
891 ac_dashdash=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000892
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000893 -bindir | --bindir | --bindi | --bind | --bin | --bi)
894 ac_prev=bindir ;;
895 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000896 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000897
898 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000899 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000900 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000901 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000902
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000903 -cache-file | --cache-file | --cache-fil | --cache-fi \
904 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
905 ac_prev=cache_file ;;
906 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
907 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000908 cache_file=$ac_optarg ;;
909
910 --config-cache | -C)
911 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000912
Martin v. Löwiseba40652007-08-30 20:10:57 +0000913 -datadir | --datadir | --datadi | --datad)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000914 ac_prev=datadir ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +0000915 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000916 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000917
Martin v. Löwiseba40652007-08-30 20:10:57 +0000918 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
919 | --dataroo | --dataro | --datar)
920 ac_prev=datarootdir ;;
921 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
922 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
923 datarootdir=$ac_optarg ;;
924
Guido van Rossum7f43da71994-08-01 12:15:30 +0000925 -disable-* | --disable-*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000926 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000927 # Reject names that are not valid shell variable names.
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000928 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Georg Brandl71f4fbb2011-02-25 11:04:50 +0000929 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000930 ac_useropt_orig=$ac_useropt
931 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
932 case $ac_user_opts in
933 *"
934"enable_$ac_useropt"
935"*) ;;
936 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
937 ac_unrecognized_sep=', ';;
938 esac
939 eval enable_$ac_useropt=no ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +0000940
941 -docdir | --docdir | --docdi | --doc | --do)
942 ac_prev=docdir ;;
943 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
944 docdir=$ac_optarg ;;
945
946 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
947 ac_prev=dvidir ;;
948 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
949 dvidir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000950
951 -enable-* | --enable-*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000952 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000953 # Reject names that are not valid shell variable names.
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000954 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Georg Brandl71f4fbb2011-02-25 11:04:50 +0000955 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000956 ac_useropt_orig=$ac_useropt
957 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
958 case $ac_user_opts in
959 *"
960"enable_$ac_useropt"
961"*) ;;
962 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
963 ac_unrecognized_sep=', ';;
964 esac
965 eval enable_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000966
Guido van Rossum7f43da71994-08-01 12:15:30 +0000967 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
968 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
969 | --exec | --exe | --ex)
970 ac_prev=exec_prefix ;;
971 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
972 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
973 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000974 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000975
976 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000977 # Obsolete; use --with-gas.
978 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000979
Martin v. Löwis11437992002-04-12 09:54:03 +0000980 -help | --help | --hel | --he | -h)
981 ac_init_help=long ;;
982 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
983 ac_init_help=recursive ;;
984 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
985 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000986
987 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +0000988 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000989 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000990 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000991
Martin v. Löwiseba40652007-08-30 20:10:57 +0000992 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
993 ac_prev=htmldir ;;
994 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
995 | --ht=*)
996 htmldir=$ac_optarg ;;
997
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000998 -includedir | --includedir | --includedi | --included | --include \
999 | --includ | --inclu | --incl | --inc)
1000 ac_prev=includedir ;;
1001 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1002 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001003 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001004
1005 -infodir | --infodir | --infodi | --infod | --info | --inf)
1006 ac_prev=infodir ;;
1007 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001008 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001009
1010 -libdir | --libdir | --libdi | --libd)
1011 ac_prev=libdir ;;
1012 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001013 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001014
1015 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1016 | --libexe | --libex | --libe)
1017 ac_prev=libexecdir ;;
1018 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1019 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001020 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001021
Martin v. Löwiseba40652007-08-30 20:10:57 +00001022 -localedir | --localedir | --localedi | --localed | --locale)
1023 ac_prev=localedir ;;
1024 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1025 localedir=$ac_optarg ;;
1026
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001027 -localstatedir | --localstatedir | --localstatedi | --localstated \
Martin v. Löwiseba40652007-08-30 20:10:57 +00001028 | --localstate | --localstat | --localsta | --localst | --locals)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001029 ac_prev=localstatedir ;;
1030 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Martin v. Löwiseba40652007-08-30 20:10:57 +00001031 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001032 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001033
1034 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1035 ac_prev=mandir ;;
1036 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001037 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001038
Guido van Rossum7f43da71994-08-01 12:15:30 +00001039 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001040 # Obsolete; use --without-fp.
1041 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001042
1043 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +00001044 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +00001045 no_create=yes ;;
1046
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001047 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1048 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1049 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001050
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001051 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1052 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1053 | --oldin | --oldi | --old | --ol | --o)
1054 ac_prev=oldincludedir ;;
1055 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1056 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1057 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001058 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001059
Guido van Rossum7f43da71994-08-01 12:15:30 +00001060 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1061 ac_prev=prefix ;;
1062 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001063 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001064
1065 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1066 | --program-pre | --program-pr | --program-p)
1067 ac_prev=program_prefix ;;
1068 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1069 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001070 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001071
1072 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1073 | --program-suf | --program-su | --program-s)
1074 ac_prev=program_suffix ;;
1075 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1076 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001077 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001078
1079 -program-transform-name | --program-transform-name \
1080 | --program-transform-nam | --program-transform-na \
1081 | --program-transform-n | --program-transform- \
1082 | --program-transform | --program-transfor \
1083 | --program-transfo | --program-transf \
1084 | --program-trans | --program-tran \
1085 | --progr-tra | --program-tr | --program-t)
1086 ac_prev=program_transform_name ;;
1087 -program-transform-name=* | --program-transform-name=* \
1088 | --program-transform-nam=* | --program-transform-na=* \
1089 | --program-transform-n=* | --program-transform-=* \
1090 | --program-transform=* | --program-transfor=* \
1091 | --program-transfo=* | --program-transf=* \
1092 | --program-trans=* | --program-tran=* \
1093 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001094 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001095
Martin v. Löwiseba40652007-08-30 20:10:57 +00001096 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1097 ac_prev=pdfdir ;;
1098 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1099 pdfdir=$ac_optarg ;;
1100
1101 -psdir | --psdir | --psdi | --psd | --ps)
1102 ac_prev=psdir ;;
1103 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1104 psdir=$ac_optarg ;;
1105
Guido van Rossum7f43da71994-08-01 12:15:30 +00001106 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1107 | -silent | --silent | --silen | --sile | --sil)
1108 silent=yes ;;
1109
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001110 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1111 ac_prev=sbindir ;;
1112 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1113 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001114 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001115
1116 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1117 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1118 | --sharedst | --shareds | --shared | --share | --shar \
1119 | --sha | --sh)
1120 ac_prev=sharedstatedir ;;
1121 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1122 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1123 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1124 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001125 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001126
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001127 -site | --site | --sit)
1128 ac_prev=site ;;
1129 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001130 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001131
Guido van Rossum7f43da71994-08-01 12:15:30 +00001132 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1133 ac_prev=srcdir ;;
1134 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001135 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001136
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001137 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1138 | --syscon | --sysco | --sysc | --sys | --sy)
1139 ac_prev=sysconfdir ;;
1140 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1141 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001142 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001143
Guido van Rossum7f43da71994-08-01 12:15:30 +00001144 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +00001145 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001146 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001147 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001148
1149 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1150 verbose=yes ;;
1151
Martin v. Löwis11437992002-04-12 09:54:03 +00001152 -version | --version | --versio | --versi | --vers | -V)
1153 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001154
1155 -with-* | --with-*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001156 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001157 # Reject names that are not valid shell variable names.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001158 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001159 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001160 ac_useropt_orig=$ac_useropt
1161 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1162 case $ac_user_opts in
1163 *"
1164"with_$ac_useropt"
1165"*) ;;
1166 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1167 ac_unrecognized_sep=', ';;
1168 esac
1169 eval with_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001170
1171 -without-* | --without-*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001172 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001173 # Reject names that are not valid shell variable names.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001174 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001175 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001176 ac_useropt_orig=$ac_useropt
1177 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1178 case $ac_user_opts in
1179 *"
1180"with_$ac_useropt"
1181"*) ;;
1182 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1183 ac_unrecognized_sep=', ';;
1184 esac
1185 eval with_$ac_useropt=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001186
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001187 --x)
1188 # Obsolete; use --with-x.
1189 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001190
1191 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1192 | --x-incl | --x-inc | --x-in | --x-i)
1193 ac_prev=x_includes ;;
1194 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1195 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001196 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001197
1198 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1199 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1200 ac_prev=x_libraries ;;
1201 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1202 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001203 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001204
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001205 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1206Try \`$0 --help' for more information"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001207 ;;
1208
Martin v. Löwis11437992002-04-12 09:54:03 +00001209 *=*)
1210 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1211 # Reject names that are not valid shell variable names.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001212 case $ac_envvar in #(
1213 '' | [0-9]* | *[!_$as_cr_alnum]* )
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001214 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001215 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00001216 eval $ac_envvar=\$ac_optarg
Martin v. Löwis11437992002-04-12 09:54:03 +00001217 export $ac_envvar ;;
1218
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001219 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001220 # FIXME: should be removed in autoconf 3.0.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001221 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001222 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001223 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
Matthias Klose3cef2a92012-03-14 23:39:33 +01001224 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001225 ;;
1226
1227 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00001228done
1229
Guido van Rossum7f43da71994-08-01 12:15:30 +00001230if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001231 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001232 as_fn_error $? "missing argument to $ac_option"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001233fi
1234
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001235if test -n "$ac_unrecognized_opts"; then
1236 case $enable_option_checking in
1237 no) ;;
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001238 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001239 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1240 esac
1241fi
1242
1243# Check all directory arguments for consistency.
Martin v. Löwiseba40652007-08-30 20:10:57 +00001244for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1245 datadir sysconfdir sharedstatedir localstatedir includedir \
1246 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1247 libdir localedir mandir
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001248do
Martin v. Löwiseba40652007-08-30 20:10:57 +00001249 eval ac_val=\$$ac_var
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001250 # Remove trailing slashes.
1251 case $ac_val in
1252 */ )
1253 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1254 eval $ac_var=\$ac_val;;
1255 esac
1256 # Be sure to have absolute directory names.
Martin v. Löwis11437992002-04-12 09:54:03 +00001257 case $ac_val in
Martin v. Löwiseba40652007-08-30 20:10:57 +00001258 [\\/$]* | ?:[\\/]* ) continue;;
1259 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001260 esac
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001261 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
Martin v. Löwis11437992002-04-12 09:54:03 +00001262done
Guido van Rossum627b2d71993-12-24 10:39:16 +00001263
Martin v. Löwis11437992002-04-12 09:54:03 +00001264# There might be people who depend on the old broken behavior: `$host'
1265# used to hold the argument of --host etc.
1266# FIXME: To remove some day.
1267build=$build_alias
1268host=$host_alias
1269target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +00001270
Martin v. Löwis11437992002-04-12 09:54:03 +00001271# FIXME: To remove some day.
1272if test "x$host_alias" != x; then
1273 if test "x$build_alias" = x; then
1274 cross_compiling=maybe
Martin v. Löwis11437992002-04-12 09:54:03 +00001275 elif test "x$build_alias" != "x$host_alias"; then
1276 cross_compiling=yes
1277 fi
1278fi
1279
1280ac_tool_prefix=
1281test -n "$host_alias" && ac_tool_prefix=$host_alias-
1282
1283test "$silent" = yes && exec 6>/dev/null
1284
Guido van Rossum627b2d71993-12-24 10:39:16 +00001285
Martin v. Löwiseba40652007-08-30 20:10:57 +00001286ac_pwd=`pwd` && test -n "$ac_pwd" &&
1287ac_ls_di=`ls -di .` &&
1288ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001289 as_fn_error $? "working directory cannot be determined"
Martin v. Löwiseba40652007-08-30 20:10:57 +00001290test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001291 as_fn_error $? "pwd does not report name of working directory"
Martin v. Löwiseba40652007-08-30 20:10:57 +00001292
1293
Guido van Rossum627b2d71993-12-24 10:39:16 +00001294# Find the source files, if location was not specified.
1295if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001296 ac_srcdir_defaulted=yes
Martin v. Löwiseba40652007-08-30 20:10:57 +00001297 # Try the directory containing this script, then the parent directory.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001298 ac_confdir=`$as_dirname -- "$as_myself" ||
1299$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1300 X"$as_myself" : 'X\(//\)[^/]' \| \
1301 X"$as_myself" : 'X\(//\)$' \| \
1302 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1303$as_echo X"$as_myself" |
Martin v. Löwiseba40652007-08-30 20:10:57 +00001304 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1305 s//\1/
1306 q
1307 }
1308 /^X\(\/\/\)[^/].*/{
1309 s//\1/
1310 q
1311 }
1312 /^X\(\/\/\)$/{
1313 s//\1/
1314 q
1315 }
1316 /^X\(\/\).*/{
1317 s//\1/
1318 q
1319 }
1320 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001321 srcdir=$ac_confdir
Martin v. Löwiseba40652007-08-30 20:10:57 +00001322 if test ! -r "$srcdir/$ac_unique_file"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001323 srcdir=..
1324 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001325else
1326 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001327fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00001328if test ! -r "$srcdir/$ac_unique_file"; then
1329 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001330 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
Brett Cannon19fab762007-06-02 03:02:29 +00001331fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00001332ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1333ac_abs_confdir=`(
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001334 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
Martin v. Löwiseba40652007-08-30 20:10:57 +00001335 pwd)`
1336# When building in place, set srcdir=.
1337if test "$ac_abs_confdir" = "$ac_pwd"; then
1338 srcdir=.
1339fi
1340# Remove unnecessary trailing slashes from srcdir.
1341# Double slashes in file names in object file debugging info
1342# mess up M-x gdb in Emacs.
1343case $srcdir in
1344*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1345esac
1346for ac_var in $ac_precious_vars; do
1347 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1348 eval ac_env_${ac_var}_value=\$${ac_var}
1349 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1350 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1351done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001352
Martin v. Löwis11437992002-04-12 09:54:03 +00001353#
1354# Report the --help message.
1355#
1356if test "$ac_init_help" = "long"; then
1357 # Omit some internal or obsolete options to make the list less imposing.
1358 # This message is too long to be a string in the A/UX 3.1 sh.
1359 cat <<_ACEOF
Martin v. Löwis174440b2008-10-03 08:59:41 +00001360\`configure' configures python 2.7 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +00001361
1362Usage: $0 [OPTION]... [VAR=VALUE]...
1363
1364To assign environment variables (e.g., CC, CFLAGS...), specify them as
1365VAR=VALUE. See below for descriptions of some of the useful variables.
1366
1367Defaults for the options are specified in brackets.
1368
1369Configuration:
1370 -h, --help display this help and exit
1371 --help=short display options specific to this package
1372 --help=recursive display the short help of all the included packages
1373 -V, --version display version information and exit
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001374 -q, --quiet, --silent do not print \`checking ...' messages
Martin v. Löwis11437992002-04-12 09:54:03 +00001375 --cache-file=FILE cache test results in FILE [disabled]
1376 -C, --config-cache alias for \`--cache-file=config.cache'
1377 -n, --no-create do not create output files
1378 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1379
Martin v. Löwis11437992002-04-12 09:54:03 +00001380Installation directories:
1381 --prefix=PREFIX install architecture-independent files in PREFIX
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001382 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001383 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001384 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +00001385
1386By default, \`make install' will install all the files in
1387\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1388an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1389for instance \`--prefix=\$HOME'.
1390
1391For better control, use the options below.
1392
1393Fine tuning of the installation directories:
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001394 --bindir=DIR user executables [EPREFIX/bin]
1395 --sbindir=DIR system admin executables [EPREFIX/sbin]
1396 --libexecdir=DIR program executables [EPREFIX/libexec]
1397 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1398 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1399 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1400 --libdir=DIR object code libraries [EPREFIX/lib]
1401 --includedir=DIR C header files [PREFIX/include]
1402 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1403 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1404 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1405 --infodir=DIR info documentation [DATAROOTDIR/info]
1406 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1407 --mandir=DIR man documentation [DATAROOTDIR/man]
1408 --docdir=DIR documentation root [DATAROOTDIR/doc/python]
1409 --htmldir=DIR html documentation [DOCDIR]
1410 --dvidir=DIR dvi documentation [DOCDIR]
1411 --pdfdir=DIR pdf documentation [DOCDIR]
1412 --psdir=DIR ps documentation [DOCDIR]
Martin v. Löwis11437992002-04-12 09:54:03 +00001413_ACEOF
1414
1415 cat <<\_ACEOF
doko@python.orgd65e2ba2013-01-31 23:52:03 +01001416
1417System types:
1418 --build=BUILD configure for building on BUILD [guessed]
1419 --host=HOST cross-compile to build programs to run on HOST [BUILD]
Martin v. Löwis11437992002-04-12 09:54:03 +00001420_ACEOF
1421fi
1422
1423if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +00001424 case $ac_init_help in
Martin v. Löwis174440b2008-10-03 08:59:41 +00001425 short | recursive ) echo "Configuration of python 2.7:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +00001426 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001427 cat <<\_ACEOF
1428
1429Optional Features:
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001430 --disable-option-checking ignore unrecognized --enable/--with options
Martin v. Löwis11437992002-04-12 09:54:03 +00001431 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1432 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Brett Cannon91a1dec2008-02-13 19:15:44 +00001433 --enable-universalsdk[=SDKDIR]
Brett Cannon9a8bb0e2008-02-03 02:07:55 +00001434 Build against Mac OS X 10.4u SDK (ppc/i386)
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001435 --enable-framework[=INSTALLDIR]
1436 Build (MacOSX|Darwin) framework
1437 --enable-shared disable/enable building shared python library
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00001438 --enable-profiling enable C-level code profiling
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001439 --enable-toolbox-glue disable/enable MacOSX glue code for extensions
1440 --enable-ipv6 Enable ipv6 (with ipv4) support
1441 --disable-ipv6 Disable ipv6 support
Mark Dickinsonefc82f72009-03-20 15:51:55 +00001442 --enable-big-digits[=BITS]
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001443 use big digits for Python longs [[BITS=30]]
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001444 --enable-unicode[=ucs[24]]
Benjamin Peterson66556b02010-05-25 02:23:32 +00001445 Enable Unicode strings (default is ucs2)
Martin v. Löwis11437992002-04-12 09:54:03 +00001446
1447Optional Packages:
1448 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1449 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Ronald Oussoren5640ce22008-06-05 12:58:24 +00001450 --with-universal-archs=ARCH
1451 select architectures for universal build ("32-bit",
Ronald Oussoren23d92532009-09-07 06:12:00 +00001452 "64-bit", "3-way", "intel" or "all")
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00001453 --with-framework-name=FRAMEWORK
1454 specify an alternate name of the framework built
1455 with --enable-framework
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001456 --without-gcc never use gcc
Martin v. Löwis0f48d982006-04-14 14:34:26 +00001457 --with-cxx-main=<compiler>
1458 compile main() and link python executable with C++
1459 compiler
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001460 --with-suffix=.exe set executable suffix
1461 --with-pydebug build with Py_DEBUG defined
1462 --with-libs='lib1 ...' link against additional libs
Benjamin Peterson2c196742009-12-31 03:17:18 +00001463 --with-system-expat build pyexpat module using an installed expat
1464 library
Martin v. Löwis9176fc12006-04-11 11:12:43 +00001465 --with-system-ffi build _ctypes module using an installed ffi library
Ned Deilya2a9f572013-10-25 00:30:10 -07001466 --with-tcltk-includes='-I...'
1467 override search for Tcl and Tk include files
1468 --with-tcltk-libs='-L...'
1469 override search for Tcl and Tk libs
Benjamin Peterson867475c2009-04-29 20:36:25 +00001470 --with-dbmliborder=db1:db2:...
1471 order to check db backends for dbm. Valid value is a
1472 colon separated string with the backend names
1473 `ndbm', `gdbm' and `bdb'.
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001474 --with-signal-module disable/enable signal module
1475 --with-dec-threads use DEC Alpha/OSF1 thread-safe libraries
1476 --with(out)-threads[=DIRECTORY]
1477 disable/enable thread support
1478 --with(out)-thread[=DIRECTORY]
1479 deprecated; use --with(out)-threads
1480 --with-pth use GNU pth threading libraries
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001481 --with(out)-doc-strings disable/enable documentation strings
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00001482 --with(out)-tsc enable/disable timestamp counter profile
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001483 --with(out)-pymalloc disable/enable specialized mallocs
Benjamin Peterson91c12eb2009-12-03 02:52:39 +00001484 --with-valgrind Enable Valgrind support
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001485 --with-wctype-functions use wctype.h functions
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001486 --with-fpectl enable SIGFPE catching
1487 --with-libm=STRING math library
1488 --with-libc=STRING C library
Martin v. Löwis11437992002-04-12 09:54:03 +00001489
1490Some influential environment variables:
1491 CC C compiler command
1492 CFLAGS C compiler flags
1493 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1494 nonstandard directory <lib dir>
Martin v. Löwiseba40652007-08-30 20:10:57 +00001495 LIBS libraries to pass to the linker, e.g. -l<library>
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001496 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
Martin v. Löwiseba40652007-08-30 20:10:57 +00001497 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001498 CPP C preprocessor
1499
1500Use these variables to override the choices made by `configure' or to help
1501it to find libraries and programs with nonstandard names/locations.
1502
Georg Brandl464432d2009-05-20 18:24:08 +00001503Report bugs to <http://bugs.python.org/>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001504_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00001505ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001506fi
1507
1508if test "$ac_init_help" = "recursive"; then
1509 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001510 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001511 test -d "$ac_dir" ||
1512 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1513 continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001514 ac_builddir=.
1515
Martin v. Löwiseba40652007-08-30 20:10:57 +00001516case "$ac_dir" in
1517.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1518*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001519 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Martin v. Löwiseba40652007-08-30 20:10:57 +00001520 # A ".." for each directory in $ac_dir_suffix.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001521 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Martin v. Löwiseba40652007-08-30 20:10:57 +00001522 case $ac_top_builddir_sub in
1523 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1524 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1525 esac ;;
1526esac
1527ac_abs_top_builddir=$ac_pwd
1528ac_abs_builddir=$ac_pwd$ac_dir_suffix
1529# for backward compatibility:
1530ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001531
1532case $srcdir in
Martin v. Löwiseba40652007-08-30 20:10:57 +00001533 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001534 ac_srcdir=.
Martin v. Löwiseba40652007-08-30 20:10:57 +00001535 ac_top_srcdir=$ac_top_builddir_sub
1536 ac_abs_top_srcdir=$ac_pwd ;;
1537 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001538 ac_srcdir=$srcdir$ac_dir_suffix;
Martin v. Löwiseba40652007-08-30 20:10:57 +00001539 ac_top_srcdir=$srcdir
1540 ac_abs_top_srcdir=$srcdir ;;
1541 *) # Relative name.
1542 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1543 ac_top_srcdir=$ac_top_build_prefix$srcdir
1544 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001545esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00001546ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001547
Martin v. Löwiseba40652007-08-30 20:10:57 +00001548 cd "$ac_dir" || { ac_status=$?; continue; }
1549 # Check for guested configure.
1550 if test -f "$ac_srcdir/configure.gnu"; then
1551 echo &&
1552 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1553 elif test -f "$ac_srcdir/configure"; then
1554 echo &&
1555 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001556 else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001557 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Martin v. Löwiseba40652007-08-30 20:10:57 +00001558 fi || ac_status=$?
1559 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001560 done
1561fi
1562
Martin v. Löwiseba40652007-08-30 20:10:57 +00001563test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001564if $ac_init_version; then
1565 cat <<\_ACEOF
Martin v. Löwis174440b2008-10-03 08:59:41 +00001566python configure 2.7
Charles-François Natalibe2b9072013-01-08 19:47:00 +01001567generated by GNU Autoconf 2.69
Martin v. Löwis11437992002-04-12 09:54:03 +00001568
Charles-François Natalibe2b9072013-01-08 19:47:00 +01001569Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001570This configure script is free software; the Free Software Foundation
1571gives unlimited permission to copy, distribute and modify it.
1572_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00001573 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001574fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001575
1576## ------------------------ ##
1577## Autoconf initialization. ##
1578## ------------------------ ##
1579
1580# ac_fn_c_try_compile LINENO
1581# --------------------------
1582# Try to compile conftest.$ac_ext, and return whether this succeeded.
1583ac_fn_c_try_compile ()
1584{
1585 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1586 rm -f conftest.$ac_objext
1587 if { { ac_try="$ac_compile"
1588case "(($ac_try" in
1589 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1590 *) ac_try_echo=$ac_try;;
1591esac
1592eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1593$as_echo "$ac_try_echo"; } >&5
1594 (eval "$ac_compile") 2>conftest.err
1595 ac_status=$?
1596 if test -s conftest.err; then
1597 grep -v '^ *+' conftest.err >conftest.er1
1598 cat conftest.er1 >&5
1599 mv -f conftest.er1 conftest.err
1600 fi
1601 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1602 test $ac_status = 0; } && {
1603 test -z "$ac_c_werror_flag" ||
1604 test ! -s conftest.err
1605 } && test -s conftest.$ac_objext; then :
1606 ac_retval=0
1607else
1608 $as_echo "$as_me: failed program was:" >&5
1609sed 's/^/| /' conftest.$ac_ext >&5
1610
1611 ac_retval=1
1612fi
Matthias Klose3cef2a92012-03-14 23:39:33 +01001613 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001614 as_fn_set_status $ac_retval
1615
1616} # ac_fn_c_try_compile
1617
1618# ac_fn_c_try_cpp LINENO
1619# ----------------------
1620# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1621ac_fn_c_try_cpp ()
1622{
1623 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1624 if { { ac_try="$ac_cpp conftest.$ac_ext"
1625case "(($ac_try" in
1626 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1627 *) ac_try_echo=$ac_try;;
1628esac
1629eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1630$as_echo "$ac_try_echo"; } >&5
1631 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1632 ac_status=$?
1633 if test -s conftest.err; then
1634 grep -v '^ *+' conftest.err >conftest.er1
1635 cat conftest.er1 >&5
1636 mv -f conftest.er1 conftest.err
1637 fi
1638 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001639 test $ac_status = 0; } > conftest.i && {
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001640 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1641 test ! -s conftest.err
1642 }; then :
1643 ac_retval=0
1644else
1645 $as_echo "$as_me: failed program was:" >&5
1646sed 's/^/| /' conftest.$ac_ext >&5
1647
1648 ac_retval=1
1649fi
Matthias Klose3cef2a92012-03-14 23:39:33 +01001650 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001651 as_fn_set_status $ac_retval
1652
1653} # ac_fn_c_try_cpp
1654
1655# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1656# -------------------------------------------------------
1657# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1658# the include files in INCLUDES and setting the cache variable VAR
1659# accordingly.
1660ac_fn_c_check_header_mongrel ()
1661{
1662 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Matthias Klose3cef2a92012-03-14 23:39:33 +01001663 if eval \${$3+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001664 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1665$as_echo_n "checking for $2... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01001666if eval \${$3+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001667 $as_echo_n "(cached) " >&6
1668fi
1669eval ac_res=\$$3
1670 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1671$as_echo "$ac_res" >&6; }
1672else
1673 # Is the header compilable?
1674{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1675$as_echo_n "checking $2 usability... " >&6; }
1676cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1677/* end confdefs.h. */
1678$4
1679#include <$2>
1680_ACEOF
1681if ac_fn_c_try_compile "$LINENO"; then :
1682 ac_header_compiler=yes
1683else
1684 ac_header_compiler=no
1685fi
1686rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1687{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1688$as_echo "$ac_header_compiler" >&6; }
1689
1690# Is the header present?
1691{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1692$as_echo_n "checking $2 presence... " >&6; }
1693cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1694/* end confdefs.h. */
1695#include <$2>
1696_ACEOF
1697if ac_fn_c_try_cpp "$LINENO"; then :
1698 ac_header_preproc=yes
1699else
1700 ac_header_preproc=no
1701fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001702rm -f conftest.err conftest.i conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001703{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1704$as_echo "$ac_header_preproc" >&6; }
1705
1706# So? What about this header?
1707case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1708 yes:no: )
1709 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1710$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1711 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1712$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1713 ;;
1714 no:yes:* )
1715 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1716$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1717 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1718$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1719 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1720$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1721 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1722$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1723 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1724$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001725( $as_echo "## -------------------------------------- ##
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001726## Report this to http://bugs.python.org/ ##
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001727## -------------------------------------- ##"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001728 ) | sed "s/^/$as_me: WARNING: /" >&2
1729 ;;
1730esac
1731 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1732$as_echo_n "checking for $2... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01001733if eval \${$3+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001734 $as_echo_n "(cached) " >&6
1735else
1736 eval "$3=\$ac_header_compiler"
1737fi
1738eval ac_res=\$$3
1739 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1740$as_echo "$ac_res" >&6; }
1741fi
Matthias Klose3cef2a92012-03-14 23:39:33 +01001742 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001743
1744} # ac_fn_c_check_header_mongrel
1745
1746# ac_fn_c_try_run LINENO
1747# ----------------------
1748# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1749# that executables *can* be run.
1750ac_fn_c_try_run ()
1751{
1752 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1753 if { { ac_try="$ac_link"
1754case "(($ac_try" in
1755 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1756 *) ac_try_echo=$ac_try;;
1757esac
1758eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1759$as_echo "$ac_try_echo"; } >&5
1760 (eval "$ac_link") 2>&5
1761 ac_status=$?
1762 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1763 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1764 { { case "(($ac_try" in
1765 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1766 *) ac_try_echo=$ac_try;;
1767esac
1768eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1769$as_echo "$ac_try_echo"; } >&5
1770 (eval "$ac_try") 2>&5
1771 ac_status=$?
1772 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1773 test $ac_status = 0; }; }; then :
1774 ac_retval=0
1775else
1776 $as_echo "$as_me: program exited with status $ac_status" >&5
1777 $as_echo "$as_me: failed program was:" >&5
1778sed 's/^/| /' conftest.$ac_ext >&5
1779
1780 ac_retval=$ac_status
1781fi
1782 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Matthias Klose3cef2a92012-03-14 23:39:33 +01001783 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001784 as_fn_set_status $ac_retval
1785
1786} # ac_fn_c_try_run
1787
1788# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1789# -------------------------------------------------------
1790# Tests whether HEADER exists and can be compiled using the include files in
1791# INCLUDES, setting the cache variable VAR accordingly.
1792ac_fn_c_check_header_compile ()
1793{
1794 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1795 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1796$as_echo_n "checking for $2... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01001797if eval \${$3+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001798 $as_echo_n "(cached) " >&6
1799else
1800 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1801/* end confdefs.h. */
1802$4
1803#include <$2>
1804_ACEOF
1805if ac_fn_c_try_compile "$LINENO"; then :
1806 eval "$3=yes"
1807else
1808 eval "$3=no"
1809fi
1810rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1811fi
1812eval ac_res=\$$3
1813 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1814$as_echo "$ac_res" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01001815 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001816
1817} # ac_fn_c_check_header_compile
1818
1819# ac_fn_c_try_link LINENO
1820# -----------------------
1821# Try to link conftest.$ac_ext, and return whether this succeeded.
1822ac_fn_c_try_link ()
1823{
1824 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1825 rm -f conftest.$ac_objext conftest$ac_exeext
1826 if { { ac_try="$ac_link"
1827case "(($ac_try" in
1828 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1829 *) ac_try_echo=$ac_try;;
1830esac
1831eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1832$as_echo "$ac_try_echo"; } >&5
1833 (eval "$ac_link") 2>conftest.err
1834 ac_status=$?
1835 if test -s conftest.err; then
1836 grep -v '^ *+' conftest.err >conftest.er1
1837 cat conftest.er1 >&5
1838 mv -f conftest.er1 conftest.err
1839 fi
1840 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1841 test $ac_status = 0; } && {
1842 test -z "$ac_c_werror_flag" ||
1843 test ! -s conftest.err
1844 } && test -s conftest$ac_exeext && {
1845 test "$cross_compiling" = yes ||
Charles-François Natalibe2b9072013-01-08 19:47:00 +01001846 test -x conftest$ac_exeext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001847 }; then :
1848 ac_retval=0
1849else
1850 $as_echo "$as_me: failed program was:" >&5
1851sed 's/^/| /' conftest.$ac_ext >&5
1852
1853 ac_retval=1
1854fi
1855 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1856 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1857 # interfere with the next link command; also delete a directory that is
1858 # left behind by Apple's compiler. We do this before executing the actions.
1859 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Matthias Klose3cef2a92012-03-14 23:39:33 +01001860 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001861 as_fn_set_status $ac_retval
1862
1863} # ac_fn_c_try_link
1864
1865# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
1866# -------------------------------------------
1867# Tests whether TYPE exists after having included INCLUDES, setting cache
1868# variable VAR accordingly.
1869ac_fn_c_check_type ()
1870{
1871 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1872 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1873$as_echo_n "checking for $2... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01001874if eval \${$3+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001875 $as_echo_n "(cached) " >&6
1876else
1877 eval "$3=no"
1878 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1879/* end confdefs.h. */
1880$4
1881int
1882main ()
1883{
1884if (sizeof ($2))
1885 return 0;
1886 ;
1887 return 0;
1888}
1889_ACEOF
1890if ac_fn_c_try_compile "$LINENO"; then :
1891 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1892/* end confdefs.h. */
1893$4
1894int
1895main ()
1896{
1897if (sizeof (($2)))
1898 return 0;
1899 ;
1900 return 0;
1901}
1902_ACEOF
1903if ac_fn_c_try_compile "$LINENO"; then :
1904
1905else
1906 eval "$3=yes"
1907fi
1908rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1909fi
1910rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1911fi
1912eval ac_res=\$$3
1913 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1914$as_echo "$ac_res" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01001915 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001916
1917} # ac_fn_c_check_type
1918
1919# ac_fn_c_find_uintX_t LINENO BITS VAR
1920# ------------------------------------
1921# Finds an unsigned integer type with width BITS, setting cache variable VAR
1922# accordingly.
1923ac_fn_c_find_uintX_t ()
1924{
1925 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1926 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uint$2_t" >&5
1927$as_echo_n "checking for uint$2_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01001928if eval \${$3+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001929 $as_echo_n "(cached) " >&6
1930else
1931 eval "$3=no"
1932 # Order is important - never check a type that is potentially smaller
1933 # than half of the expected target width.
1934 for ac_type in uint$2_t 'unsigned int' 'unsigned long int' \
1935 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
1936 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1937/* end confdefs.h. */
1938$ac_includes_default
1939int
1940main ()
1941{
1942static int test_array [1 - 2 * !((($ac_type) -1 >> ($2 / 2 - 1)) >> ($2 / 2 - 1) == 3)];
Charles-François Natalibe2b9072013-01-08 19:47:00 +01001943test_array [0] = 0;
1944return test_array [0];
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001945
1946 ;
1947 return 0;
1948}
1949_ACEOF
1950if ac_fn_c_try_compile "$LINENO"; then :
1951 case $ac_type in #(
1952 uint$2_t) :
1953 eval "$3=yes" ;; #(
1954 *) :
1955 eval "$3=\$ac_type" ;;
1956esac
1957fi
1958rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001959 if eval test \"x\$"$3"\" = x"no"; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001960
1961else
1962 break
1963fi
1964 done
1965fi
1966eval ac_res=\$$3
1967 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1968$as_echo "$ac_res" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01001969 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001970
1971} # ac_fn_c_find_uintX_t
1972
1973# ac_fn_c_find_intX_t LINENO BITS VAR
1974# -----------------------------------
1975# Finds a signed integer type with width BITS, setting cache variable VAR
1976# accordingly.
1977ac_fn_c_find_intX_t ()
1978{
1979 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1980 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for int$2_t" >&5
1981$as_echo_n "checking for int$2_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01001982if eval \${$3+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001983 $as_echo_n "(cached) " >&6
1984else
1985 eval "$3=no"
1986 # Order is important - never check a type that is potentially smaller
1987 # than half of the expected target width.
1988 for ac_type in int$2_t 'int' 'long int' \
1989 'long long int' 'short int' 'signed char'; do
1990 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1991/* end confdefs.h. */
1992$ac_includes_default
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001993 enum { N = $2 / 2 - 1 };
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001994int
1995main ()
1996{
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001997static int test_array [1 - 2 * !(0 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1))];
Charles-François Natalibe2b9072013-01-08 19:47:00 +01001998test_array [0] = 0;
1999return test_array [0];
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002000
2001 ;
2002 return 0;
2003}
2004_ACEOF
2005if ac_fn_c_try_compile "$LINENO"; then :
2006 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2007/* end confdefs.h. */
2008$ac_includes_default
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002009 enum { N = $2 / 2 - 1 };
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002010int
2011main ()
2012{
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002013static int test_array [1 - 2 * !(($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002014 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 2))];
Charles-François Natalibe2b9072013-01-08 19:47:00 +01002015test_array [0] = 0;
2016return test_array [0];
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002017
2018 ;
2019 return 0;
2020}
2021_ACEOF
2022if ac_fn_c_try_compile "$LINENO"; then :
2023
2024else
2025 case $ac_type in #(
2026 int$2_t) :
2027 eval "$3=yes" ;; #(
2028 *) :
2029 eval "$3=\$ac_type" ;;
2030esac
2031fi
2032rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2033fi
2034rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002035 if eval test \"x\$"$3"\" = x"no"; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002036
2037else
2038 break
2039fi
2040 done
2041fi
2042eval ac_res=\$$3
2043 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2044$as_echo "$ac_res" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01002045 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002046
2047} # ac_fn_c_find_intX_t
2048
2049# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2050# --------------------------------------------
2051# Tries to find the compile-time value of EXPR in a program that includes
2052# INCLUDES, setting VAR accordingly. Returns whether the value could be
2053# computed
2054ac_fn_c_compute_int ()
2055{
2056 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2057 if test "$cross_compiling" = yes; then
2058 # Depending upon the size, compute the lo and hi bounds.
2059cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2060/* end confdefs.h. */
2061$4
2062int
2063main ()
2064{
2065static int test_array [1 - 2 * !(($2) >= 0)];
Charles-François Natalibe2b9072013-01-08 19:47:00 +01002066test_array [0] = 0;
2067return test_array [0];
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002068
2069 ;
2070 return 0;
2071}
2072_ACEOF
2073if ac_fn_c_try_compile "$LINENO"; then :
2074 ac_lo=0 ac_mid=0
2075 while :; do
2076 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2077/* end confdefs.h. */
2078$4
2079int
2080main ()
2081{
2082static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Charles-François Natalibe2b9072013-01-08 19:47:00 +01002083test_array [0] = 0;
2084return test_array [0];
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002085
2086 ;
2087 return 0;
2088}
2089_ACEOF
2090if ac_fn_c_try_compile "$LINENO"; then :
2091 ac_hi=$ac_mid; break
2092else
2093 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2094 if test $ac_lo -le $ac_mid; then
2095 ac_lo= ac_hi=
2096 break
2097 fi
2098 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2099fi
2100rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2101 done
2102else
2103 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2104/* end confdefs.h. */
2105$4
2106int
2107main ()
2108{
2109static int test_array [1 - 2 * !(($2) < 0)];
Charles-François Natalibe2b9072013-01-08 19:47:00 +01002110test_array [0] = 0;
2111return test_array [0];
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002112
2113 ;
2114 return 0;
2115}
2116_ACEOF
2117if ac_fn_c_try_compile "$LINENO"; then :
2118 ac_hi=-1 ac_mid=-1
2119 while :; do
2120 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2121/* end confdefs.h. */
2122$4
2123int
2124main ()
2125{
2126static int test_array [1 - 2 * !(($2) >= $ac_mid)];
Charles-François Natalibe2b9072013-01-08 19:47:00 +01002127test_array [0] = 0;
2128return test_array [0];
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002129
2130 ;
2131 return 0;
2132}
2133_ACEOF
2134if ac_fn_c_try_compile "$LINENO"; then :
2135 ac_lo=$ac_mid; break
2136else
2137 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2138 if test $ac_mid -le $ac_hi; then
2139 ac_lo= ac_hi=
2140 break
2141 fi
2142 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2143fi
2144rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2145 done
2146else
2147 ac_lo= ac_hi=
2148fi
2149rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2150fi
2151rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2152# Binary search between lo and hi bounds.
2153while test "x$ac_lo" != "x$ac_hi"; do
2154 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2155 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2156/* end confdefs.h. */
2157$4
2158int
2159main ()
2160{
2161static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Charles-François Natalibe2b9072013-01-08 19:47:00 +01002162test_array [0] = 0;
2163return test_array [0];
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002164
2165 ;
2166 return 0;
2167}
2168_ACEOF
2169if ac_fn_c_try_compile "$LINENO"; then :
2170 ac_hi=$ac_mid
2171else
2172 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2173fi
2174rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2175done
2176case $ac_lo in #((
2177?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2178'') ac_retval=1 ;;
2179esac
2180 else
2181 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2182/* end confdefs.h. */
2183$4
2184static long int longval () { return $2; }
2185static unsigned long int ulongval () { return $2; }
2186#include <stdio.h>
2187#include <stdlib.h>
2188int
2189main ()
2190{
2191
2192 FILE *f = fopen ("conftest.val", "w");
2193 if (! f)
2194 return 1;
2195 if (($2) < 0)
2196 {
2197 long int i = longval ();
2198 if (i != ($2))
2199 return 1;
2200 fprintf (f, "%ld", i);
2201 }
2202 else
2203 {
2204 unsigned long int i = ulongval ();
2205 if (i != ($2))
2206 return 1;
2207 fprintf (f, "%lu", i);
2208 }
2209 /* Do not output a trailing newline, as this causes \r\n confusion
2210 on some platforms. */
2211 return ferror (f) || fclose (f) != 0;
2212
2213 ;
2214 return 0;
2215}
2216_ACEOF
2217if ac_fn_c_try_run "$LINENO"; then :
2218 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2219else
2220 ac_retval=1
2221fi
2222rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2223 conftest.$ac_objext conftest.beam conftest.$ac_ext
2224rm -f conftest.val
2225
2226 fi
Matthias Klose3cef2a92012-03-14 23:39:33 +01002227 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002228 as_fn_set_status $ac_retval
2229
2230} # ac_fn_c_compute_int
2231
2232# ac_fn_c_check_func LINENO FUNC VAR
2233# ----------------------------------
2234# Tests whether FUNC exists, setting the cache variable VAR accordingly
2235ac_fn_c_check_func ()
2236{
2237 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2238 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2239$as_echo_n "checking for $2... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01002240if eval \${$3+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002241 $as_echo_n "(cached) " >&6
2242else
2243 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2244/* end confdefs.h. */
2245/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2246 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2247#define $2 innocuous_$2
2248
2249/* System header to define __stub macros and hopefully few prototypes,
2250 which can conflict with char $2 (); below.
2251 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2252 <limits.h> exists even on freestanding compilers. */
2253
2254#ifdef __STDC__
2255# include <limits.h>
2256#else
2257# include <assert.h>
2258#endif
2259
2260#undef $2
2261
2262/* Override any GCC internal prototype to avoid an error.
2263 Use char because int might match the return type of a GCC
2264 builtin and then its argument prototype would still apply. */
2265#ifdef __cplusplus
2266extern "C"
2267#endif
2268char $2 ();
2269/* The GNU C library defines this for functions which it implements
2270 to always fail with ENOSYS. Some functions are actually named
2271 something starting with __ and the normal name is an alias. */
2272#if defined __stub_$2 || defined __stub___$2
2273choke me
2274#endif
2275
2276int
2277main ()
2278{
2279return $2 ();
2280 ;
2281 return 0;
2282}
2283_ACEOF
2284if ac_fn_c_try_link "$LINENO"; then :
2285 eval "$3=yes"
2286else
2287 eval "$3=no"
2288fi
2289rm -f core conftest.err conftest.$ac_objext \
2290 conftest$ac_exeext conftest.$ac_ext
2291fi
2292eval ac_res=\$$3
2293 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2294$as_echo "$ac_res" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01002295 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002296
2297} # ac_fn_c_check_func
2298
2299# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2300# ----------------------------------------------------
2301# Tries to find if the field MEMBER exists in type AGGR, after including
2302# INCLUDES, setting cache variable VAR accordingly.
2303ac_fn_c_check_member ()
2304{
2305 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2306 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2307$as_echo_n "checking for $2.$3... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01002308if eval \${$4+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002309 $as_echo_n "(cached) " >&6
2310else
2311 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2312/* end confdefs.h. */
2313$5
2314int
2315main ()
2316{
2317static $2 ac_aggr;
2318if (ac_aggr.$3)
2319return 0;
2320 ;
2321 return 0;
2322}
2323_ACEOF
2324if ac_fn_c_try_compile "$LINENO"; then :
2325 eval "$4=yes"
2326else
2327 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2328/* end confdefs.h. */
2329$5
2330int
2331main ()
2332{
2333static $2 ac_aggr;
2334if (sizeof ac_aggr.$3)
2335return 0;
2336 ;
2337 return 0;
2338}
2339_ACEOF
2340if ac_fn_c_try_compile "$LINENO"; then :
2341 eval "$4=yes"
2342else
2343 eval "$4=no"
2344fi
2345rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2346fi
2347rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2348fi
2349eval ac_res=\$$4
2350 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2351$as_echo "$ac_res" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01002352 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002353
2354} # ac_fn_c_check_member
2355
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002356# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2357# ---------------------------------------------
2358# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2359# accordingly.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002360ac_fn_c_check_decl ()
2361{
2362 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002363 as_decl_name=`echo $2|sed 's/ *(.*//'`
2364 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2365 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2366$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01002367if eval \${$3+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002368 $as_echo_n "(cached) " >&6
2369else
2370 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2371/* end confdefs.h. */
2372$4
2373int
2374main ()
2375{
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002376#ifndef $as_decl_name
2377#ifdef __cplusplus
2378 (void) $as_decl_use;
2379#else
2380 (void) $as_decl_name;
2381#endif
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002382#endif
2383
2384 ;
2385 return 0;
2386}
2387_ACEOF
2388if ac_fn_c_try_compile "$LINENO"; then :
2389 eval "$3=yes"
2390else
2391 eval "$3=no"
2392fi
2393rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2394fi
2395eval ac_res=\$$3
2396 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2397$as_echo "$ac_res" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01002398 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002399
2400} # ac_fn_c_check_decl
Martin v. Löwiseba40652007-08-30 20:10:57 +00002401cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00002402This file contains any messages produced by compilers while
2403running configure, to aid debugging if configure makes a mistake.
2404
Martin v. Löwis174440b2008-10-03 08:59:41 +00002405It was created by python $as_me 2.7, which was
Charles-François Natalibe2b9072013-01-08 19:47:00 +01002406generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00002407
2408 $ $0 $@
2409
2410_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00002411exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00002412{
2413cat <<_ASUNAME
2414## --------- ##
2415## Platform. ##
2416## --------- ##
2417
2418hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2419uname -m = `(uname -m) 2>/dev/null || echo unknown`
2420uname -r = `(uname -r) 2>/dev/null || echo unknown`
2421uname -s = `(uname -s) 2>/dev/null || echo unknown`
2422uname -v = `(uname -v) 2>/dev/null || echo unknown`
2423
2424/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2425/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2426
2427/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2428/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2429/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Martin v. Löwiseba40652007-08-30 20:10:57 +00002430/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00002431/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2432/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2433/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2434
2435_ASUNAME
2436
2437as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2438for as_dir in $PATH
2439do
2440 IFS=$as_save_IFS
2441 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002442 $as_echo "PATH: $as_dir"
2443 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002444IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002445
2446} >&5
2447
2448cat >&5 <<_ACEOF
2449
2450
2451## ----------- ##
2452## Core tests. ##
2453## ----------- ##
2454
2455_ACEOF
2456
2457
2458# Keep a trace of the command line.
2459# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00002460# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00002461# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00002462# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00002463ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00002464ac_configure_args0=
2465ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00002466ac_must_keep_next=false
2467for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00002468do
Skip Montanaro6dead952003-09-25 14:50:04 +00002469 for ac_arg
2470 do
2471 case $ac_arg in
2472 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2473 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2474 | -silent | --silent | --silen | --sile | --sil)
2475 continue ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00002476 *\'*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002477 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002478 esac
2479 case $ac_pass in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002480 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002481 2)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002482 as_fn_append ac_configure_args1 " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002483 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002484 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00002485 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00002486 case $ac_arg in
2487 *=* | --config-cache | -C | -disable-* | --disable-* \
2488 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2489 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2490 | -with-* | --with-* | -without-* | --without-* | --x)
2491 case "$ac_configure_args0 " in
2492 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2493 esac
2494 ;;
2495 -* ) ac_must_keep_next=true ;;
2496 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00002497 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002498 as_fn_append ac_configure_args " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002499 ;;
2500 esac
2501 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002502done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002503{ ac_configure_args0=; unset ac_configure_args0;}
2504{ ac_configure_args1=; unset ac_configure_args1;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002505
2506# When interrupted or exit'd, cleanup temporary files, and complete
2507# config.log. We remove comments because anyway the quotes in there
2508# would cause problems or look ugly.
Martin v. Löwiseba40652007-08-30 20:10:57 +00002509# WARNING: Use '\'' to represent an apostrophe within the trap.
2510# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
Martin v. Löwis11437992002-04-12 09:54:03 +00002511trap 'exit_status=$?
2512 # Save into config.log some information that might help in debugging.
2513 {
2514 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002515
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002516 $as_echo "## ---------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002517## Cache variables. ##
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002518## ---------------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002519 echo
2520 # The following way of writing the cache mishandles newlines in values,
Martin v. Löwiseba40652007-08-30 20:10:57 +00002521(
2522 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2523 eval ac_val=\$$ac_var
2524 case $ac_val in #(
2525 *${as_nl}*)
2526 case $ac_var in #(
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002527 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2528$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00002529 esac
2530 case $ac_var in #(
2531 _ | IFS | as_nl) ;; #(
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002532 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2533 *) { eval $ac_var=; unset $ac_var;} ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00002534 esac ;;
2535 esac
2536 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002537 (set) 2>&1 |
Martin v. Löwiseba40652007-08-30 20:10:57 +00002538 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2539 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00002540 sed -n \
Martin v. Löwiseba40652007-08-30 20:10:57 +00002541 "s/'\''/'\''\\\\'\'''\''/g;
2542 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2543 ;; #(
Skip Montanaro89e975f2007-08-22 19:05:21 +00002544 *)
Martin v. Löwiseba40652007-08-30 20:10:57 +00002545 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaro89e975f2007-08-22 19:05:21 +00002546 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00002547 esac |
2548 sort
2549)
Martin v. Löwis11437992002-04-12 09:54:03 +00002550 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002551
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002552 $as_echo "## ----------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00002553## Output variables. ##
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002554## ----------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002555 echo
2556 for ac_var in $ac_subst_vars
2557 do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002558 eval ac_val=\$$ac_var
2559 case $ac_val in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002560 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00002561 esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002562 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002563 done | sort
2564 echo
2565
2566 if test -n "$ac_subst_files"; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002567 $as_echo "## ------------------- ##
Martin v. Löwiseba40652007-08-30 20:10:57 +00002568## File substitutions. ##
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002569## ------------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002570 echo
2571 for ac_var in $ac_subst_files
2572 do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002573 eval ac_val=\$$ac_var
2574 case $ac_val in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002575 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00002576 esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002577 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002578 done | sort
2579 echo
2580 fi
2581
Martin v. Löwis11437992002-04-12 09:54:03 +00002582 if test -s confdefs.h; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002583 $as_echo "## ----------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002584## confdefs.h. ##
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002585## ----------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002586 echo
Martin v. Löwiseba40652007-08-30 20:10:57 +00002587 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002588 echo
2589 fi
2590 test "$ac_signal" != 0 &&
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002591 $as_echo "$as_me: caught signal $ac_signal"
2592 $as_echo "$as_me: exit $exit_status"
Martin v. Löwis11437992002-04-12 09:54:03 +00002593 } >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00002594 rm -f core *.core core.conftest.* &&
2595 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00002596 exit $exit_status
Martin v. Löwiseba40652007-08-30 20:10:57 +00002597' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00002598for ac_signal in 1 2 13 15; do
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002599 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00002600done
2601ac_signal=0
2602
2603# confdefs.h avoids OS command line length limits that DEFS can exceed.
Martin v. Löwiseba40652007-08-30 20:10:57 +00002604rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002605
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002606$as_echo "/* confdefs.h */" > confdefs.h
2607
Martin v. Löwis11437992002-04-12 09:54:03 +00002608# Predefined preprocessor variables.
2609
2610cat >>confdefs.h <<_ACEOF
2611#define PACKAGE_NAME "$PACKAGE_NAME"
2612_ACEOF
2613
Martin v. Löwis11437992002-04-12 09:54:03 +00002614cat >>confdefs.h <<_ACEOF
2615#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2616_ACEOF
2617
Martin v. Löwis11437992002-04-12 09:54:03 +00002618cat >>confdefs.h <<_ACEOF
2619#define PACKAGE_VERSION "$PACKAGE_VERSION"
2620_ACEOF
2621
Martin v. Löwis11437992002-04-12 09:54:03 +00002622cat >>confdefs.h <<_ACEOF
2623#define PACKAGE_STRING "$PACKAGE_STRING"
2624_ACEOF
2625
Martin v. Löwis11437992002-04-12 09:54:03 +00002626cat >>confdefs.h <<_ACEOF
2627#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2628_ACEOF
2629
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002630cat >>confdefs.h <<_ACEOF
2631#define PACKAGE_URL "$PACKAGE_URL"
2632_ACEOF
2633
Martin v. Löwis11437992002-04-12 09:54:03 +00002634
2635# Let the site file select an alternate cache file if it wants to.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002636# Prefer an explicitly selected file to automatically selected ones.
2637ac_site_file1=NONE
2638ac_site_file2=NONE
Martin v. Löwiseba40652007-08-30 20:10:57 +00002639if test -n "$CONFIG_SITE"; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002640 # We do not want a PATH search for config.site.
2641 case $CONFIG_SITE in #((
2642 -*) ac_site_file1=./$CONFIG_SITE;;
2643 */*) ac_site_file1=$CONFIG_SITE;;
2644 *) ac_site_file1=./$CONFIG_SITE;;
2645 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00002646elif test "x$prefix" != xNONE; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002647 ac_site_file1=$prefix/share/config.site
2648 ac_site_file2=$prefix/etc/config.site
Martin v. Löwiseba40652007-08-30 20:10:57 +00002649else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002650 ac_site_file1=$ac_default_prefix/share/config.site
2651 ac_site_file2=$ac_default_prefix/etc/config.site
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002652fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002653for ac_site_file in "$ac_site_file1" "$ac_site_file2"
Martin v. Löwiseba40652007-08-30 20:10:57 +00002654do
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002655 test "x$ac_site_file" = xNONE && continue
2656 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2657 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2658$as_echo "$as_me: loading site script $ac_site_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002659 sed 's/^/| /' "$ac_site_file" >&5
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002660 . "$ac_site_file" \
2661 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2662$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2663as_fn_error $? "failed to load site script $ac_site_file
Matthias Klose3cef2a92012-03-14 23:39:33 +01002664See \`config.log' for more details" "$LINENO" 5; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002665 fi
2666done
2667
2668if test -r "$cache_file"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002669 # Some versions of bash will fail to source /dev/null (special files
2670 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2671 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2672 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2673$as_echo "$as_me: loading cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002674 case $cache_file in
Martin v. Löwiseba40652007-08-30 20:10:57 +00002675 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2676 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00002677 esac
2678 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002679else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002680 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2681$as_echo "$as_me: creating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002682 >$cache_file
2683fi
2684
2685# Check that the precious variables saved in the cache have kept the same
2686# value.
2687ac_cache_corrupted=false
Martin v. Löwiseba40652007-08-30 20:10:57 +00002688for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00002689 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2690 eval ac_new_set=\$ac_env_${ac_var}_set
Martin v. Löwiseba40652007-08-30 20:10:57 +00002691 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2692 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00002693 case $ac_old_set,$ac_new_set in
2694 set,)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002695 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2696$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002697 ac_cache_corrupted=: ;;
2698 ,set)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002699 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2700$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002701 ac_cache_corrupted=: ;;
2702 ,);;
2703 *)
2704 if test "x$ac_old_val" != "x$ac_new_val"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002705 # differences in whitespace do not lead to failure.
2706 ac_old_val_w=`echo x $ac_old_val`
2707 ac_new_val_w=`echo x $ac_new_val`
2708 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2709 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2710$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2711 ac_cache_corrupted=:
2712 else
2713 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2714$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2715 eval $ac_var=\$ac_old_val
2716 fi
2717 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2718$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2719 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2720$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002721 fi;;
2722 esac
2723 # Pass precious variables to config.status.
2724 if test "$ac_new_set" = set; then
2725 case $ac_new_val in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002726 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002727 *) ac_arg=$ac_var=$ac_new_val ;;
2728 esac
2729 case " $ac_configure_args " in
2730 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002731 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002732 esac
2733 fi
2734done
2735if $ac_cache_corrupted; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002736 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2737$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2738 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2739$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002740 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002741fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002742## -------------------- ##
2743## Main body of script. ##
2744## -------------------- ##
Martin v. Löwiseba40652007-08-30 20:10:57 +00002745
Guido van Rossum7f43da71994-08-01 12:15:30 +00002746ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002747ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00002748ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2749ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2750ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002751
Guido van Rossum627b2d71993-12-24 10:39:16 +00002752
Michael W. Hudson54241132001-12-07 15:38:26 +00002753
Martin v. Löwiseba40652007-08-30 20:10:57 +00002754ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00002755
2756
doko@python.orgd65e2ba2013-01-31 23:52:03 +01002757ac_aux_dir=
2758for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
2759 if test -f "$ac_dir/install-sh"; then
2760 ac_aux_dir=$ac_dir
2761 ac_install_sh="$ac_aux_dir/install-sh -c"
2762 break
2763 elif test -f "$ac_dir/install.sh"; then
2764 ac_aux_dir=$ac_dir
2765 ac_install_sh="$ac_aux_dir/install.sh -c"
2766 break
2767 elif test -f "$ac_dir/shtool"; then
2768 ac_aux_dir=$ac_dir
2769 ac_install_sh="$ac_aux_dir/shtool install -c"
2770 break
2771 fi
2772done
2773if test -z "$ac_aux_dir"; then
2774 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
2775fi
2776
2777# These three variables are undocumented and unsupported,
2778# and are intended to be withdrawn in a future Autoconf release.
2779# They can cause serious problems if a builder's source tree is in a directory
2780# whose full name contains unusual characters.
2781ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
2782ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
2783ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
2784
2785
2786# Make sure we can run config.sub.
2787$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2788 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
2789
2790{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
2791$as_echo_n "checking build system type... " >&6; }
2792if ${ac_cv_build+:} false; then :
2793 $as_echo_n "(cached) " >&6
2794else
2795 ac_build_alias=$build_alias
2796test "x$ac_build_alias" = x &&
2797 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2798test "x$ac_build_alias" = x &&
2799 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
2800ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2801 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
2802
2803fi
2804{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
2805$as_echo "$ac_cv_build" >&6; }
2806case $ac_cv_build in
2807*-*-*) ;;
2808*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
2809esac
2810build=$ac_cv_build
2811ac_save_IFS=$IFS; IFS='-'
2812set x $ac_cv_build
2813shift
2814build_cpu=$1
2815build_vendor=$2
2816shift; shift
2817# Remember, the first character of IFS is used to create $*,
2818# except with old shells:
2819build_os=$*
2820IFS=$ac_save_IFS
2821case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2822
2823
2824{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
2825$as_echo_n "checking host system type... " >&6; }
2826if ${ac_cv_host+:} false; then :
2827 $as_echo_n "(cached) " >&6
2828else
2829 if test "x$host_alias" = x; then
2830 ac_cv_host=$ac_cv_build
2831else
2832 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2833 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
2834fi
2835
2836fi
2837{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
2838$as_echo "$ac_cv_host" >&6; }
2839case $ac_cv_host in
2840*-*-*) ;;
2841*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
2842esac
2843host=$ac_cv_host
2844ac_save_IFS=$IFS; IFS='-'
2845set x $ac_cv_host
2846shift
2847host_cpu=$1
2848host_vendor=$2
2849shift; shift
2850# Remember, the first character of IFS is used to create $*,
2851# except with old shells:
2852host_os=$*
2853IFS=$ac_save_IFS
2854case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
2855
2856
2857
2858
2859
Ned Deily983df862014-08-22 13:30:59 -07002860# pybuilddir.txt will be created by --generate-posix-vars in the Makefile
2861rm -f pybuilddir.txt
2862
doko@python.orgd65e2ba2013-01-31 23:52:03 +01002863if test "$cross_compiling" = yes; then
2864 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for python interpreter for cross build" >&5
2865$as_echo_n "checking for python interpreter for cross build... " >&6; }
2866 if test -z "$PYTHON_FOR_BUILD"; then
2867 for interp in python$PACKAGE_VERSION python2 python; do
2868 which $interp >/dev/null 2>&1 || continue
2869 if $interp -c 'import sys;sys.exit(not (sys.version_info[:2] >= (2,7) and sys.version_info[0] < 3))'; then
2870 break
2871 fi
2872 interp=
2873 done
2874 if test x$interp = x; then
2875 as_fn_error $? "python$PACKAGE_VERSION interpreter not found" "$LINENO" 5
2876 fi
2877 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $interp" >&5
2878$as_echo "$interp" >&6; }
2879 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
2880 fi
2881elif test "$cross_compiling" = maybe; then
2882 as_fn_error $? "Cross compiling required --host=HOST-TUPLE and --build=ARCH" "$LINENO" 5
2883else
2884 PYTHON_FOR_BUILD='./$(BUILDPYTHON) -E'
2885fi
2886
2887
Martin v. Löwis11437992002-04-12 09:54:03 +00002888
Georg Brandlbcd64a32009-03-31 21:45:18 +00002889if test "$prefix" != "/"; then
2890 prefix=`echo "$prefix" | sed -e 's/\/$//g'`
2891fi
2892
2893
Martin v. Löwis11437992002-04-12 09:54:03 +00002894
2895
Martin v. Löwis8316feb2003-06-14 07:48:07 +00002896# We don't use PACKAGE_ variables, and they cause conflicts
2897# with other autoconf-based packages that include Python.h
2898grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
2899rm confdefs.h
2900mv confdefs.h.new confdefs.h
2901
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00002902
Martin v. Löwis174440b2008-10-03 08:59:41 +00002903VERSION=2.7
Guido van Rossum1fd74a71997-07-19 19:36:02 +00002904
Martin v. Löwis1142de32002-03-29 16:28:31 +00002905
2906SOVERSION=1.0
2907
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002908# The later defininition of _XOPEN_SOURCE disables certain features
2909# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
2910
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002911$as_echo "#define _GNU_SOURCE 1" >>confdefs.h
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002912
2913
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002914# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2915# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
2916# them.
2917
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002918$as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002919
2920
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002921# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2922# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
2923# them.
2924
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002925$as_echo "#define __BSD_VISIBLE 1" >>confdefs.h
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002926
2927
Martin v. Löwisd6320502004-08-12 13:45:08 +00002928# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2929# u_int on Irix 5.3. Defining _BSD_TYPES brings it back.
2930
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002931$as_echo "#define _BSD_TYPES 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +00002932
2933
Ronald Oussoren5640ce22008-06-05 12:58:24 +00002934# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2935# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
2936# them.
2937
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002938$as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
Ronald Oussoren5640ce22008-06-05 12:58:24 +00002939
2940
2941
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002942define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002943
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00002944# Arguments passed to configure.
2945
2946CONFIG_ARGS="$ac_configure_args"
2947
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002948{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-universalsdk" >&5
2949$as_echo_n "checking for --enable-universalsdk... " >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00002950# Check whether --enable-universalsdk was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002951if test "${enable_universalsdk+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00002952 enableval=$enable_universalsdk;
Ronald Oussoren988117f2006-04-29 11:31:35 +00002953 case $enableval in
2954 yes)
2955 enableval=/Developer/SDKs/MacOSX10.4u.sdk
Ronald Oussoren3c0a1262010-01-17 19:27:57 +00002956 if test ! -d "${enableval}"
2957 then
2958 enableval=/
2959 fi
Ronald Oussoren988117f2006-04-29 11:31:35 +00002960 ;;
2961 esac
2962 case $enableval in
2963 no)
2964 UNIVERSALSDK=
2965 enable_universalsdk=
2966 ;;
2967 *)
2968 UNIVERSALSDK=$enableval
Ronald Oussoren3c0a1262010-01-17 19:27:57 +00002969 if test ! -d "${UNIVERSALSDK}"
2970 then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002971 as_fn_error $? "--enable-universalsdk specifies non-existing SDK: ${UNIVERSALSDK}" "$LINENO" 5
Ronald Oussoren3c0a1262010-01-17 19:27:57 +00002972 fi
Ronald Oussoren988117f2006-04-29 11:31:35 +00002973 ;;
2974 esac
2975
Ronald Oussoren3c0a1262010-01-17 19:27:57 +00002976
Ronald Oussoren988117f2006-04-29 11:31:35 +00002977else
2978
2979 UNIVERSALSDK=
2980 enable_universalsdk=
2981
Martin v. Löwiseba40652007-08-30 20:10:57 +00002982fi
Ronald Oussoren988117f2006-04-29 11:31:35 +00002983
Ronald Oussoren3c0a1262010-01-17 19:27:57 +00002984if test -n "${UNIVERSALSDK}"
2985then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002986 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSALSDK}" >&5
2987$as_echo "${UNIVERSALSDK}" >&6; }
Ronald Oussoren3c0a1262010-01-17 19:27:57 +00002988else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002989 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2990$as_echo "no" >&6; }
Ronald Oussoren3c0a1262010-01-17 19:27:57 +00002991fi
Ronald Oussoren988117f2006-04-29 11:31:35 +00002992
Martin v. Löwiseba40652007-08-30 20:10:57 +00002993
Benjamin Peterson0e6ea5d2008-07-16 20:17:04 +00002994
Ned Deily8e60f6e2013-05-30 00:14:29 -07002995ARCH_RUN_32BIT=""
Benjamin Peterson0e6ea5d2008-07-16 20:17:04 +00002996
Ronald Oussoren5640ce22008-06-05 12:58:24 +00002997UNIVERSAL_ARCHS="32-bit"
Ronald Oussoren92919a62009-12-24 13:30:58 +00002998
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002999{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-universal-archs" >&5
3000$as_echo_n "checking for --with-universal-archs... " >&6; }
Ronald Oussoren5640ce22008-06-05 12:58:24 +00003001
3002# Check whether --with-universal-archs was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003003if test "${with_universal_archs+set}" = set; then :
Ronald Oussoren5640ce22008-06-05 12:58:24 +00003004 withval=$with_universal_archs;
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003005 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
3006$as_echo "$withval" >&6; }
Ronald Oussoren5640ce22008-06-05 12:58:24 +00003007 UNIVERSAL_ARCHS="$withval"
Ronald Oussoren9ebd2422009-09-29 13:00:44 +00003008 if test "${enable_universalsdk}" ; then
3009 :
3010 else
Georg Brandl71f4fbb2011-02-25 11:04:50 +00003011 as_fn_error $? "--with-universal-archs without --enable-universalsdk. See Mac/README" "$LINENO" 5
Ronald Oussoren9ebd2422009-09-29 13:00:44 +00003012 fi
Ronald Oussoren5640ce22008-06-05 12:58:24 +00003013
3014else
3015
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003016 { $as_echo "$as_me:${as_lineno-$LINENO}: result: 32-bit" >&5
3017$as_echo "32-bit" >&6; }
Ronald Oussoren5640ce22008-06-05 12:58:24 +00003018
3019fi
3020
3021
3022
3023
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00003024
3025# Check whether --with-framework-name was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003026if test "${with_framework_name+set}" = set; then :
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00003027 withval=$with_framework_name;
Ronald Oussoren9ebd2422009-09-29 13:00:44 +00003028 if test "${enable_framework}"; then
3029 :
3030 else
Georg Brandl71f4fbb2011-02-25 11:04:50 +00003031 as_fn_error $? "--with-framework-name without --enable-framework. See Mac/README" "$LINENO" 5
Ronald Oussoren9ebd2422009-09-29 13:00:44 +00003032 fi
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00003033 PYTHONFRAMEWORK=${withval}
3034 PYTHONFRAMEWORKDIR=${withval}.framework
3035 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
3036
3037else
3038
3039 PYTHONFRAMEWORK=Python
3040 PYTHONFRAMEWORKDIR=Python.framework
3041 PYTHONFRAMEWORKIDENTIFIER=org.python.python
3042
3043fi
3044
Martin v. Löwiseba40652007-08-30 20:10:57 +00003045# Check whether --enable-framework was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003046if test "${enable_framework+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00003047 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00003048 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00003049 yes)
Jack Jansene578a632001-08-15 01:27:14 +00003050 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00003051 esac
3052 case $enableval in
3053 no)
3054 PYTHONFRAMEWORK=
3055 PYTHONFRAMEWORKDIR=no-framework
3056 PYTHONFRAMEWORKPREFIX=
3057 PYTHONFRAMEWORKINSTALLDIR=
Ronald Oussoren567a8ff2006-05-26 11:43:26 +00003058 FRAMEWORKINSTALLFIRST=
3059 FRAMEWORKINSTALLLAST=
Ronald Oussoren5b787322006-06-06 19:50:24 +00003060 FRAMEWORKALTINSTALLFIRST=
3061 FRAMEWORKALTINSTALLLAST=
Ronald Oussoren2db3a8f2006-06-07 19:06:01 +00003062 if test "x${prefix}" = "xNONE"; then
3063 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3064 else
3065 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3066 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00003067 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00003068 ;;
3069 *)
Ronald Oussoren01d149f2010-04-30 11:20:14 +00003070 PYTHONFRAMEWORKPREFIX="${enableval}"
Jack Jansen127e56e2001-09-11 14:41:54 +00003071 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Ronald Oussoren567a8ff2006-05-26 11:43:26 +00003072 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussoren5640ce22008-06-05 12:58:24 +00003073 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure bininstall maninstall"
Ronald Oussoren92919a62009-12-24 13:30:58 +00003074 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
3075 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
Ronald Oussoren01d149f2010-04-30 11:20:14 +00003076 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
Ronald Oussoren5640ce22008-06-05 12:58:24 +00003077
Ronald Oussoren2db3a8f2006-06-07 19:06:01 +00003078 if test "x${prefix}" = "xNONE" ; then
3079 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
Ronald Oussoren01d149f2010-04-30 11:20:14 +00003080
Ronald Oussoren2db3a8f2006-06-07 19:06:01 +00003081 else
3082 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3083 fi
Ronald Oussoren01d149f2010-04-30 11:20:14 +00003084
3085 case "${enableval}" in
3086 /System*)
3087 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3088 if test "${prefix}" = "NONE" ; then
3089 # See below
3090 FRAMEWORKUNIXTOOLSPREFIX="/usr"
3091 fi
3092 ;;
3093
3094 /Library*)
3095 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3096 ;;
3097
3098 */Library/Frameworks)
3099 MDIR="`dirname "${enableval}"`"
3100 MDIR="`dirname "${MDIR}"`"
3101 FRAMEWORKINSTALLAPPSPREFIX="${MDIR}/Applications"
3102
3103 if test "${prefix}" = "NONE"; then
3104 # User hasn't specified the
3105 # --prefix option, but wants to install
3106 # the framework in a non-default location,
3107 # ensure that the compatibility links get
3108 # installed relative to that prefix as well
3109 # instead of in /usr/local.
3110 FRAMEWORKUNIXTOOLSPREFIX="${MDIR}"
3111 fi
3112 ;;
3113
3114 *)
3115 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3116 ;;
3117 esac
3118
Jack Jansen127e56e2001-09-11 14:41:54 +00003119 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Ronald Oussoren836b0392006-05-14 19:56:34 +00003120
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00003121 # Add files for Mac specific code to the list of output
Ronald Oussoren836b0392006-05-14 19:56:34 +00003122 # files:
Martin v. Löwiseba40652007-08-30 20:10:57 +00003123 ac_config_files="$ac_config_files Mac/Makefile"
Ronald Oussoren836b0392006-05-14 19:56:34 +00003124
Martin v. Löwiseba40652007-08-30 20:10:57 +00003125 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Ronald Oussoren836b0392006-05-14 19:56:34 +00003126
Martin v. Löwiseba40652007-08-30 20:10:57 +00003127 ac_config_files="$ac_config_files Mac/IDLE/Makefile"
Ronald Oussoren836b0392006-05-14 19:56:34 +00003128
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00003129 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
3130
3131 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
3132
Jack Jansene578a632001-08-15 01:27:14 +00003133 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003134
Guido van Rossum563e7081996-09-10 18:20:48 +00003135else
Martin v. Löwis11437992002-04-12 09:54:03 +00003136
Jack Jansene578a632001-08-15 01:27:14 +00003137 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00003138 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00003139 PYTHONFRAMEWORKPREFIX=
3140 PYTHONFRAMEWORKINSTALLDIR=
Ronald Oussoren567a8ff2006-05-26 11:43:26 +00003141 FRAMEWORKINSTALLFIRST=
3142 FRAMEWORKINSTALLLAST=
Ronald Oussoren5b787322006-06-06 19:50:24 +00003143 FRAMEWORKALTINSTALLFIRST=
3144 FRAMEWORKALTINSTALLLAST=
Ronald Oussoren2db3a8f2006-06-07 19:06:01 +00003145 if test "x${prefix}" = "xNONE" ; then
3146 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3147 else
3148 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3149 fi
Jack Jansene578a632001-08-15 01:27:14 +00003150 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003151
Ronald Oussoren5640ce22008-06-05 12:58:24 +00003152
Martin v. Löwiseba40652007-08-30 20:10:57 +00003153fi
3154
Michael W. Hudson54241132001-12-07 15:38:26 +00003155
3156
3157
3158
Jack Jansene578a632001-08-15 01:27:14 +00003159
Ronald Oussoren567a8ff2006-05-26 11:43:26 +00003160
3161
Ronald Oussoren5b787322006-06-06 19:50:24 +00003162
3163
3164
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00003165
Ronald Oussoren01d149f2010-04-30 11:20:14 +00003166
Jack Jansene578a632001-08-15 01:27:14 +00003167##AC_ARG_WITH(dyld,
Matthias Klose22520ea2010-05-08 10:14:46 +00003168## AS_HELP_STRING([--with-dyld],
3169## [Use (OpenStep|Rhapsody) dynamic linker]))
Jack Jansene578a632001-08-15 01:27:14 +00003170##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003171# Set name for machine-dependent library files
3172
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003173{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP" >&5
3174$as_echo_n "checking MACHDEP... " >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003175if test -z "$MACHDEP"
3176then
doko@python.orgd65e2ba2013-01-31 23:52:03 +01003177 # avoid using uname for cross builds
3178 if test "$cross_compiling" = yes; then
3179 # ac_sys_system and ac_sys_release are only used for setting
3180 # `define_xopen_source' in the case statement below. For the
3181 # current supported cross builds, this macro is not adjusted.
3182 case "$host" in
3183 *-*-linux*)
3184 ac_sys_system=Linux
3185 ;;
3186 *-*-cygwin*)
3187 ac_sys_system=Cygwin
3188 ;;
3189 *)
3190 # for now, limit cross builds to known configurations
3191 MACHDEP="unknown"
3192 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3193 esac
3194 ac_sys_release=
3195 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003196 ac_sys_system=`uname -s`
Georg Brandlfe18a112009-09-04 07:55:14 +00003197 if test "$ac_sys_system" = "AIX" \
Martin v. Löwis21ee4092002-09-30 16:19:48 +00003198 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00003199 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003200 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003201 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003202 fi
doko@python.orgd65e2ba2013-01-31 23:52:03 +01003203 fi
3204 ac_md_system=`echo $ac_sys_system |
3205 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
3206 ac_md_release=`echo $ac_sys_release |
3207 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
3208 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00003209
doko@python.orgd65e2ba2013-01-31 23:52:03 +01003210 case $MACHDEP in
Victor Stinneracacbaa2011-08-20 14:02:38 +02003211 linux*) MACHDEP="linux2";;
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00003212 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00003213 darwin*) MACHDEP="darwin";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00003214 atheos*) MACHDEP="atheos";;
Martin v. Löwisf3322282003-07-13 09:46:13 +00003215 irix646) MACHDEP="irix6";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00003216 '') MACHDEP="unknown";;
doko@python.orgd65e2ba2013-01-31 23:52:03 +01003217 esac
3218fi
3219
3220
3221if test "$cross_compiling" = yes; then
3222 case "$host" in
3223 *-*-linux*)
3224 case "$host_cpu" in
3225 arm*)
3226 _host_cpu=arm
3227 ;;
3228 *)
3229 _host_cpu=$host_cpu
3230 esac
3231 ;;
3232 *-*-cygwin*)
3233 _host_cpu=
3234 ;;
3235 *)
3236 # for now, limit cross builds to known configurations
3237 MACHDEP="unknown"
3238 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003239 esac
doko@python.orgd65e2ba2013-01-31 23:52:03 +01003240 _PYTHON_HOST_PLATFORM="$MACHDEP${_host_cpu:+-$_host_cpu}"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003241fi
Guido van Rossum91922671997-10-09 20:24:13 +00003242
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003243# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
3244# disable features if it is defined, without any means to access these
3245# features as extensions. For these systems, we skip the definition of
3246# _XOPEN_SOURCE. Before adding a system to the list to gain access to
3247# some feature, make sure there is no alternative way to access this
3248# feature. Also, when using wildcards, make sure you have verified the
3249# need for not defining _XOPEN_SOURCE on all systems matching the
3250# wildcard, and that the wildcard does not include future systems
3251# (which may remove their limitations).
3252case $ac_sys_system/$ac_sys_release in
3253 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
3254 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00003255 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Martin v. Löwis7875ef62010-02-15 21:41:12 +00003256 # In addition, Stefan Krah confirms that issue #1244610 exists through
3257 # OpenBSD 4.6, but is fixed in 4.7.
Charles-François Natali97781b02011-07-22 23:43:42 +02003258 OpenBSD/2.* | OpenBSD/3.* | OpenBSD/4.[0123456])
Martin v. Löwiscb78de62007-12-29 18:49:21 +00003259 define_xopen_source=no
3260 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3261 # also defined. This can be overridden by defining _BSD_SOURCE
3262 # As this has a different meaning on Linux, only define it on OpenBSD
3263
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003264$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Martin v. Löwiscb78de62007-12-29 18:49:21 +00003265
3266 ;;
Charles-François Natali97781b02011-07-22 23:43:42 +02003267 OpenBSD/*)
Martin v. Löwis5e2dd862010-02-15 08:32:00 +00003268 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3269 # also defined. This can be overridden by defining _BSD_SOURCE
3270 # As this has a different meaning on Linux, only define it on OpenBSD
3271
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003272$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Martin v. Löwis5e2dd862010-02-15 08:32:00 +00003273
3274 ;;
Martin v. Löwis4d542ec2006-11-25 15:39:19 +00003275 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
3276 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
3277 # Marc Recht
Benjamin Petersoneac68f42008-11-16 17:54:55 +00003278 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 +00003279 define_xopen_source=no;;
Martin v. Löwisb41afb52010-05-28 15:28:47 +00003280 # From the perspective of Solaris, _XOPEN_SOURCE is not so much a
3281 # request to enable features supported by the standard as a request
3282 # to disable features not supported by the standard. The best way
3283 # for Python to use Solaris is simply to leave _XOPEN_SOURCE out
3284 # entirely and define __EXTENSIONS__ instead.
3285 SunOS/*)
Martin v. Löwisa9d71422003-03-28 18:43:31 +00003286 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003287 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
3288 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00003289 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00003290 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003291 define_xopen_source=no;;
3292 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003293 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003294 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003295 define_xopen_source=no;;
Martin v. Löwisbb86d832008-11-04 20:40:09 +00003296 # On FreeBSD 4, the math functions C89 does not cover are never defined
3297 # with _XOPEN_SOURCE and __BSD_VISIBLE does not re-enable them.
3298 FreeBSD/4.*)
3299 define_xopen_source=no;;
3300 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
3301 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
3302 # identifies itself as Darwin/7.*
3303 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3304 # disables platform specific features beyond repair.
3305 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3306 # has no effect, don't bother defining them
3307 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00003308 define_xopen_source=no;;
Ronald Oussorena55af9a2010-01-17 16:25:57 +00003309 Darwin/1[0-9].*)
3310 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003311 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
3312 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
3313 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00003314 AIX/4)
3315 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003316 AIX/5)
3317 if test `uname -r` -eq 1; then
3318 define_xopen_source=no
3319 fi
3320 ;;
Martin v. Löwis8c255e42008-05-23 15:06:50 +00003321 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
3322 # defining NI_NUMERICHOST.
3323 QNX/6.3.2)
3324 define_xopen_source=no
3325 ;;
Martin v. Löwisa0588362006-04-04 06:03:50 +00003326
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003327esac
3328
3329if test $define_xopen_source = yes
3330then
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003331
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003332$as_echo "#define _XOPEN_SOURCE 600" >>confdefs.h
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003333
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003334
3335 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
3336 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
3337 # several APIs are not declared. Since this is also needed in some
3338 # cases for HP-UX, we define it globally.
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003339
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003340$as_echo "#define _XOPEN_SOURCE_EXTENDED 1" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003341
3342
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003343
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003344$as_echo "#define _POSIX_C_SOURCE 200112L" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003345
3346
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003347fi
3348
Guido van Rossum91922671997-10-09 20:24:13 +00003349#
3350# SGI compilers allow the specification of the both the ABI and the
3351# ISA on the command line. Depending on the values of these switches,
3352# different and often incompatable code will be generated.
3353#
3354# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
3355# thus supply support for various ABI/ISA combinations. The MACHDEP
3356# variable is also adjusted.
3357#
3358
3359if test ! -z "$SGI_ABI"
3360then
3361 CC="cc $SGI_ABI"
3362 LDFLAGS="$SGI_ABI $LDFLAGS"
3363 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
3364fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003365{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP" >&5
3366$as_echo "$MACHDEP" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003367
Jack Jansen83f898c2002-12-30 22:23:40 +00003368# And add extra plat-mac for darwin
3369
Jack Jansen7b59b422003-03-17 15:44:10 +00003370
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003371{ $as_echo "$as_me:${as_lineno-$LINENO}: checking EXTRAPLATDIR" >&5
3372$as_echo_n "checking EXTRAPLATDIR... " >&6; }
Jack Jansen83f898c2002-12-30 22:23:40 +00003373if test -z "$EXTRAPLATDIR"
3374then
3375 case $MACHDEP in
Jack Jansen7b59b422003-03-17 15:44:10 +00003376 darwin)
3377 EXTRAPLATDIR="\$(PLATMACDIRS)"
3378 EXTRAMACHDEPPATH="\$(PLATMACPATH)"
3379 ;;
3380 *)
3381 EXTRAPLATDIR=""
3382 EXTRAMACHDEPPATH=""
3383 ;;
Jack Jansen83f898c2002-12-30 22:23:40 +00003384 esac
3385fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003386{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXTRAPLATDIR" >&5
3387$as_echo "$EXTRAPLATDIR" >&6; }
Jack Jansen83f898c2002-12-30 22:23:40 +00003388
Jack Jansen6b08a402004-06-03 12:41:45 +00003389# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
3390# it may influence the way we can build extensions, so distutils
3391# needs to check it
3392
Ronald Oussoren988117f2006-04-29 11:31:35 +00003393
Jack Jansen6b08a402004-06-03 12:41:45 +00003394CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Ronald Oussoren988117f2006-04-29 11:31:35 +00003395EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00003396
Guido van Rossum627b2d71993-12-24 10:39:16 +00003397# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00003398
3399# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
3400# for debug/optimization stuff. BASECFLAGS is for flags that are required
3401# just to get things to compile and link. Users are free to override OPT
3402# when running configure or make. The build should not break if they do.
3403# BASECFLAGS should generally not be messed with, however.
3404
3405# XXX shouldn't some/most/all of this code be merged with the stuff later
3406# on that fiddles with OPT and BASECFLAGS?
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003407{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --without-gcc" >&5
3408$as_echo_n "checking for --without-gcc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003409
Martin v. Löwiseba40652007-08-30 20:10:57 +00003410# Check whether --with-gcc was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003411if test "${with_gcc+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00003412 withval=$with_gcc;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003413 case $withval in
Mark Dickinson04b27232009-01-04 12:29:36 +00003414 no) CC=${CC:-cc}
Guido van Rossumda88dad1995-01-26 00:46:29 +00003415 without_gcc=yes;;
3416 yes) CC=gcc
3417 without_gcc=no;;
3418 *) CC=$withval
3419 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003420 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00003421else
Martin v. Löwis11437992002-04-12 09:54:03 +00003422
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003423 case $ac_sys_system in
Antoine Pitrou285cd162010-09-21 15:23:17 +00003424 AIX*) CC=${CC:-xlc_r}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003425 without_gcc=;;
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003426 BeOS*)
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003427 case $BE_HOST_CPU in
3428 ppc)
Fred Drake5790be12000-10-09 17:06:13 +00003429 CC=mwcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003430 without_gcc=yes
Skip Montanarodecc6a42003-01-01 20:07:49 +00003431 BASECFLAGS="$BASECFLAGS -export pragma"
3432 OPT="$OPT -O"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003433 LDFLAGS="$LDFLAGS -nodup"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003434 ;;
3435 x86)
Fred Drake5790be12000-10-09 17:06:13 +00003436 CC=gcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003437 without_gcc=no
Skip Montanarodecc6a42003-01-01 20:07:49 +00003438 OPT="$OPT -O"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003439 ;;
3440 *)
Georg Brandl71f4fbb2011-02-25 11:04:50 +00003441 as_fn_error $? "Unknown BeOS platform \"$BE_HOST_CPU\"" "$LINENO" 5
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003442 ;;
3443 esac
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003444 AR="\$(srcdir)/Modules/ar_beos"
3445 RANLIB=:
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003446 ;;
Martin v. Löwis130fb172001-07-19 11:00:41 +00003447 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00003448 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00003449fi
3450
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003451{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $without_gcc" >&5
3452$as_echo "$without_gcc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003453
Guido van Rossum8b131c51995-03-09 14:10:13 +00003454# If the user switches compilers, we can't believe the cache
3455if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
3456then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00003457 as_fn_error $? "cached CC is different -- throw away $cache_file
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003458(it is also a good idea to do 'make clean' before compiling)" "$LINENO" 5
Guido van Rossum8b131c51995-03-09 14:10:13 +00003459fi
3460
Trent Nelson15daa352012-12-13 06:46:39 +00003461if test "$MACHDEP" = "irix6" && test "$CC" != "gcc"; then
3462 # Normally, MIPSpro CC treats #error directives as warnings, which means
3463 # a successful exit code is returned (0). This is a problem because IRIX
3464 # has a bunch of system headers with this guard at the top:
3465 #
3466 # #ifndef __c99
3467 # #error This header file is to be used only for c99 mode compilations
3468 # #else
3469 #
3470 # When autoconf tests for such a header, like stdint.h, this happens:
3471 #
3472 # configure:4619: cc -c conftest.c >&5
3473 # cc-1035 cc: WARNING File = /usr/include/stdint.h, Line = 5
3474 # #error directive: This header file is to be used only for c99 mode
3475 # compilations
3476 #
3477 # #error This header file is to be used only for c99 mode compilations
3478 # ^
3479 #
3480 # configure:4619: $? = 0
3481 # configure:4619: result: yes
3482 #
3483 # Therefore, we use `-diag_error 1035` to have the compiler treat the
3484 # warning as an error, which causes cc to return a non-zero result,
3485 # which autoconf can interpret correctly.
3486 CFLAGS="$CFLAGS -diag_error 1035"
3487 # Whilst we're here, we might as well make sure CXX defaults to something
3488 # sensible if we're not using gcc.
3489 if test -z "$CXX"; then
3490 CXX="CC"
3491 fi
3492fi
3493
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00003494# If the user set CFLAGS, use this instead of the automatically
3495# determined setting
3496preset_cflags="$CFLAGS"
Martin v. Löwis11437992002-04-12 09:54:03 +00003497ac_ext=c
3498ac_cpp='$CPP $CPPFLAGS'
3499ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3500ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3501ac_compiler_gnu=$ac_cv_c_compiler_gnu
3502if test -n "$ac_tool_prefix"; then
3503 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3504set dummy ${ac_tool_prefix}gcc; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003505{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3506$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01003507if ${ac_cv_prog_CC+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003508 $as_echo_n "(cached) " >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003509else
3510 if test -n "$CC"; then
3511 ac_cv_prog_CC="$CC" # Let the user override the test.
3512else
Martin v. Löwis11437992002-04-12 09:54:03 +00003513as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3514for as_dir in $PATH
3515do
3516 IFS=$as_save_IFS
3517 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003518 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01003519 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003520 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003521 $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 +00003522 break 2
3523 fi
3524done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003525 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003526IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003527
Jack Jansendd19cf82001-12-06 22:36:17 +00003528fi
3529fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003530CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00003531if test -n "$CC"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003532 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3533$as_echo "$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003534else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003535 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3536$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003537fi
3538
Martin v. Löwiseba40652007-08-30 20:10:57 +00003539
Martin v. Löwis11437992002-04-12 09:54:03 +00003540fi
3541if test -z "$ac_cv_prog_CC"; then
3542 ac_ct_CC=$CC
3543 # Extract the first word of "gcc", so it can be a program name with args.
3544set dummy gcc; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003545{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3546$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01003547if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003548 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003549else
3550 if test -n "$ac_ct_CC"; then
3551 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3552else
3553as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3554for as_dir in $PATH
3555do
3556 IFS=$as_save_IFS
3557 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003558 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01003559 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003560 ac_cv_prog_ac_ct_CC="gcc"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003561 $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 +00003562 break 2
3563 fi
3564done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003565 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003566IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003567
3568fi
3569fi
3570ac_ct_CC=$ac_cv_prog_ac_ct_CC
3571if test -n "$ac_ct_CC"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003572 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3573$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003574else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003575 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3576$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003577fi
3578
Martin v. Löwiseba40652007-08-30 20:10:57 +00003579 if test "x$ac_ct_CC" = x; then
3580 CC=""
3581 else
3582 case $cross_compiling:$ac_tool_warned in
3583yes:)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003584{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3585$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00003586ac_tool_warned=yes ;;
3587esac
3588 CC=$ac_ct_CC
3589 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003590else
3591 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00003592fi
3593
Jack Jansendd19cf82001-12-06 22:36:17 +00003594if test -z "$CC"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00003595 if test -n "$ac_tool_prefix"; then
3596 # 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 +00003597set dummy ${ac_tool_prefix}cc; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003598{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3599$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01003600if ${ac_cv_prog_CC+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003601 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00003602else
3603 if test -n "$CC"; then
3604 ac_cv_prog_CC="$CC" # Let the user override the test.
3605else
Martin v. Löwis11437992002-04-12 09:54:03 +00003606as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3607for as_dir in $PATH
3608do
3609 IFS=$as_save_IFS
3610 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003611 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01003612 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003613 ac_cv_prog_CC="${ac_tool_prefix}cc"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003614 $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 +00003615 break 2
3616 fi
3617done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003618 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003619IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003620
3621fi
3622fi
3623CC=$ac_cv_prog_CC
3624if test -n "$CC"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003625 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3626$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003627else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003628 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3629$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003630fi
3631
Martin v. Löwiseba40652007-08-30 20:10:57 +00003632
Martin v. Löwis11437992002-04-12 09:54:03 +00003633 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003634fi
3635if test -z "$CC"; then
3636 # Extract the first word of "cc", so it can be a program name with args.
3637set dummy cc; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003638{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3639$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01003640if ${ac_cv_prog_CC+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003641 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003642else
3643 if test -n "$CC"; then
3644 ac_cv_prog_CC="$CC" # Let the user override the test.
3645else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003646 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003647as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3648for as_dir in $PATH
3649do
3650 IFS=$as_save_IFS
3651 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003652 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01003653 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003654 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3655 ac_prog_rejected=yes
3656 continue
3657 fi
3658 ac_cv_prog_CC="cc"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003659 $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 +00003660 break 2
3661 fi
3662done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003663 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003664IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003665
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003666if test $ac_prog_rejected = yes; then
3667 # We found a bogon in the path, so make sure we never use it.
3668 set dummy $ac_cv_prog_CC
3669 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00003670 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003671 # We chose a different compiler from the bogus one.
3672 # However, it has the same basename, so the bogon will be chosen
3673 # first if we set CC to just the basename; use the full file name.
3674 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00003675 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003676 fi
3677fi
3678fi
3679fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003680CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003681if test -n "$CC"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003682 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3683$as_echo "$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003684else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003685 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3686$as_echo "no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003687fi
3688
Martin v. Löwiseba40652007-08-30 20:10:57 +00003689
Martin v. Löwis11437992002-04-12 09:54:03 +00003690fi
3691if test -z "$CC"; then
3692 if test -n "$ac_tool_prefix"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00003693 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003694 do
3695 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3696set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003697{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3698$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01003699if ${ac_cv_prog_CC+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003700 $as_echo_n "(cached) " >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003701else
3702 if test -n "$CC"; then
3703 ac_cv_prog_CC="$CC" # Let the user override the test.
3704else
Martin v. Löwis11437992002-04-12 09:54:03 +00003705as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3706for as_dir in $PATH
3707do
3708 IFS=$as_save_IFS
3709 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003710 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01003711 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003712 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003713 $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 +00003714 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00003715 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003716done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003717 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003718IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003719
3720fi
3721fi
3722CC=$ac_cv_prog_CC
3723if test -n "$CC"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003724 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3725$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003726else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003727 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3728$as_echo "no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003729fi
3730
Martin v. Löwiseba40652007-08-30 20:10:57 +00003731
Martin v. Löwis11437992002-04-12 09:54:03 +00003732 test -n "$CC" && break
3733 done
3734fi
3735if test -z "$CC"; then
3736 ac_ct_CC=$CC
Martin v. Löwiseba40652007-08-30 20:10:57 +00003737 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003738do
3739 # Extract the first word of "$ac_prog", so it can be a program name with args.
3740set dummy $ac_prog; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003741{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3742$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01003743if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003744 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003745else
3746 if test -n "$ac_ct_CC"; then
3747 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3748else
3749as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3750for as_dir in $PATH
3751do
3752 IFS=$as_save_IFS
3753 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003754 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01003755 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003756 ac_cv_prog_ac_ct_CC="$ac_prog"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003757 $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 +00003758 break 2
3759 fi
3760done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003761 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003762IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00003763
Martin v. Löwis11437992002-04-12 09:54:03 +00003764fi
3765fi
3766ac_ct_CC=$ac_cv_prog_ac_ct_CC
3767if test -n "$ac_ct_CC"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003768 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3769$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003770else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003771 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3772$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003773fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003774
Martin v. Löwiseba40652007-08-30 20:10:57 +00003775
Martin v. Löwis11437992002-04-12 09:54:03 +00003776 test -n "$ac_ct_CC" && break
3777done
Michael W. Hudson54241132001-12-07 15:38:26 +00003778
Martin v. Löwiseba40652007-08-30 20:10:57 +00003779 if test "x$ac_ct_CC" = x; then
3780 CC=""
3781 else
3782 case $cross_compiling:$ac_tool_warned in
3783yes:)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003784{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3785$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00003786ac_tool_warned=yes ;;
3787esac
3788 CC=$ac_ct_CC
3789 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003790fi
3791
3792fi
3793
3794
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003795test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3796$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00003797as_fn_error $? "no acceptable C compiler found in \$PATH
Matthias Klose3cef2a92012-03-14 23:39:33 +01003798See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003799
3800# Provide some information about the compiler.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003801$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3802set X $ac_compile
3803ac_compiler=$2
3804for ac_option in --version -v -V -qversion; do
3805 { { ac_try="$ac_compiler $ac_option >&5"
Martin v. Löwiseba40652007-08-30 20:10:57 +00003806case "(($ac_try" in
3807 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3808 *) ac_try_echo=$ac_try;;
3809esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003810eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3811$as_echo "$ac_try_echo"; } >&5
3812 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003813 ac_status=$?
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003814 if test -s conftest.err; then
3815 sed '10a\
3816... rest of stderr output deleted ...
3817 10q' conftest.err >conftest.er1
3818 cat conftest.er1 >&5
3819 fi
3820 rm -f conftest.er1 conftest.err
3821 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3822 test $ac_status = 0; }
3823done
Martin v. Löwis11437992002-04-12 09:54:03 +00003824
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003825cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003826/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00003827
Martin v. Löwis11437992002-04-12 09:54:03 +00003828int
3829main ()
3830{
3831
3832 ;
3833 return 0;
3834}
3835_ACEOF
3836ac_clean_files_save=$ac_clean_files
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003837ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00003838# Try to create an executable without -o first, disregard a.out.
3839# It will help us diagnose broken compilers, and finding out an intuition
3840# of exeext.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003841{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3842$as_echo_n "checking whether the C compiler works... " >&6; }
3843ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3844
3845# The possible output files:
3846ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3847
Martin v. Löwiseba40652007-08-30 20:10:57 +00003848ac_rmfiles=
3849for ac_file in $ac_files
3850do
3851 case $ac_file in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003852 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00003853 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3854 esac
3855done
3856rm -f $ac_rmfiles
3857
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003858if { { ac_try="$ac_link_default"
Martin v. Löwiseba40652007-08-30 20:10:57 +00003859case "(($ac_try" in
3860 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3861 *) ac_try_echo=$ac_try;;
3862esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003863eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3864$as_echo "$ac_try_echo"; } >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003865 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003866 ac_status=$?
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003867 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3868 test $ac_status = 0; }; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00003869 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3870# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3871# in a Makefile. We should not override ac_cv_exeext if it was cached,
3872# so that the user can short-circuit this test for compilers unknown to
3873# Autoconf.
3874for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00003875do
3876 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00003877 case $ac_file in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003878 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
Skip Montanarof0d5f792004-08-15 14:08:23 +00003879 ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003880 [ab].out )
Skip Montanarof0d5f792004-08-15 14:08:23 +00003881 # We found the default executable, but exeext='' is most
3882 # certainly right.
3883 break;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003884 *.* )
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003885 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
Martin v. Löwiseba40652007-08-30 20:10:57 +00003886 then :; else
3887 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3888 fi
3889 # We set ac_cv_exeext here because the later test for it is not
3890 # safe: cross compilers may not add the suffix if given an `-o'
3891 # argument, so we may need to know it at that point already.
3892 # Even if this section looks crufty: it has the advantage of
3893 # actually working.
Skip Montanarof0d5f792004-08-15 14:08:23 +00003894 break;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003895 * )
Skip Montanarof0d5f792004-08-15 14:08:23 +00003896 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003897 esac
3898done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003899test "$ac_cv_exeext" = no && ac_cv_exeext=
3900
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003901else
Martin v. Löwiseba40652007-08-30 20:10:57 +00003902 ac_file=''
3903fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003904if test -z "$ac_file"; then :
3905 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3906$as_echo "no" >&6; }
3907$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003908sed 's/^/| /' conftest.$ac_ext >&5
3909
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003910{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3911$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00003912as_fn_error 77 "C compiler cannot create executables
Matthias Klose3cef2a92012-03-14 23:39:33 +01003913See \`config.log' for more details" "$LINENO" 5; }
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003914else
3915 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3916$as_echo "yes" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003917fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003918{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3919$as_echo_n "checking for C compiler default output file name... " >&6; }
3920{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3921$as_echo "$ac_file" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003922ac_exeext=$ac_cv_exeext
Michael W. Hudson54241132001-12-07 15:38:26 +00003923
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003924rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
Martin v. Löwis11437992002-04-12 09:54:03 +00003925ac_clean_files=$ac_clean_files_save
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003926{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3927$as_echo_n "checking for suffix of executables... " >&6; }
3928if { { ac_try="$ac_link"
Martin v. Löwiseba40652007-08-30 20:10:57 +00003929case "(($ac_try" in
3930 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3931 *) ac_try_echo=$ac_try;;
3932esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003933eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3934$as_echo "$ac_try_echo"; } >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003935 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003936 ac_status=$?
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003937 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3938 test $ac_status = 0; }; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00003939 # If both `conftest.exe' and `conftest' are `present' (well, observable)
3940# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
3941# work properly (i.e., refer to `conftest.exe'), while it won't with
3942# `rm'.
Skip Montanaro6dead952003-09-25 14:50:04 +00003943for ac_file in conftest.exe conftest conftest.*; do
3944 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00003945 case $ac_file in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003946 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003947 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
Skip Montanarof0d5f792004-08-15 14:08:23 +00003948 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003949 * ) break;;
3950 esac
3951done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003952else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003953 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3954$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00003955as_fn_error $? "cannot compute suffix of executables: cannot compile and link
Matthias Klose3cef2a92012-03-14 23:39:33 +01003956See \`config.log' for more details" "$LINENO" 5; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003957fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003958rm -f conftest conftest$ac_cv_exeext
3959{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3960$as_echo "$ac_cv_exeext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003961
3962rm -f conftest.$ac_ext
3963EXEEXT=$ac_cv_exeext
3964ac_exeext=$EXEEXT
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003965cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3966/* end confdefs.h. */
3967#include <stdio.h>
3968int
3969main ()
3970{
3971FILE *f = fopen ("conftest.out", "w");
3972 return ferror (f) || fclose (f) != 0;
3973
3974 ;
3975 return 0;
3976}
Skip Montanaro6dead952003-09-25 14:50:04 +00003977_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003978ac_clean_files="$ac_clean_files conftest.out"
3979# Check that the compiler produces executables we can run. If not, either
3980# the compiler is broken, or we cross compile.
3981{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
3982$as_echo_n "checking whether we are cross compiling... " >&6; }
3983if test "$cross_compiling" != yes; then
3984 { { ac_try="$ac_link"
3985case "(($ac_try" in
3986 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3987 *) ac_try_echo=$ac_try;;
3988esac
3989eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3990$as_echo "$ac_try_echo"; } >&5
3991 (eval "$ac_link") 2>&5
3992 ac_status=$?
3993 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3994 test $ac_status = 0; }
3995 if { ac_try='./conftest$ac_cv_exeext'
3996 { { case "(($ac_try" in
3997 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3998 *) ac_try_echo=$ac_try;;
3999esac
4000eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4001$as_echo "$ac_try_echo"; } >&5
4002 (eval "$ac_try") 2>&5
4003 ac_status=$?
4004 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4005 test $ac_status = 0; }; }; then
4006 cross_compiling=no
4007 else
4008 if test "$cross_compiling" = maybe; then
4009 cross_compiling=yes
4010 else
4011 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4012$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004013as_fn_error $? "cannot run C compiled programs.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004014If you meant to cross compile, use \`--host'.
Matthias Klose3cef2a92012-03-14 23:39:33 +01004015See \`config.log' for more details" "$LINENO" 5; }
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004016 fi
4017 fi
4018fi
4019{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
4020$as_echo "$cross_compiling" >&6; }
4021
4022rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
4023ac_clean_files=$ac_clean_files_save
4024{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
4025$as_echo_n "checking for suffix of object files... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01004026if ${ac_cv_objext+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004027 $as_echo_n "(cached) " >&6
4028else
4029 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004030/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004031
Martin v. Löwis11437992002-04-12 09:54:03 +00004032int
4033main ()
4034{
4035
4036 ;
4037 return 0;
4038}
4039_ACEOF
4040rm -f conftest.o conftest.obj
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004041if { { ac_try="$ac_compile"
Martin v. Löwiseba40652007-08-30 20:10:57 +00004042case "(($ac_try" in
4043 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4044 *) ac_try_echo=$ac_try;;
4045esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004046eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4047$as_echo "$ac_try_echo"; } >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00004048 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004049 ac_status=$?
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004050 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4051 test $ac_status = 0; }; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00004052 for ac_file in conftest.o conftest.obj conftest.*; do
4053 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00004054 case $ac_file in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004055 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004056 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4057 break;;
4058 esac
4059done
4060else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004061 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004062sed 's/^/| /' conftest.$ac_ext >&5
4063
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004064{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4065$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004066as_fn_error $? "cannot compute suffix of object files: cannot compile
Matthias Klose3cef2a92012-03-14 23:39:33 +01004067See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004068fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004069rm -f conftest.$ac_cv_objext conftest.$ac_ext
4070fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004071{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4072$as_echo "$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004073OBJEXT=$ac_cv_objext
4074ac_objext=$OBJEXT
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004075{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4076$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01004077if ${ac_cv_c_compiler_gnu+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004078 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004079else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004080 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004081/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004082
Martin v. Löwis11437992002-04-12 09:54:03 +00004083int
4084main ()
4085{
4086#ifndef __GNUC__
4087 choke me
4088#endif
4089
4090 ;
4091 return 0;
4092}
4093_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004094if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004095 ac_compiler_gnu=yes
4096else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004097 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00004098fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004099rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004100ac_cv_c_compiler_gnu=$ac_compiler_gnu
4101
4102fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004103{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4104$as_echo "$ac_cv_c_compiler_gnu" >&6; }
4105if test $ac_compiler_gnu = yes; then
4106 GCC=yes
4107else
4108 GCC=
4109fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004110ac_test_CFLAGS=${CFLAGS+set}
4111ac_save_CFLAGS=$CFLAGS
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004112{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4113$as_echo_n "checking whether $CC accepts -g... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01004114if ${ac_cv_prog_cc_g+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004115 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004116else
Martin v. Löwiseba40652007-08-30 20:10:57 +00004117 ac_save_c_werror_flag=$ac_c_werror_flag
4118 ac_c_werror_flag=yes
4119 ac_cv_prog_cc_g=no
4120 CFLAGS="-g"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004121 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004122/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004123
Martin v. Löwis11437992002-04-12 09:54:03 +00004124int
4125main ()
4126{
4127
4128 ;
4129 return 0;
4130}
4131_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004132if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumf78abae1997-01-21 22:02:36 +00004133 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004134else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004135 CFLAGS=""
4136 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +00004137/* end confdefs.h. */
4138
4139int
4140main ()
4141{
4142
4143 ;
4144 return 0;
4145}
4146_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004147if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00004148
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004149else
4150 ac_c_werror_flag=$ac_save_c_werror_flag
Martin v. Löwiseba40652007-08-30 20:10:57 +00004151 CFLAGS="-g"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004152 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +00004153/* end confdefs.h. */
4154
4155int
4156main ()
4157{
4158
4159 ;
4160 return 0;
4161}
4162_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004163if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00004164 ac_cv_prog_cc_g=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004165fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004166rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004167fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004168rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4169fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004170rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4171 ac_c_werror_flag=$ac_save_c_werror_flag
4172fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004173{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4174$as_echo "$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004175if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004176 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004177elif test $ac_cv_prog_cc_g = yes; then
4178 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00004179 CFLAGS="-g -O2"
4180 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004181 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004182 fi
4183else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004184 if test "$GCC" = yes; then
4185 CFLAGS="-O2"
4186 else
4187 CFLAGS=
4188 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004189fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004190{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4191$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01004192if ${ac_cv_prog_cc_c89+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004193 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004194else
Martin v. Löwiseba40652007-08-30 20:10:57 +00004195 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00004196ac_save_CC=$CC
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004197cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004198/* end confdefs.h. */
4199#include <stdarg.h>
4200#include <stdio.h>
Charles-François Natalibe2b9072013-01-08 19:47:00 +01004201struct stat;
Skip Montanaro6dead952003-09-25 14:50:04 +00004202/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4203struct buf { int x; };
4204FILE * (*rcsopen) (struct buf *, struct stat *, int);
4205static char *e (p, i)
4206 char **p;
4207 int i;
4208{
4209 return p[i];
4210}
4211static char *f (char * (*g) (char **, int), char **p, ...)
4212{
4213 char *s;
4214 va_list v;
4215 va_start (v,p);
4216 s = g (p, va_arg (v,int));
4217 va_end (v);
4218 return s;
4219}
Skip Montanarof0d5f792004-08-15 14:08:23 +00004220
4221/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
4222 function prototypes and stuff, but not '\xHH' hex character constants.
4223 These don't provoke an error unfortunately, instead are silently treated
Martin v. Löwiseba40652007-08-30 20:10:57 +00004224 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00004225 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
4226 array size at least. It's necessary to write '\x00'==0 to get something
Martin v. Löwiseba40652007-08-30 20:10:57 +00004227 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00004228int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4229
Martin v. Löwiseba40652007-08-30 20:10:57 +00004230/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4231 inside strings and character constants. */
4232#define FOO(x) 'x'
4233int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4234
Skip Montanaro6dead952003-09-25 14:50:04 +00004235int test (int i, double x);
4236struct s1 {int (*f) (int a);};
4237struct s2 {int (*f) (double a);};
4238int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4239int argc;
4240char **argv;
4241int
4242main ()
4243{
4244return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4245 ;
4246 return 0;
4247}
4248_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00004249for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4250 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00004251do
4252 CC="$ac_save_CC $ac_arg"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004253 if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00004254 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00004255fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004256rm -f core conftest.err conftest.$ac_objext
4257 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00004258done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004259rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004260CC=$ac_save_CC
4261
4262fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004263# AC_CACHE_VAL
4264case "x$ac_cv_prog_cc_c89" in
4265 x)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004266 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4267$as_echo "none needed" >&6; } ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00004268 xno)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004269 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4270$as_echo "unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004271 *)
Martin v. Löwiseba40652007-08-30 20:10:57 +00004272 CC="$CC $ac_cv_prog_cc_c89"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004273 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4274$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004275esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004276if test "x$ac_cv_prog_cc_c89" != xno; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004277
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004278fi
Skip Montanaro6dead952003-09-25 14:50:04 +00004279
Martin v. Löwis11437992002-04-12 09:54:03 +00004280ac_ext=c
4281ac_cpp='$CPP $CPPFLAGS'
4282ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4283ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4284ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004285
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00004286if test ! -z "$preset_cflags"
4287then
4288 CFLAGS=$preset_cflags
4289fi
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004290
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004291
4292
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004293{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-cxx-main=<compiler>" >&5
4294$as_echo_n "checking for --with-cxx-main=<compiler>... " >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004295
Martin v. Löwiseba40652007-08-30 20:10:57 +00004296# Check whether --with-cxx_main was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004297if test "${with_cxx_main+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00004298 withval=$with_cxx_main;
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004299
4300 case $withval in
4301 no) with_cxx_main=no
4302 MAINCC='$(CC)';;
4303 yes) with_cxx_main=yes
4304 MAINCC='$(CXX)';;
4305 *) with_cxx_main=yes
4306 MAINCC=$withval
4307 if test -z "$CXX"
4308 then
4309 CXX=$withval
4310 fi;;
4311 esac
4312else
4313
4314 with_cxx_main=no
4315 MAINCC='$(CC)'
4316
Martin v. Löwiseba40652007-08-30 20:10:57 +00004317fi
4318
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004319{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_cxx_main" >&5
4320$as_echo "$with_cxx_main" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004321
4322preset_cxx="$CXX"
4323if test -z "$CXX"
4324then
4325 case "$CC" in
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004326 gcc) if test -n "$ac_tool_prefix"; then
4327 # Extract the first word of "${ac_tool_prefix}g++", so it can be a program name with args.
4328set dummy ${ac_tool_prefix}g++; ac_word=$2
4329{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4330$as_echo_n "checking for $ac_word... " >&6; }
4331if ${ac_cv_path_CXX+:} false; then :
4332 $as_echo_n "(cached) " >&6
4333else
4334 case $CXX in
4335 [\\/]* | ?:[\\/]*)
4336 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4337 ;;
4338 *)
4339 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4340for as_dir in notfound
4341do
4342 IFS=$as_save_IFS
4343 test -z "$as_dir" && as_dir=.
4344 for ac_exec_ext in '' $ac_executable_extensions; do
4345 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4346 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4347 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4348 break 2
4349 fi
4350done
4351 done
4352IFS=$as_save_IFS
4353
4354 ;;
4355esac
4356fi
4357CXX=$ac_cv_path_CXX
4358if test -n "$CXX"; then
4359 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4360$as_echo "$CXX" >&6; }
4361else
4362 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4363$as_echo "no" >&6; }
4364fi
4365
4366
4367fi
4368if test -z "$ac_cv_path_CXX"; then
4369 ac_pt_CXX=$CXX
4370 # Extract the first word of "g++", so it can be a program name with args.
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004371set dummy g++; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004372{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4373$as_echo_n "checking for $ac_word... " >&6; }
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004374if ${ac_cv_path_ac_pt_CXX+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004375 $as_echo_n "(cached) " >&6
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004376else
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004377 case $ac_pt_CXX in
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004378 [\\/]* | ?:[\\/]*)
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004379 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 +00004380 ;;
4381 *)
4382 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4383for as_dir in notfound
4384do
4385 IFS=$as_save_IFS
4386 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004387 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01004388 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004389 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004390 $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 +00004391 break 2
4392 fi
4393done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004394 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004395IFS=$as_save_IFS
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004396
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004397 ;;
4398esac
4399fi
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004400ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4401if test -n "$ac_pt_CXX"; then
4402 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4403$as_echo "$ac_pt_CXX" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00004404else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004405 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4406$as_echo "no" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00004407fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004408
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004409 if test "x$ac_pt_CXX" = x; then
4410 CXX="g++"
4411 else
4412 case $cross_compiling:$ac_tool_warned in
4413yes:)
4414{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4415$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4416ac_tool_warned=yes ;;
4417esac
4418 CXX=$ac_pt_CXX
4419 fi
4420else
4421 CXX="$ac_cv_path_CXX"
4422fi
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004423 ;;
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004424 cc) if test -n "$ac_tool_prefix"; then
4425 # Extract the first word of "${ac_tool_prefix}c++", so it can be a program name with args.
4426set dummy ${ac_tool_prefix}c++; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004427{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4428$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01004429if ${ac_cv_path_CXX+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004430 $as_echo_n "(cached) " >&6
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004431else
4432 case $CXX in
4433 [\\/]* | ?:[\\/]*)
4434 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4435 ;;
4436 *)
4437 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4438for as_dir in notfound
4439do
4440 IFS=$as_save_IFS
4441 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004442 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01004443 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004444 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004445 $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 +00004446 break 2
4447 fi
4448done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004449 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004450IFS=$as_save_IFS
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004451
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004452 ;;
4453esac
4454fi
4455CXX=$ac_cv_path_CXX
Skip Montanaro89e975f2007-08-22 19:05:21 +00004456if test -n "$CXX"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004457 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4458$as_echo "$CXX" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00004459else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004460 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4461$as_echo "no" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00004462fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004463
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004464
4465fi
4466if test -z "$ac_cv_path_CXX"; then
4467 ac_pt_CXX=$CXX
4468 # Extract the first word of "c++", so it can be a program name with args.
4469set dummy c++; ac_word=$2
4470{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4471$as_echo_n "checking for $ac_word... " >&6; }
4472if ${ac_cv_path_ac_pt_CXX+:} false; then :
4473 $as_echo_n "(cached) " >&6
4474else
4475 case $ac_pt_CXX in
4476 [\\/]* | ?:[\\/]*)
4477 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4478 ;;
4479 *)
4480 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4481for as_dir in notfound
4482do
4483 IFS=$as_save_IFS
4484 test -z "$as_dir" && as_dir=.
4485 for ac_exec_ext in '' $ac_executable_extensions; do
4486 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4487 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4488 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4489 break 2
4490 fi
4491done
4492 done
4493IFS=$as_save_IFS
4494
4495 ;;
4496esac
4497fi
4498ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4499if test -n "$ac_pt_CXX"; then
4500 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4501$as_echo "$ac_pt_CXX" >&6; }
4502else
4503 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4504$as_echo "no" >&6; }
4505fi
4506
4507 if test "x$ac_pt_CXX" = x; then
4508 CXX="c++"
4509 else
4510 case $cross_compiling:$ac_tool_warned in
4511yes:)
4512{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4513$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4514ac_tool_warned=yes ;;
4515esac
4516 CXX=$ac_pt_CXX
4517 fi
4518else
4519 CXX="$ac_cv_path_CXX"
4520fi
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004521 ;;
4522 esac
4523 if test "$CXX" = "notfound"
4524 then
4525 CXX=""
4526 fi
4527fi
4528if test -z "$CXX"
4529then
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004530 if test -n "$ac_tool_prefix"; then
4531 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
4532 do
4533 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4534set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004535{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4536$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01004537if ${ac_cv_prog_CXX+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004538 $as_echo_n "(cached) " >&6
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004539else
4540 if test -n "$CXX"; then
4541 ac_cv_prog_CXX="$CXX" # Let the user override the test.
4542else
4543as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4544for as_dir in $PATH
4545do
4546 IFS=$as_save_IFS
4547 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004548 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01004549 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004550 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004551 $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 +00004552 break 2
4553 fi
4554done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004555 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004556IFS=$as_save_IFS
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004557
4558fi
4559fi
4560CXX=$ac_cv_prog_CXX
4561if test -n "$CXX"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004562 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4563$as_echo "$CXX" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004564else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004565 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4566$as_echo "no" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004567fi
4568
Martin v. Löwiseba40652007-08-30 20:10:57 +00004569
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004570 test -n "$CXX" && break
4571 done
4572fi
4573if test -z "$CXX"; then
4574 ac_ct_CXX=$CXX
4575 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
4576do
4577 # Extract the first word of "$ac_prog", so it can be a program name with args.
4578set dummy $ac_prog; ac_word=$2
4579{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4580$as_echo_n "checking for $ac_word... " >&6; }
4581if ${ac_cv_prog_ac_ct_CXX+:} false; then :
4582 $as_echo_n "(cached) " >&6
4583else
4584 if test -n "$ac_ct_CXX"; then
4585 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
4586else
4587as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4588for as_dir in $PATH
4589do
4590 IFS=$as_save_IFS
4591 test -z "$as_dir" && as_dir=.
4592 for ac_exec_ext in '' $ac_executable_extensions; do
4593 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4594 ac_cv_prog_ac_ct_CXX="$ac_prog"
4595 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4596 break 2
4597 fi
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004598done
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004599 done
4600IFS=$as_save_IFS
4601
4602fi
4603fi
4604ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
4605if test -n "$ac_ct_CXX"; then
4606 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
4607$as_echo "$ac_ct_CXX" >&6; }
4608else
4609 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4610$as_echo "no" >&6; }
4611fi
4612
4613
4614 test -n "$ac_ct_CXX" && break
4615done
4616
4617 if test "x$ac_ct_CXX" = x; then
4618 CXX="notfound"
4619 else
4620 case $cross_compiling:$ac_tool_warned in
4621yes:)
4622{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4623$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4624ac_tool_warned=yes ;;
4625esac
4626 CXX=$ac_ct_CXX
4627 fi
4628fi
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004629
4630 if test "$CXX" = "notfound"
4631 then
4632 CXX=""
4633 fi
4634fi
4635if test "$preset_cxx" != "$CXX"
4636then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004637 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004638
4639 By default, distutils will build C++ extension modules with \"$CXX\".
4640 If this is not intended, then set CXX on the configure command line.
4641 " >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004642$as_echo "$as_me: 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 " >&2;}
4647fi
4648
doko@python.org4e63fbe2013-01-25 13:08:27 +01004649MULTIARCH=$($CC --print-multiarch 2>/dev/null)
4650
4651
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004652
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004653# checks for UNIX variants that set C preprocessor variables
Martin v. Löwis11437992002-04-12 09:54:03 +00004654
4655ac_ext=c
4656ac_cpp='$CPP $CPPFLAGS'
4657ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4658ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4659ac_compiler_gnu=$ac_cv_c_compiler_gnu
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004660{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4661$as_echo_n "checking how to run the C preprocessor... " >&6; }
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004662# On Suns, sometimes $CPP names a directory.
4663if test -n "$CPP" && test -d "$CPP"; then
4664 CPP=
4665fi
4666if test -z "$CPP"; then
Matthias Klose3cef2a92012-03-14 23:39:33 +01004667 if ${ac_cv_prog_CPP+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004668 $as_echo_n "(cached) " >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004669else
Martin v. Löwis11437992002-04-12 09:54:03 +00004670 # Double quotes because CPP needs to be expanded
4671 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4672 do
4673 ac_preproc_ok=false
4674for ac_c_preproc_warn_flag in '' yes
4675do
4676 # Use a header file that comes with gcc, so configuring glibc
4677 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00004678 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4679 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004680 # On the NeXT, cc -E runs the code through the compiler's parser,
Martin v. Löwis11437992002-04-12 09:54:03 +00004681 # not just through cpp. "Syntax error" is here to catch this case.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004682 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004683/* end confdefs.h. */
4684#ifdef __STDC__
4685# include <limits.h>
4686#else
4687# include <assert.h>
4688#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00004689 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00004690_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004691if ac_fn_c_try_cpp "$LINENO"; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004692
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004693else
Martin v. Löwis11437992002-04-12 09:54:03 +00004694 # Broken: fails on valid input.
4695continue
Jack Jansendd19cf82001-12-06 22:36:17 +00004696fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004697rm -f conftest.err conftest.i conftest.$ac_ext
Jack Jansendd19cf82001-12-06 22:36:17 +00004698
Martin v. Löwiseba40652007-08-30 20:10:57 +00004699 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00004700 # can be detected and how.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004701 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004702/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004703#include <ac_nonexistent.h>
4704_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004705if ac_fn_c_try_cpp "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004706 # Broken: success on invalid input.
4707continue
4708else
Martin v. Löwis11437992002-04-12 09:54:03 +00004709 # Passes both tests.
4710ac_preproc_ok=:
4711break
4712fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004713rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004714
4715done
4716# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004717rm -f conftest.i conftest.err conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004718if $ac_preproc_ok; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004719 break
4720fi
4721
4722 done
4723 ac_cv_prog_CPP=$CPP
4724
4725fi
4726 CPP=$ac_cv_prog_CPP
4727else
4728 ac_cv_prog_CPP=$CPP
4729fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004730{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4731$as_echo "$CPP" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004732ac_preproc_ok=false
4733for ac_c_preproc_warn_flag in '' yes
4734do
4735 # Use a header file that comes with gcc, so configuring glibc
4736 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00004737 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4738 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis11437992002-04-12 09:54:03 +00004739 # On the NeXT, cc -E runs the code through the compiler's parser,
4740 # not just through cpp. "Syntax error" is here to catch this case.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004741 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004742/* end confdefs.h. */
4743#ifdef __STDC__
4744# include <limits.h>
4745#else
4746# include <assert.h>
4747#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00004748 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00004749_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004750if ac_fn_c_try_cpp "$LINENO"; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004751
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004752else
Martin v. Löwis11437992002-04-12 09:54:03 +00004753 # Broken: fails on valid input.
4754continue
4755fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004756rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004757
Martin v. Löwiseba40652007-08-30 20:10:57 +00004758 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00004759 # can be detected and how.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004760 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004761/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004762#include <ac_nonexistent.h>
4763_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004764if ac_fn_c_try_cpp "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004765 # Broken: success on invalid input.
4766continue
4767else
Martin v. Löwis11437992002-04-12 09:54:03 +00004768 # Passes both tests.
4769ac_preproc_ok=:
4770break
4771fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004772rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004773
4774done
4775# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004776rm -f conftest.i conftest.err conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004777if $ac_preproc_ok; then :
4778
Martin v. Löwis11437992002-04-12 09:54:03 +00004779else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004780 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4781$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004782as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
Matthias Klose3cef2a92012-03-14 23:39:33 +01004783See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004784fi
4785
4786ac_ext=c
4787ac_cpp='$CPP $CPPFLAGS'
4788ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4789ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4790ac_compiler_gnu=$ac_cv_c_compiler_gnu
4791
4792
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004793{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4794$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01004795if ${ac_cv_path_GREP+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004796 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004797else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004798 if test -z "$GREP"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00004799 ac_path_GREP_found=false
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004800 # Loop through the user's path and test for each of PROGNAME-LIST
4801 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwiseba40652007-08-30 20:10:57 +00004802for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4803do
4804 IFS=$as_save_IFS
4805 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004806 for ac_prog in grep ggrep; do
4807 for ac_exec_ext in '' $ac_executable_extensions; do
4808 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
Charles-François Natalibe2b9072013-01-08 19:47:00 +01004809 as_fn_executable_p "$ac_path_GREP" || continue
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004810# Check for GNU ac_path_GREP and select it if it is found.
Martin v. Löwiseba40652007-08-30 20:10:57 +00004811 # Check for GNU $ac_path_GREP
4812case `"$ac_path_GREP" --version 2>&1` in
4813*GNU*)
4814 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4815*)
4816 ac_count=0
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004817 $as_echo_n 0123456789 >"conftest.in"
Martin v. Löwiseba40652007-08-30 20:10:57 +00004818 while :
4819 do
4820 cat "conftest.in" "conftest.in" >"conftest.tmp"
4821 mv "conftest.tmp" "conftest.in"
4822 cp "conftest.in" "conftest.nl"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004823 $as_echo 'GREP' >> "conftest.nl"
Martin v. Löwiseba40652007-08-30 20:10:57 +00004824 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4825 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004826 as_fn_arith $ac_count + 1 && ac_count=$as_val
Martin v. Löwiseba40652007-08-30 20:10:57 +00004827 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4828 # Best one so far, save it but keep looking for a better one
4829 ac_cv_path_GREP="$ac_path_GREP"
4830 ac_path_GREP_max=$ac_count
Skip Montanaro6dead952003-09-25 14:50:04 +00004831 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004832 # 10*(2^10) chars as input seems more than enough
4833 test $ac_count -gt 10 && break
4834 done
4835 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4836esac
4837
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004838 $ac_path_GREP_found && break 3
4839 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004840 done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004841 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004842IFS=$as_save_IFS
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004843 if test -z "$ac_cv_path_GREP"; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004844 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 +00004845 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004846else
4847 ac_cv_path_GREP=$GREP
4848fi
4849
Martin v. Löwiseba40652007-08-30 20:10:57 +00004850fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004851{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4852$as_echo "$ac_cv_path_GREP" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00004853 GREP="$ac_cv_path_GREP"
4854
4855
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004856{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
4857$as_echo_n "checking for egrep... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01004858if ${ac_cv_path_EGREP+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004859 $as_echo_n "(cached) " >&6
Martin v. Löwiseba40652007-08-30 20:10:57 +00004860else
4861 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
4862 then ac_cv_path_EGREP="$GREP -E"
4863 else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004864 if test -z "$EGREP"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00004865 ac_path_EGREP_found=false
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004866 # Loop through the user's path and test for each of PROGNAME-LIST
4867 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwiseba40652007-08-30 20:10:57 +00004868for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4869do
4870 IFS=$as_save_IFS
4871 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004872 for ac_prog in egrep; do
4873 for ac_exec_ext in '' $ac_executable_extensions; do
4874 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
Charles-François Natalibe2b9072013-01-08 19:47:00 +01004875 as_fn_executable_p "$ac_path_EGREP" || continue
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004876# Check for GNU ac_path_EGREP and select it if it is found.
Martin v. Löwiseba40652007-08-30 20:10:57 +00004877 # Check for GNU $ac_path_EGREP
4878case `"$ac_path_EGREP" --version 2>&1` in
4879*GNU*)
4880 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
4881*)
4882 ac_count=0
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004883 $as_echo_n 0123456789 >"conftest.in"
Martin v. Löwiseba40652007-08-30 20:10:57 +00004884 while :
4885 do
4886 cat "conftest.in" "conftest.in" >"conftest.tmp"
4887 mv "conftest.tmp" "conftest.in"
4888 cp "conftest.in" "conftest.nl"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004889 $as_echo 'EGREP' >> "conftest.nl"
Martin v. Löwiseba40652007-08-30 20:10:57 +00004890 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4891 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004892 as_fn_arith $ac_count + 1 && ac_count=$as_val
Martin v. Löwiseba40652007-08-30 20:10:57 +00004893 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
4894 # Best one so far, save it but keep looking for a better one
4895 ac_cv_path_EGREP="$ac_path_EGREP"
4896 ac_path_EGREP_max=$ac_count
4897 fi
4898 # 10*(2^10) chars as input seems more than enough
4899 test $ac_count -gt 10 && break
4900 done
4901 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4902esac
4903
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004904 $ac_path_EGREP_found && break 3
4905 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004906 done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004907 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004908IFS=$as_save_IFS
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004909 if test -z "$ac_cv_path_EGREP"; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004910 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 +00004911 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004912else
4913 ac_cv_path_EGREP=$EGREP
4914fi
4915
Martin v. Löwiseba40652007-08-30 20:10:57 +00004916 fi
4917fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004918{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
4919$as_echo "$ac_cv_path_EGREP" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00004920 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00004921
4922
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004923{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
4924$as_echo_n "checking for ANSI C header files... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01004925if ${ac_cv_header_stdc+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004926 $as_echo_n "(cached) " >&6
4927else
4928 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitrouf2caeed2009-05-24 20:23:57 +00004929/* end confdefs.h. */
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004930#include <stdlib.h>
4931#include <stdarg.h>
4932#include <string.h>
4933#include <float.h>
4934
4935int
4936main ()
4937{
4938
4939 ;
4940 return 0;
4941}
4942_ACEOF
4943if ac_fn_c_try_compile "$LINENO"; then :
4944 ac_cv_header_stdc=yes
4945else
4946 ac_cv_header_stdc=no
4947fi
4948rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4949
4950if test $ac_cv_header_stdc = yes; then
4951 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4952 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4953/* end confdefs.h. */
4954#include <string.h>
Antoine Pitrouf2caeed2009-05-24 20:23:57 +00004955
Antoine Pitrouf2caeed2009-05-24 20:23:57 +00004956_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004957if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004958 $EGREP "memchr" >/dev/null 2>&1; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004959
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004960else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004961 ac_cv_header_stdc=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004962fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00004963rm -f conftest*
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004964
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004965fi
4966
4967if test $ac_cv_header_stdc = yes; then
4968 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4969 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4970/* end confdefs.h. */
4971#include <stdlib.h>
4972
4973_ACEOF
4974if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4975 $EGREP "free" >/dev/null 2>&1; then :
4976
4977else
4978 ac_cv_header_stdc=no
4979fi
4980rm -f conftest*
4981
4982fi
4983
4984if test $ac_cv_header_stdc = yes; then
4985 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4986 if test "$cross_compiling" = yes; then :
4987 :
4988else
4989 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4990/* end confdefs.h. */
4991#include <ctype.h>
4992#include <stdlib.h>
4993#if ((' ' & 0x0FF) == 0x020)
4994# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4995# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4996#else
4997# define ISLOWER(c) \
4998 (('a' <= (c) && (c) <= 'i') \
4999 || ('j' <= (c) && (c) <= 'r') \
5000 || ('s' <= (c) && (c) <= 'z'))
5001# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5002#endif
5003
5004#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5005int
5006main ()
5007{
5008 int i;
5009 for (i = 0; i < 256; i++)
5010 if (XOR (islower (i), ISLOWER (i))
5011 || toupper (i) != TOUPPER (i))
5012 return 2;
5013 return 0;
5014}
5015_ACEOF
5016if ac_fn_c_try_run "$LINENO"; then :
5017
5018else
5019 ac_cv_header_stdc=no
5020fi
5021rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5022 conftest.$ac_objext conftest.beam conftest.$ac_ext
5023fi
5024
5025fi
5026fi
5027{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
5028$as_echo "$ac_cv_header_stdc" >&6; }
5029if test $ac_cv_header_stdc = yes; then
5030
5031$as_echo "#define STDC_HEADERS 1" >>confdefs.h
5032
5033fi
5034
5035# On IRIX 5.3, sys/types and inttypes.h are conflicting.
5036for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
5037 inttypes.h stdint.h unistd.h
5038do :
5039 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
5040ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
5041"
Georg Brandl71f4fbb2011-02-25 11:04:50 +00005042if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005043 cat >>confdefs.h <<_ACEOF
5044#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
5045_ACEOF
5046
5047fi
5048
5049done
5050
5051
5052
5053 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 +01005054if test "x$ac_cv_header_minix_config_h" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005055 MINIX=yes
5056else
5057 MINIX=
5058fi
5059
5060
5061 if test "$MINIX" = yes; then
5062
5063$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
5064
5065
5066$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
5067
5068
5069$as_echo "#define _MINIX 1" >>confdefs.h
5070
5071 fi
5072
5073
5074 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
5075$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01005076if ${ac_cv_safe_to_define___extensions__+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005077 $as_echo_n "(cached) " >&6
5078else
5079 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5080/* end confdefs.h. */
5081
Charles-François Natalibe2b9072013-01-08 19:47:00 +01005082# define __EXTENSIONS__ 1
5083 $ac_includes_default
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005084int
5085main ()
5086{
5087
5088 ;
5089 return 0;
5090}
5091_ACEOF
5092if ac_fn_c_try_compile "$LINENO"; then :
5093 ac_cv_safe_to_define___extensions__=yes
5094else
5095 ac_cv_safe_to_define___extensions__=no
5096fi
5097rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5098fi
5099{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
5100$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
5101 test $ac_cv_safe_to_define___extensions__ = yes &&
5102 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
5103
5104 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
5105
5106 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
5107
5108 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
5109
5110 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
5111
5112
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005113
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005114# Check for unsupported systems
5115case $ac_sys_system/$ac_sys_release in
5116atheos*|Linux*/1*)
5117 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
5118 echo See README for details.
5119 exit 1;;
5120esac
5121
5122
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005123{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-suffix" >&5
5124$as_echo_n "checking for --with-suffix... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005125
5126# Check whether --with-suffix was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005127if test "${with_suffix+set}" = set; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005128 withval=$with_suffix;
5129 case $withval in
5130 no) EXEEXT=;;
5131 yes) EXEEXT=.exe;;
5132 *) EXEEXT=$withval;;
5133 esac
5134fi
5135
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005136{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXEEXT" >&5
5137$as_echo "$EXEEXT" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005138
5139# Test whether we're running on a non-case-sensitive system, in which
5140# case we give a warning if no ext is given
5141
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005142{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for case-insensitive build directory" >&5
5143$as_echo_n "checking for case-insensitive build directory... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005144if test ! -d CaseSensitiveTestDir; then
5145mkdir CaseSensitiveTestDir
5146fi
5147
5148if test -d casesensitivetestdir
5149then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005150 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5151$as_echo "yes" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005152 BUILDEXEEXT=.exe
5153else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005154 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5155$as_echo "no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005156 BUILDEXEEXT=$EXEEXT
5157fi
5158rmdir CaseSensitiveTestDir
5159
5160case $MACHDEP in
5161bsdos*)
5162 case $CC in
5163 gcc) CC="$CC -D_HAVE_BSDI";;
5164 esac;;
5165esac
5166
5167case $ac_sys_system in
5168hp*|HP*)
5169 case $CC in
5170 cc|*/cc) CC="$CC -Ae";;
5171 esac;;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005172SunOS*)
5173 # Some functions have a prototype only with that define, e.g. confstr
5174
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005175$as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005176
5177 ;;
5178esac
5179
5180
5181
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005182{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBRARY" >&5
5183$as_echo_n "checking LIBRARY... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005184if test -z "$LIBRARY"
5185then
5186 LIBRARY='libpython$(VERSION).a'
5187fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005188{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBRARY" >&5
5189$as_echo "$LIBRARY" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005190
5191# LDLIBRARY is the name of the library to link against (as opposed to the
5192# name of the library into which to insert object files). BLDLIBRARY is also
5193# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
5194# is blank as the main program is not linked directly against LDLIBRARY.
5195# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
5196# systems without shared libraries, LDLIBRARY is the same as LIBRARY
5197# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
5198# DLLLIBRARY is the shared (i.e., DLL) library.
5199#
5200# RUNSHARED is used to run shared python without installed libraries
5201#
5202# INSTSONAME is the name of the shared library that will be use to install
5203# on the system - some systems like version suffix, others don't
5204
5205
5206
5207
5208
5209
5210LDLIBRARY="$LIBRARY"
5211BLDLIBRARY='$(LDLIBRARY)'
5212INSTSONAME='$(LDLIBRARY)'
5213DLLLIBRARY=''
5214LDLIBRARYDIR=''
5215RUNSHARED=''
5216
5217# LINKCC is the command that links the python executable -- default is $(CC).
5218# If CXX is set, and if it is needed to link a main function that was
5219# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
5220# python might then depend on the C++ runtime
5221# This is altered for AIX in order to build the export list before
5222# linking.
5223
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005224{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKCC" >&5
5225$as_echo_n "checking LINKCC... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005226if test -z "$LINKCC"
5227then
5228 LINKCC='$(PURIFY) $(MAINCC)'
5229 case $ac_sys_system in
5230 AIX*)
5231 exp_extra="\"\""
5232 if test $ac_sys_release -ge 5 -o \
5233 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
5234 exp_extra="."
5235 fi
5236 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005237 QNX*)
5238 # qcc must be used because the other compilers do not
5239 # support -N.
5240 LINKCC=qcc;;
5241 esac
5242fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005243{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKCC" >&5
5244$as_echo "$LINKCC" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005245
5246# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
5247# make sure we default having it set to "no": this is used by
5248# distutils.unixccompiler to know if it should add --enable-new-dtags
5249# to linker command lines, and failing to detect GNU ld simply results
5250# in the same bahaviour as before.
5251
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005252{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
5253$as_echo_n "checking for GNU ld... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005254ac_prog=ld
5255if test "$GCC" = yes; then
5256 ac_prog=`$CC -print-prog-name=ld`
5257fi
5258case `"$ac_prog" -V 2>&1 < /dev/null` in
5259 *GNU*)
5260 GNULD=yes;;
5261 *)
5262 GNULD=no;;
5263esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005264{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNULD" >&5
5265$as_echo "$GNULD" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005266
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005267{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-shared" >&5
5268$as_echo_n "checking for --enable-shared... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005269# Check whether --enable-shared was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005270if test "${enable_shared+set}" = set; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005271 enableval=$enable_shared;
5272fi
5273
5274
5275if test -z "$enable_shared"
5276then
5277 case $ac_sys_system in
5278 CYGWIN* | atheos*)
5279 enable_shared="yes";;
5280 *)
5281 enable_shared="no";;
5282 esac
5283fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005284{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
5285$as_echo "$enable_shared" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005286
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005287{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-profiling" >&5
5288$as_echo_n "checking for --enable-profiling... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005289# Check whether --enable-profiling was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005290if test "${enable_profiling+set}" = set; then :
doko@python.orgd65e2ba2013-01-31 23:52:03 +01005291 enableval=$enable_profiling;
5292fi
5293
5294if test "x$enable_profiling" = xyes; then
5295 ac_save_cc="$CC"
Benjamin Petersonb9be7bb2013-03-26 08:55:37 -04005296 CC="$CC -pg"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005297 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005298/* end confdefs.h. */
5299int main() { return 0; }
5300_ACEOF
doko@python.orgd65e2ba2013-01-31 23:52:03 +01005301if ac_fn_c_try_link "$LINENO"; then :
5302
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005303else
doko@python.orgd65e2ba2013-01-31 23:52:03 +01005304 enable_profiling=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005305fi
doko@python.orgd65e2ba2013-01-31 23:52:03 +01005306rm -f core conftest.err conftest.$ac_objext \
5307 conftest$ac_exeext conftest.$ac_ext
5308 CC="$ac_save_cc"
5309else
5310 enable_profiling=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005311fi
doko@python.orgd65e2ba2013-01-31 23:52:03 +01005312{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_profiling" >&5
5313$as_echo "$enable_profiling" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005314
doko@python.orgd65e2ba2013-01-31 23:52:03 +01005315if test "x$enable_profiling" = xyes; then
5316 BASECFLAGS="-pg $BASECFLAGS"
5317 LDFLAGS="-pg $LDFLAGS"
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005318fi
5319
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005320{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDLIBRARY" >&5
5321$as_echo_n "checking LDLIBRARY... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005322
5323# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
5324# library that we build, but we do not want to link against it (we
5325# will find it with a -framework option). For this reason there is an
5326# extra variable BLDLIBRARY against which Python and the extension
5327# modules are linked, BLDLIBRARY. This is normally the same as
5328# LDLIBRARY, but empty for MacOSX framework builds.
5329if test "$enable_framework"
5330then
5331 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
doko@ubuntu.com9ba90c92014-05-07 04:41:26 +02005332 RUNSHARED=DYLD_FRAMEWORK_PATH=`pwd`${DYLD_FRAMEWORK_PATH:+:${DYLD_FRAMEWORK_PATH}}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005333 BLDLIBRARY=''
5334else
5335 BLDLIBRARY='$(LDLIBRARY)'
5336fi
5337
5338# Other platforms follow
5339if test $enable_shared = "yes"; then
5340
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005341$as_echo "#define Py_ENABLE_SHARED 1" >>confdefs.h
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005342
5343 case $ac_sys_system in
5344 BeOS*)
5345 LDLIBRARY='libpython$(VERSION).so'
5346 ;;
5347 CYGWIN*)
5348 LDLIBRARY='libpython$(VERSION).dll.a'
5349 DLLLIBRARY='libpython$(VERSION).dll'
5350 ;;
5351 SunOS*)
5352 LDLIBRARY='libpython$(VERSION).so'
5353 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(VERSION)'
doko@ubuntu.com9ba90c92014-05-07 04:41:26 +02005354 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005355 INSTSONAME="$LDLIBRARY".$SOVERSION
5356 ;;
Charles-François Natali3de8c732011-07-24 22:33:35 +02005357 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*|OpenBSD*)
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005358 LDLIBRARY='libpython$(VERSION).so'
5359 BLDLIBRARY='-L. -lpython$(VERSION)'
doko@ubuntu.com9ba90c92014-05-07 04:41:26 +02005360 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005361 case $ac_sys_system in
5362 FreeBSD*)
5363 SOVERSION=`echo $SOVERSION|cut -d "." -f 1`
5364 ;;
5365 esac
5366 INSTSONAME="$LDLIBRARY".$SOVERSION
5367 ;;
5368 hp*|HP*)
5369 case `uname -m` in
5370 ia64)
5371 LDLIBRARY='libpython$(VERSION).so'
5372 ;;
5373 *)
5374 LDLIBRARY='libpython$(VERSION).sl'
5375 ;;
5376 esac
5377 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(VERSION)'
doko@ubuntu.com9ba90c92014-05-07 04:41:26 +02005378 RUNSHARED=SHLIB_PATH=`pwd`${SHLIB_PATH:+:${SHLIB_PATH}}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005379 ;;
5380 OSF*)
5381 LDLIBRARY='libpython$(VERSION).so'
5382 BLDLIBRARY='-rpath $(LIBDIR) -L. -lpython$(VERSION)'
doko@ubuntu.com9ba90c92014-05-07 04:41:26 +02005383 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005384 ;;
5385 atheos*)
5386 LDLIBRARY='libpython$(VERSION).so'
5387 BLDLIBRARY='-L. -lpython$(VERSION)'
5388 RUNSHARED=DLL_PATH=`pwd`:${DLL_PATH:-/atheos/sys/libs:/atheos/autolnk/lib}
5389 ;;
5390 Darwin*)
5391 LDLIBRARY='libpython$(VERSION).dylib'
5392 BLDLIBRARY='-L. -lpython$(VERSION)'
doko@ubuntu.com9ba90c92014-05-07 04:41:26 +02005393 RUNSHARED=DYLD_LIBRARY_PATH=`pwd`${DYLD_LIBRARY_PATH:+:${DYLD_LIBRARY_PATH}}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005394 ;;
Antoine Pitrouaabdceb2010-09-10 20:03:17 +00005395 AIX*)
5396 LDLIBRARY='libpython$(VERSION).so'
doko@ubuntu.com9ba90c92014-05-07 04:41:26 +02005397 RUNSHARED=LIBPATH=`pwd`${LIBPATH:+:${LIBPATH}}
Antoine Pitrouaabdceb2010-09-10 20:03:17 +00005398 ;;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005399
5400 esac
5401else # shared is disabled
5402 case $ac_sys_system in
5403 CYGWIN*)
5404 BLDLIBRARY='$(LIBRARY)'
5405 LDLIBRARY='libpython$(VERSION).dll.a'
5406 ;;
5407 esac
5408fi
5409
doko@python.orgd65e2ba2013-01-31 23:52:03 +01005410if test "$cross_compiling" = yes; then
5411 RUNSHARED=
5412fi
5413
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005414{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDLIBRARY" >&5
5415$as_echo "$LDLIBRARY" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005416
5417if test -n "$ac_tool_prefix"; then
5418 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
5419set dummy ${ac_tool_prefix}ranlib; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005420{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5421$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01005422if ${ac_cv_prog_RANLIB+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005423 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005424else
5425 if test -n "$RANLIB"; then
5426 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
5427else
5428as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5429for as_dir in $PATH
5430do
5431 IFS=$as_save_IFS
5432 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005433 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01005434 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005435 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005436 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005437 break 2
5438 fi
5439done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005440 done
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005441IFS=$as_save_IFS
5442
5443fi
5444fi
5445RANLIB=$ac_cv_prog_RANLIB
5446if test -n "$RANLIB"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005447 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
5448$as_echo "$RANLIB" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005449else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005450 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5451$as_echo "no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005452fi
5453
5454
5455fi
5456if test -z "$ac_cv_prog_RANLIB"; then
5457 ac_ct_RANLIB=$RANLIB
5458 # Extract the first word of "ranlib", so it can be a program name with args.
5459set dummy ranlib; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005460{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5461$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01005462if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005463 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005464else
5465 if test -n "$ac_ct_RANLIB"; then
5466 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
5467else
5468as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5469for as_dir in $PATH
5470do
5471 IFS=$as_save_IFS
5472 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005473 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01005474 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005475 ac_cv_prog_ac_ct_RANLIB="ranlib"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005476 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005477 break 2
5478 fi
5479done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005480 done
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005481IFS=$as_save_IFS
5482
5483fi
5484fi
5485ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
5486if test -n "$ac_ct_RANLIB"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005487 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
5488$as_echo "$ac_ct_RANLIB" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005489else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005490 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5491$as_echo "no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005492fi
5493
5494 if test "x$ac_ct_RANLIB" = x; then
5495 RANLIB=":"
5496 else
5497 case $cross_compiling:$ac_tool_warned in
5498yes:)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005499{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5500$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005501ac_tool_warned=yes ;;
5502esac
5503 RANLIB=$ac_ct_RANLIB
5504 fi
5505else
5506 RANLIB="$ac_cv_prog_RANLIB"
5507fi
5508
5509
doko@python.orgd65e2ba2013-01-31 23:52:03 +01005510if test -n "$ac_tool_prefix"; then
5511 for ac_prog in ar aal
5512 do
5513 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5514set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005515{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5516$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01005517if ${ac_cv_prog_AR+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005518 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005519else
5520 if test -n "$AR"; then
5521 ac_cv_prog_AR="$AR" # Let the user override the test.
5522else
5523as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5524for as_dir in $PATH
5525do
5526 IFS=$as_save_IFS
5527 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005528 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01005529 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@python.orgd65e2ba2013-01-31 23:52:03 +01005530 ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005531 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005532 break 2
5533 fi
5534done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005535 done
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005536IFS=$as_save_IFS
5537
5538fi
5539fi
5540AR=$ac_cv_prog_AR
5541if test -n "$AR"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005542 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
5543$as_echo "$AR" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005544else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005545 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5546$as_echo "no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005547fi
5548
5549
doko@python.orgd65e2ba2013-01-31 23:52:03 +01005550 test -n "$AR" && break
5551 done
5552fi
5553if test -z "$AR"; then
5554 ac_ct_AR=$AR
5555 for ac_prog in ar aal
5556do
5557 # Extract the first word of "$ac_prog", so it can be a program name with args.
5558set dummy $ac_prog; ac_word=$2
5559{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5560$as_echo_n "checking for $ac_word... " >&6; }
5561if ${ac_cv_prog_ac_ct_AR+:} false; then :
5562 $as_echo_n "(cached) " >&6
5563else
5564 if test -n "$ac_ct_AR"; then
5565 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
5566else
5567as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5568for as_dir in $PATH
5569do
5570 IFS=$as_save_IFS
5571 test -z "$as_dir" && as_dir=.
5572 for ac_exec_ext in '' $ac_executable_extensions; do
5573 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5574 ac_cv_prog_ac_ct_AR="$ac_prog"
5575 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5576 break 2
5577 fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005578done
doko@python.orgd65e2ba2013-01-31 23:52:03 +01005579 done
5580IFS=$as_save_IFS
5581
5582fi
5583fi
5584ac_ct_AR=$ac_cv_prog_ac_ct_AR
5585if test -n "$ac_ct_AR"; then
5586 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
5587$as_echo "$ac_ct_AR" >&6; }
5588else
5589 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5590$as_echo "no" >&6; }
5591fi
5592
5593
5594 test -n "$ac_ct_AR" && break
5595done
5596
5597 if test "x$ac_ct_AR" = x; then
5598 AR="ar"
5599 else
5600 case $cross_compiling:$ac_tool_warned in
5601yes:)
5602{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5603$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5604ac_tool_warned=yes ;;
5605esac
5606 AR=$ac_ct_AR
5607 fi
5608fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005609
5610
5611# tweak ARFLAGS only if the user didn't set it on the command line
5612
5613if test -z "$ARFLAGS"
5614then
5615 ARFLAGS="rc"
5616fi
5617
5618
5619# Extract the first word of "svnversion", so it can be a program name with args.
5620set dummy svnversion; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005621{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5622$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01005623if ${ac_cv_prog_SVNVERSION+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005624 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005625else
5626 if test -n "$SVNVERSION"; then
5627 ac_cv_prog_SVNVERSION="$SVNVERSION" # Let the user override the test.
5628else
5629as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5630for as_dir in $PATH
5631do
5632 IFS=$as_save_IFS
5633 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005634 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01005635 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005636 ac_cv_prog_SVNVERSION="found"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005637 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005638 break 2
5639 fi
5640done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005641 done
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005642IFS=$as_save_IFS
5643
5644 test -z "$ac_cv_prog_SVNVERSION" && ac_cv_prog_SVNVERSION="not-found"
5645fi
5646fi
5647SVNVERSION=$ac_cv_prog_SVNVERSION
5648if test -n "$SVNVERSION"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005649 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SVNVERSION" >&5
5650$as_echo "$SVNVERSION" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005651else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005652 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5653$as_echo "no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005654fi
5655
5656
5657if test $SVNVERSION = found
5658then
5659 SVNVERSION="svnversion \$(srcdir)"
5660else
5661 SVNVERSION="echo Unversioned directory"
5662fi
5663
Trent Nelsond86ceec2012-10-16 09:42:45 -04005664
Trent Nelsonabf20512012-10-17 04:32:49 -04005665if test "$abs_srcdir" != "$abs_builddir"; then
Trent Nelsond86ceec2012-10-16 09:42:45 -04005666 # If we're building out-of-tree make sure Include (in the current dir)
5667 # gets picked up before its $srcdir counterpart in order for Python-ast.h
5668 # and graminit.h to get picked up from the correct directory.
5669 # (A side effect of this is that these resources will automatically be
5670 # regenerated when building out-of-tree, regardless of whether or not
5671 # the $srcdir counterpart is up-to-date. This is an acceptable trade
5672 # off.)
5673 BASECPPFLAGS="-IInclude"
5674else
5675 BASECPPFLAGS=""
5676fi
5677
Georg Brandl3a5508e2011-03-06 10:42:21 +01005678
5679
5680
5681# Extract the first word of "hg", so it can be a program name with args.
5682set dummy hg; ac_word=$2
5683{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5684$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01005685if ${ac_cv_prog_HAS_HG+:} false; then :
Georg Brandl3a5508e2011-03-06 10:42:21 +01005686 $as_echo_n "(cached) " >&6
5687else
5688 if test -n "$HAS_HG"; then
5689 ac_cv_prog_HAS_HG="$HAS_HG" # Let the user override the test.
5690else
5691as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5692for as_dir in $PATH
5693do
5694 IFS=$as_save_IFS
5695 test -z "$as_dir" && as_dir=.
5696 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01005697 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Georg Brandl3a5508e2011-03-06 10:42:21 +01005698 ac_cv_prog_HAS_HG="found"
5699 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5700 break 2
5701 fi
5702done
5703 done
5704IFS=$as_save_IFS
5705
5706 test -z "$ac_cv_prog_HAS_HG" && ac_cv_prog_HAS_HG="not-found"
5707fi
5708fi
5709HAS_HG=$ac_cv_prog_HAS_HG
5710if test -n "$HAS_HG"; then
5711 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAS_HG" >&5
5712$as_echo "$HAS_HG" >&6; }
5713else
5714 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5715$as_echo "no" >&6; }
5716fi
5717
5718
5719if test $HAS_HG = found
5720then
5721 HGVERSION="hg id -i \$(srcdir)"
5722 HGTAG="hg id -t \$(srcdir)"
5723 HGBRANCH="hg id -b \$(srcdir)"
5724else
5725 HGVERSION=""
5726 HGTAG=""
5727 HGBRANCH=""
5728fi
5729
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005730case $MACHDEP in
5731bsdos*|hp*|HP*)
5732 # install -d does not work on BSDI or HP-UX
5733 if test -z "$INSTALL"
5734 then
5735 INSTALL="${srcdir}/install-sh -c"
5736 fi
5737esac
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005738# Find a good install program. We prefer a C program (faster),
5739# so one script is as good as another. But avoid the broken or
5740# incompatible versions:
5741# SysV /etc/install, /usr/sbin/install
5742# SunOS /usr/etc/install
5743# IRIX /sbin/install
5744# AIX /bin/install
5745# AmigaOS /C/install, which installs bootblocks on floppy discs
5746# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
5747# AFS /usr/afsws/bin/install, which mishandles nonexistent args
5748# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
5749# OS/2's system install, which has a completely different semantic
5750# ./install, which can be erroneously created by make from ./install.sh.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005751# Reject install programs that cannot install multiple files.
5752{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
5753$as_echo_n "checking for a BSD-compatible install... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005754if test -z "$INSTALL"; then
Matthias Klose3cef2a92012-03-14 23:39:33 +01005755if ${ac_cv_path_install+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005756 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005757else
5758 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5759for as_dir in $PATH
5760do
5761 IFS=$as_save_IFS
5762 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005763 # Account for people who put trailing slashes in PATH elements.
5764case $as_dir/ in #((
5765 ./ | .// | /[cC]/* | \
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005766 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005767 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005768 /usr/ucb/* ) ;;
5769 *)
5770 # OSF1 and SCO ODT 3.0 have their own names for install.
5771 # Don't use installbsd from OSF since it installs stuff as root
5772 # by default.
5773 for ac_prog in ginstall scoinst install; do
5774 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01005775 if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005776 if test $ac_prog = install &&
5777 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
5778 # AIX install. It has an incompatible calling convention.
5779 :
5780 elif test $ac_prog = install &&
5781 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
5782 # program-specific install script used by HP pwplus--don't use.
5783 :
5784 else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005785 rm -rf conftest.one conftest.two conftest.dir
5786 echo one > conftest.one
5787 echo two > conftest.two
5788 mkdir conftest.dir
5789 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
5790 test -s conftest.one && test -s conftest.two &&
5791 test -s conftest.dir/conftest.one &&
5792 test -s conftest.dir/conftest.two
5793 then
5794 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
5795 break 3
5796 fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005797 fi
5798 fi
5799 done
5800 done
5801 ;;
5802esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005803
5804 done
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005805IFS=$as_save_IFS
5806
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005807rm -rf conftest.one conftest.two conftest.dir
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005808
5809fi
5810 if test "${ac_cv_path_install+set}" = set; then
5811 INSTALL=$ac_cv_path_install
5812 else
5813 # As a last resort, use the slow shell script. Don't cache a
5814 # value for INSTALL within a source directory, because that will
5815 # break other packages using the cache if that directory is
5816 # removed, or if the value is a relative name.
5817 INSTALL=$ac_install_sh
5818 fi
5819fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005820{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
5821$as_echo "$INSTALL" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005822
5823# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
5824# It thinks the first close brace ends the variable substitution.
5825test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
5826
5827test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
5828
5829test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
5830
Trent Nelsonf6407a12012-08-30 14:56:13 +00005831{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
5832$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
5833if test -z "$MKDIR_P"; then
5834 if ${ac_cv_path_mkdir+:} false; then :
5835 $as_echo_n "(cached) " >&6
5836else
5837 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5838for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
5839do
5840 IFS=$as_save_IFS
5841 test -z "$as_dir" && as_dir=.
5842 for ac_prog in mkdir gmkdir; do
5843 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01005844 as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
Trent Nelsonf6407a12012-08-30 14:56:13 +00005845 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
5846 'mkdir (GNU coreutils) '* | \
5847 'mkdir (coreutils) '* | \
5848 'mkdir (fileutils) '4.1*)
5849 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
5850 break 3;;
5851 esac
5852 done
5853 done
5854 done
5855IFS=$as_save_IFS
5856
5857fi
5858
5859 test -d ./--version && rmdir ./--version
5860 if test "${ac_cv_path_mkdir+set}" = set; then
5861 MKDIR_P="$ac_cv_path_mkdir -p"
5862 else
5863 # As a last resort, use the slow shell script. Don't cache a
5864 # value for MKDIR_P within a source directory, because that will
5865 # break other packages using the cache if that directory is
5866 # removed, or if the value is a relative name.
5867 MKDIR_P="$ac_install_sh -d"
5868 fi
5869fi
5870{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
5871$as_echo "$MKDIR_P" >&6; }
5872
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005873
5874# Not every filesystem supports hard links
5875
5876if test -z "$LN" ; then
5877 case $ac_sys_system in
5878 BeOS*) LN="ln -s";;
5879 CYGWIN*) LN="ln -s";;
5880 atheos*) LN="ln -s";;
5881 *) LN=ln;;
5882 esac
5883fi
5884
5885# Check for --with-pydebug
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005886{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pydebug" >&5
5887$as_echo_n "checking for --with-pydebug... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005888
5889# Check whether --with-pydebug was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005890if test "${with_pydebug+set}" = set; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005891 withval=$with_pydebug;
5892if test "$withval" != no
5893then
5894
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005895$as_echo "#define Py_DEBUG 1" >>confdefs.h
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005896
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005897 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5898$as_echo "yes" >&6; };
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005899 Py_DEBUG='true'
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005900else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5901$as_echo "no" >&6; }; Py_DEBUG='false'
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005902fi
5903else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005904 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5905$as_echo "no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005906fi
5907
5908
5909# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
5910# merged with this chunk of code?
5911
5912# Optimizer/debugger flags
5913# ------------------------
5914# (The following bit of code is complicated enough - please keep things
5915# indented properly. Just pretend you're editing Python code. ;-)
5916
5917# There are two parallel sets of case statements below, one that checks to
5918# see if OPT was set and one that does BASECFLAGS setting based upon
5919# compiler and platform. BASECFLAGS tweaks need to be made even if the
5920# user set OPT.
5921
5922# tweak OPT based on compiler and platform, only if the user didn't set
5923# it on the command line
5924
Benjamin Petersond4b721b2010-03-23 20:58:37 +00005925if test "${OPT-unset}" = "unset"
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005926then
5927 case $GCC in
5928 yes)
5929 if test "$CC" != 'g++' ; then
5930 STRICT_PROTO="-Wstrict-prototypes"
5931 fi
5932 # For gcc 4.x we need to use -fwrapv so lets check if its supported
5933 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
5934 WRAP="-fwrapv"
5935 fi
Stefan Krah503e5e12011-09-14 15:19:42 +02005936
5937 # Clang also needs -fwrapv
Stefan Krah2bc1e8f2011-12-08 22:26:06 +01005938 case $CC in
5939 *clang*) WRAP="-fwrapv"
5940 ;;
5941 esac
Stefan Krah503e5e12011-09-14 15:19:42 +02005942
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005943 case $ac_cv_prog_cc_g in
5944 yes)
5945 if test "$Py_DEBUG" = 'true' ; then
5946 # Optimization messes up debuggers, so turn it off for
5947 # debug builds.
Mark Dickinsond2f3e3f2010-05-05 22:23:58 +00005948 OPT="-g -O0 -Wall $STRICT_PROTO"
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005949 else
5950 OPT="-g $WRAP -O3 -Wall $STRICT_PROTO"
5951 fi
5952 ;;
5953 *)
5954 OPT="-O3 -Wall $STRICT_PROTO"
5955 ;;
5956 esac
5957 case $ac_sys_system in
5958 SCO_SV*) OPT="$OPT -m486 -DSCO5"
5959 ;;
5960 esac
5961 ;;
5962
5963 *)
5964 OPT="-O"
5965 ;;
5966 esac
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005967fi
5968
5969
5970
5971# The -arch flags for universal builds on OSX
5972UNIVERSAL_ARCH_FLAGS=
5973
5974
5975# tweak BASECFLAGS based on compiler and platform
5976case $GCC in
5977yes)
5978 # Python violates C99 rules, by casting between incompatible
5979 # pointer types. GCC may generate bad code as a result of that,
5980 # so use -fno-strict-aliasing if supported.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005981 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -fno-strict-aliasing" >&5
5982$as_echo_n "checking whether $CC accepts -fno-strict-aliasing... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005983 ac_save_cc="$CC"
5984 CC="$CC -fno-strict-aliasing"
Matthias Klose3cef2a92012-03-14 23:39:33 +01005985 if ${ac_cv_no_strict_aliasing_ok+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005986 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00005987else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005988 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005989/* end confdefs.h. */
Gregory P. Smith373469a2009-11-01 21:03:38 +00005990
5991int
5992main ()
5993{
Mark Dickinson5e13e292010-05-11 08:55:06 +00005994
Gregory P. Smith373469a2009-11-01 21:03:38 +00005995 ;
5996 return 0;
5997}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005998_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005999if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006000 ac_cv_no_strict_aliasing_ok=yes
6001else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006002 ac_cv_no_strict_aliasing_ok=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006003fi
Gregory P. Smith373469a2009-11-01 21:03:38 +00006004rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00006005fi
6006
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006007 CC="$ac_save_cc"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006008 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_no_strict_aliasing_ok" >&5
6009$as_echo "$ac_cv_no_strict_aliasing_ok" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006010 if test $ac_cv_no_strict_aliasing_ok = yes
6011 then
6012 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
6013 fi
6014
6015 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
6016 # support. Without this, treatment of subnormals doesn't follow
6017 # the standard.
doko@python.orgd65e2ba2013-01-31 23:52:03 +01006018 case $host in
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006019 alpha*)
6020 BASECFLAGS="$BASECFLAGS -mieee"
6021 ;;
6022 esac
6023
6024 case $ac_sys_system in
6025 SCO_SV*)
6026 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
6027 ;;
6028 # is there any other compiler on Darwin besides gcc?
6029 Darwin*)
6030 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
6031 # used to be here, but non-Apple gcc doesn't accept them.
Ronald Oussorena55af9a2010-01-17 16:25:57 +00006032 if test "${CC}" = gcc
6033 then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006034 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which compiler should be used" >&5
6035$as_echo_n "checking which compiler should be used... " >&6; }
Ronald Oussorena55af9a2010-01-17 16:25:57 +00006036 case "${UNIVERSALSDK}" in
6037 */MacOSX10.4u.sdk)
6038 # Build using 10.4 SDK, force usage of gcc when the
6039 # compiler is gcc, otherwise the user will get very
6040 # confusing error messages when building on OSX 10.6
6041 CC=gcc-4.0
6042 CPP=cpp-4.0
6043 ;;
6044 esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006045 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
6046$as_echo "$CC" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006047 fi
6048
6049 # Calculate the right deployment target for this build.
6050 #
Ned Deilyc40b9032014-06-25 13:48:46 -07006051 cur_target_major=`sw_vers -productVersion | \
6052 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
6053 cur_target_minor=`sw_vers -productVersion | \
6054 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
6055 cur_target="${cur_target_major}.${cur_target_minor}"
6056 if test ${cur_target_major} -eq 10 && \
6057 test ${cur_target_minor} -ge 3
6058 then
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006059 cur_target=10.3
Ronald Oussoren25967582009-09-06 10:00:26 +00006060 if test ${enable_universalsdk}; then
6061 if test "${UNIVERSAL_ARCHS}" = "all"; then
6062 # Ensure that the default platform for a
6063 # 4-way universal build is OSX 10.5,
6064 # that's the first OS release where
6065 # 4-way builds make sense.
6066 cur_target='10.5'
Ronald Oussoren23d92532009-09-07 06:12:00 +00006067
6068 elif test "${UNIVERSAL_ARCHS}" = "3-way"; then
6069 cur_target='10.5'
6070
6071 elif test "${UNIVERSAL_ARCHS}" = "intel"; then
6072 cur_target='10.5'
6073
6074 elif test "${UNIVERSAL_ARCHS}" = "64-bit"; then
6075 cur_target='10.5'
Ronald Oussoren25967582009-09-06 10:00:26 +00006076 fi
6077 else
Ronald Oussorenbc0e83c2010-02-11 13:26:54 +00006078 if test `/usr/bin/arch` = "i386"; then
Ronald Oussoren25967582009-09-06 10:00:26 +00006079 # On Intel macs default to a deployment
6080 # target of 10.4, that's the first OSX
6081 # release with Intel support.
6082 cur_target="10.4"
6083 fi
6084 fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006085 fi
6086 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
6087
6088 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
6089 # environment with a value that is the same as what we'll use
6090 # in the Makefile to ensure that we'll get the same compiler
6091 # environment during configure and build time.
6092 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
6093 export MACOSX_DEPLOYMENT_TARGET
6094 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
6095
Ronald Oussorena55af9a2010-01-17 16:25:57 +00006096 if test "${enable_universalsdk}"; then
6097 UNIVERSAL_ARCH_FLAGS=""
6098 if test "$UNIVERSAL_ARCHS" = "32-bit" ; then
6099 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
6100 ARCH_RUN_32BIT=""
Ronald Oussoren75912852010-04-08 08:13:31 +00006101 LIPO_32BIT_FLAGS=""
Ronald Oussorena55af9a2010-01-17 16:25:57 +00006102
6103 elif test "$UNIVERSAL_ARCHS" = "64-bit" ; then
6104 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
6105 LIPO_32BIT_FLAGS=""
6106 ARCH_RUN_32BIT="true"
6107
6108 elif test "$UNIVERSAL_ARCHS" = "all" ; then
6109 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
6110 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Ronald Oussoren92397ce2010-01-17 19:32:00 +00006111 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
Ronald Oussorena55af9a2010-01-17 16:25:57 +00006112
6113 elif test "$UNIVERSAL_ARCHS" = "intel" ; then
6114 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
6115 LIPO_32BIT_FLAGS="-extract i386"
Ronald Oussoren92397ce2010-01-17 19:32:00 +00006116 ARCH_RUN_32BIT="/usr/bin/arch -i386"
Ronald Oussorena55af9a2010-01-17 16:25:57 +00006117
6118 elif test "$UNIVERSAL_ARCHS" = "3-way" ; then
6119 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
6120 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Ronald Oussoren9922f172010-02-11 13:19:34 +00006121 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
Ronald Oussorena55af9a2010-01-17 16:25:57 +00006122
6123 else
Georg Brandl71f4fbb2011-02-25 11:04:50 +00006124 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 +00006125
6126 fi
6127
6128
Ronald Oussoren974eb5e2010-04-18 17:59:37 +00006129 CFLAGS="${UNIVERSAL_ARCH_FLAGS} ${CFLAGS}"
6130 if test "${UNIVERSALSDK}" != "/"
6131 then
6132 CPPFLAGS="-isysroot ${UNIVERSALSDK} ${CPPFLAGS}"
6133 LDFLAGS="-isysroot ${UNIVERSALSDK} ${LDFLAGS}"
6134 CFLAGS="-isysroot ${UNIVERSALSDK} ${CFLAGS}"
Ronald Oussorena55af9a2010-01-17 16:25:57 +00006135 fi
6136
6137 fi
6138
6139
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006140 ;;
6141 OSF*)
6142 BASECFLAGS="$BASECFLAGS -mieee"
6143 ;;
6144 esac
6145 ;;
6146
6147*)
6148 case $ac_sys_system in
6149 OpenUNIX*|UnixWare*)
6150 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
6151 ;;
6152 OSF*)
6153 BASECFLAGS="$BASECFLAGS -ieee -std"
6154 ;;
6155 SCO_SV*)
6156 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
6157 ;;
6158 esac
6159 ;;
6160esac
6161
6162if test "$Py_DEBUG" = 'true'; then
6163 :
6164else
6165 OPT="-DNDEBUG $OPT"
6166fi
6167
6168if test "$ac_arch_flags"
6169then
6170 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
6171fi
6172
6173# disable check for icc since it seems to pass, but generates a warning
6174if test "$CC" = icc
6175then
6176 ac_cv_opt_olimit_ok=no
6177fi
6178
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006179{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -OPT:Olimit=0" >&5
6180$as_echo_n "checking whether $CC accepts -OPT:Olimit=0... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01006181if ${ac_cv_opt_olimit_ok+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006182 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006183else
6184 ac_save_cc="$CC"
6185CC="$CC -OPT:Olimit=0"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006186cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006187/* end confdefs.h. */
Gregory P. Smith373469a2009-11-01 21:03:38 +00006188
6189int
6190main ()
6191{
Mark Dickinson5e13e292010-05-11 08:55:06 +00006192
Gregory P. Smith373469a2009-11-01 21:03:38 +00006193 ;
6194 return 0;
6195}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006196_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006197if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006198 ac_cv_opt_olimit_ok=yes
6199else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006200 ac_cv_opt_olimit_ok=no
Matthias Klosec511b472010-05-08 11:01:39 +00006201
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006202fi
Gregory P. Smith373469a2009-11-01 21:03:38 +00006203rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006204CC="$ac_save_cc"
6205fi
6206
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006207{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_opt_olimit_ok" >&5
6208$as_echo "$ac_cv_opt_olimit_ok" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006209if test $ac_cv_opt_olimit_ok = yes; then
6210 case $ac_sys_system in
6211 # XXX is this branch needed? On MacOSX 10.2.2 the result of the
6212 # olimit_ok test is "no". Is it "yes" in some other Darwin-esque
6213 # environment?
6214 Darwin*)
6215 ;;
Trent Nelson34562e12012-10-17 18:01:12 -04006216 # XXX thankfully this useless troublemaker of a flag has been
6217 # eradicated in the 3.x line. For now, make sure it isn't picked
6218 # up by any of our other platforms that use CC.
6219 AIX*|SunOS*|HP-UX*|IRIX*)
6220 ;;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006221 *)
6222 BASECFLAGS="$BASECFLAGS -OPT:Olimit=0"
6223 ;;
6224 esac
6225else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006226 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Olimit 1500" >&5
6227$as_echo_n "checking whether $CC accepts -Olimit 1500... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01006228 if ${ac_cv_olimit_ok+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006229 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006230else
6231 ac_save_cc="$CC"
6232 CC="$CC -Olimit 1500"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006233 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006234/* end confdefs.h. */
Gregory P. Smith373469a2009-11-01 21:03:38 +00006235
6236int
6237main ()
6238{
Mark Dickinson5e13e292010-05-11 08:55:06 +00006239
Gregory P. Smith373469a2009-11-01 21:03:38 +00006240 ;
6241 return 0;
6242}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006243_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006244if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006245 ac_cv_olimit_ok=yes
6246else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006247 ac_cv_olimit_ok=no
Matthias Klosec511b472010-05-08 11:01:39 +00006248
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006249fi
Gregory P. Smith373469a2009-11-01 21:03:38 +00006250rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006251 CC="$ac_save_cc"
6252fi
6253
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006254 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_olimit_ok" >&5
6255$as_echo "$ac_cv_olimit_ok" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006256 if test $ac_cv_olimit_ok = yes; then
Stefan Krah67473262012-11-29 00:17:05 +01006257 case $ac_sys_system in
6258 # Issue #16534: On HP-UX ac_cv_olimit_ok=yes is a false positive.
6259 HP-UX*)
6260 ;;
6261 *)
6262 BASECFLAGS="$BASECFLAGS -Olimit 1500"
6263 ;;
6264 esac
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006265 fi
6266fi
6267
6268# Check whether GCC supports PyArg_ParseTuple format
6269if test "$GCC" = "yes"
6270then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006271 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc supports ParseTuple __format__" >&5
6272$as_echo_n "checking whether gcc supports ParseTuple __format__... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006273 save_CFLAGS=$CFLAGS
Benjamin Petersonc8759662013-05-11 13:00:05 -05006274 CFLAGS="$CFLAGS -Werror -Wformat"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006275 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006276/* end confdefs.h. */
6277
6278 void f(char*,...)__attribute((format(PyArg_ParseTuple, 1, 2)));
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006279int
6280main ()
6281{
6282
6283 ;
6284 return 0;
6285}
Matthias Klosec511b472010-05-08 11:01:39 +00006286
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006287_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006288if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006289
Matthias Klosec511b472010-05-08 11:01:39 +00006290
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006291$as_echo "#define HAVE_ATTRIBUTE_FORMAT_PARSETUPLE 1" >>confdefs.h
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006292
Matthias Klosec511b472010-05-08 11:01:39 +00006293 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006294$as_echo "yes" >&6; }
Matthias Klosec511b472010-05-08 11:01:39 +00006295
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006296else
Matthias Klosec511b472010-05-08 11:01:39 +00006297
6298 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006299$as_echo "no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006300
6301fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006302rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6303 CFLAGS=$save_CFLAGS
6304fi
6305
6306# On some compilers, pthreads are available without further options
6307# (e.g. MacOS X). On some of these systems, the compiler will not
6308# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
6309# So we have to see first whether pthreads are available without
6310# options before we can check whether -Kpthread improves anything.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006311{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads are available without options" >&5
6312$as_echo_n "checking whether pthreads are available without options... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01006313if ${ac_cv_pthread_is_default+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006314 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006315else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006316 if test "$cross_compiling" = yes; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006317 ac_cv_pthread_is_default=no
6318else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006319 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006320/* end confdefs.h. */
6321
Stefan Krahae66ca62012-11-22 22:36:57 +01006322#include <stdio.h>
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006323#include <pthread.h>
6324
6325void* routine(void* p){return NULL;}
6326
6327int main(){
6328 pthread_t p;
6329 if(pthread_create(&p,NULL,routine,NULL)!=0)
6330 return 1;
6331 (void)pthread_detach(p);
6332 return 0;
6333}
6334
6335_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006336if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006337
6338 ac_cv_pthread_is_default=yes
6339 ac_cv_kthread=no
6340 ac_cv_pthread=no
6341
6342else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006343 ac_cv_pthread_is_default=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006344fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006345rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6346 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006347fi
6348
6349
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006350fi
6351
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006352{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_is_default" >&5
6353$as_echo "$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006354
6355
6356if test $ac_cv_pthread_is_default = yes
6357then
6358 ac_cv_kpthread=no
6359else
6360# -Kpthread, if available, provides the right #defines
6361# and linker options to make pthread_create available
6362# Some compilers won't report that they do not support -Kpthread,
6363# so we need to run a program to see whether it really made the
6364# function available.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006365{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kpthread" >&5
6366$as_echo_n "checking whether $CC accepts -Kpthread... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01006367if ${ac_cv_kpthread+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006368 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006369else
6370 ac_save_cc="$CC"
6371CC="$CC -Kpthread"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006372if test "$cross_compiling" = yes; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006373 ac_cv_kpthread=no
6374else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006375 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006376/* end confdefs.h. */
6377
Stefan Krahae66ca62012-11-22 22:36:57 +01006378#include <stdio.h>
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006379#include <pthread.h>
6380
6381void* routine(void* p){return NULL;}
6382
6383int main(){
6384 pthread_t p;
6385 if(pthread_create(&p,NULL,routine,NULL)!=0)
6386 return 1;
6387 (void)pthread_detach(p);
6388 return 0;
6389}
6390
6391_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006392if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006393 ac_cv_kpthread=yes
6394else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006395 ac_cv_kpthread=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006396fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006397rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6398 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006399fi
6400
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006401CC="$ac_save_cc"
6402fi
6403
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006404{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kpthread" >&5
6405$as_echo "$ac_cv_kpthread" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006406fi
6407
6408if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
6409then
6410# -Kthread, if available, provides the right #defines
6411# and linker options to make pthread_create available
6412# Some compilers won't report that they do not support -Kthread,
6413# so we need to run a program to see whether it really made the
6414# function available.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006415{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kthread" >&5
6416$as_echo_n "checking whether $CC accepts -Kthread... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01006417if ${ac_cv_kthread+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006418 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006419else
6420 ac_save_cc="$CC"
6421CC="$CC -Kthread"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006422if test "$cross_compiling" = yes; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006423 ac_cv_kthread=no
6424else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006425 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006426/* end confdefs.h. */
6427
Stefan Krahae66ca62012-11-22 22:36:57 +01006428#include <stdio.h>
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006429#include <pthread.h>
6430
6431void* routine(void* p){return NULL;}
6432
6433int main(){
6434 pthread_t p;
6435 if(pthread_create(&p,NULL,routine,NULL)!=0)
6436 return 1;
6437 (void)pthread_detach(p);
6438 return 0;
6439}
6440
6441_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006442if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006443 ac_cv_kthread=yes
6444else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006445 ac_cv_kthread=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006446fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006447rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6448 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006449fi
6450
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006451CC="$ac_save_cc"
6452fi
6453
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006454{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kthread" >&5
6455$as_echo "$ac_cv_kthread" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006456fi
6457
6458if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
6459then
6460# -pthread, if available, provides the right #defines
6461# and linker options to make pthread_create available
6462# Some compilers won't report that they do not support -pthread,
6463# so we need to run a program to see whether it really made the
6464# function available.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006465{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -pthread" >&5
6466$as_echo_n "checking whether $CC accepts -pthread... " >&6; }
doko@python.orgfa3f9a32013-01-25 15:32:31 +01006467if ${ac_cv_pthread+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006468 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006469else
6470 ac_save_cc="$CC"
6471CC="$CC -pthread"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006472if test "$cross_compiling" = yes; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006473 ac_cv_pthread=no
6474else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006475 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006476/* end confdefs.h. */
6477
Stefan Krahae66ca62012-11-22 22:36:57 +01006478#include <stdio.h>
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006479#include <pthread.h>
6480
6481void* routine(void* p){return NULL;}
6482
6483int main(){
6484 pthread_t p;
6485 if(pthread_create(&p,NULL,routine,NULL)!=0)
6486 return 1;
6487 (void)pthread_detach(p);
6488 return 0;
6489}
6490
6491_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006492if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006493 ac_cv_pthread=yes
6494else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006495 ac_cv_pthread=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006496fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006497rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6498 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006499fi
6500
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006501CC="$ac_save_cc"
6502fi
6503
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006504{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread" >&5
6505$as_echo "$ac_cv_pthread" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006506fi
6507
6508# If we have set a CC compiler flag for thread support then
6509# check if it works for CXX, too.
6510ac_cv_cxx_thread=no
6511if test ! -z "$CXX"
6512then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006513{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX also accepts flags for thread support" >&5
6514$as_echo_n "checking whether $CXX also accepts flags for thread support... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006515ac_save_cxx="$CXX"
6516
6517if test "$ac_cv_kpthread" = "yes"
6518then
6519 CXX="$CXX -Kpthread"
6520 ac_cv_cxx_thread=yes
6521elif test "$ac_cv_kthread" = "yes"
6522then
6523 CXX="$CXX -Kthread"
6524 ac_cv_cxx_thread=yes
6525elif test "$ac_cv_pthread" = "yes"
6526then
6527 CXX="$CXX -pthread"
6528 ac_cv_cxx_thread=yes
6529fi
6530
6531if test $ac_cv_cxx_thread = yes
6532then
6533 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
6534 $CXX -c conftest.$ac_ext 2>&5
6535 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
6536 && test -s conftest$ac_exeext && ./conftest$ac_exeext
6537 then
6538 ac_cv_cxx_thread=yes
6539 else
6540 ac_cv_cxx_thread=no
6541 fi
6542 rm -fr conftest*
6543fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006544{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_thread" >&5
6545$as_echo "$ac_cv_cxx_thread" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006546fi
6547CXX="$ac_save_cxx"
6548
6549
6550# checks for header files
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006551{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
6552$as_echo_n "checking for ANSI C header files... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01006553if ${ac_cv_header_stdc+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006554 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006555else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006556 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006557/* end confdefs.h. */
6558#include <stdlib.h>
6559#include <stdarg.h>
6560#include <string.h>
6561#include <float.h>
6562
6563int
6564main ()
6565{
6566
6567 ;
6568 return 0;
6569}
6570_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006571if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006572 ac_cv_header_stdc=yes
6573else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006574 ac_cv_header_stdc=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006575fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006576rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6577
6578if test $ac_cv_header_stdc = yes; then
6579 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006580 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006581/* end confdefs.h. */
6582#include <string.h>
6583
6584_ACEOF
6585if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006586 $EGREP "memchr" >/dev/null 2>&1; then :
6587
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006588else
6589 ac_cv_header_stdc=no
6590fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00006591rm -f conftest*
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006592
6593fi
6594
6595if test $ac_cv_header_stdc = yes; then
6596 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006597 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006598/* end confdefs.h. */
6599#include <stdlib.h>
6600
6601_ACEOF
6602if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006603 $EGREP "free" >/dev/null 2>&1; then :
6604
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006605else
6606 ac_cv_header_stdc=no
6607fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00006608rm -f conftest*
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006609
6610fi
6611
6612if test $ac_cv_header_stdc = yes; then
6613 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006614 if test "$cross_compiling" = yes; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006615 :
6616else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006617 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006618/* end confdefs.h. */
6619#include <ctype.h>
6620#include <stdlib.h>
6621#if ((' ' & 0x0FF) == 0x020)
6622# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
6623# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
6624#else
6625# define ISLOWER(c) \
6626 (('a' <= (c) && (c) <= 'i') \
6627 || ('j' <= (c) && (c) <= 'r') \
6628 || ('s' <= (c) && (c) <= 'z'))
6629# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
6630#endif
6631
6632#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
6633int
6634main ()
6635{
6636 int i;
6637 for (i = 0; i < 256; i++)
6638 if (XOR (islower (i), ISLOWER (i))
6639 || toupper (i) != TOUPPER (i))
6640 return 2;
6641 return 0;
6642}
6643_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006644if ac_fn_c_try_run "$LINENO"; then :
6645
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006646else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006647 ac_cv_header_stdc=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006648fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006649rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6650 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006651fi
6652
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006653fi
6654fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006655{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
6656$as_echo "$ac_cv_header_stdc" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006657if test $ac_cv_header_stdc = yes; then
6658
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006659$as_echo "#define STDC_HEADERS 1" >>confdefs.h
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006660
6661fi
6662
doko@ubuntu.comf27ec3e2014-04-17 20:11:19 +02006663for ac_header in asm/types.h conio.h direct.h dlfcn.h errno.h \
Martin v. Löwis0e8bd7e2006-06-10 12:23:46 +00006664fcntl.h grp.h \
doko@ubuntu.comf27ec3e2014-04-17 20:11:19 +02006665ieeefp.h io.h langinfo.h libintl.h poll.h process.h pthread.h \
Martin v. Löwis40e9aed2006-10-02 15:20:37 +00006666shadow.h signal.h stdint.h stropts.h termios.h thread.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00006667unistd.h utime.h \
Christian Heimes0e9ab5f2008-03-21 23:49:44 +00006668sys/audioio.h sys/bsdtty.h sys/epoll.h sys/event.h sys/file.h sys/loadavg.h \
6669sys/lock.h sys/mkdev.h sys/modem.h \
Martin v. Löwis0e8bd7e2006-06-10 12:23:46 +00006670sys/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 +00006671sys/termio.h sys/time.h \
Martin v. Löwis0e8bd7e2006-06-10 12:23:46 +00006672sys/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 +00006673sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Christian Heimes3aa138f2013-06-18 13:25:24 +02006674bluetooth/bluetooth.h linux/tipc.h spawn.h util.h alloca.h
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006675do :
6676 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
6677ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
Georg Brandl71f4fbb2011-02-25 11:04:50 +00006678if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006679 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006680#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00006681_ACEOF
6682
6683fi
6684
Guido van Rossum627b2d71993-12-24 10:39:16 +00006685done
6686
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006687ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00006688for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006689 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
6690{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
6691$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01006692if eval \${$as_ac_Header+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006693 $as_echo_n "(cached) " >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00006694else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006695 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006696/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006697#include <sys/types.h>
6698#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00006699
Martin v. Löwis11437992002-04-12 09:54:03 +00006700int
6701main ()
6702{
6703if ((DIR *) 0)
6704return 0;
6705 ;
6706 return 0;
6707}
6708_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006709if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006710 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00006711else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006712 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006713fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006714rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006715fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006716eval ac_res=\$$as_ac_Header
6717 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
6718$as_echo "$ac_res" >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00006719if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006720 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006721#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00006722_ACEOF
6723
6724ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00006725fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006726
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006727done
6728# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
6729if test $ac_header_dirent = dirent.h; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006730 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
6731$as_echo_n "checking for library containing opendir... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01006732if ${ac_cv_search_opendir+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006733 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006734else
Martin v. Löwis11437992002-04-12 09:54:03 +00006735 ac_func_search_save_LIBS=$LIBS
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006736cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006737/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006738
Martin v. Löwiseba40652007-08-30 20:10:57 +00006739/* Override any GCC internal prototype to avoid an error.
6740 Use char because int might match the return type of a GCC
6741 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006742#ifdef __cplusplus
6743extern "C"
6744#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006745char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006746int
6747main ()
6748{
Martin v. Löwiseba40652007-08-30 20:10:57 +00006749return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006750 ;
6751 return 0;
6752}
6753_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00006754for ac_lib in '' dir; do
6755 if test -z "$ac_lib"; then
6756 ac_res="none required"
6757 else
6758 ac_res=-l$ac_lib
Skip Montanaro89e975f2007-08-22 19:05:21 +00006759 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Martin v. Löwiseba40652007-08-30 20:10:57 +00006760 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006761 if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00006762 ac_cv_search_opendir=$ac_res
Brett Cannon19fab762007-06-02 03:02:29 +00006763fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006764rm -f core conftest.err conftest.$ac_objext \
6765 conftest$ac_exeext
Matthias Klose3cef2a92012-03-14 23:39:33 +01006766 if ${ac_cv_search_opendir+:} false; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00006767 break
Skip Montanaro89e975f2007-08-22 19:05:21 +00006768fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006769done
Matthias Klose3cef2a92012-03-14 23:39:33 +01006770if ${ac_cv_search_opendir+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006771
Martin v. Löwiseba40652007-08-30 20:10:57 +00006772else
6773 ac_cv_search_opendir=no
6774fi
6775rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006776LIBS=$ac_func_search_save_LIBS
6777fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006778{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
6779$as_echo "$ac_cv_search_opendir" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006780ac_res=$ac_cv_search_opendir
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006781if test "$ac_res" != no; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00006782 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00006783
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006784fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006785
Michael W. Hudson54241132001-12-07 15:38:26 +00006786else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006787 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
6788$as_echo_n "checking for library containing opendir... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01006789if ${ac_cv_search_opendir+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006790 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006791else
6792 ac_func_search_save_LIBS=$LIBS
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006793cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006794/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006795
Martin v. Löwiseba40652007-08-30 20:10:57 +00006796/* Override any GCC internal prototype to avoid an error.
6797 Use char because int might match the return type of a GCC
6798 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006799#ifdef __cplusplus
6800extern "C"
6801#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006802char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006803int
6804main ()
6805{
Martin v. Löwiseba40652007-08-30 20:10:57 +00006806return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006807 ;
6808 return 0;
6809}
6810_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00006811for ac_lib in '' x; do
6812 if test -z "$ac_lib"; then
6813 ac_res="none required"
6814 else
6815 ac_res=-l$ac_lib
Skip Montanaro89e975f2007-08-22 19:05:21 +00006816 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Martin v. Löwiseba40652007-08-30 20:10:57 +00006817 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006818 if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00006819 ac_cv_search_opendir=$ac_res
Brett Cannon19fab762007-06-02 03:02:29 +00006820fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006821rm -f core conftest.err conftest.$ac_objext \
6822 conftest$ac_exeext
Matthias Klose3cef2a92012-03-14 23:39:33 +01006823 if ${ac_cv_search_opendir+:} false; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00006824 break
Skip Montanaro89e975f2007-08-22 19:05:21 +00006825fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006826done
Matthias Klose3cef2a92012-03-14 23:39:33 +01006827if ${ac_cv_search_opendir+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006828
Martin v. Löwiseba40652007-08-30 20:10:57 +00006829else
6830 ac_cv_search_opendir=no
6831fi
6832rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006833LIBS=$ac_func_search_save_LIBS
6834fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006835{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
6836$as_echo "$ac_cv_search_opendir" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006837ac_res=$ac_cv_search_opendir
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006838if test "$ac_res" != no; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00006839 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00006840
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006841fi
6842
6843fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00006844
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006845{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5
6846$as_echo_n "checking whether sys/types.h defines makedev... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01006847if ${ac_cv_header_sys_types_h_makedev+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006848 $as_echo_n "(cached) " >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006849else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006850 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006851/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006852#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006853int
6854main ()
6855{
6856return makedev(0, 0);
6857 ;
6858 return 0;
6859}
6860_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006861if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006862 ac_cv_header_sys_types_h_makedev=yes
6863else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006864 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006865fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006866rm -f core conftest.err conftest.$ac_objext \
6867 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006868
6869fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006870{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_types_h_makedev" >&5
6871$as_echo "$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006872
6873if test $ac_cv_header_sys_types_h_makedev = no; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006874ac_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 +01006875if test "x$ac_cv_header_sys_mkdev_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006876
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006877$as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006878
6879fi
6880
6881
6882
6883 if test $ac_cv_header_sys_mkdev_h = no; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006884 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 +01006885if test "x$ac_cv_header_sys_sysmacros_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006886
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006887$as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006888
6889fi
6890
6891
6892 fi
6893fi
6894
Michael W. Hudson54241132001-12-07 15:38:26 +00006895
Martin v. Löwis11017b12006-01-14 18:12:57 +00006896# On Linux, netlink.h requires asm/types.h
Martin v. Löwis11017b12006-01-14 18:12:57 +00006897for ac_header in linux/netlink.h
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006898do :
6899 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 +00006900#ifdef HAVE_ASM_TYPES_H
6901#include <asm/types.h>
6902#endif
6903#ifdef HAVE_SYS_SOCKET_H
6904#include <sys/socket.h>
6905#endif
6906
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006907"
Matthias Klose3cef2a92012-03-14 23:39:33 +01006908if test "x$ac_cv_header_linux_netlink_h" = xyes; then :
Martin v. Löwis11017b12006-01-14 18:12:57 +00006909 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006910#define HAVE_LINUX_NETLINK_H 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00006911_ACEOF
6912
6913fi
6914
6915done
6916
6917
Guido van Rossum627b2d71993-12-24 10:39:16 +00006918# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00006919was_it_defined=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006920{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_t in time.h" >&5
6921$as_echo_n "checking for clock_t in time.h... " >&6; }
6922cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006923/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006924#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006925
6926_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006927if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006928 $EGREP "clock_t" >/dev/null 2>&1; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +00006929 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006930else
Martin v. Löwis11437992002-04-12 09:54:03 +00006931
6932
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006933$as_echo "#define clock_t long" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00006934
Martin v. Löwisc45929e2002-04-06 10:10:49 +00006935
Guido van Rossum627b2d71993-12-24 10:39:16 +00006936fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00006937rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00006938
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006939{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
6940$as_echo "$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00006941
Neal Norwitz11690112002-07-30 01:08:28 +00006942# Check whether using makedev requires defining _OSF_SOURCE
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006943{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for makedev" >&5
6944$as_echo_n "checking for makedev... " >&6; }
6945cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006946/* end confdefs.h. */
Jesus Cea616de772010-04-28 10:32:30 +00006947
6948#if defined(MAJOR_IN_MKDEV)
6949#include <sys/mkdev.h>
6950#elif defined(MAJOR_IN_SYSMACROS)
6951#include <sys/sysmacros.h>
6952#else
Neal Norwitz6eb37f02003-02-23 23:28:15 +00006953#include <sys/types.h>
Jesus Cea616de772010-04-28 10:32:30 +00006954#endif
Neal Norwitz11690112002-07-30 01:08:28 +00006955int
6956main ()
6957{
6958 makedev(0, 0)
6959 ;
6960 return 0;
6961}
6962_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006963if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00006964 ac_cv_has_makedev=yes
6965else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006966 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006967fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006968rm -f core conftest.err conftest.$ac_objext \
6969 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00006970if test "$ac_cv_has_makedev" = "no"; then
6971 # we didn't link, try if _OSF_SOURCE will allow us to link
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006972 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006973/* end confdefs.h. */
Neal Norwitz11690112002-07-30 01:08:28 +00006974
Neal Norwitz6eb37f02003-02-23 23:28:15 +00006975#define _OSF_SOURCE 1
6976#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00006977
Neal Norwitz11690112002-07-30 01:08:28 +00006978int
6979main ()
6980{
6981 makedev(0, 0)
6982 ;
6983 return 0;
6984}
6985_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006986if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00006987 ac_cv_has_makedev=yes
6988else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006989 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006990fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006991rm -f core conftest.err conftest.$ac_objext \
6992 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00006993 if test "$ac_cv_has_makedev" = "yes"; then
6994
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006995$as_echo "#define _OSF_SOURCE 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00006996
6997 fi
6998fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006999{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_makedev" >&5
7000$as_echo "$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00007001if test "$ac_cv_has_makedev" = "yes"; then
7002
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007003$as_echo "#define HAVE_MAKEDEV 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00007004
7005fi
7006
Martin v. Löwis399a6892002-10-04 10:22:02 +00007007# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
7008# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
7009# defined, but the compiler does not support pragma redefine_extname,
7010# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
7011# structures (such as rlimit64) without declaring them. As a
7012# work-around, disable LFS on such configurations
7013
7014use_lfs=yes
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007015{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Solaris LFS bug" >&5
7016$as_echo_n "checking Solaris LFS bug... " >&6; }
7017cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007018/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00007019
7020#define _LARGEFILE_SOURCE 1
7021#define _FILE_OFFSET_BITS 64
7022#include <sys/resource.h>
7023
Martin v. Löwis399a6892002-10-04 10:22:02 +00007024int
7025main ()
7026{
7027struct rlimit foo;
7028 ;
7029 return 0;
7030}
7031_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007032if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis399a6892002-10-04 10:22:02 +00007033 sol_lfs_bug=no
7034else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007035 sol_lfs_bug=yes
Martin v. Löwis399a6892002-10-04 10:22:02 +00007036fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007037rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007038{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $sol_lfs_bug" >&5
7039$as_echo "$sol_lfs_bug" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00007040if test "$sol_lfs_bug" = "yes"; then
7041 use_lfs=no
7042fi
7043
7044if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00007045# Two defines needed to enable largefile support on various platforms
7046# These may affect some typedefs
Georg Brandl94800df2011-02-25 11:09:02 +00007047case $ac_sys_system/$ac_sys_release in
7048AIX*)
7049
7050$as_echo "#define _LARGE_FILES 1" >>confdefs.h
7051
7052 ;;
7053esac
Guido van Rossum810cc512001-09-09 23:51:39 +00007054
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007055$as_echo "#define _LARGEFILE_SOURCE 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007056
7057
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007058$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
Guido van Rossum810cc512001-09-09 23:51:39 +00007059
Martin v. Löwis399a6892002-10-04 10:22:02 +00007060fi
Michael W. Hudson54241132001-12-07 15:38:26 +00007061
Guido van Rossum84e7b241996-08-19 21:59:00 +00007062# Add some code to confdefs.h so that the test for off_t works on SCO
7063cat >> confdefs.h <<\EOF
7064#if defined(SCO_DS)
7065#undef _OFF_T
7066#endif
7067EOF
7068
Guido van Rossumef2255b2000-03-10 22:30:29 +00007069# Type availability checks
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007070ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
Matthias Klose3cef2a92012-03-14 23:39:33 +01007071if test "x$ac_cv_type_mode_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007072
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007073else
Martin v. Löwis11437992002-04-12 09:54:03 +00007074
7075cat >>confdefs.h <<_ACEOF
7076#define mode_t int
7077_ACEOF
7078
7079fi
7080
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007081ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
Matthias Klose3cef2a92012-03-14 23:39:33 +01007082if test "x$ac_cv_type_off_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007083
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007084else
Martin v. Löwis11437992002-04-12 09:54:03 +00007085
7086cat >>confdefs.h <<_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00007087#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00007088_ACEOF
7089
7090fi
7091
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007092ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
Matthias Klose3cef2a92012-03-14 23:39:33 +01007093if test "x$ac_cv_type_pid_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007094
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007095else
Martin v. Löwis11437992002-04-12 09:54:03 +00007096
7097cat >>confdefs.h <<_ACEOF
7098#define pid_t int
7099_ACEOF
7100
7101fi
7102
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00007103
Martin v. Löwis11437992002-04-12 09:54:03 +00007104cat >>confdefs.h <<_ACEOF
Matthias Klosecbf54b12010-05-08 11:04:18 +00007105#define RETSIGTYPE void
Martin v. Löwis11437992002-04-12 09:54:03 +00007106_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00007107
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007108ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
Matthias Klose3cef2a92012-03-14 23:39:33 +01007109if test "x$ac_cv_type_size_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007110
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007111else
Martin v. Löwis11437992002-04-12 09:54:03 +00007112
7113cat >>confdefs.h <<_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00007114#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00007115_ACEOF
7116
7117fi
7118
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007119{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
7120$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007121if ${ac_cv_type_uid_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007122 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007123else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007124 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007125/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007126#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007127
7128_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007129if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007130 $EGREP "uid_t" >/dev/null 2>&1; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007131 ac_cv_type_uid_t=yes
7132else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007133 ac_cv_type_uid_t=no
7134fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00007135rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00007136
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007137fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007138{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
7139$as_echo "$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00007140if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007141
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007142$as_echo "#define uid_t int" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007143
7144
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007145$as_echo "#define gid_t int" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007146
7147fi
7148
Mark Dickinson17c50cd2012-12-02 13:13:56 +00007149
7150# There are two separate checks for each of the exact-width integer types we
7151# need. First we check whether the type is available using the usual
7152# AC_CHECK_TYPE macro with the default includes (which includes <inttypes.h>
7153# and <stdint.h> where available). We then also use the special type checks of
7154# the form AC_TYPE_UINT32_T, which in the case that uint32_t is not available
7155# directly, #define's uint32_t to be a suitable type.
7156
7157ac_fn_c_check_type "$LINENO" "uint32_t" "ac_cv_type_uint32_t" "$ac_includes_default"
7158if test "x$ac_cv_type_uint32_t" = xyes; then :
7159
7160$as_echo "#define HAVE_UINT32_T 1" >>confdefs.h
7161
7162fi
7163
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007164ac_fn_c_find_uintX_t "$LINENO" "32" "ac_cv_c_uint32_t"
7165case $ac_cv_c_uint32_t in #(
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007166 no|yes) ;; #(
7167 *)
7168
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007169$as_echo "#define _UINT32_T 1" >>confdefs.h
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007170
7171
7172cat >>confdefs.h <<_ACEOF
7173#define uint32_t $ac_cv_c_uint32_t
7174_ACEOF
7175;;
7176 esac
7177
Mark Dickinson17c50cd2012-12-02 13:13:56 +00007178
7179ac_fn_c_check_type "$LINENO" "uint64_t" "ac_cv_type_uint64_t" "$ac_includes_default"
7180if test "x$ac_cv_type_uint64_t" = xyes; then :
7181
7182$as_echo "#define HAVE_UINT64_T 1" >>confdefs.h
7183
7184fi
7185
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007186ac_fn_c_find_uintX_t "$LINENO" "64" "ac_cv_c_uint64_t"
7187case $ac_cv_c_uint64_t in #(
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007188 no|yes) ;; #(
7189 *)
7190
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007191$as_echo "#define _UINT64_T 1" >>confdefs.h
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007192
7193
7194cat >>confdefs.h <<_ACEOF
7195#define uint64_t $ac_cv_c_uint64_t
7196_ACEOF
7197;;
7198 esac
7199
Mark Dickinson17c50cd2012-12-02 13:13:56 +00007200
7201ac_fn_c_check_type "$LINENO" "int32_t" "ac_cv_type_int32_t" "$ac_includes_default"
7202if test "x$ac_cv_type_int32_t" = xyes; then :
7203
7204$as_echo "#define HAVE_INT32_T 1" >>confdefs.h
7205
7206fi
7207
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007208ac_fn_c_find_intX_t "$LINENO" "32" "ac_cv_c_int32_t"
7209case $ac_cv_c_int32_t in #(
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007210 no|yes) ;; #(
7211 *)
7212
7213cat >>confdefs.h <<_ACEOF
7214#define int32_t $ac_cv_c_int32_t
7215_ACEOF
7216;;
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007217esac
7218
Mark Dickinson17c50cd2012-12-02 13:13:56 +00007219
7220ac_fn_c_check_type "$LINENO" "int64_t" "ac_cv_type_int64_t" "$ac_includes_default"
7221if test "x$ac_cv_type_int64_t" = xyes; then :
7222
7223$as_echo "#define HAVE_INT64_T 1" >>confdefs.h
7224
7225fi
7226
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007227ac_fn_c_find_intX_t "$LINENO" "64" "ac_cv_c_int64_t"
7228case $ac_cv_c_int64_t in #(
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007229 no|yes) ;; #(
7230 *)
7231
7232cat >>confdefs.h <<_ACEOF
7233#define int64_t $ac_cv_c_int64_t
7234_ACEOF
7235;;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00007236esac
Martin v. Löwis18e16552006-02-15 17:27:45 +00007237
Mark Dickinson17c50cd2012-12-02 13:13:56 +00007238
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007239ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
Matthias Klose3cef2a92012-03-14 23:39:33 +01007240if test "x$ac_cv_type_ssize_t" = xyes; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00007241
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007242$as_echo "#define HAVE_SSIZE_T 1" >>confdefs.h
Martin v. Löwis18e16552006-02-15 17:27:45 +00007243
7244fi
7245
Jack Jansendd19cf82001-12-06 22:36:17 +00007246
Michael W. Hudson54241132001-12-07 15:38:26 +00007247# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00007248# ANSI C requires sizeof(char) == 1, so no need to check it
Martin v. Löwiseba40652007-08-30 20:10:57 +00007249# The cast to long int works around a bug in the HP C Compiler
7250# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7251# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7252# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007253{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
7254$as_echo_n "checking size of int... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007255if ${ac_cv_sizeof_int+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007256 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007257else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007258 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 +00007259
Martin v. Löwis11437992002-04-12 09:54:03 +00007260else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007261 if test "$ac_cv_type_int" = yes; then
7262 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7263$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007264as_fn_error 77 "cannot compute sizeof (int)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007265See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007266 else
7267 ac_cv_sizeof_int=0
7268 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007269fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007270
Martin v. Löwis11437992002-04-12 09:54:03 +00007271fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007272{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
7273$as_echo "$ac_cv_sizeof_int" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007274
7275
7276
Martin v. Löwis11437992002-04-12 09:54:03 +00007277cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007278#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00007279_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007280
7281
Martin v. Löwiseba40652007-08-30 20:10:57 +00007282# The cast to long int works around a bug in the HP C Compiler
7283# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7284# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7285# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007286{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
7287$as_echo_n "checking size of long... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007288if ${ac_cv_sizeof_long+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007289 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007290else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007291 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 +00007292
Martin v. Löwis11437992002-04-12 09:54:03 +00007293else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007294 if test "$ac_cv_type_long" = yes; then
7295 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7296$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007297as_fn_error 77 "cannot compute sizeof (long)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007298See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007299 else
7300 ac_cv_sizeof_long=0
7301 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007302fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007303
Martin v. Löwis11437992002-04-12 09:54:03 +00007304fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007305{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
7306$as_echo "$ac_cv_sizeof_long" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007307
7308
7309
Martin v. Löwis11437992002-04-12 09:54:03 +00007310cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007311#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00007312_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007313
7314
Martin v. Löwiseba40652007-08-30 20:10:57 +00007315# The cast to long int works around a bug in the HP C Compiler
7316# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7317# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7318# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007319{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
7320$as_echo_n "checking size of void *... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007321if ${ac_cv_sizeof_void_p+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007322 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007323else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007324 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 +00007325
Martin v. Löwis11437992002-04-12 09:54:03 +00007326else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007327 if test "$ac_cv_type_void_p" = yes; then
7328 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7329$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007330as_fn_error 77 "cannot compute sizeof (void *)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007331See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007332 else
7333 ac_cv_sizeof_void_p=0
7334 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007335fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007336
Martin v. Löwis11437992002-04-12 09:54:03 +00007337fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007338{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
7339$as_echo "$ac_cv_sizeof_void_p" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007340
7341
7342
Martin v. Löwis11437992002-04-12 09:54:03 +00007343cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00007344#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00007345_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00007346
7347
Martin v. Löwiseba40652007-08-30 20:10:57 +00007348# The cast to long int works around a bug in the HP C Compiler
7349# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7350# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7351# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007352{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
7353$as_echo_n "checking size of short... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007354if ${ac_cv_sizeof_short+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007355 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007356else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007357 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 +00007358
Martin v. Löwis11437992002-04-12 09:54:03 +00007359else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007360 if test "$ac_cv_type_short" = yes; then
7361 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7362$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007363as_fn_error 77 "cannot compute sizeof (short)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007364See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007365 else
7366 ac_cv_sizeof_short=0
7367 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007368fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007369
Martin v. Löwis11437992002-04-12 09:54:03 +00007370fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007371{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
7372$as_echo "$ac_cv_sizeof_short" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007373
7374
7375
Martin v. Löwis11437992002-04-12 09:54:03 +00007376cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007377#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00007378_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007379
7380
Martin v. Löwiseba40652007-08-30 20:10:57 +00007381# The cast to long int works around a bug in the HP C Compiler
7382# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7383# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7384# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007385{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of float" >&5
7386$as_echo_n "checking size of float... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007387if ${ac_cv_sizeof_float+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007388 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007389else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007390 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 +00007391
Martin v. Löwis11437992002-04-12 09:54:03 +00007392else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007393 if test "$ac_cv_type_float" = yes; then
7394 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7395$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007396as_fn_error 77 "cannot compute sizeof (float)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007397See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007398 else
7399 ac_cv_sizeof_float=0
7400 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007401fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007402
Martin v. Löwis11437992002-04-12 09:54:03 +00007403fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007404{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_float" >&5
7405$as_echo "$ac_cv_sizeof_float" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007406
7407
7408
Martin v. Löwis11437992002-04-12 09:54:03 +00007409cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007410#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00007411_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007412
7413
Martin v. Löwiseba40652007-08-30 20:10:57 +00007414# The cast to long int works around a bug in the HP C Compiler
7415# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7416# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7417# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007418{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of double" >&5
7419$as_echo_n "checking size of double... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007420if ${ac_cv_sizeof_double+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007421 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007422else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007423 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 +00007424
Martin v. Löwis11437992002-04-12 09:54:03 +00007425else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007426 if test "$ac_cv_type_double" = yes; then
7427 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7428$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007429as_fn_error 77 "cannot compute sizeof (double)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007430See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007431 else
7432 ac_cv_sizeof_double=0
7433 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007434fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007435
Martin v. Löwis11437992002-04-12 09:54:03 +00007436fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007437{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5
7438$as_echo "$ac_cv_sizeof_double" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007439
7440
7441
Martin v. Löwis11437992002-04-12 09:54:03 +00007442cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007443#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00007444_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007445
7446
Martin v. Löwiseba40652007-08-30 20:10:57 +00007447# The cast to long int works around a bug in the HP C Compiler
7448# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7449# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7450# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007451{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of fpos_t" >&5
7452$as_echo_n "checking size of fpos_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007453if ${ac_cv_sizeof_fpos_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007454 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007455else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007456 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 +00007457
Martin v. Löwis11437992002-04-12 09:54:03 +00007458else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007459 if test "$ac_cv_type_fpos_t" = yes; then
7460 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7461$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007462as_fn_error 77 "cannot compute sizeof (fpos_t)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007463See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007464 else
7465 ac_cv_sizeof_fpos_t=0
7466 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007467fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007468
Martin v. Löwis11437992002-04-12 09:54:03 +00007469fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007470{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_fpos_t" >&5
7471$as_echo "$ac_cv_sizeof_fpos_t" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007472
7473
7474
Martin v. Löwis11437992002-04-12 09:54:03 +00007475cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007476#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007477_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007478
Michael W. Hudson54241132001-12-07 15:38:26 +00007479
Martin v. Löwiseba40652007-08-30 20:10:57 +00007480# The cast to long int works around a bug in the HP C Compiler
7481# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7482# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7483# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007484{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
7485$as_echo_n "checking size of size_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007486if ${ac_cv_sizeof_size_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007487 $as_echo_n "(cached) " >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00007488else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007489 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 +00007490
Martin v. Löwis18e16552006-02-15 17:27:45 +00007491else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007492 if test "$ac_cv_type_size_t" = yes; then
7493 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7494$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007495as_fn_error 77 "cannot compute sizeof (size_t)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007496See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007497 else
7498 ac_cv_sizeof_size_t=0
7499 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +00007500fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007501
Martin v. Löwis18e16552006-02-15 17:27:45 +00007502fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007503{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
7504$as_echo "$ac_cv_sizeof_size_t" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007505
7506
7507
Martin v. Löwis18e16552006-02-15 17:27:45 +00007508cat >>confdefs.h <<_ACEOF
7509#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
7510_ACEOF
7511
7512
Christian Heimes951cc0f2008-01-31 23:08:23 +00007513# The cast to long int works around a bug in the HP C Compiler
7514# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7515# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7516# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007517{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pid_t" >&5
7518$as_echo_n "checking size of pid_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007519if ${ac_cv_sizeof_pid_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007520 $as_echo_n "(cached) " >&6
Christian Heimes951cc0f2008-01-31 23:08:23 +00007521else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007522 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 +00007523
Christian Heimes951cc0f2008-01-31 23:08:23 +00007524else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007525 if test "$ac_cv_type_pid_t" = yes; then
7526 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7527$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007528as_fn_error 77 "cannot compute sizeof (pid_t)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007529See \`config.log' for more details" "$LINENO" 5; }
Christian Heimes951cc0f2008-01-31 23:08:23 +00007530 else
7531 ac_cv_sizeof_pid_t=0
7532 fi
7533fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007534
Christian Heimes951cc0f2008-01-31 23:08:23 +00007535fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007536{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pid_t" >&5
7537$as_echo "$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes951cc0f2008-01-31 23:08:23 +00007538
7539
7540
7541cat >>confdefs.h <<_ACEOF
7542#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
7543_ACEOF
7544
7545
Michael W. Hudson54241132001-12-07 15:38:26 +00007546
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007547{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support" >&5
7548$as_echo_n "checking for long long support... " >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007549have_long_long=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007550cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007551/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007552
Martin v. Löwis11437992002-04-12 09:54:03 +00007553int
7554main ()
7555{
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007556long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007557 ;
7558 return 0;
7559}
7560_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007561if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007562
7563
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007564$as_echo "#define HAVE_LONG_LONG 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007565
Martin v. Löwisc45929e2002-04-06 10:10:49 +00007566 have_long_long=yes
7567
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007568fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007569rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007570{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_long" >&5
7571$as_echo "$have_long_long" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +00007572if test "$have_long_long" = yes ; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00007573# The cast to long int works around a bug in the HP C Compiler
7574# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7575# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7576# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007577{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
7578$as_echo_n "checking size of long long... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007579if ${ac_cv_sizeof_long_long+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007580 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007581else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007582 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 +00007583
Martin v. Löwis11437992002-04-12 09:54:03 +00007584else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007585 if test "$ac_cv_type_long_long" = yes; then
7586 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7587$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007588as_fn_error 77 "cannot compute sizeof (long long)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007589See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007590 else
7591 ac_cv_sizeof_long_long=0
7592 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007593fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007594
Martin v. Löwis11437992002-04-12 09:54:03 +00007595fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007596{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
7597$as_echo "$ac_cv_sizeof_long_long" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007598
7599
7600
Martin v. Löwis11437992002-04-12 09:54:03 +00007601cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007602#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +00007603_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007604
Michael W. Hudson54241132001-12-07 15:38:26 +00007605
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007606fi
7607
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007608{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support" >&5
7609$as_echo_n "checking for long double support... " >&6; }
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007610have_long_double=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007611cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007612/* end confdefs.h. */
7613
7614int
7615main ()
7616{
Matthias Klosec511b472010-05-08 11:01:39 +00007617long double x; x = (long double)0;
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007618 ;
7619 return 0;
7620}
7621_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007622if ac_fn_c_try_compile "$LINENO"; then :
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007623
7624
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007625$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007626
7627 have_long_double=yes
7628
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007629fi
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007630rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007631{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_double" >&5
7632$as_echo "$have_long_double" >&6; }
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007633if test "$have_long_double" = yes ; then
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007634# The cast to long int works around a bug in the HP C Compiler
7635# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7636# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7637# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007638{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long double" >&5
7639$as_echo_n "checking size of long double... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007640if ${ac_cv_sizeof_long_double+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007641 $as_echo_n "(cached) " >&6
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007642else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007643 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 +00007644
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007645else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007646 if test "$ac_cv_type_long_double" = yes; then
7647 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7648$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007649as_fn_error 77 "cannot compute sizeof (long double)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007650See \`config.log' for more details" "$LINENO" 5; }
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007651 else
7652 ac_cv_sizeof_long_double=0
7653 fi
7654fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007655
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007656fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007657{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double" >&5
7658$as_echo "$ac_cv_sizeof_long_double" >&6; }
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007659
7660
7661
7662cat >>confdefs.h <<_ACEOF
7663#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
7664_ACEOF
7665
7666
7667fi
7668
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007669{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _Bool support" >&5
7670$as_echo_n "checking for _Bool support... " >&6; }
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007671have_c99_bool=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007672cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007673/* end confdefs.h. */
7674
7675int
7676main ()
7677{
7678_Bool x; x = (_Bool)0;
7679 ;
7680 return 0;
7681}
7682_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007683if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007684
7685
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007686$as_echo "#define HAVE_C99_BOOL 1" >>confdefs.h
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007687
7688 have_c99_bool=yes
7689
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007690fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007691rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007692{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_c99_bool" >&5
7693$as_echo "$have_c99_bool" >&6; }
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007694if test "$have_c99_bool" = yes ; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00007695# The cast to long int works around a bug in the HP C Compiler
7696# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7697# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7698# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007699{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of _Bool" >&5
7700$as_echo_n "checking size of _Bool... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007701if ${ac_cv_sizeof__Bool+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007702 $as_echo_n "(cached) " >&6
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007703else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007704 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 +00007705
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007706else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007707 if test "$ac_cv_type__Bool" = yes; then
7708 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7709$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007710as_fn_error 77 "cannot compute sizeof (_Bool)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007711See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007712 else
7713 ac_cv_sizeof__Bool=0
7714 fi
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007715fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007716
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007717fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007718{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof__Bool" >&5
7719$as_echo "$ac_cv_sizeof__Bool" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007720
7721
7722
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007723cat >>confdefs.h <<_ACEOF
7724#define SIZEOF__BOOL $ac_cv_sizeof__Bool
7725_ACEOF
7726
7727
7728fi
7729
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007730ac_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 +00007731 #include <stdint.h>
7732 #endif
Antoine Pitrou7be5a652010-10-10 08:14:41 +00007733 #ifdef HAVE_INTTYPES_H
7734 #include <inttypes.h>
7735 #endif
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007736"
Matthias Klose3cef2a92012-03-14 23:39:33 +01007737if test "x$ac_cv_type_uintptr_t" = xyes; then :
Martin v. Löwisebe26702006-10-02 14:55:51 +00007738
7739cat >>confdefs.h <<_ACEOF
7740#define HAVE_UINTPTR_T 1
7741_ACEOF
7742
Martin v. Löwiseba40652007-08-30 20:10:57 +00007743# The cast to long int works around a bug in the HP C Compiler
7744# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7745# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7746# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007747{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of uintptr_t" >&5
7748$as_echo_n "checking size of uintptr_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007749if ${ac_cv_sizeof_uintptr_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007750 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007751else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007752 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 +00007753
Martin v. Löwis11437992002-04-12 09:54:03 +00007754else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007755 if test "$ac_cv_type_uintptr_t" = yes; then
7756 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7757$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007758as_fn_error 77 "cannot compute sizeof (uintptr_t)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007759See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007760 else
7761 ac_cv_sizeof_uintptr_t=0
7762 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007763fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007764
Martin v. Löwis11437992002-04-12 09:54:03 +00007765fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007766{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uintptr_t" >&5
7767$as_echo "$ac_cv_sizeof_uintptr_t" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007768
7769
7770
Martin v. Löwis11437992002-04-12 09:54:03 +00007771cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007772#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007773_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007774
Michael W. Hudson54241132001-12-07 15:38:26 +00007775
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007776fi
7777
Martin v. Löwisebe26702006-10-02 14:55:51 +00007778
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007779# The cast to long int works around a bug in the HP C Compiler
7780# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7781# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7782# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007783{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
7784$as_echo_n "checking size of off_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007785if ${ac_cv_sizeof_off_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007786 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007787else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007788 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007789#ifdef HAVE_SYS_TYPES_H
7790#include <sys/types.h>
7791#endif
7792
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007793"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007794
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007795else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007796 if test "$ac_cv_type_off_t" = yes; then
7797 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7798$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007799as_fn_error 77 "cannot compute sizeof (off_t)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007800See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007801 else
7802 ac_cv_sizeof_off_t=0
7803 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007804fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007805
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007806fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007807{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
7808$as_echo "$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007809
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007810
7811
Martin v. Löwis11437992002-04-12 09:54:03 +00007812cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007813#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007814_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007815
Michael W. Hudson54241132001-12-07 15:38:26 +00007816
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007817
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007818{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable large file support" >&5
7819$as_echo_n "checking whether to enable large file support... " >&6; }
Mark Dickinson0ef0b912009-12-31 21:11:48 +00007820if test "$have_long_long" = yes
7821then
7822if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +00007823 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007824
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007825$as_echo "#define HAVE_LARGEFILE_SUPPORT 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007826
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007827 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7828$as_echo "yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007829else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007830 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7831$as_echo "no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007832fi
Mark Dickinson0ef0b912009-12-31 21:11:48 +00007833else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007834 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7835$as_echo "no" >&6; }
Mark Dickinson0ef0b912009-12-31 21:11:48 +00007836fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007837
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007838# The cast to long int works around a bug in the HP C Compiler
7839# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7840# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7841# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007842{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
7843$as_echo_n "checking size of time_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007844if ${ac_cv_sizeof_time_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007845 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007846else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007847 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007848#ifdef HAVE_SYS_TYPES_H
7849#include <sys/types.h>
7850#endif
7851#ifdef HAVE_TIME_H
7852#include <time.h>
7853#endif
7854
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007855"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007856
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007857else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007858 if test "$ac_cv_type_time_t" = yes; then
7859 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7860$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007861as_fn_error 77 "cannot compute sizeof (time_t)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007862See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007863 else
7864 ac_cv_sizeof_time_t=0
7865 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007866fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007867
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007868fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007869{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
7870$as_echo "$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007871
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007872
7873
Martin v. Löwis11437992002-04-12 09:54:03 +00007874cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007875#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007876_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007877
Michael W. Hudson54241132001-12-07 15:38:26 +00007878
7879
Trent Mick635f6fb2000-08-23 21:33:05 +00007880# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00007881ac_save_cc="$CC"
7882if test "$ac_cv_kpthread" = "yes"
7883then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00007884elif test "$ac_cv_kthread" = "yes"
7885then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00007886elif test "$ac_cv_pthread" = "yes"
7887then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00007888fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007889{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_t" >&5
7890$as_echo_n "checking for pthread_t... " >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00007891have_pthread_t=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007892cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007893/* end confdefs.h. */
Matthias Klosec511b472010-05-08 11:01:39 +00007894
7895 #include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007896int
7897main ()
7898{
Guido van Rossum12580492000-09-24 16:47:19 +00007899pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007900 ;
7901 return 0;
7902}
Matthias Klosec511b472010-05-08 11:01:39 +00007903
Martin v. Löwis11437992002-04-12 09:54:03 +00007904_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007905if ac_fn_c_try_compile "$LINENO"; then :
Trent Mick635f6fb2000-08-23 21:33:05 +00007906 have_pthread_t=yes
Trent Mick635f6fb2000-08-23 21:33:05 +00007907fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007908rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007909{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_pthread_t" >&5
7910$as_echo "$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00007911if test "$have_pthread_t" = yes ; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007912 # The cast to long int works around a bug in the HP C Compiler
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007913# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7914# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7915# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007916{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
7917$as_echo_n "checking size of pthread_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007918if ${ac_cv_sizeof_pthread_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007919 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007920else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007921 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t" "
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007922#ifdef HAVE_PTHREAD_H
7923#include <pthread.h>
7924#endif
7925
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007926"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007927
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007928else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007929 if test "$ac_cv_type_pthread_t" = yes; then
7930 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7931$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007932as_fn_error 77 "cannot compute sizeof (pthread_t)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007933See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007934 else
7935 ac_cv_sizeof_pthread_t=0
7936 fi
Trent Mick635f6fb2000-08-23 21:33:05 +00007937fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007938
Trent Mick635f6fb2000-08-23 21:33:05 +00007939fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007940{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
7941$as_echo "$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007942
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007943
7944
Martin v. Löwis11437992002-04-12 09:54:03 +00007945cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00007946#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007947_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00007948
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007949
Trent Mick635f6fb2000-08-23 21:33:05 +00007950fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00007951CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00007952
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007953{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-toolbox-glue" >&5
7954$as_echo_n "checking for --enable-toolbox-glue... " >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007955# Check whether --enable-toolbox-glue was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007956if test "${enable_toolbox_glue+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00007957 enableval=$enable_toolbox_glue;
7958fi
Jack Jansene578a632001-08-15 01:27:14 +00007959
7960
7961if test -z "$enable_toolbox_glue"
Martin v. Löwis11437992002-04-12 09:54:03 +00007962then
Jack Jansene578a632001-08-15 01:27:14 +00007963 case $ac_sys_system/$ac_sys_release in
7964 Darwin/*)
7965 enable_toolbox_glue="yes";;
7966 *)
7967 enable_toolbox_glue="no";;
7968 esac
7969fi
7970case "$enable_toolbox_glue" in
7971yes)
Jack Jansene578a632001-08-15 01:27:14 +00007972 extra_machdep_objs="Python/mactoolboxglue.o"
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00007973 extra_undefs="-u _PyMac_Error"
Martin v. Löwis11437992002-04-12 09:54:03 +00007974
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007975$as_echo "#define USE_TOOLBOX_OBJECT_GLUE 1" >>confdefs.h
Jack Jansene578a632001-08-15 01:27:14 +00007976
7977 ;;
7978*)
Jack Jansene578a632001-08-15 01:27:14 +00007979 extra_machdep_objs=""
Jack Jansen591cbed2001-08-15 13:55:15 +00007980 extra_undefs=""
Jack Jansene578a632001-08-15 01:27:14 +00007981 ;;
7982esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007983{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_toolbox_glue" >&5
7984$as_echo "$enable_toolbox_glue" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00007985
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007986
Ronald Oussoren0d236eb2008-06-06 21:31:33 +00007987
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007988case $ac_sys_system/$ac_sys_release in
Anthony Baxter82201742006-04-09 15:07:40 +00007989 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +00007990 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
7991 ;;
7992 Darwin/*)
7993 OTHER_LIBTOOL_OPT=""
7994 ;;
7995esac
7996
7997
Ronald Oussoren25967582009-09-06 10:00:26 +00007998
Bob Ippolito7026a0a2005-03-28 23:23:47 +00007999case $ac_sys_system/$ac_sys_release in
Anthony Baxter82201742006-04-09 15:07:40 +00008000 Darwin/[01567]\..*)
Ronald Oussoren988117f2006-04-29 11:31:35 +00008001 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
8002 if test "${enable_universalsdk}"; then
8003 :
8004 else
Ronald Oussorenbc0e83c2010-02-11 13:26:54 +00008005 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Ronald Oussoren988117f2006-04-29 11:31:35 +00008006 fi
Jack Jansenb36687a2004-07-16 08:43:47 +00008007 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00008008 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00008009 Darwin/*)
Ronald Oussorena55af9a2010-01-17 16:25:57 +00008010 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008011 if test ${gcc_version} '<' 4.0
8012 then
8013 LIBTOOL_CRUFT="-lcc_dynamic"
8014 else
8015 LIBTOOL_CRUFT=""
8016 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008017 if test "$cross_compiling" = yes; then :
Ronald Oussoren23d92532009-09-07 06:12:00 +00008018 ac_osx_32bit=yes
Ronald Oussoren25967582009-09-06 10:00:26 +00008019else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008020 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren25967582009-09-06 10:00:26 +00008021/* end confdefs.h. */
Ronald Oussoren23d92532009-09-07 06:12:00 +00008022
Ronald Oussoren25967582009-09-06 10:00:26 +00008023 #include <unistd.h>
8024 int main(int argc, char*argv[])
8025 {
8026 if (sizeof(long) == 4) {
8027 return 0;
8028 } else {
8029 return 1;
8030 }
Ronald Oussoren84ddd722009-09-08 07:17:10 +00008031 }
Ronald Oussoren23d92532009-09-07 06:12:00 +00008032
Ronald Oussoren25967582009-09-06 10:00:26 +00008033_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008034if ac_fn_c_try_run "$LINENO"; then :
Ronald Oussoren25967582009-09-06 10:00:26 +00008035 ac_osx_32bit=yes
8036else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008037 ac_osx_32bit=no
Ronald Oussoren25967582009-09-06 10:00:26 +00008038fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008039rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8040 conftest.$ac_objext conftest.beam conftest.$ac_ext
Ronald Oussoren25967582009-09-06 10:00:26 +00008041fi
8042
8043
Ronald Oussoren25967582009-09-06 10:00:26 +00008044 if test "${ac_osx_32bit}" = "yes"; then
Ronald Oussorenbc0e83c2010-02-11 13:26:54 +00008045 case `/usr/bin/arch` in
Ronald Oussoren25967582009-09-06 10:00:26 +00008046 i386)
8047 MACOSX_DEFAULT_ARCH="i386"
8048 ;;
8049 ppc)
8050 MACOSX_DEFAULT_ARCH="ppc"
8051 ;;
8052 *)
Georg Brandl71f4fbb2011-02-25 11:04:50 +00008053 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren25967582009-09-06 10:00:26 +00008054 ;;
8055 esac
8056 else
Ronald Oussorenbc0e83c2010-02-11 13:26:54 +00008057 case `/usr/bin/arch` in
Ronald Oussoren25967582009-09-06 10:00:26 +00008058 i386)
8059 MACOSX_DEFAULT_ARCH="x86_64"
8060 ;;
8061 ppc)
8062 MACOSX_DEFAULT_ARCH="ppc64"
8063 ;;
8064 *)
Georg Brandl71f4fbb2011-02-25 11:04:50 +00008065 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren25967582009-09-06 10:00:26 +00008066 ;;
8067 esac
8068
8069 #ARCH_RUN_32BIT="true"
8070 fi
8071
8072 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +00008073 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00008074 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008075esac
8076
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008077{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-framework" >&5
8078$as_echo_n "checking for --enable-framework... " >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00008079if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008080then
Skip Montanarodecc6a42003-01-01 20:07:49 +00008081 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00008082 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00008083 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008084
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008085$as_echo "#define WITH_NEXT_FRAMEWORK 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008086
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008087 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8088$as_echo "yes" >&6; }
Ronald Oussoren450d5612009-06-08 21:12:41 +00008089 if test $enable_shared = "yes"
8090 then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00008091 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 +00008092 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008093else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008094 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8095$as_echo "no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008096fi
8097
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008098{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dyld" >&5
8099$as_echo_n "checking for dyld... " >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008100case $ac_sys_system/$ac_sys_release in
8101 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008102
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008103$as_echo "#define WITH_DYLD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008104
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008105 { $as_echo "$as_me:${as_lineno-$LINENO}: result: always on for Darwin" >&5
8106$as_echo "always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008107 ;;
8108 *)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008109 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8110$as_echo "no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00008111 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008112esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008113
Guido van Rossum0a516c91994-09-12 10:58:40 +00008114# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00008115
Michael W. Hudson54241132001-12-07 15:38:26 +00008116
8117
8118
8119
Ronald Oussoren75912852010-04-08 08:13:31 +00008120
Guido van Rossum0a516c91994-09-12 10:58:40 +00008121# SO is the extension of shared libraries `(including the dot!)
Guido van Rossumaef734b2001-01-10 21:09:12 +00008122# -- usually .so, .sl on HP-UX, .dll on Cygwin
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008123{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SO" >&5
8124$as_echo_n "checking SO... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008125if test -z "$SO"
8126then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008127 case $ac_sys_system in
Neal Norwitz58e28882006-05-19 07:00:58 +00008128 hp*|HP*)
8129 case `uname -m` in
8130 ia64) SO=.so;;
8131 *) SO=.sl;;
8132 esac
8133 ;;
Guido van Rossumaef734b2001-01-10 21:09:12 +00008134 CYGWIN*) SO=.dll;;
Guido van Rossum563e7081996-09-10 18:20:48 +00008135 *) SO=.so;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008136 esac
Martin v. Löwis368de8f2003-06-14 14:46:38 +00008137else
8138 # this might also be a termcap variable, see #610332
8139 echo
8140 echo '====================================================================='
8141 echo '+ +'
8142 echo '+ WARNING: You have set SO in your environment. +'
8143 echo '+ Do you really mean to change the extension for shared libraries? +'
8144 echo '+ Continuing in 10 seconds to let you to ponder. +'
8145 echo '+ +'
8146 echo '====================================================================='
8147 sleep 10
Guido van Rossum0a516c91994-09-12 10:58:40 +00008148fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008149{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SO" >&5
8150$as_echo "$SO" >&6; }
Neal Norwitz58e28882006-05-19 07:00:58 +00008151
Ronald Oussoren79f90492009-01-02 10:44:46 +00008152
Neal Norwitz58e28882006-05-19 07:00:58 +00008153cat >>confdefs.h <<_ACEOF
8154#define SHLIB_EXT "$SO"
8155_ACEOF
8156
Guido van Rossum0a516c91994-09-12 10:58:40 +00008157# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +00008158# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008159# (Shared libraries in this instance are shared modules to be loaded into
8160# Python, as opposed to building Python itself as a shared library.)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008161{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDSHARED" >&5
8162$as_echo_n "checking LDSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008163if test -z "$LDSHARED"
8164then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008165 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008166 AIX*)
Georg Brandl71f4fbb2011-02-25 11:04:50 +00008167 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:\$(srcdir)/Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +00008168 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008169 ;;
8170 BeOS*)
8171 BLDSHARED="\$(srcdir)/Modules/ld_so_beos $LDLIBRARY"
Guido van Rossumce608b02001-09-28 15:59:38 +00008172 LDSHARED="\$(BINLIBDEST)/config/ld_so_beos \$(LIBDIR)/$LDLIBRARY"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008173 ;;
Guido van Rossum07397971997-04-29 21:49:50 +00008174 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00008175 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +00008176 SunOS/5*)
Ronald Oussoren75912852010-04-08 08:13:31 +00008177 if test "$GCC" = "yes" ; then
8178 LDSHARED='$(CC) -shared'
8179 LDCXXSHARED='$(CXX) -shared'
8180 else
8181 LDSHARED='$(CC) -G'
8182 LDCXXSHARED='$(CXX) -G'
Greg Ward57c9a662000-05-26 12:22:54 +00008183 fi ;;
Thomas Hellerdc96a772008-04-04 10:07:55 +00008184 hp*|HP*)
Ronald Oussoren75912852010-04-08 08:13:31 +00008185 if test "$GCC" = "yes" ; then
8186 LDSHARED='$(CC) -shared'
8187 LDCXXSHARED='$(CXX) -shared'
8188 else
8189 LDSHARED='ld -b'
Thomas Hellerdc96a772008-04-04 10:07:55 +00008190 fi ;;
Guido van Rossumda88dad1995-01-26 00:46:29 +00008191 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
Jack Jansen418c3b12001-11-14 10:59:57 +00008192 Darwin/1.3*)
Stefan Krah3a3e2032010-11-28 15:30:05 +00008193 LDSHARED='$(CC) -bundle'
8194 LDCXXSHARED='$(CXX) -bundle'
Jack Jansena3891ea2001-09-07 14:25:12 +00008195 if test "$enable_framework" ; then
8196 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00008197 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
8198 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Ronald Oussoren75912852010-04-08 08:13:31 +00008199 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00008200 else
8201 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00008202 LDSHARED="$LDSHARED -undefined suppress"
Ronald Oussoren75912852010-04-08 08:13:31 +00008203 LDCXXSHARED="$LDCXXSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00008204 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00008205 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Stefan Krah3a3e2032010-11-28 15:30:05 +00008206 LDSHARED='$(CC) -bundle'
8207 LDCXXSHARED='$(CXX) -bundle'
Jack Jansene578a632001-08-15 01:27:14 +00008208 if test "$enable_framework" ; then
8209 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00008210 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
8211 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Ronald Oussoren75912852010-04-08 08:13:31 +00008212 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00008213 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00008214 # No framework, use the Python app as bundle-loader
8215 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00008216 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Ronald Oussoren75912852010-04-08 08:13:31 +00008217 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008218 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00008219 Darwin/*)
8220 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
8221 # This allows an extension to be used in any Python
Ronald Oussoren38f1b982007-09-02 09:46:07 +00008222
Ned Deilyc40b9032014-06-25 13:48:46 -07008223 dep_target_major=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
8224 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
8225 dep_target_minor=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
8226 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
8227 if test ${dep_target_major} -eq 10 && \
8228 test ${dep_target_minor} -le 2
Jack Jansen6b08a402004-06-03 12:41:45 +00008229 then
Ned Deilyc40b9032014-06-25 13:48:46 -07008230 # building for OS X 10.0 through 10.2
Stefan Krah3a3e2032010-11-28 15:30:05 +00008231 LDSHARED='$(CC) -bundle'
8232 LDCXXSHARED='$(CXX) -bundle'
Jack Jansen6b08a402004-06-03 12:41:45 +00008233 if test "$enable_framework" ; then
8234 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00008235 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
8236 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Ronald Oussoren75912852010-04-08 08:13:31 +00008237 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +00008238 else
8239 # No framework, use the Python app as bundle-loader
8240 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
8241 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Ronald Oussoren75912852010-04-08 08:13:31 +00008242 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Jack Jansen6b08a402004-06-03 12:41:45 +00008243 fi
Ned Deilyc40b9032014-06-25 13:48:46 -07008244 else
8245 # building for OS X 10.3 and later
8246 if test "${enable_universalsdk}"; then
8247 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
8248 fi
8249 LDSHARED='$(CC) -bundle -undefined dynamic_lookup'
8250 LDCXXSHARED='$(CXX) -bundle -undefined dynamic_lookup'
8251 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +00008252 fi
8253 ;;
Ronald Oussoren75912852010-04-08 08:13:31 +00008254 Linux*|GNU*|QNX*)
8255 LDSHARED='$(CC) -shared'
8256 LDCXXSHARED='$(CXX) -shared';;
8257 BSD/OS*/4*)
8258 LDSHARED="gcc -shared"
8259 LDCXXSHARED="g++ -shared";;
Martin v. Löwis222c5152006-06-03 07:37:13 +00008260 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00008261 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00008262 then
Stefan Krah3a3e2032010-11-28 15:30:05 +00008263 LDSHARED='$(CC) -shared'
8264 LDCXXSHARED='$(CXX) -shared'
Guido van Rossum0286ae82000-08-29 15:06:49 +00008265 else
Stefan Krah3a3e2032010-11-28 15:30:05 +00008266 LDSHARED="ld -Bshareable"
Guido van Rossum0286ae82000-08-29 15:06:49 +00008267 fi;;
Martin v. Löwis222c5152006-06-03 07:37:13 +00008268 OpenBSD*)
8269 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
8270 then
Stefan Krah3a3e2032010-11-28 15:30:05 +00008271 LDSHARED='$(CC) -shared $(CCSHARED)'
8272 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Martin v. Löwis222c5152006-06-03 07:37:13 +00008273 else
8274 case `uname -r` in
8275 [01].* | 2.[0-7] | 2.[0-7].*)
8276 LDSHARED="ld -Bshareable ${LDFLAGS}"
8277 ;;
8278 *)
Stefan Krah3a3e2032010-11-28 15:30:05 +00008279 LDSHARED='$(CC) -shared $(CCSHARED)'
8280 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Martin v. Löwis222c5152006-06-03 07:37:13 +00008281 ;;
8282 esac
8283 fi;;
Ronald Oussoren75912852010-04-08 08:13:31 +00008284 NetBSD*|DragonFly*)
Antoine Pitroucb402772011-01-02 20:51:34 +00008285 LDSHARED='$(CC) -shared'
8286 LDCXXSHARED='$(CXX) -shared';;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00008287 OpenUNIX*|UnixWare*)
Ronald Oussoren75912852010-04-08 08:13:31 +00008288 if test "$GCC" = "yes" ; then
8289 LDSHARED='$(CC) -shared'
8290 LDCXXSHARED='$(CXX) -shared'
8291 else
8292 LDSHARED='$(CC) -G'
8293 LDCXXSHARED='$(CXX) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00008294 fi;;
Ronald Oussoren75912852010-04-08 08:13:31 +00008295 SCO_SV*)
8296 LDSHARED='$(CC) -Wl,-G,-Bexport'
8297 LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
8298 CYGWIN*)
8299 LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
8300 LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
8301 atheos*)
8302 LDSHARED="gcc -shared"
8303 LDCXXSHARED="g++ -shared";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008304 *) LDSHARED="ld";;
8305 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008306fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008307{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDSHARED" >&5
8308$as_echo "$LDSHARED" >&6; }
Ronald Oussoren75912852010-04-08 08:13:31 +00008309LDCXXSHARED=${LDCXXSHARED-$LDSHARED}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008310BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00008311# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008312# library (module) -- this is only needed for a few systems
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008313{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CCSHARED" >&5
8314$as_echo_n "checking CCSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008315if test -z "$CCSHARED"
8316then
Guido van Rossum07397971997-04-29 21:49:50 +00008317 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00008318 SunOS*) if test "$GCC" = yes;
Martin v. Löwiseb623572007-03-12 10:50:39 +00008319 then CCSHARED="-fPIC";
8320 elif test `uname -p` = sparc;
8321 then CCSHARED="-xcode=pic32";
8322 else CCSHARED="-Kpic";
8323 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00008324 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00008325 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00008326 else CCSHARED="+z";
8327 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008328 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00008329 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00008330 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00008331 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00008332 if test "$GCC" = "yes"
8333 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008334 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00008335 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00008336 SCO_SV*)
8337 if test "$GCC" = "yes"
8338 then CCSHARED="-fPIC"
8339 else CCSHARED="-Kpic -belf"
8340 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008341 IRIX*/6*) case $CC in
8342 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00008343 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008344 esac;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008345 atheos*) CCSHARED="-fPIC";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008346 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008347fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008348{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCSHARED" >&5
8349$as_echo "$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008350# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008351# the python executable -- this is only needed for a few systems
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008352{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKFORSHARED" >&5
8353$as_echo_n "checking LINKFORSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008354if test -z "$LINKFORSHARED"
8355then
Guido van Rossum07397971997-04-29 21:49:50 +00008356 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008357 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008358 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00008359 LINKFORSHARED="-Wl,-E -Wl,+s";;
8360# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00008361 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008362 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008363 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00008364 Darwin/*)
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00008365 # -u _PyMac_Error is needed to pull in the mac toolbox glue,
8366 # which is
Jack Jansene578a632001-08-15 01:27:14 +00008367 # not used by the core itself but which needs to be in the core so
8368 # that dynamically loaded extension modules have access to it.
Jack Jansen97e3f002003-02-23 22:59:01 +00008369 # -prebind is no longer used, because it actually seems to give a
8370 # slowdown in stead of a speedup, maybe due to the large number of
8371 # dynamic loads Python does.
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00008372
8373 LINKFORSHARED="$extra_undefs"
Jack Jansene578a632001-08-15 01:27:14 +00008374 if test "$enable_framework"
8375 then
Jack Jansenda49e192005-01-07 13:08:22 +00008376 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00008377 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00008378 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00008379 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00008380 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00008381 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00008382 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +00008383 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
8384 then
8385 LINKFORSHARED="-Wl,--export-dynamic"
8386 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008387 SunOS/5*) case $CC in
8388 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00008389 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00008390 then
8391 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008392 fi;;
8393 esac;;
Jason Tishler30765592003-09-04 11:04:06 +00008394 CYGWIN*)
8395 if test $enable_shared = "no"
8396 then
8397 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
8398 fi;;
Martin v. Löwis8c255e42008-05-23 15:06:50 +00008399 QNX*)
8400 # -Wl,-E causes the symbols to be added to the dynamic
8401 # symbol table so that they can be found when a module
8402 # is loaded. -N 2048K causes the stack size to be set
8403 # to 2048 kilobytes so that the stack doesn't overflow
8404 # when running test_compile.py.
8405 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008406 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008407fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008408{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKFORSHARED" >&5
8409$as_echo "$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008410
Michael W. Hudson54241132001-12-07 15:38:26 +00008411
Ronald Oussoren0d236eb2008-06-06 21:31:33 +00008412
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008413{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAGSFORSHARED" >&5
8414$as_echo_n "checking CFLAGSFORSHARED... " >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00008415if test ! "$LIBRARY" = "$LDLIBRARY"
8416then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00008417 case $ac_sys_system in
8418 CYGWIN*)
8419 # Cygwin needs CCSHARED when building extension DLLs
8420 # but not when building the interpreter DLL.
8421 CFLAGSFORSHARED='';;
8422 *)
8423 CFLAGSFORSHARED='$(CCSHARED)'
8424 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00008425fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008426{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CFLAGSFORSHARED" >&5
8427$as_echo "$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00008428
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008429# SHLIBS are libraries (except -lc and -lm) to link to the python shared
8430# library (with --enable-shared).
8431# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00008432# symbols, this must be set to $(LIBS) (expanded by make). We do this even
8433# if it is not required, since it creates a dependency of the shared library
8434# to LIBS. This, in turn, means that applications linking the shared libpython
8435# don't need to link LIBS explicitly. The default should be only changed
8436# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008437
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008438{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SHLIBS" >&5
8439$as_echo_n "checking SHLIBS... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008440case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008441 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00008442 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008443esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008444{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIBS" >&5
8445$as_echo "$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008446
8447
Guido van Rossum627b2d71993-12-24 10:39:16 +00008448# checks for libraries
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008449{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
8450$as_echo_n "checking for dlopen in -ldl... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008451if ${ac_cv_lib_dl_dlopen+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008452 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008453else
Martin v. Löwis11437992002-04-12 09:54:03 +00008454 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008455LIBS="-ldl $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008456cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008457/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008458
Martin v. Löwiseba40652007-08-30 20:10:57 +00008459/* Override any GCC internal prototype to avoid an error.
8460 Use char because int might match the return type of a GCC
8461 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008462#ifdef __cplusplus
8463extern "C"
8464#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008465char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008466int
8467main ()
8468{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008469return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008470 ;
8471 return 0;
8472}
8473_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008474if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008475 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008476else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008477 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008478fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008479rm -f core conftest.err conftest.$ac_objext \
8480 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008481LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00008482fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008483{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
8484$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008485if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008486 cat >>confdefs.h <<_ACEOF
8487#define HAVE_LIBDL 1
8488_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00008489
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008490 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00008491
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008492fi
8493 # Dynamic linking for SunOS/Solaris and SYSV
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008494{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
8495$as_echo_n "checking for shl_load in -ldld... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008496if ${ac_cv_lib_dld_shl_load+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008497 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008498else
Martin v. Löwis11437992002-04-12 09:54:03 +00008499 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008500LIBS="-ldld $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008501cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008502/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008503
Martin v. Löwiseba40652007-08-30 20:10:57 +00008504/* Override any GCC internal prototype to avoid an error.
8505 Use char because int might match the return type of a GCC
8506 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008507#ifdef __cplusplus
8508extern "C"
8509#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008510char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008511int
8512main ()
8513{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008514return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008515 ;
8516 return 0;
8517}
8518_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008519if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008520 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008521else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008522 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008523fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008524rm -f core conftest.err conftest.$ac_objext \
8525 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008526LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00008527fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008528{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
8529$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008530if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008531 cat >>confdefs.h <<_ACEOF
8532#define HAVE_LIBDLD 1
8533_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00008534
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008535 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008536
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008537fi
8538 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +00008539
Ronald Oussoren79f90492009-01-02 10:44:46 +00008540# only check for sem_init if thread support is requested
Martin v. Löwis519adae2003-09-20 10:47:47 +00008541if test "$with_threads" = "yes" -o -z "$with_threads"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008542 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
8543$as_echo_n "checking for library containing sem_init... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008544if ${ac_cv_search_sem_init+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008545 $as_echo_n "(cached) " >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00008546else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00008547 ac_func_search_save_LIBS=$LIBS
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008548cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008549/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008550
Martin v. Löwiseba40652007-08-30 20:10:57 +00008551/* Override any GCC internal prototype to avoid an error.
8552 Use char because int might match the return type of a GCC
8553 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008554#ifdef __cplusplus
8555extern "C"
8556#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008557char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008558int
8559main ()
8560{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008561return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008562 ;
8563 return 0;
8564}
8565_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00008566for ac_lib in '' pthread rt posix4; do
8567 if test -z "$ac_lib"; then
8568 ac_res="none required"
8569 else
8570 ac_res=-l$ac_lib
Skip Montanaro89e975f2007-08-22 19:05:21 +00008571 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Martin v. Löwiseba40652007-08-30 20:10:57 +00008572 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008573 if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00008574 ac_cv_search_sem_init=$ac_res
Brett Cannon19fab762007-06-02 03:02:29 +00008575fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008576rm -f core conftest.err conftest.$ac_objext \
8577 conftest$ac_exeext
Matthias Klose3cef2a92012-03-14 23:39:33 +01008578 if ${ac_cv_search_sem_init+:} false; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00008579 break
Skip Montanaro89e975f2007-08-22 19:05:21 +00008580fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008581done
Matthias Klose3cef2a92012-03-14 23:39:33 +01008582if ${ac_cv_search_sem_init+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008583
Martin v. Löwiseba40652007-08-30 20:10:57 +00008584else
8585 ac_cv_search_sem_init=no
8586fi
8587rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00008588LIBS=$ac_func_search_save_LIBS
8589fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008590{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
8591$as_echo "$ac_cv_search_sem_init" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008592ac_res=$ac_cv_search_sem_init
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008593if test "$ac_res" != no; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00008594 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00008595
Martin v. Löwis41933dd2002-03-21 15:10:58 +00008596fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +00008597 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +00008598 # posix4 on Solaris 2.6
8599 # pthread (first!) on Linux
8600fi
8601
Martin v. Löwis19d17342003-06-14 21:03:05 +00008602# check if we need libintl for locale functions
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008603{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for textdomain in -lintl" >&5
8604$as_echo_n "checking for textdomain in -lintl... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008605if ${ac_cv_lib_intl_textdomain+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008606 $as_echo_n "(cached) " >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +00008607else
8608 ac_check_lib_save_LIBS=$LIBS
8609LIBS="-lintl $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008610cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008611/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00008612
Martin v. Löwiseba40652007-08-30 20:10:57 +00008613/* Override any GCC internal prototype to avoid an error.
8614 Use char because int might match the return type of a GCC
8615 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00008616#ifdef __cplusplus
8617extern "C"
8618#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +00008619char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00008620int
8621main ()
8622{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008623return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00008624 ;
8625 return 0;
8626}
8627_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008628if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00008629 ac_cv_lib_intl_textdomain=yes
8630else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008631 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +00008632fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008633rm -f core conftest.err conftest.$ac_objext \
8634 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +00008635LIBS=$ac_check_lib_save_LIBS
8636fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008637{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_textdomain" >&5
8638$as_echo "$ac_cv_lib_intl_textdomain" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008639if test "x$ac_cv_lib_intl_textdomain" = xyes; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00008640
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008641$as_echo "#define WITH_LIBINTL 1" >>confdefs.h
Martin v. Löwis19d17342003-06-14 21:03:05 +00008642
8643fi
8644
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008645
8646# checks for system dependent C++ extensions support
8647case "$ac_sys_system" in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008648 AIX*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for genuine AIX C++ extensions support" >&5
8649$as_echo_n "checking for genuine AIX C++ extensions support... " >&6; }
8650 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008651/* end confdefs.h. */
Matthias Klosec511b472010-05-08 11:01:39 +00008652
Georg Brandl94800df2011-02-25 11:09:02 +00008653 #include <load.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008654int
8655main ()
8656{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008657loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00008658 ;
8659 return 0;
8660}
Matthias Klosec511b472010-05-08 11:01:39 +00008661
Martin v. Löwis11437992002-04-12 09:54:03 +00008662_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008663if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008664
Matthias Klosec511b472010-05-08 11:01:39 +00008665
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008666$as_echo "#define AIX_GENUINE_CPLUSPLUS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008667
Matthias Klosec511b472010-05-08 11:01:39 +00008668 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008669$as_echo "yes" >&6; }
Matthias Klosec511b472010-05-08 11:01:39 +00008670
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008671else
Matthias Klosec511b472010-05-08 11:01:39 +00008672
8673 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008674$as_echo "no" >&6; }
Matthias Klosec511b472010-05-08 11:01:39 +00008675
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008676fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008677rm -f core conftest.err conftest.$ac_objext \
8678 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008679 *) ;;
8680esac
8681
Guido van Rossum70c7f481998-03-26 18:44:10 +00008682# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008683# BeOS' sockets are stashed in libnet.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008684{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_open in -lnsl" >&5
8685$as_echo_n "checking for t_open in -lnsl... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008686if ${ac_cv_lib_nsl_t_open+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008687 $as_echo_n "(cached) " >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008688else
Martin v. Löwis11437992002-04-12 09:54:03 +00008689 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008690LIBS="-lnsl $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008691cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008692/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008693
Martin v. Löwiseba40652007-08-30 20:10:57 +00008694/* Override any GCC internal prototype to avoid an error.
8695 Use char because int might match the return type of a GCC
8696 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008697#ifdef __cplusplus
8698extern "C"
8699#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008700char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008701int
8702main ()
8703{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008704return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008705 ;
8706 return 0;
8707}
8708_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008709if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008710 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008711else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008712 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008713fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008714rm -f core conftest.err conftest.$ac_objext \
8715 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008716LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008717fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008718{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_t_open" >&5
8719$as_echo "$ac_cv_lib_nsl_t_open" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008720if test "x$ac_cv_lib_nsl_t_open" = xyes; then :
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008721 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008722fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00008723 # SVR4
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008724{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
8725$as_echo_n "checking for socket in -lsocket... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008726if ${ac_cv_lib_socket_socket+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008727 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008728else
Martin v. Löwis11437992002-04-12 09:54:03 +00008729 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008730LIBS="-lsocket $LIBS $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008731cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008732/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008733
Martin v. Löwiseba40652007-08-30 20:10:57 +00008734/* Override any GCC internal prototype to avoid an error.
8735 Use char because int might match the return type of a GCC
8736 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008737#ifdef __cplusplus
8738extern "C"
8739#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008740char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008741int
8742main ()
8743{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008744return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008745 ;
8746 return 0;
8747}
8748_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008749if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008750 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008751else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008752 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008753fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008754rm -f core conftest.err conftest.$ac_objext \
8755 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008756LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008757fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008758{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
8759$as_echo "$ac_cv_lib_socket_socket" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008760if test "x$ac_cv_lib_socket_socket" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +00008761 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +00008762fi
8763 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +00008764
Jeremy Hyltoncb25d5e2000-07-27 21:23:28 +00008765case "$ac_sys_system" in
8766BeOS*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008767{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lnet" >&5
8768$as_echo_n "checking for socket in -lnet... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008769if ${ac_cv_lib_net_socket+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008770 $as_echo_n "(cached) " >&6
Guido van Rossumad678af1998-10-02 14:42:15 +00008771else
Martin v. Löwis11437992002-04-12 09:54:03 +00008772 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +00008773LIBS="-lnet $LIBS $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008774cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008775/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008776
Martin v. Löwiseba40652007-08-30 20:10:57 +00008777/* Override any GCC internal prototype to avoid an error.
8778 Use char because int might match the return type of a GCC
8779 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008780#ifdef __cplusplus
8781extern "C"
8782#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008783char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008784int
8785main ()
8786{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008787return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008788 ;
8789 return 0;
8790}
8791_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008792if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008793 ac_cv_lib_net_socket=yes
Guido van Rossumad678af1998-10-02 14:42:15 +00008794else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008795 ac_cv_lib_net_socket=no
Guido van Rossumad678af1998-10-02 14:42:15 +00008796fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008797rm -f core conftest.err conftest.$ac_objext \
8798 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008799LIBS=$ac_check_lib_save_LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +00008800fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008801{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_net_socket" >&5
8802$as_echo "$ac_cv_lib_net_socket" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008803if test "x$ac_cv_lib_net_socket" = xyes; then :
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008804 LIBS="-lnet $LIBS"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008805fi
8806 # BeOS
8807;;
8808esac
Guido van Rossum70c7f481998-03-26 18:44:10 +00008809
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008810{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libs" >&5
8811$as_echo_n "checking for --with-libs... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008812
Martin v. Löwiseba40652007-08-30 20:10:57 +00008813# Check whether --with-libs was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008814if test "${with_libs+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00008815 withval=$with_libs;
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008816{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
8817$as_echo "$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +00008818LIBS="$withval $LIBS"
8819
8820else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008821 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8822$as_echo "no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008823fi
8824
Guido van Rossum7f43da71994-08-01 12:15:30 +00008825
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00008826if test -n "$ac_tool_prefix"; then
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008827 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
8828set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008829{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8830$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008831if ${ac_cv_path_PKG_CONFIG+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008832 $as_echo_n "(cached) " >&6
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008833else
8834 case $PKG_CONFIG in
8835 [\\/]* | ?:[\\/]*)
8836 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
8837 ;;
8838 *)
8839 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8840for as_dir in $PATH
8841do
8842 IFS=$as_save_IFS
8843 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008844 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01008845 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008846 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008847 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008848 break 2
8849 fi
8850done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008851 done
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008852IFS=$as_save_IFS
8853
8854 ;;
8855esac
8856fi
8857PKG_CONFIG=$ac_cv_path_PKG_CONFIG
8858if test -n "$PKG_CONFIG"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008859 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
8860$as_echo "$PKG_CONFIG" >&6; }
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008861else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008862 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8863$as_echo "no" >&6; }
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008864fi
8865
8866
8867fi
8868if test -z "$ac_cv_path_PKG_CONFIG"; then
8869 ac_pt_PKG_CONFIG=$PKG_CONFIG
8870 # Extract the first word of "pkg-config", so it can be a program name with args.
8871set dummy pkg-config; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008872{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8873$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008874if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008875 $as_echo_n "(cached) " >&6
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008876else
8877 case $ac_pt_PKG_CONFIG in
8878 [\\/]* | ?:[\\/]*)
8879 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
8880 ;;
8881 *)
8882 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8883for as_dir in $PATH
8884do
8885 IFS=$as_save_IFS
8886 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008887 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01008888 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008889 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008890 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008891 break 2
8892 fi
8893done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008894 done
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008895IFS=$as_save_IFS
8896
8897 ;;
8898esac
8899fi
8900ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
8901if test -n "$ac_pt_PKG_CONFIG"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008902 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
8903$as_echo "$ac_pt_PKG_CONFIG" >&6; }
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008904else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008905 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8906$as_echo "no" >&6; }
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008907fi
8908
8909 if test "x$ac_pt_PKG_CONFIG" = x; then
8910 PKG_CONFIG=""
8911 else
8912 case $cross_compiling:$ac_tool_warned in
8913yes:)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008914{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8915$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008916ac_tool_warned=yes ;;
8917esac
8918 PKG_CONFIG=$ac_pt_PKG_CONFIG
8919 fi
8920else
8921 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
8922fi
8923
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00008924
8925# Check for use of the system expat library
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008926{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-expat" >&5
8927$as_echo_n "checking for --with-system-expat... " >&6; }
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00008928
8929# Check whether --with-system_expat was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008930if test "${with_system_expat+set}" = set; then :
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00008931 withval=$with_system_expat;
Benjamin Petersonf2d1b2a2010-10-31 16:53:53 +00008932else
8933 with_system_expat="no"
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00008934fi
8935
8936
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008937{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_expat" >&5
8938$as_echo "$with_system_expat" >&6; }
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00008939
8940# Check for use of the system libffi library
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008941{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-ffi" >&5
8942$as_echo_n "checking for --with-system-ffi... " >&6; }
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00008943
8944# Check whether --with-system_ffi was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008945if test "${with_system_ffi+set}" = set; then :
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00008946 withval=$with_system_ffi;
Benjamin Petersonf2d1b2a2010-10-31 16:53:53 +00008947else
8948 with_system_ffi="no"
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00008949fi
8950
8951
8952if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008953 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
8954else
8955 LIBFFI_INCLUDEDIR=""
8956fi
8957
8958
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008959{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_ffi" >&5
8960$as_echo "$with_system_ffi" >&6; }
Martin v. Löwis9176fc12006-04-11 11:12:43 +00008961
Ned Deilya2a9f572013-10-25 00:30:10 -07008962# Check for --with-tcltk-includes=path and --with-tcltk-libs=path
8963
8964
8965{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-includes" >&5
8966$as_echo_n "checking for --with-tcltk-includes... " >&6; }
8967
8968# Check whether --with-tcltk-includes was given.
8969if test "${with_tcltk_includes+set}" = set; then :
8970 withval=$with_tcltk_includes;
8971else
8972 with_tcltk_includes="default"
8973fi
8974
8975{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_includes" >&5
8976$as_echo "$with_tcltk_includes" >&6; }
8977{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-libs" >&5
8978$as_echo_n "checking for --with-tcltk-libs... " >&6; }
8979
8980# Check whether --with-tcltk-libs was given.
8981if test "${with_tcltk_libs+set}" = set; then :
8982 withval=$with_tcltk_libs;
8983else
8984 with_tcltk_libs="default"
8985fi
8986
8987{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_libs" >&5
8988$as_echo "$with_tcltk_libs" >&6; }
8989if test "x$with_tcltk_includes" = xdefault || test "x$with_tcltk_libs" = xdefault
8990then
8991 if test "x$with_tcltk_includes" != "x$with_tcltk_libs"
8992 then
8993 as_fn_error $? "use both --with-tcltk-includes='...' and --with-tcltk-libs='...' or neither" "$LINENO" 5
8994 fi
8995 TCLTK_INCLUDES=""
8996 TCLTK_LIBS=""
8997else
8998 TCLTK_INCLUDES="$with_tcltk_includes"
8999 TCLTK_LIBS="$with_tcltk_libs"
9000fi
9001
Benjamin Peterson867475c2009-04-29 20:36:25 +00009002# Check for --with-dbmliborder
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009003{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dbmliborder" >&5
9004$as_echo_n "checking for --with-dbmliborder... " >&6; }
Benjamin Peterson867475c2009-04-29 20:36:25 +00009005
9006# Check whether --with-dbmliborder was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009007if test "${with_dbmliborder+set}" = set; then :
Benjamin Peterson867475c2009-04-29 20:36:25 +00009008 withval=$with_dbmliborder;
9009if test x$with_dbmliborder = xyes
9010then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00009011as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Benjamin Peterson867475c2009-04-29 20:36:25 +00009012else
9013 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
9014 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
9015 then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00009016 as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Benjamin Peterson867475c2009-04-29 20:36:25 +00009017 fi
9018 done
9019fi
9020fi
9021
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009022{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dbmliborder" >&5
9023$as_echo "$with_dbmliborder" >&6; }
Benjamin Peterson867475c2009-04-29 20:36:25 +00009024
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00009025# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009026
9027
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009028{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-signal-module" >&5
9029$as_echo_n "checking for --with-signal-module... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009030
Martin v. Löwiseba40652007-08-30 20:10:57 +00009031# Check whether --with-signal-module was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009032if test "${with_signal_module+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00009033 withval=$with_signal_module;
9034fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009035
9036
9037if test -z "$with_signal_module"
9038then with_signal_module="yes"
9039fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009040{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_signal_module" >&5
9041$as_echo "$with_signal_module" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009042
9043if test "${with_signal_module}" = "yes"; then
9044 USE_SIGNAL_MODULE=""
9045 SIGNAL_OBJS=""
9046else
9047 USE_SIGNAL_MODULE="#"
9048 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
9049fi
9050
Guido van Rossum3d15bd82001-01-10 18:53:48 +00009051# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +00009052
Barry Warsawc0d24d82000-06-29 16:12:00 +00009053USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +00009054
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009055{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dec-threads" >&5
9056$as_echo_n "checking for --with-dec-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009057
Guido van Rossumec2f0731997-01-22 20:54:01 +00009058
Martin v. Löwiseba40652007-08-30 20:10:57 +00009059# Check whether --with-dec-threads was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009060if test "${with_dec_threads+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00009061 withval=$with_dec_threads;
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009062{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9063$as_echo "$withval" >&6; }
Guido van Rossumec2f0731997-01-22 20:54:01 +00009064LDLAST=-threads
Guido van Rossumf78abae1997-01-21 22:02:36 +00009065if test "${with_thread+set}" != set; then
Guido van Rossumec2f0731997-01-22 20:54:01 +00009066 with_thread="$withval";
Guido van Rossumf78abae1997-01-21 22:02:36 +00009067fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00009068else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009069 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9070$as_echo "no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009071fi
9072
Martin v. Löwis11437992002-04-12 09:54:03 +00009073
9074# Templates for things AC_DEFINEd more than once.
9075# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +00009076
9077
Martin v. Löwis11437992002-04-12 09:54:03 +00009078
9079
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009080{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-threads" >&5
9081$as_echo_n "checking for --with-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009082
Martin v. Löwiseba40652007-08-30 20:10:57 +00009083# Check whether --with-threads was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009084if test "${with_threads+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00009085 withval=$with_threads;
9086fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00009087
9088
Barry Warsawc0d24d82000-06-29 16:12:00 +00009089# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +00009090
Martin v. Löwiseba40652007-08-30 20:10:57 +00009091# Check whether --with-thread was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009092if test "${with_thread+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00009093 withval=$with_thread; with_threads=$with_thread
9094fi
9095
Barry Warsawc0d24d82000-06-29 16:12:00 +00009096
9097if test -z "$with_threads"
9098then with_threads="yes"
9099fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009100{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_threads" >&5
9101$as_echo "$with_threads" >&6; }
Barry Warsawc0d24d82000-06-29 16:12:00 +00009102
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009103
Barry Warsawc0d24d82000-06-29 16:12:00 +00009104if test "$with_threads" = "no"
9105then
9106 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009107elif test "$ac_cv_pthread_is_default" = yes
9108then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009109 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009110
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009111 # Defining _REENTRANT on system with POSIX threads should not hurt.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009112 $as_echo "#define _REENTRANT 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009113
9114 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +00009115 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009116elif test "$ac_cv_kpthread" = "yes"
9117then
9118 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00009119 if test "$ac_cv_cxx_thread" = "yes"; then
9120 CXX="$CXX -Kpthread"
9121 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009122 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum2242f2f2001-04-11 20:58:20 +00009123
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009124 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009125 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00009126elif test "$ac_cv_kthread" = "yes"
9127then
9128 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00009129 if test "$ac_cv_cxx_thread" = "yes"; then
9130 CXX="$CXX -Kthread"
9131 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009132 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis5f433f02003-05-05 05:05:30 +00009133
9134 posix_threads=yes
9135 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009136elif test "$ac_cv_pthread" = "yes"
9137then
9138 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00009139 if test "$ac_cv_cxx_thread" = "yes"; then
9140 CXX="$CXX -pthread"
9141 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009142 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009143
9144 posix_threads=yes
9145 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009146else
9147 if test ! -z "$with_threads" -a -d "$with_threads"
9148 then LDFLAGS="$LDFLAGS -L$with_threads"
9149 fi
9150 if test ! -z "$withval" -a -d "$withval"
9151 then LDFLAGS="$LDFLAGS -L$withval"
9152 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009153
9154 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +00009155 # define _POSIX_THREADS in unistd.h. Some apparently don't
9156 # (e.g. gnu pth with pthread emulation)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009157 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _POSIX_THREADS in unistd.h" >&5
9158$as_echo_n "checking for _POSIX_THREADS in unistd.h... " >&6; }
9159 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009160/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +00009161
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009162#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +00009163#ifdef _POSIX_THREADS
9164yes
9165#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009166
9167_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009168if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009169 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009170 unistd_defines_pthreads=yes
9171else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009172 unistd_defines_pthreads=no
9173fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00009174rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009175
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009176 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $unistd_defines_pthreads" >&5
9177$as_echo "$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009178
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009179 $as_echo "#define _REENTRANT 1" >>confdefs.h
Guido van Rossum9caf77a1996-08-01 00:52:26 +00009180
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009181 ac_fn_c_check_header_mongrel "$LINENO" "cthreads.h" "ac_cv_header_cthreads_h" "$ac_includes_default"
Matthias Klose3cef2a92012-03-14 23:39:33 +01009182if test "x$ac_cv_header_cthreads_h" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009183 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +00009184
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009185 $as_echo "#define C_THREADS 1" >>confdefs.h
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009186
Martin v. Löwis11437992002-04-12 09:54:03 +00009187
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009188$as_echo "#define HURD_C_THREADS 1" >>confdefs.h
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009189
9190 LIBS="$LIBS -lthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009191 THREADOBJ="Python/thread.o"
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009192else
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009193
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009194 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 +01009195if test "x$ac_cv_header_mach_cthreads_h" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009196 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +00009197
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009198 $as_echo "#define C_THREADS 1" >>confdefs.h
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009199
Martin v. Löwis11437992002-04-12 09:54:03 +00009200
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009201$as_echo "#define MACH_C_THREADS 1" >>confdefs.h
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009202
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009203 THREADOBJ="Python/thread.o"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009204else
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009205
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009206 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pth" >&5
9207$as_echo_n "checking for --with-pth... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009208
Martin v. Löwiseba40652007-08-30 20:10:57 +00009209# Check whether --with-pth was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009210if test "${with_pth+set}" = set; then :
9211 withval=$with_pth; { $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9212$as_echo "$withval" >&6; }
9213 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009214
9215
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009216$as_echo "#define HAVE_PTH 1" >>confdefs.h
Guido van Rossum9e8181b2000-09-19 00:46:46 +00009217
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00009218 LIBS="-lpth $LIBS"
9219 THREADOBJ="Python/thread.o"
Guido van Rossum9e8181b2000-09-19 00:46:46 +00009220else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009221 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9222$as_echo "no" >&6; }
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009223
9224 # Just looking for pthread_create in libpthread is not enough:
9225 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
9226 # So we really have to include pthread.h, and then link.
9227 _libs=$LIBS
9228 LIBS="$LIBS -lpthread"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009229 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
9230$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
9231 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009232/* end confdefs.h. */
Stefan Krahae66ca62012-11-22 22:36:57 +01009233
9234#include <stdio.h>
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009235#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +00009236
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009237void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +00009238int
9239main ()
9240{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009241
9242pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +00009243 ;
9244 return 0;
9245}
9246_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009247if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009248
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009249 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9250$as_echo "yes" >&6; }
9251 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum02a1c402000-02-25 19:26:31 +00009252
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009253 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009254 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +00009255else
Martin v. Löwis11437992002-04-12 09:54:03 +00009256
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009257 LIBS=$_libs
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009258 ac_fn_c_check_func "$LINENO" "pthread_detach" "ac_cv_func_pthread_detach"
Matthias Klose3cef2a92012-03-14 23:39:33 +01009259if test "x$ac_cv_func_pthread_detach" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009260 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumad678af1998-10-02 14:42:15 +00009261
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009262 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009263 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +00009264else
Guido van Rossumad678af1998-10-02 14:42:15 +00009265
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009266 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 +01009267if test "x$ac_cv_header_atheos_threads_h" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009268 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009269
9270
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009271$as_echo "#define ATHEOS_THREADS 1" >>confdefs.h
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009272
9273 THREADOBJ="Python/thread.o"
9274else
9275
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009276 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 +01009277if test "x$ac_cv_header_kernel_OS_h" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009278 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009279
9280
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009281$as_echo "#define BEOS_THREADS 1" >>confdefs.h
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009282
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009283 THREADOBJ="Python/thread.o"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009284else
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009285
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009286 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5
9287$as_echo_n "checking for pthread_create in -lpthreads... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009288if ${ac_cv_lib_pthreads_pthread_create+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009289 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009290else
Martin v. Löwis11437992002-04-12 09:54:03 +00009291 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009292LIBS="-lpthreads $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009293cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009294/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009295
Martin v. Löwiseba40652007-08-30 20:10:57 +00009296/* Override any GCC internal prototype to avoid an error.
9297 Use char because int might match the return type of a GCC
9298 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009299#ifdef __cplusplus
9300extern "C"
9301#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009302char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009303int
9304main ()
9305{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009306return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009307 ;
9308 return 0;
9309}
9310_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009311if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009312 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +00009313else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009314 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +00009315fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009316rm -f core conftest.err conftest.$ac_objext \
9317 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009318LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00009319fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009320{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5
9321$as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009322if test "x$ac_cv_lib_pthreads_pthread_create" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009323 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Greg Steinadf63d62000-07-05 10:38:09 +00009324
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009325 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00009326 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009327 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +00009328else
Greg Steinadf63d62000-07-05 10:38:09 +00009329
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009330 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5
9331$as_echo_n "checking for pthread_create in -lc_r... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009332if ${ac_cv_lib_c_r_pthread_create+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009333 $as_echo_n "(cached) " >&6
Greg Steinadf63d62000-07-05 10:38:09 +00009334else
Martin v. Löwis11437992002-04-12 09:54:03 +00009335 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00009336LIBS="-lc_r $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009337cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009338/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009339
Martin v. Löwiseba40652007-08-30 20:10:57 +00009340/* Override any GCC internal prototype to avoid an error.
9341 Use char because int might match the return type of a GCC
9342 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009343#ifdef __cplusplus
9344extern "C"
9345#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009346char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009347int
9348main ()
9349{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009350return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009351 ;
9352 return 0;
9353}
9354_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009355if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009356 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +00009357else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009358 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +00009359fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009360rm -f core conftest.err conftest.$ac_objext \
9361 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009362LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +00009363fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009364{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5
9365$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009366if test "x$ac_cv_lib_c_r_pthread_create" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009367 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum49545951997-12-02 19:28:29 +00009368
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009369 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00009370 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009371 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +00009372else
Guido van Rossum07bd90e2000-05-08 13:41:38 +00009373
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009374 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_create_system in -lpthread" >&5
9375$as_echo_n "checking for __pthread_create_system in -lpthread... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009376if ${ac_cv_lib_pthread___pthread_create_system+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009377 $as_echo_n "(cached) " >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009378else
Martin v. Löwis11437992002-04-12 09:54:03 +00009379 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009380LIBS="-lpthread $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009381cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009382/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009383
Martin v. Löwiseba40652007-08-30 20:10:57 +00009384/* Override any GCC internal prototype to avoid an error.
9385 Use char because int might match the return type of a GCC
9386 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009387#ifdef __cplusplus
9388extern "C"
9389#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009390char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009391int
9392main ()
9393{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009394return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009395 ;
9396 return 0;
9397}
9398_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009399if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009400 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009401else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009402 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009403fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009404rm -f core conftest.err conftest.$ac_objext \
9405 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009406LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009407fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009408{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_create_system" >&5
9409$as_echo "$ac_cv_lib_pthread___pthread_create_system" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009410if test "x$ac_cv_lib_pthread___pthread_create_system" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009411 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009412
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009413 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00009414 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009415 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009416else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009417
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009418 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lcma" >&5
9419$as_echo_n "checking for pthread_create in -lcma... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009420if ${ac_cv_lib_cma_pthread_create+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009421 $as_echo_n "(cached) " >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +00009422else
Martin v. Löwis11437992002-04-12 09:54:03 +00009423 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00009424LIBS="-lcma $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009425cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009426/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009427
Martin v. Löwiseba40652007-08-30 20:10:57 +00009428/* Override any GCC internal prototype to avoid an error.
9429 Use char because int might match the return type of a GCC
9430 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009431#ifdef __cplusplus
9432extern "C"
9433#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009434char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009435int
9436main ()
9437{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009438return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009439 ;
9440 return 0;
9441}
9442_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009443if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009444 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +00009445else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009446 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +00009447fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009448rm -f core conftest.err conftest.$ac_objext \
9449 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009450LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00009451fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009452{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cma_pthread_create" >&5
9453$as_echo "$ac_cv_lib_cma_pthread_create" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009454if test "x$ac_cv_lib_cma_pthread_create" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009455 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumb93a8621998-05-07 13:27:32 +00009456
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009457 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00009458 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009459 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +00009460else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +00009461
Martin v. Löwis130fb172001-07-19 11:00:41 +00009462 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +00009463fi
9464
Guido van Rossum627b2d71993-12-24 10:39:16 +00009465
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009466fi
9467
Guido van Rossum0be3e491997-05-22 20:33:33 +00009468fi
9469
Guido van Rossum49545951997-12-02 19:28:29 +00009470fi
9471
Guido van Rossumb93a8621998-05-07 13:27:32 +00009472fi
9473
Guido van Rossum07bd90e2000-05-08 13:41:38 +00009474
Michael W. Hudson54241132001-12-07 15:38:26 +00009475fi
9476
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009477
9478fi
9479
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009480fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009481rm -f core conftest.err conftest.$ac_objext \
9482 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009483fi
9484
Martin v. Löwis11437992002-04-12 09:54:03 +00009485fi
9486
9487
9488fi
9489
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009490
Michael W. Hudson54241132001-12-07 15:38:26 +00009491
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009492 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usconfig in -lmpc" >&5
9493$as_echo_n "checking for usconfig in -lmpc... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009494if ${ac_cv_lib_mpc_usconfig+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009495 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009496else
Martin v. Löwis11437992002-04-12 09:54:03 +00009497 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009498LIBS="-lmpc $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009499cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009500/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009501
Martin v. Löwiseba40652007-08-30 20:10:57 +00009502/* Override any GCC internal prototype to avoid an error.
9503 Use char because int might match the return type of a GCC
9504 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009505#ifdef __cplusplus
9506extern "C"
9507#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009508char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009509int
9510main ()
9511{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009512return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009513 ;
9514 return 0;
9515}
9516_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009517if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009518 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009519else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009520 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009521fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009522rm -f core conftest.err conftest.$ac_objext \
9523 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009524LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009525fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009526{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpc_usconfig" >&5
9527$as_echo "$ac_cv_lib_mpc_usconfig" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009528if test "x$ac_cv_lib_mpc_usconfig" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009529 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00009530
Martin v. Löwis130fb172001-07-19 11:00:41 +00009531 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009532 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009533 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +00009534fi
9535
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00009536
Neal Norwitza978ab02002-11-02 16:58:05 +00009537 if test "$posix_threads" != "yes"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009538 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thr_create in -lthread" >&5
9539$as_echo_n "checking for thr_create in -lthread... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009540if ${ac_cv_lib_thread_thr_create+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009541 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009542else
Martin v. Löwis11437992002-04-12 09:54:03 +00009543 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009544LIBS="-lthread $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009545cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009546/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009547
Martin v. Löwiseba40652007-08-30 20:10:57 +00009548/* Override any GCC internal prototype to avoid an error.
9549 Use char because int might match the return type of a GCC
9550 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009551#ifdef __cplusplus
9552extern "C"
9553#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009554char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009555int
9556main ()
9557{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009558return thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009559 ;
9560 return 0;
9561}
9562_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009563if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009564 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009565else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009566 ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009567fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009568rm -f core conftest.err conftest.$ac_objext \
9569 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009570LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009571fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009572{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_thread_thr_create" >&5
9573$as_echo "$ac_cv_lib_thread_thr_create" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009574if test "x$ac_cv_lib_thread_thr_create" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009575 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00009576
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00009577 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009578 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00009579 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +00009580fi
9581
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00009582 fi
Michael W. Hudson54241132001-12-07 15:38:26 +00009583
Martin v. Löwis130fb172001-07-19 11:00:41 +00009584 if test "$USE_THREAD_MODULE" != "#"
9585 then
9586 # If the above checks didn't disable threads, (at least) OSF1
9587 # needs this '-threads' argument during linking.
9588 case $ac_sys_system in
9589 OSF1) LDLAST=-threads;;
9590 esac
Jeremy Hylton1a2ca862000-10-16 16:59:12 +00009591 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009592fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00009593
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009594if test "$posix_threads" = "yes"; then
9595 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00009596
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009597$as_echo "#define _POSIX_THREADS 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009598
9599 fi
9600
9601 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
9602 case $ac_sys_system/$ac_sys_release in
Charles-François Natali4929eb92011-07-21 19:41:04 +02009603 SunOS/5.6)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009604$as_echo "#define HAVE_PTHREAD_DESTRUCTOR 1" >>confdefs.h
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00009605
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009606 ;;
9607 SunOS/5.8)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009608$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009609
9610 ;;
Charles-François Natali4929eb92011-07-21 19:41:04 +02009611 AIX/*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009612$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Christian Heimescba36bb2008-01-30 22:54:18 +00009613
9614 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009615 esac
9616
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009617 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
9618$as_echo_n "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009619 if ${ac_cv_pthread_system_supported+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009620 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009621else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009622 if test "$cross_compiling" = yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009623 ac_cv_pthread_system_supported=no
9624else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009625 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009626/* end confdefs.h. */
Stefan Krahae66ca62012-11-22 22:36:57 +01009627
9628 #include <stdio.h>
9629 #include <pthread.h>
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009630 void *foo(void *parm) {
9631 return NULL;
9632 }
9633 main() {
9634 pthread_attr_t attr;
9635 pthread_t id;
9636 if (pthread_attr_init(&attr)) exit(-1);
9637 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
9638 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
9639 exit(0);
9640 }
9641_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009642if ac_fn_c_try_run "$LINENO"; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009643 ac_cv_pthread_system_supported=yes
9644else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009645 ac_cv_pthread_system_supported=no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009646fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009647rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9648 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009649fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00009650
Martin v. Löwiseba40652007-08-30 20:10:57 +00009651
Guido van Rossum627b2d71993-12-24 10:39:16 +00009652fi
9653
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009654 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_system_supported" >&5
9655$as_echo "$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009656 if test "$ac_cv_pthread_system_supported" = "yes"; then
9657
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009658$as_echo "#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009659
9660 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009661 for ac_func in pthread_sigmask
9662do :
9663 ac_fn_c_check_func "$LINENO" "pthread_sigmask" "ac_cv_func_pthread_sigmask"
Matthias Klose3cef2a92012-03-14 23:39:33 +01009664if test "x$ac_cv_func_pthread_sigmask" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009665 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009666#define HAVE_PTHREAD_SIGMASK 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009667_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +00009668 case $ac_sys_system in
9669 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009670
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009671$as_echo "#define HAVE_BROKEN_PTHREAD_SIGMASK 1" >>confdefs.h
Jason Tishlerfac083d2003-07-22 15:20:49 +00009672
9673 ;;
9674 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009675fi
9676done
9677
Christian Heimes0d604cf2013-08-21 13:26:05 +02009678 for ac_func in pthread_atfork
9679do :
9680 ac_fn_c_check_func "$LINENO" "pthread_atfork" "ac_cv_func_pthread_atfork"
9681if test "x$ac_cv_func_pthread_atfork" = xyes; then :
9682 cat >>confdefs.h <<_ACEOF
9683#define HAVE_PTHREAD_ATFORK 1
9684_ACEOF
9685
9686fi
9687done
9688
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009689fi
9690
9691
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009692# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +00009693
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009694{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if --enable-ipv6 is specified" >&5
9695$as_echo_n "checking if --enable-ipv6 is specified... " >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009696# Check whether --enable-ipv6 was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009697if test "${enable_ipv6+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00009698 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009699 no)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009700 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9701$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009702 ipv6=no
9703 ;;
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009704 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9705$as_echo "yes" >&6; }
9706 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009707
9708 ipv6=yes
9709 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009710 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009711else
Martin v. Löwis11437992002-04-12 09:54:03 +00009712
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009713 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009714/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009715 /* AF_INET6 available check */
9716#include <sys/types.h>
9717#include <sys/socket.h>
Charles-François Natalibe2b9072013-01-08 19:47:00 +01009718int
9719main ()
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009720{
Charles-François Natalibe2b9072013-01-08 19:47:00 +01009721int domain = AF_INET6;
9722 ;
9723 return 0;
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009724}
Martin v. Löwis11437992002-04-12 09:54:03 +00009725_ACEOF
Charles-François Natalibe2b9072013-01-08 19:47:00 +01009726if ac_fn_c_try_compile "$LINENO"; then :
Matthias Klosec511b472010-05-08 11:01:39 +00009727
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009728 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9729$as_echo "yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009730 ipv6=yes
Matthias Klosec511b472010-05-08 11:01:39 +00009731
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009732else
Matthias Klosec511b472010-05-08 11:01:39 +00009733
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009734 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9735$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009736 ipv6=no
Matthias Klosec511b472010-05-08 11:01:39 +00009737
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009738fi
Charles-François Natalibe2b9072013-01-08 19:47:00 +01009739rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009740
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009741if test "$ipv6" = "yes"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009742 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RFC2553 API is available" >&5
9743$as_echo_n "checking if RFC2553 API is available... " >&6; }
9744 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009745/* end confdefs.h. */
Matthias Klosec511b472010-05-08 11:01:39 +00009746
9747 #include <sys/types.h>
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009748#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009749int
9750main ()
9751{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009752struct sockaddr_in6 x;
Matthias Klosec511b472010-05-08 11:01:39 +00009753 x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +00009754 ;
9755 return 0;
9756}
Matthias Klosec511b472010-05-08 11:01:39 +00009757
Martin v. Löwis11437992002-04-12 09:54:03 +00009758_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009759if ac_fn_c_try_compile "$LINENO"; then :
Matthias Klosec511b472010-05-08 11:01:39 +00009760
9761 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009762$as_echo "yes" >&6; }
Matthias Klosec511b472010-05-08 11:01:39 +00009763 ipv6=yes
9764
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009765else
Matthias Klosec511b472010-05-08 11:01:39 +00009766
9767 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009768$as_echo "no" >&6; }
Matthias Klosec511b472010-05-08 11:01:39 +00009769 ipv6=no
9770
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009771fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009772rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009773fi
9774
9775if test "$ipv6" = "yes"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009776 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009777
9778fi
9779
Martin v. Löwiseba40652007-08-30 20:10:57 +00009780fi
9781
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009782
9783ipv6type=unknown
9784ipv6lib=none
9785ipv6trylibc=no
9786
9787if test "$ipv6" = "yes"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009788 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5
9789$as_echo_n "checking ipv6 stack type... " >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +00009790 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
9791 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009792 case $i in
9793 inria)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009794 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009795/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009796
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009797#include <netinet/in.h>
9798#ifdef IPV6_INRIA_VERSION
9799yes
9800#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009801_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009802if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009803 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00009804 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009805fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00009806rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009807
9808 ;;
9809 kame)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009810 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009811/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009812
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009813#include <netinet/in.h>
9814#ifdef __KAME__
9815yes
9816#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009817_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009818if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009819 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009820 ipv6type=$i;
9821 ipv6lib=inet6
9822 ipv6libdir=/usr/local/v6/lib
9823 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009824fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00009825rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009826
9827 ;;
9828 linux-glibc)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009829 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009830/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009831
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009832#include <features.h>
9833#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
9834yes
9835#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009836_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009837if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009838 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009839 ipv6type=$i;
9840 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009841fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00009842rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009843
9844 ;;
9845 linux-inet6)
9846 if test -d /usr/inet6; then
9847 ipv6type=$i
9848 ipv6lib=inet6
9849 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +00009850 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009851 fi
9852 ;;
9853 solaris)
9854 if test -f /etc/netconfig; then
Antoine Pitrou31e85952011-01-03 18:57:14 +00009855 if $GREP -q tcp6 /etc/netconfig; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009856 ipv6type=$i
9857 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009858 fi
9859 fi
9860 ;;
9861 toshiba)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009862 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009863/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009864
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009865#include <sys/param.h>
9866#ifdef _TOSHIBA_INET6
9867yes
9868#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009869_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009870if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009871 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009872 ipv6type=$i;
9873 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00009874 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009875fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00009876rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009877
9878 ;;
9879 v6d)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009880 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009881/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009882
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009883#include </usr/local/v6/include/sys/v6config.h>
9884#ifdef __V6D__
9885yes
9886#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009887_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009888if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009889 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009890 ipv6type=$i;
9891 ipv6lib=v6;
9892 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +00009893 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009894fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00009895rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009896
9897 ;;
9898 zeta)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009899 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009900/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009901
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009902#include <sys/param.h>
9903#ifdef _ZETA_MINAMI_INET6
9904yes
9905#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009906_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009907if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009908 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009909 ipv6type=$i;
9910 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00009911 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009912fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00009913rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009914
9915 ;;
9916 esac
9917 if test "$ipv6type" != "unknown"; then
9918 break
9919 fi
9920 done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009921 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5
9922$as_echo "$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009923fi
9924
9925if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
9926 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
9927 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
9928 echo "using lib$ipv6lib"
9929 else
9930 if test $ipv6trylibc = "yes"; then
9931 echo "using libc"
9932 else
9933 echo 'Fatal: no $ipv6lib library found. cannot continue.'
9934 echo "You need to fetch lib$ipv6lib.a from appropriate"
9935 echo 'ipv6 kit and compile beforehand.'
9936 exit 1
9937 fi
9938 fi
9939fi
9940
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009941{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for OSX 10.5 SDK or later" >&5
9942$as_echo_n "checking for OSX 10.5 SDK or later... " >&6; }
9943cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren0d236eb2008-06-06 21:31:33 +00009944/* end confdefs.h. */
Matthias Klosec511b472010-05-08 11:01:39 +00009945
9946 #include <Carbon/Carbon.h>
Ronald Oussoren0d236eb2008-06-06 21:31:33 +00009947int
9948main ()
9949{
9950FSIORefNum fRef = 0
9951 ;
9952 return 0;
9953}
Mark Dickinson0712b562010-05-08 19:13:21 +00009954
Ronald Oussoren0d236eb2008-06-06 21:31:33 +00009955_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009956if ac_fn_c_try_compile "$LINENO"; then :
Matthias Klosec511b472010-05-08 11:01:39 +00009957
Ronald Oussoren0d236eb2008-06-06 21:31:33 +00009958
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009959$as_echo "#define HAVE_OSX105_SDK 1" >>confdefs.h
Ronald Oussoren0d236eb2008-06-06 21:31:33 +00009960
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009961 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9962$as_echo "yes" >&6; }
Ronald Oussoren0d236eb2008-06-06 21:31:33 +00009963
Mark Dickinson0712b562010-05-08 19:13:21 +00009964else
9965
9966 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9967$as_echo "no" >&6; }
9968
Ronald Oussoren0d236eb2008-06-06 21:31:33 +00009969fi
Ronald Oussoren0d236eb2008-06-06 21:31:33 +00009970rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9971
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009972# Check for --with-doc-strings
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009973{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-doc-strings" >&5
9974$as_echo_n "checking for --with-doc-strings... " >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009975
Martin v. Löwiseba40652007-08-30 20:10:57 +00009976# Check whether --with-doc-strings was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009977if test "${with_doc_strings+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00009978 withval=$with_doc_strings;
9979fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009980
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009981
9982if test -z "$with_doc_strings"
9983then with_doc_strings="yes"
9984fi
9985if test "$with_doc_strings" != "no"
9986then
9987
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009988$as_echo "#define WITH_DOC_STRINGS 1" >>confdefs.h
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009989
9990fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009991{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_doc_strings" >&5
9992$as_echo "$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009993
Neil Schemenauera35c6882001-02-27 04:45:05 +00009994# Check for Python-specific malloc support
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009995{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tsc" >&5
9996$as_echo_n "checking for --with-tsc... " >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009997
Martin v. Löwiseba40652007-08-30 20:10:57 +00009998# Check whether --with-tsc was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009999if test "${with_tsc+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +000010000 withval=$with_tsc;
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010001if test "$withval" != no
10002then
10003
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010004$as_echo "#define WITH_TSC 1" >>confdefs.h
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010005
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010006 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10007$as_echo "yes" >&6; }
10008else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10009$as_echo "no" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010010fi
10011else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010012 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10013$as_echo "no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000010014fi
10015
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010016
10017# Check for Python-specific malloc support
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010018{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pymalloc" >&5
10019$as_echo_n "checking for --with-pymalloc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010020
Martin v. Löwiseba40652007-08-30 20:10:57 +000010021# Check whether --with-pymalloc was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010022if test "${with_pymalloc+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +000010023 withval=$with_pymalloc;
10024fi
Michael W. Hudson54241132001-12-07 15:38:26 +000010025
Neil Schemenauera35c6882001-02-27 04:45:05 +000010026
Neil Schemenauer16c22972002-03-22 15:34:49 +000010027if test -z "$with_pymalloc"
10028then with_pymalloc="yes"
10029fi
10030if test "$with_pymalloc" != "no"
10031then
Martin v. Löwis11437992002-04-12 09:54:03 +000010032
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010033$as_echo "#define WITH_PYMALLOC 1" >>confdefs.h
Neil Schemenauer16c22972002-03-22 15:34:49 +000010034
10035fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010036{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pymalloc" >&5
10037$as_echo "$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +000010038
Benjamin Peterson91c12eb2009-12-03 02:52:39 +000010039# Check for Valgrind support
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010040{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-valgrind" >&5
10041$as_echo_n "checking for --with-valgrind... " >&6; }
Benjamin Peterson91c12eb2009-12-03 02:52:39 +000010042
10043# Check whether --with-valgrind was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010044if test "${with_valgrind+set}" = set; then :
Benjamin Peterson91c12eb2009-12-03 02:52:39 +000010045 withval=$with_valgrind;
10046else
10047 with_valgrind=no
10048fi
10049
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010050{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_valgrind" >&5
10051$as_echo "$with_valgrind" >&6; }
Benjamin Peterson91c12eb2009-12-03 02:52:39 +000010052if test "$with_valgrind" != no; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010053 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 +010010054if test "x$ac_cv_header_valgrind_valgrind_h" = xyes; then :
Benjamin Peterson91c12eb2009-12-03 02:52:39 +000010055
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010056$as_echo "#define WITH_VALGRIND 1" >>confdefs.h
Benjamin Peterson91c12eb2009-12-03 02:52:39 +000010057
10058else
Georg Brandl71f4fbb2011-02-25 11:04:50 +000010059 as_fn_error $? "Valgrind support requested but headers not available" "$LINENO" 5
Benjamin Peterson91c12eb2009-12-03 02:52:39 +000010060
10061fi
10062
10063
10064fi
10065
Barry Warsawef82cd72000-06-30 16:21:01 +000010066# Check for --with-wctype-functions
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010067{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-wctype-functions" >&5
10068$as_echo_n "checking for --with-wctype-functions... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010069
Martin v. Löwiseba40652007-08-30 20:10:57 +000010070# Check whether --with-wctype-functions was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010071if test "${with_wctype_functions+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +000010072 withval=$with_wctype_functions;
Barry Warsawef82cd72000-06-30 16:21:01 +000010073if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000010074then
10075
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010076$as_echo "#define WANT_WCTYPE_FUNCTIONS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000010077
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010078 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10079$as_echo "yes" >&6; }
10080else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10081$as_echo "no" >&6; }
Barry Warsawef82cd72000-06-30 16:21:01 +000010082fi
10083else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010084 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10085$as_echo "no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000010086fi
10087
Barry Warsawef82cd72000-06-30 16:21:01 +000010088
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010089# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000010090
Guido van Rossum98935bf2001-09-05 19:13:16 +000010091DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000010092
Guido van Rossume97ee181999-12-20 21:27:22 +000010093# the dlopen() function means we might want to use dynload_shlib.o. some
10094# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +000010095for ac_func in dlopen
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010096do :
10097 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
Matthias Klose3cef2a92012-03-14 23:39:33 +010010098if test "x$ac_cv_func_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010099 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010100#define HAVE_DLOPEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010101_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000010102
Guido van Rossume97ee181999-12-20 21:27:22 +000010103fi
Thomas Wouters3a584202000-08-05 23:28:51 +000010104done
Guido van Rossume97ee181999-12-20 21:27:22 +000010105
Michael W. Hudson54241132001-12-07 15:38:26 +000010106
Guido van Rossume97ee181999-12-20 21:27:22 +000010107# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
10108# loading of modules.
10109
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010110{ $as_echo "$as_me:${as_lineno-$LINENO}: checking DYNLOADFILE" >&5
10111$as_echo_n "checking DYNLOADFILE... " >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000010112if test -z "$DYNLOADFILE"
10113then
10114 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000010115 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
10116 if test "$ac_cv_func_dlopen" = yes
10117 then DYNLOADFILE="dynload_shlib.o"
10118 else DYNLOADFILE="dynload_aix.o"
10119 fi
10120 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000010121 BeOS*) DYNLOADFILE="dynload_beos.o";;
10122 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Anthony Baxter82201742006-04-09 15:07:40 +000010123 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
10124 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010125 atheos*) DYNLOADFILE="dynload_atheos.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000010126 *)
10127 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
10128 # out any dynamic loading
10129 if test "$ac_cv_func_dlopen" = yes
10130 then DYNLOADFILE="dynload_shlib.o"
10131 else DYNLOADFILE="dynload_stub.o"
10132 fi
10133 ;;
10134 esac
10135fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010136{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DYNLOADFILE" >&5
10137$as_echo "$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000010138if test "$DYNLOADFILE" != "dynload_stub.o"
10139then
Martin v. Löwis11437992002-04-12 09:54:03 +000010140
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010141$as_echo "#define HAVE_DYNAMIC_LOADING 1" >>confdefs.h
Guido van Rossume97ee181999-12-20 21:27:22 +000010142
10143fi
10144
Neil Schemenauer4e425612001-06-19 15:44:15 +000010145# MACHDEP_OBJS can be set to platform-specific object files needed by Python
10146
Michael W. Hudson54241132001-12-07 15:38:26 +000010147
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010148{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP_OBJS" >&5
10149$as_echo_n "checking MACHDEP_OBJS... " >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000010150if test -z "$MACHDEP_OBJS"
10151then
Jack Jansene578a632001-08-15 01:27:14 +000010152 MACHDEP_OBJS=$extra_machdep_objs
10153else
10154 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000010155fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010156{ $as_echo "$as_me:${as_lineno-$LINENO}: result: MACHDEP_OBJS" >&5
10157$as_echo "MACHDEP_OBJS" >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000010158
Guido van Rossum627b2d71993-12-24 10:39:16 +000010159# checks for library functions
Martin v. Löwisaef18b12008-03-24 13:31:16 +000010160for ac_func in alarm setitimer getitimer bind_textdomain_codeset chown \
10161 clock confstr ctermid execv fchmod fchown fork fpathconf ftime ftruncate \
Martin v. Löwis438b5342002-12-27 10:16:42 +000010162 gai_strerror getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwis50ea4562009-11-27 13:56:01 +000010163 getpriority getresuid getresgid getpwent getspnam getspent getsid getwd \
Benjamin Petersond16e01c2014-02-04 10:20:26 -050010164 initgroups kill killpg lchmod lchown lstat mkfifo mknod mktime mmap \
Martin v. Löwisa5f09072002-10-11 05:37:59 +000010165 mremap nice pathconf pause plock poll pthread_init \
Guido van Rossum162e38c2003-02-19 15:25:10 +000010166 putenv readlink realpath \
Jesse Noller355b1262009-04-02 00:03:28 +000010167 select sem_open sem_timedwait sem_getvalue sem_unlink setegid seteuid \
10168 setgid \
Martin v. Löwis4daacb12003-03-28 18:37:01 +000010169 setlocale setregid setreuid setsid setpgid setpgrp setuid setvbuf snprintf \
Martin v. Löwis50ea4562009-11-27 13:56:01 +000010170 setlocale setregid setreuid setresuid setresgid \
10171 setsid setpgid setpgrp setuid setvbuf snprintf \
Skip Montanaro7e11a012004-02-07 12:55:46 +000010172 sigaction siginterrupt sigrelse strftime \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000010173 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Neal Norwitz05a45592006-03-20 06:30:08 +000010174 truncate uname unsetenv utimes waitpid wait3 wait4 wcscoll _getpty
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010175do :
10176 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10177ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Georg Brandl71f4fbb2011-02-25 11:04:50 +000010178if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010179 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010180#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010181_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000010182
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010183fi
10184done
10185
Michael W. Hudson54241132001-12-07 15:38:26 +000010186
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010187# For some functions, having a definition is not sufficient, since
10188# we want to take their address.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010189{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chroot" >&5
10190$as_echo_n "checking for chroot... " >&6; }
10191cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010192/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010193#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010194int
10195main ()
10196{
10197void *x=chroot
10198 ;
10199 return 0;
10200}
10201_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010202if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010203
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010204$as_echo "#define HAVE_CHROOT 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010205
Matthias Klosec511b472010-05-08 11:01:39 +000010206 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010207$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010208else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010209 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10210$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010211
10212fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010213rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010214{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for link" >&5
10215$as_echo_n "checking for link... " >&6; }
10216cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010217/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010218#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010219int
10220main ()
10221{
10222void *x=link
10223 ;
10224 return 0;
10225}
10226_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010227if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010228
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010229$as_echo "#define HAVE_LINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010230
Matthias Klosec511b472010-05-08 11:01:39 +000010231 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010232$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010233else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010234 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10235$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010236
10237fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010238rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010239{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for symlink" >&5
10240$as_echo_n "checking for symlink... " >&6; }
10241cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010242/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010243#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010244int
10245main ()
10246{
10247void *x=symlink
10248 ;
10249 return 0;
10250}
10251_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010252if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010253
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010254$as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010255
Matthias Klosec511b472010-05-08 11:01:39 +000010256 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010257$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010258else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010259 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10260$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010261
10262fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010263rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010264{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fchdir" >&5
10265$as_echo_n "checking for fchdir... " >&6; }
10266cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010267/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010268#include <unistd.h>
10269int
10270main ()
10271{
10272void *x=fchdir
10273 ;
10274 return 0;
10275}
10276_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010277if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010278
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010279$as_echo "#define HAVE_FCHDIR 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010280
Matthias Klosec511b472010-05-08 11:01:39 +000010281 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010282$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010283else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010284 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10285$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010286
10287fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010288rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010289{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fsync" >&5
10290$as_echo_n "checking for fsync... " >&6; }
10291cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010292/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010293#include <unistd.h>
10294int
10295main ()
10296{
10297void *x=fsync
10298 ;
10299 return 0;
10300}
10301_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010302if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010303
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010304$as_echo "#define HAVE_FSYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010305
Matthias Klosec511b472010-05-08 11:01:39 +000010306 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010307$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010308else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010309 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10310$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010311
10312fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010313rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010314{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fdatasync" >&5
10315$as_echo_n "checking for fdatasync... " >&6; }
10316cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010317/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010318#include <unistd.h>
10319int
10320main ()
10321{
10322void *x=fdatasync
10323 ;
10324 return 0;
10325}
10326_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010327if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010328
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010329$as_echo "#define HAVE_FDATASYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010330
Matthias Klosec511b472010-05-08 11:01:39 +000010331 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010332$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010333else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010334 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10335$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010336
10337fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010338rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010339{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll" >&5
10340$as_echo_n "checking for epoll... " >&6; }
10341cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000010342/* end confdefs.h. */
10343#include <sys/epoll.h>
10344int
10345main ()
10346{
10347void *x=epoll_create
10348 ;
10349 return 0;
10350}
10351_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010352if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010353
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010354$as_echo "#define HAVE_EPOLL 1" >>confdefs.h
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000010355
Matthias Klosec511b472010-05-08 11:01:39 +000010356 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010357$as_echo "yes" >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000010358else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010359 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10360$as_echo "no" >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000010361
10362fi
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000010363rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010364{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kqueue" >&5
10365$as_echo_n "checking for kqueue... " >&6; }
10366cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000010367/* end confdefs.h. */
10368
10369#include <sys/types.h>
10370#include <sys/event.h>
10371
10372int
10373main ()
10374{
10375int x=kqueue()
10376 ;
10377 return 0;
10378}
10379_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010380if ac_fn_c_try_compile "$LINENO"; then :
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000010381
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010382$as_echo "#define HAVE_KQUEUE 1" >>confdefs.h
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000010383
Matthias Klosec511b472010-05-08 11:01:39 +000010384 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010385$as_echo "yes" >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000010386else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010387 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10388$as_echo "no" >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000010389
10390fi
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000010391rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000010392# On some systems (eg. FreeBSD 5), we would find a definition of the
10393# functions ctermid_r, setgroups in the library, but no prototype
10394# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
10395# address to avoid compiler warnings and potential miscompilations
10396# because of the missing prototypes.
10397
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010398{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ctermid_r" >&5
10399$as_echo_n "checking for ctermid_r... " >&6; }
10400cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010401/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000010402
Martin v. Löwisd5843682002-11-21 20:41:28 +000010403#include <stdio.h>
10404
Martin v. Löwisd5843682002-11-21 20:41:28 +000010405int
10406main ()
10407{
10408void* p = ctermid_r
10409 ;
10410 return 0;
10411}
10412_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010413if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000010414
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010415$as_echo "#define HAVE_CTERMID_R 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000010416
Matthias Klosec511b472010-05-08 11:01:39 +000010417 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010418$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010419else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010420 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10421$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010422
10423fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010424rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10425
Antoine Pitroub170f172010-09-10 18:47:36 +000010426{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock declaration" >&5
10427$as_echo_n "checking for flock declaration... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010428if ${ac_cv_flock_decl+:} false; then :
Antoine Pitroub170f172010-09-10 18:47:36 +000010429 $as_echo_n "(cached) " >&6
10430else
10431 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010432/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010433#include <sys/file.h>
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010434int
10435main ()
10436{
10437void* p = flock
Antoine Pitroub170f172010-09-10 18:47:36 +000010438
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010439 ;
10440 return 0;
10441}
10442_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010443if ac_fn_c_try_compile "$LINENO"; then :
Antoine Pitroub170f172010-09-10 18:47:36 +000010444 ac_cv_flock_decl=yes
10445else
10446 ac_cv_flock_decl=no
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010447
10448fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010449rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitrou85729812010-09-07 14:55:24 +000010450
Antoine Pitroub170f172010-09-10 18:47:36 +000010451fi
10452{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_flock_decl" >&5
10453$as_echo "$ac_cv_flock_decl" >&6; }
10454if test "x${ac_cv_flock_decl}" = xyes; then
10455 for ac_func in flock
10456do :
10457 ac_fn_c_check_func "$LINENO" "flock" "ac_cv_func_flock"
Matthias Klose3cef2a92012-03-14 23:39:33 +010010458if test "x$ac_cv_func_flock" = xyes; then :
Antoine Pitroub170f172010-09-10 18:47:36 +000010459 cat >>confdefs.h <<_ACEOF
10460#define HAVE_FLOCK 1
Antoine Pitrou85729812010-09-07 14:55:24 +000010461_ACEOF
Antoine Pitroub170f172010-09-10 18:47:36 +000010462
Antoine Pitrou85729812010-09-07 14:55:24 +000010463else
Antoine Pitroub170f172010-09-10 18:47:36 +000010464 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock in -lbsd" >&5
Antoine Pitrou85729812010-09-07 14:55:24 +000010465$as_echo_n "checking for flock in -lbsd... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010466if ${ac_cv_lib_bsd_flock+:} false; then :
Antoine Pitrou85729812010-09-07 14:55:24 +000010467 $as_echo_n "(cached) " >&6
10468else
10469 ac_check_lib_save_LIBS=$LIBS
10470LIBS="-lbsd $LIBS"
10471cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10472/* end confdefs.h. */
10473
10474/* Override any GCC internal prototype to avoid an error.
10475 Use char because int might match the return type of a GCC
10476 builtin and then its argument prototype would still apply. */
10477#ifdef __cplusplus
10478extern "C"
10479#endif
10480char flock ();
10481int
10482main ()
10483{
10484return flock ();
10485 ;
10486 return 0;
10487}
10488_ACEOF
10489if ac_fn_c_try_link "$LINENO"; then :
10490 ac_cv_lib_bsd_flock=yes
10491else
10492 ac_cv_lib_bsd_flock=no
10493fi
10494rm -f core conftest.err conftest.$ac_objext \
10495 conftest$ac_exeext conftest.$ac_ext
10496LIBS=$ac_check_lib_save_LIBS
10497fi
10498{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_flock" >&5
10499$as_echo "$ac_cv_lib_bsd_flock" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010500if test "x$ac_cv_lib_bsd_flock" = xyes; then :
Antoine Pitroub170f172010-09-10 18:47:36 +000010501 $as_echo "#define HAVE_FLOCK 1" >>confdefs.h
Antoine Pitrou85729812010-09-07 14:55:24 +000010502
10503
10504$as_echo "#define FLOCK_NEEDS_LIBBSD 1" >>confdefs.h
10505
10506
10507fi
10508
10509
10510fi
Antoine Pitroub170f172010-09-10 18:47:36 +000010511done
10512
Antoine Pitrou85729812010-09-07 14:55:24 +000010513fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010514
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010515{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
10516$as_echo_n "checking for getpagesize... " >&6; }
10517cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010518/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010519
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010520#include <unistd.h>
10521
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010522int
10523main ()
10524{
10525void* p = getpagesize
10526 ;
10527 return 0;
10528}
10529_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010530if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010531
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010532$as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010533
Matthias Klosec511b472010-05-08 11:01:39 +000010534 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010535$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010536else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010537 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10538$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010539
10540fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010541rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010542
Charles-François Natali93a11752011-11-27 13:01:35 +010010543{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken unsetenv" >&5
10544$as_echo_n "checking for broken unsetenv... " >&6; }
10545cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10546/* end confdefs.h. */
10547
10548#include <stdlib.h>
10549
10550int
10551main ()
10552{
10553int res = unsetenv("DUMMY")
10554 ;
10555 return 0;
10556}
10557_ACEOF
10558if ac_fn_c_try_compile "$LINENO"; then :
10559 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10560$as_echo "no" >&6; }
10561else
10562
10563$as_echo "#define HAVE_BROKEN_UNSETENV 1" >>confdefs.h
10564
10565 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10566$as_echo "yes" >&6; }
10567
10568fi
10569rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10570
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010571for ac_prog in true
10572do
10573 # Extract the first word of "$ac_prog", so it can be a program name with args.
10574set dummy $ac_prog; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010575{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10576$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010577if ${ac_cv_prog_TRUE+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010578 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010579else
10580 if test -n "$TRUE"; then
10581 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
10582else
10583as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10584for as_dir in $PATH
10585do
10586 IFS=$as_save_IFS
10587 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010588 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +010010589 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010590 ac_cv_prog_TRUE="$ac_prog"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010591 $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 +000010592 break 2
10593 fi
10594done
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010595 done
Martin v. Löwiseba40652007-08-30 20:10:57 +000010596IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010597
10598fi
10599fi
10600TRUE=$ac_cv_prog_TRUE
10601if test -n "$TRUE"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010602 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TRUE" >&5
10603$as_echo "$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010604else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010605 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10606$as_echo "no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010607fi
10608
Martin v. Löwiseba40652007-08-30 20:10:57 +000010609
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010610 test -n "$TRUE" && break
10611done
10612test -n "$TRUE" || TRUE="/bin/true"
10613
10614
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010615{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lc" >&5
10616$as_echo_n "checking for inet_aton in -lc... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010617if ${ac_cv_lib_c_inet_aton+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010618 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010619else
10620 ac_check_lib_save_LIBS=$LIBS
10621LIBS="-lc $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010622cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010623/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010624
Martin v. Löwiseba40652007-08-30 20:10:57 +000010625/* Override any GCC internal prototype to avoid an error.
10626 Use char because int might match the return type of a GCC
10627 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010628#ifdef __cplusplus
10629extern "C"
10630#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010631char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010632int
10633main ()
10634{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010635return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010636 ;
10637 return 0;
10638}
10639_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010640if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010641 ac_cv_lib_c_inet_aton=yes
10642else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010643 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010644fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010645rm -f core conftest.err conftest.$ac_objext \
10646 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010647LIBS=$ac_check_lib_save_LIBS
10648fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010649{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_inet_aton" >&5
10650$as_echo "$ac_cv_lib_c_inet_aton" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010651if test "x$ac_cv_lib_c_inet_aton" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010652 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010653else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010654 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5
10655$as_echo_n "checking for inet_aton in -lresolv... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010656if ${ac_cv_lib_resolv_inet_aton+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010657 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010658else
10659 ac_check_lib_save_LIBS=$LIBS
10660LIBS="-lresolv $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010661cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010662/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010663
Martin v. Löwiseba40652007-08-30 20:10:57 +000010664/* Override any GCC internal prototype to avoid an error.
10665 Use char because int might match the return type of a GCC
10666 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010667#ifdef __cplusplus
10668extern "C"
10669#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010670char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010671int
10672main ()
10673{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010674return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010675 ;
10676 return 0;
10677}
10678_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010679if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010680 ac_cv_lib_resolv_inet_aton=yes
10681else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010682 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010683fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010684rm -f core conftest.err conftest.$ac_objext \
10685 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010686LIBS=$ac_check_lib_save_LIBS
10687fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010688{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5
10689$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010690if test "x$ac_cv_lib_resolv_inet_aton" = xyes; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010691 cat >>confdefs.h <<_ACEOF
10692#define HAVE_LIBRESOLV 1
10693_ACEOF
10694
10695 LIBS="-lresolv $LIBS"
10696
10697fi
10698
10699
10700fi
10701
10702
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010703# On Tru64, chflags seems to be present, but calling it will
10704# exit Python
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010705{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chflags" >&5
10706$as_echo_n "checking for chflags... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010707if ${ac_cv_have_chflags+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010708 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010709else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010710 if test "$cross_compiling" = yes; then :
Gregory P. Smith49437c22009-11-02 01:38:35 +000010711 ac_cv_have_chflags=cross
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010712else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010713 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010714/* end confdefs.h. */
Ned Deily43e10542011-06-27 23:41:53 -070010715
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010716#include <sys/stat.h>
10717#include <unistd.h>
10718int main(int argc, char*argv[])
10719{
10720 if(chflags(argv[0], 0) != 0)
10721 return 1;
10722 return 0;
10723}
Ned Deily43e10542011-06-27 23:41:53 -070010724
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010725_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010726if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010727 ac_cv_have_chflags=yes
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010728else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010729 ac_cv_have_chflags=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010730fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010731rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10732 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +000010733fi
10734
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010735
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010736fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010737{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_chflags" >&5
10738$as_echo "$ac_cv_have_chflags" >&6; }
Gregory P. Smith49437c22009-11-02 01:38:35 +000010739if test "$ac_cv_have_chflags" = cross ; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010740 ac_fn_c_check_func "$LINENO" "chflags" "ac_cv_func_chflags"
Matthias Klose3cef2a92012-03-14 23:39:33 +010010741if test "x$ac_cv_func_chflags" = xyes; then :
Gregory P. Smith49437c22009-11-02 01:38:35 +000010742 ac_cv_have_chflags="yes"
10743else
10744 ac_cv_have_chflags="no"
10745fi
10746
10747fi
10748if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010749
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010750$as_echo "#define HAVE_CHFLAGS 1" >>confdefs.h
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010751
10752fi
10753
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010754{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lchflags" >&5
10755$as_echo_n "checking for lchflags... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010756if ${ac_cv_have_lchflags+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010757 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010758else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010759 if test "$cross_compiling" = yes; then :
Gregory P. Smith49437c22009-11-02 01:38:35 +000010760 ac_cv_have_lchflags=cross
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010761else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010762 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010763/* end confdefs.h. */
Ned Deily43e10542011-06-27 23:41:53 -070010764
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010765#include <sys/stat.h>
10766#include <unistd.h>
10767int main(int argc, char*argv[])
10768{
10769 if(lchflags(argv[0], 0) != 0)
10770 return 1;
10771 return 0;
10772}
Ned Deily43e10542011-06-27 23:41:53 -070010773
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010774_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010775if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010776 ac_cv_have_lchflags=yes
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010777else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010778 ac_cv_have_lchflags=no
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010779fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010780rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10781 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010782fi
10783
10784
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010785fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010786{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lchflags" >&5
10787$as_echo "$ac_cv_have_lchflags" >&6; }
Gregory P. Smith49437c22009-11-02 01:38:35 +000010788if test "$ac_cv_have_lchflags" = cross ; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010789 ac_fn_c_check_func "$LINENO" "lchflags" "ac_cv_func_lchflags"
Matthias Klose3cef2a92012-03-14 23:39:33 +010010790if test "x$ac_cv_func_lchflags" = xyes; then :
Gregory P. Smith49437c22009-11-02 01:38:35 +000010791 ac_cv_have_lchflags="yes"
10792else
10793 ac_cv_have_lchflags="no"
10794fi
10795
10796fi
10797if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010798
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010799$as_echo "#define HAVE_LCHFLAGS 1" >>confdefs.h
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010800
10801fi
10802
Ronald Oussorenf8752642006-07-06 10:13:35 +000010803case $ac_sys_system/$ac_sys_release in
10804Darwin/*)
10805 _CUR_CFLAGS="${CFLAGS}"
10806 _CUR_LDFLAGS="${LDFLAGS}"
10807 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
10808 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
10809 ;;
10810esac
10811
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010812{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5
10813$as_echo_n "checking for inflateCopy in -lz... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010814if ${ac_cv_lib_z_inflateCopy+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010815 $as_echo_n "(cached) " >&6
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000010816else
10817 ac_check_lib_save_LIBS=$LIBS
10818LIBS="-lz $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010819cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000010820/* end confdefs.h. */
10821
Martin v. Löwiseba40652007-08-30 20:10:57 +000010822/* Override any GCC internal prototype to avoid an error.
10823 Use char because int might match the return type of a GCC
10824 builtin and then its argument prototype would still apply. */
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000010825#ifdef __cplusplus
10826extern "C"
10827#endif
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000010828char inflateCopy ();
10829int
10830main ()
10831{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010832return inflateCopy ();
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000010833 ;
10834 return 0;
10835}
10836_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010837if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000010838 ac_cv_lib_z_inflateCopy=yes
10839else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010840 ac_cv_lib_z_inflateCopy=no
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000010841fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010842rm -f core conftest.err conftest.$ac_objext \
10843 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000010844LIBS=$ac_check_lib_save_LIBS
10845fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010846{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5
10847$as_echo "$ac_cv_lib_z_inflateCopy" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010848if test "x$ac_cv_lib_z_inflateCopy" = xyes; then :
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000010849
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010850$as_echo "#define HAVE_ZLIB_COPY 1" >>confdefs.h
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000010851
10852fi
10853
10854
Ronald Oussorenf8752642006-07-06 10:13:35 +000010855case $ac_sys_system/$ac_sys_release in
10856Darwin/*)
10857 CFLAGS="${_CUR_CFLAGS}"
10858 LDFLAGS="${_CUR_LDFLAGS}"
10859 ;;
10860esac
10861
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010862{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hstrerror" >&5
10863$as_echo_n "checking for hstrerror... " >&6; }
10864cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010865/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000010866
Martin v. Löwise9416172003-05-03 10:12:45 +000010867#include <netdb.h>
10868
Martin v. Löwise9416172003-05-03 10:12:45 +000010869int
10870main ()
10871{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010872void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000010873 ;
10874 return 0;
10875}
10876_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010877if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000010878
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010879$as_echo "#define HAVE_HSTRERROR 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000010880
Matthias Klosec511b472010-05-08 11:01:39 +000010881 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010882$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010883else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010884 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10885$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010886
10887fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010888rm -f core conftest.err conftest.$ac_objext \
10889 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010890
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010891{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5
10892$as_echo_n "checking for inet_aton... " >&6; }
10893cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010894/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000010895
Martin v. Löwis86d66262006-02-17 08:40:11 +000010896#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000010897#include <sys/socket.h>
10898#include <netinet/in.h>
10899#include <arpa/inet.h>
10900
Martin v. Löwise9416172003-05-03 10:12:45 +000010901int
10902main ()
10903{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010904void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000010905 ;
10906 return 0;
10907}
10908_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010909if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000010910
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010911$as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000010912
Matthias Klosec511b472010-05-08 11:01:39 +000010913 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010914$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010915else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010916 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10917$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010918
10919fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010920rm -f core conftest.err conftest.$ac_objext \
10921 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010922
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010923{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_pton" >&5
10924$as_echo_n "checking for inet_pton... " >&6; }
10925cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010926/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000010927
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000010928#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000010929#include <sys/socket.h>
10930#include <netinet/in.h>
10931#include <arpa/inet.h>
10932
Martin v. Löwise9416172003-05-03 10:12:45 +000010933int
10934main ()
10935{
10936void* p = inet_pton
10937 ;
10938 return 0;
10939}
10940_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010941if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000010942
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010943$as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000010944
Matthias Klosec511b472010-05-08 11:01:39 +000010945 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010946$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010947else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010948 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10949$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010950
10951fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010952rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000010953
Martin v. Löwisd6640d42003-07-06 09:29:52 +000010954# On some systems, setgroups is in unistd.h, on others, in grp.h
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010955{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for setgroups" >&5
10956$as_echo_n "checking for setgroups... " >&6; }
10957cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010958/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000010959
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000010960#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000010961#ifdef HAVE_GRP_H
10962#include <grp.h>
10963#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000010964
Martin v. Löwisd5843682002-11-21 20:41:28 +000010965int
10966main ()
10967{
10968void* p = setgroups
10969 ;
10970 return 0;
10971}
10972_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010973if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000010974
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010975$as_echo "#define HAVE_SETGROUPS 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000010976
Matthias Klosec511b472010-05-08 11:01:39 +000010977 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010978$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010979else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010980 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10981$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010982
10983fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010984rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000010985
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010986# check for openpty and forkpty
10987
10988for ac_func in openpty
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010989do :
10990 ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty"
Matthias Klose3cef2a92012-03-14 23:39:33 +010010991if test "x$ac_cv_func_openpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010992 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010993#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010994_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010995
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010996else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010997 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5
10998$as_echo_n "checking for openpty in -lutil... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010999if ${ac_cv_lib_util_openpty+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011000 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000011001else
Martin v. Löwis11437992002-04-12 09:54:03 +000011002 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011003LIBS="-lutil $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011004cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011005/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011006
Martin v. Löwiseba40652007-08-30 20:10:57 +000011007/* Override any GCC internal prototype to avoid an error.
11008 Use char because int might match the return type of a GCC
11009 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011010#ifdef __cplusplus
11011extern "C"
11012#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011013char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011014int
11015main ()
11016{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011017return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011018 ;
11019 return 0;
11020}
11021_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011022if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011023 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000011024else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011025 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011026fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011027rm -f core conftest.err conftest.$ac_objext \
11028 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011029LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011030fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011031{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5
11032$as_echo "$ac_cv_lib_util_openpty" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011033if test "x$ac_cv_lib_util_openpty" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011034 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000011035 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011036else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011037 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lbsd" >&5
11038$as_echo_n "checking for openpty in -lbsd... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011039if ${ac_cv_lib_bsd_openpty+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011040 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011041else
11042 ac_check_lib_save_LIBS=$LIBS
11043LIBS="-lbsd $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011044cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011045/* end confdefs.h. */
11046
Martin v. Löwiseba40652007-08-30 20:10:57 +000011047/* Override any GCC internal prototype to avoid an error.
11048 Use char because int might match the return type of a GCC
11049 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011050#ifdef __cplusplus
11051extern "C"
11052#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011053char openpty ();
11054int
11055main ()
11056{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011057return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011058 ;
11059 return 0;
11060}
11061_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011062if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011063 ac_cv_lib_bsd_openpty=yes
11064else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011065 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011066fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011067rm -f core conftest.err conftest.$ac_objext \
11068 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011069LIBS=$ac_check_lib_save_LIBS
11070fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011071{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_openpty" >&5
11072$as_echo "$ac_cv_lib_bsd_openpty" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011073if test "x$ac_cv_lib_bsd_openpty" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011074 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011075 LIBS="$LIBS -lbsd"
11076fi
11077
11078
11079fi
11080
Fred Drake8cef4cf2000-06-28 16:40:38 +000011081
11082fi
11083done
11084
11085for ac_func in forkpty
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011086do :
11087 ac_fn_c_check_func "$LINENO" "forkpty" "ac_cv_func_forkpty"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011088if test "x$ac_cv_func_forkpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011089 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011090#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011091_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011092
Fred Drake8cef4cf2000-06-28 16:40:38 +000011093else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011094 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5
11095$as_echo_n "checking for forkpty in -lutil... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011096if ${ac_cv_lib_util_forkpty+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011097 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000011098else
Martin v. Löwis11437992002-04-12 09:54:03 +000011099 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011100LIBS="-lutil $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011101cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011102/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011103
Martin v. Löwiseba40652007-08-30 20:10:57 +000011104/* Override any GCC internal prototype to avoid an error.
11105 Use char because int might match the return type of a GCC
11106 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011107#ifdef __cplusplus
11108extern "C"
11109#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011110char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011111int
11112main ()
11113{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011114return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011115 ;
11116 return 0;
11117}
11118_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011119if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011120 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000011121else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011122 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011123fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011124rm -f core conftest.err conftest.$ac_objext \
11125 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011126LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011127fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011128{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5
11129$as_echo "$ac_cv_lib_util_forkpty" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011130if test "x$ac_cv_lib_util_forkpty" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011131 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000011132 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011133else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011134 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lbsd" >&5
11135$as_echo_n "checking for forkpty in -lbsd... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011136if ${ac_cv_lib_bsd_forkpty+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011137 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011138else
11139 ac_check_lib_save_LIBS=$LIBS
11140LIBS="-lbsd $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011141cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011142/* end confdefs.h. */
11143
Martin v. Löwiseba40652007-08-30 20:10:57 +000011144/* Override any GCC internal prototype to avoid an error.
11145 Use char because int might match the return type of a GCC
11146 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011147#ifdef __cplusplus
11148extern "C"
11149#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011150char forkpty ();
11151int
11152main ()
11153{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011154return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011155 ;
11156 return 0;
11157}
11158_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011159if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011160 ac_cv_lib_bsd_forkpty=yes
11161else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011162 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011163fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011164rm -f core conftest.err conftest.$ac_objext \
11165 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011166LIBS=$ac_check_lib_save_LIBS
11167fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011168{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_forkpty" >&5
11169$as_echo "$ac_cv_lib_bsd_forkpty" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011170if test "x$ac_cv_lib_bsd_forkpty" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011171 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011172 LIBS="$LIBS -lbsd"
11173fi
11174
11175
11176fi
11177
Fred Drake8cef4cf2000-06-28 16:40:38 +000011178
11179fi
11180done
11181
Jack Jansendd19cf82001-12-06 22:36:17 +000011182
Brett Cannonaa5778d2008-03-18 04:09:00 +000011183# Stuff for expat.
Brett Cannonaa5778d2008-03-18 04:09:00 +000011184for ac_func in memmove
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011185do :
11186 ac_fn_c_check_func "$LINENO" "memmove" "ac_cv_func_memmove"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011187if test "x$ac_cv_func_memmove" = xyes; then :
Brett Cannonaa5778d2008-03-18 04:09:00 +000011188 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011189#define HAVE_MEMMOVE 1
Brett Cannonaa5778d2008-03-18 04:09:00 +000011190_ACEOF
11191
11192fi
11193done
11194
11195
Michael W. Hudson54241132001-12-07 15:38:26 +000011196# check for long file support functions
Fred Drake8cef4cf2000-06-28 16:40:38 +000011197for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011198do :
11199 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11200ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Georg Brandl71f4fbb2011-02-25 11:04:50 +000011201if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011202 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011203#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011204_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000011205
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011206fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000011207done
11208
Michael W. Hudson54241132001-12-07 15:38:26 +000011209
Georg Brandl71f4fbb2011-02-25 11:04:50 +000011210ac_fn_c_check_func "$LINENO" "dup2" "ac_cv_func_dup2"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011211if test "x$ac_cv_func_dup2" = xyes; then :
Georg Brandl71f4fbb2011-02-25 11:04:50 +000011212 $as_echo "#define HAVE_DUP2 1" >>confdefs.h
Martin v. Löwis1142de32002-03-29 16:28:31 +000011213
Martin v. Löwis1142de32002-03-29 16:28:31 +000011214else
Martin v. Löwiseba40652007-08-30 20:10:57 +000011215 case " $LIBOBJS " in
Georg Brandl71f4fbb2011-02-25 11:04:50 +000011216 *" dup2.$ac_objext "* ) ;;
11217 *) LIBOBJS="$LIBOBJS dup2.$ac_objext"
Martin v. Löwiseba40652007-08-30 20:10:57 +000011218 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000011219esac
11220
Martin v. Löwis1142de32002-03-29 16:28:31 +000011221fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +000011222
11223ac_fn_c_check_func "$LINENO" "getcwd" "ac_cv_func_getcwd"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011224if test "x$ac_cv_func_getcwd" = xyes; then :
Georg Brandl71f4fbb2011-02-25 11:04:50 +000011225 $as_echo "#define HAVE_GETCWD 1" >>confdefs.h
11226
11227else
11228 case " $LIBOBJS " in
11229 *" getcwd.$ac_objext "* ) ;;
11230 *) LIBOBJS="$LIBOBJS getcwd.$ac_objext"
11231 ;;
11232esac
11233
11234fi
11235
11236ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011237if test "x$ac_cv_func_strdup" = xyes; then :
Georg Brandl71f4fbb2011-02-25 11:04:50 +000011238 $as_echo "#define HAVE_STRDUP 1" >>confdefs.h
11239
11240else
11241 case " $LIBOBJS " in
11242 *" strdup.$ac_objext "* ) ;;
11243 *) LIBOBJS="$LIBOBJS strdup.$ac_objext"
11244 ;;
11245esac
11246
11247fi
Martin v. Löwis1142de32002-03-29 16:28:31 +000011248
11249
11250for ac_func in getpgrp
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011251do :
11252 ac_fn_c_check_func "$LINENO" "getpgrp" "ac_cv_func_getpgrp"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011253if test "x$ac_cv_func_getpgrp" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011254 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011255#define HAVE_GETPGRP 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011256_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011257 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011258/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011259#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011260int
11261main ()
11262{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011263getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000011264 ;
11265 return 0;
11266}
11267_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011268if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011269
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011270$as_echo "#define GETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000011271
Guido van Rossum627b2d71993-12-24 10:39:16 +000011272fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011273rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011274
Guido van Rossum627b2d71993-12-24 10:39:16 +000011275fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011276done
Guido van Rossum627b2d71993-12-24 10:39:16 +000011277
Jack Jansen150753c2003-03-29 22:07:47 +000011278for ac_func in setpgrp
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011279do :
11280 ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011281if test "x$ac_cv_func_setpgrp" = xyes; then :
Jack Jansen150753c2003-03-29 22:07:47 +000011282 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011283#define HAVE_SETPGRP 1
Jack Jansen150753c2003-03-29 22:07:47 +000011284_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011285 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011286/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000011287#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000011288int
11289main ()
11290{
11291setpgrp(0,0);
11292 ;
11293 return 0;
11294}
11295_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011296if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011297
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011298$as_echo "#define SETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000011299
Guido van Rossum8eee56f1994-10-20 22:18:37 +000011300fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011301rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000011302
11303fi
11304done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000011305
Thomas Wouters3a584202000-08-05 23:28:51 +000011306for ac_func in gettimeofday
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011307do :
11308 ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011309if test "x$ac_cv_func_gettimeofday" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011310 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011311#define HAVE_GETTIMEOFDAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011312_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011313 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011314/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000011315#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011316int
11317main ()
11318{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011319gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000011320 ;
11321 return 0;
11322}
11323_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011324if ac_fn_c_try_compile "$LINENO"; then :
11325
Guido van Rossum627b2d71993-12-24 10:39:16 +000011326else
Skip Montanaro6dead952003-09-25 14:50:04 +000011327
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011328$as_echo "#define GETTIMEOFDAY_NO_TZ 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000011329
Martin v. Löwis11437992002-04-12 09:54:03 +000011330
Guido van Rossum627b2d71993-12-24 10:39:16 +000011331fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011332rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011333
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011334fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011335done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011336
Michael W. Hudson54241132001-12-07 15:38:26 +000011337
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011338{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for major" >&5
11339$as_echo_n "checking for major... " >&6; }
11340cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011341/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011342
Neal Norwitz6eb37f02003-02-23 23:28:15 +000011343#if defined(MAJOR_IN_MKDEV)
11344#include <sys/mkdev.h>
11345#elif defined(MAJOR_IN_SYSMACROS)
11346#include <sys/sysmacros.h>
11347#else
11348#include <sys/types.h>
11349#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011350
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011351int
11352main ()
11353{
11354
11355 makedev(major(0),minor(0));
11356
11357 ;
11358 return 0;
11359}
11360_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011361if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011362
11363
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011364$as_echo "#define HAVE_DEVICE_MACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011365
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011366 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11367$as_echo "yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011368
11369else
Skip Montanaro6dead952003-09-25 14:50:04 +000011370
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011371 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11372$as_echo "no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011373
11374fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011375rm -f core conftest.err conftest.$ac_objext \
11376 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000011377
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011378# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000011379# for [no]getaddrinfo in netdb.h.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011380{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
11381$as_echo_n "checking for getaddrinfo... " >&6; }
11382cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011383/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011384
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000011385#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011386#include <sys/socket.h>
11387#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000011388#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011389
Martin v. Löwis11437992002-04-12 09:54:03 +000011390int
11391main ()
11392{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011393getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000011394 ;
11395 return 0;
11396}
11397_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011398if ac_fn_c_try_link "$LINENO"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011399 have_getaddrinfo=yes
11400else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011401 have_getaddrinfo=no
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011402fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011403rm -f core conftest.err conftest.$ac_objext \
11404 conftest$ac_exeext conftest.$ac_ext
11405{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getaddrinfo" >&5
11406$as_echo "$have_getaddrinfo" >&6; }
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011407if test $have_getaddrinfo = yes
11408then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011409 { $as_echo "$as_me:${as_lineno-$LINENO}: checking getaddrinfo bug" >&5
11410$as_echo_n "checking getaddrinfo bug... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011411 if ${ac_cv_buggy_getaddrinfo+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011412 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011413else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011414 if test "$cross_compiling" = yes; then :
doko@python.orgd65e2ba2013-01-31 23:52:03 +010011415
11416if test "${enable_ipv6+set}" = set; then
11417 ac_cv_buggy_getaddrinfo="no -- configured with --(en|dis)able-ipv6"
11418else
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011419 ac_cv_buggy_getaddrinfo=yes
doko@python.orgd65e2ba2013-01-31 23:52:03 +010011420fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011421else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011422 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011423/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011424
Stefan Krah0afe4e42012-11-22 23:56:51 +010011425#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011426#include <sys/types.h>
11427#include <netdb.h>
11428#include <string.h>
11429#include <sys/socket.h>
11430#include <netinet/in.h>
11431
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011432int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011433{
11434 int passive, gaierr, inet4 = 0, inet6 = 0;
11435 struct addrinfo hints, *ai, *aitop;
11436 char straddr[INET6_ADDRSTRLEN], strport[16];
11437
11438 for (passive = 0; passive <= 1; passive++) {
11439 memset(&hints, 0, sizeof(hints));
11440 hints.ai_family = AF_UNSPEC;
11441 hints.ai_flags = passive ? AI_PASSIVE : 0;
11442 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000011443 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011444 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
11445 (void)gai_strerror(gaierr);
11446 goto bad;
11447 }
11448 for (ai = aitop; ai; ai = ai->ai_next) {
11449 if (ai->ai_addr == NULL ||
11450 ai->ai_addrlen == 0 ||
11451 getnameinfo(ai->ai_addr, ai->ai_addrlen,
11452 straddr, sizeof(straddr), strport, sizeof(strport),
11453 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
11454 goto bad;
11455 }
11456 switch (ai->ai_family) {
11457 case AF_INET:
11458 if (strcmp(strport, "54321") != 0) {
11459 goto bad;
11460 }
11461 if (passive) {
11462 if (strcmp(straddr, "0.0.0.0") != 0) {
11463 goto bad;
11464 }
11465 } else {
11466 if (strcmp(straddr, "127.0.0.1") != 0) {
11467 goto bad;
11468 }
11469 }
11470 inet4++;
11471 break;
11472 case AF_INET6:
11473 if (strcmp(strport, "54321") != 0) {
11474 goto bad;
11475 }
11476 if (passive) {
11477 if (strcmp(straddr, "::") != 0) {
11478 goto bad;
11479 }
11480 } else {
11481 if (strcmp(straddr, "::1") != 0) {
11482 goto bad;
11483 }
11484 }
11485 inet6++;
11486 break;
11487 case AF_UNSPEC:
11488 goto bad;
11489 break;
11490 default:
11491 /* another family support? */
11492 break;
11493 }
11494 }
11495 }
11496
11497 if (!(inet4 == 0 || inet4 == 2))
11498 goto bad;
11499 if (!(inet6 == 0 || inet6 == 2))
11500 goto bad;
11501
11502 if (aitop)
11503 freeaddrinfo(aitop);
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011504 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011505
11506 bad:
11507 if (aitop)
11508 freeaddrinfo(aitop);
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011509 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011510}
11511
Martin v. Löwis11437992002-04-12 09:54:03 +000011512_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011513if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011514 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011515else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011516 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011517fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011518rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11519 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011520fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011521
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011522fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011523
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011524fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011525
Benjamin Peterson75fed812010-11-01 01:47:19 +000011526{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_buggy_getaddrinfo" >&5
11527$as_echo "$ac_cv_buggy_getaddrinfo" >&6; }
11528
Mark Dickinson0ef0b912009-12-31 21:11:48 +000011529if test $have_getaddrinfo = no -o "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011530then
11531 if test $ipv6 = yes
11532 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011533 echo 'Fatal: You must get working getaddrinfo() function.'
11534 echo ' or you can specify "--disable-ipv6"'.
11535 exit 1
11536 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011537else
Martin v. Löwis11437992002-04-12 09:54:03 +000011538
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011539$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011540
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011541fi
Benjamin Peterson75fed812010-11-01 01:47:19 +000011542
Jack Jansen9a66b6d2001-08-08 13:56:14 +000011543for ac_func in getnameinfo
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011544do :
11545 ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011546if test "x$ac_cv_func_getnameinfo" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011547 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011548#define HAVE_GETNAMEINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011549_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011550
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011551fi
11552done
11553
Michael W. Hudson54241132001-12-07 15:38:26 +000011554
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011555# checks for structures
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011556{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
11557$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011558if ${ac_cv_header_time+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011559 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011560else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011561 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011562/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011563#include <sys/types.h>
11564#include <sys/time.h>
11565#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011566
Martin v. Löwis11437992002-04-12 09:54:03 +000011567int
11568main ()
11569{
11570if ((struct tm *) 0)
11571return 0;
11572 ;
11573 return 0;
11574}
11575_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011576if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011577 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000011578else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011579 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011580fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011581rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011582fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011583{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
11584$as_echo "$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000011585if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011586
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011587$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011588
11589fi
11590
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011591{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
11592$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011593if ${ac_cv_struct_tm+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011594 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011595else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011596 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011597/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011598#include <sys/types.h>
11599#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011600
Martin v. Löwis11437992002-04-12 09:54:03 +000011601int
11602main ()
11603{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011604struct tm tm;
11605 int *p = &tm.tm_sec;
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011606 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000011607 ;
11608 return 0;
11609}
11610_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011611if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011612 ac_cv_struct_tm=time.h
11613else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011614 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011615fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011616rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011617fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011618{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
11619$as_echo "$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000011620if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011621
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011622$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011623
11624fi
11625
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011626ac_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 +000011627#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000011628
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011629"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011630if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011631
11632cat >>confdefs.h <<_ACEOF
11633#define HAVE_STRUCT_TM_TM_ZONE 1
11634_ACEOF
11635
11636
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011637fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011638
Martin v. Löwis11437992002-04-12 09:54:03 +000011639if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
11640
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011641$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011642
11643else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011644 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
11645"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011646if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011647 ac_have_decl=1
Martin v. Löwiseba40652007-08-30 20:10:57 +000011648else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011649 ac_have_decl=0
Martin v. Löwiseba40652007-08-30 20:10:57 +000011650fi
11651
Martin v. Löwiseba40652007-08-30 20:10:57 +000011652cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011653#define HAVE_DECL_TZNAME $ac_have_decl
Martin v. Löwiseba40652007-08-30 20:10:57 +000011654_ACEOF
11655
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011656 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
11657$as_echo_n "checking for tzname... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011658if ${ac_cv_var_tzname+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011659 $as_echo_n "(cached) " >&6
Martin v. Löwiseba40652007-08-30 20:10:57 +000011660else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011661 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011662/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000011663#include <time.h>
Martin v. Löwiseba40652007-08-30 20:10:57 +000011664#if !HAVE_DECL_TZNAME
11665extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000011666#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011667
Martin v. Löwis11437992002-04-12 09:54:03 +000011668int
11669main ()
11670{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011671return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000011672 ;
11673 return 0;
11674}
11675_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011676if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011677 ac_cv_var_tzname=yes
11678else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011679 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011680fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011681rm -f core conftest.err conftest.$ac_objext \
11682 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000011683fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011684{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
11685$as_echo "$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000011686 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011687
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011688$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000011689
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011690 fi
11691fi
11692
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011693ac_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 +010011694if test "x$ac_cv_member_struct_stat_st_rdev" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011695
11696cat >>confdefs.h <<_ACEOF
11697#define HAVE_STRUCT_STAT_ST_RDEV 1
11698_ACEOF
11699
11700
Guido van Rossum98bf58f2001-10-18 20:34:25 +000011701fi
11702
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011703ac_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 +010011704if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000011705
Martin v. Löwis11437992002-04-12 09:54:03 +000011706cat >>confdefs.h <<_ACEOF
11707#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
11708_ACEOF
11709
11710
Guido van Rossum98bf58f2001-10-18 20:34:25 +000011711fi
11712
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011713ac_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 +010011714if test "x$ac_cv_member_struct_stat_st_flags" = xyes; then :
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000011715
11716cat >>confdefs.h <<_ACEOF
11717#define HAVE_STRUCT_STAT_ST_FLAGS 1
11718_ACEOF
11719
11720
11721fi
11722
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011723ac_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 +010011724if test "x$ac_cv_member_struct_stat_st_gen" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000011725
11726cat >>confdefs.h <<_ACEOF
11727#define HAVE_STRUCT_STAT_ST_GEN 1
11728_ACEOF
11729
11730
11731fi
11732
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011733ac_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 +010011734if test "x$ac_cv_member_struct_stat_st_birthtime" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000011735
11736cat >>confdefs.h <<_ACEOF
11737#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
11738_ACEOF
11739
11740
11741fi
11742
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011743ac_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 +010011744if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000011745
Martin v. Löwis11437992002-04-12 09:54:03 +000011746cat >>confdefs.h <<_ACEOF
11747#define HAVE_STRUCT_STAT_ST_BLOCKS 1
11748_ACEOF
11749
11750
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011751$as_echo "#define HAVE_ST_BLOCKS 1" >>confdefs.h
Guido van Rossum98bf58f2001-10-18 20:34:25 +000011752
11753else
Martin v. Löwiseba40652007-08-30 20:10:57 +000011754 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000011755 *" fileblocks.$ac_objext "* ) ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000011756 *) LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
11757 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000011758esac
11759
Guido van Rossum98bf58f2001-10-18 20:34:25 +000011760fi
11761
Michael W. Hudson54241132001-12-07 15:38:26 +000011762
Martin v. Löwis11437992002-04-12 09:54:03 +000011763
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011764{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5
11765$as_echo_n "checking for time.h that defines altzone... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011766if ${ac_cv_header_time_altzone+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011767 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011768else
Matthias Klosec511b472010-05-08 11:01:39 +000011769
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011770 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011771/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000011772#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011773int
11774main ()
11775{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011776return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000011777 ;
11778 return 0;
11779}
11780_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011781if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011782 ac_cv_header_time_altzone=yes
11783else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011784 ac_cv_header_time_altzone=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011785fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011786rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosec511b472010-05-08 11:01:39 +000011787
Martin v. Löwiseba40652007-08-30 20:10:57 +000011788fi
11789
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011790{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5
11791$as_echo "$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011792if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011793
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011794$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011795
11796fi
11797
Guido van Rossumda88dad1995-01-26 00:46:29 +000011798was_it_defined=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011799{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
11800$as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
11801cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011802/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000011803
11804#include <sys/types.h>
11805#include <sys/select.h>
11806#include <sys/time.h>
11807
Martin v. Löwis11437992002-04-12 09:54:03 +000011808int
11809main ()
11810{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011811;
Martin v. Löwis11437992002-04-12 09:54:03 +000011812 ;
11813 return 0;
11814}
11815_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011816if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011817
11818
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011819$as_echo "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011820
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011821 was_it_defined=yes
11822
Martin v. Löwiseba40652007-08-30 20:10:57 +000011823fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011824rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011825{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
11826$as_echo "$was_it_defined" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000011827
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011828{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for addrinfo" >&5
11829$as_echo_n "checking for addrinfo... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011830if ${ac_cv_struct_addrinfo+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011831 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011832else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011833 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011834/* end confdefs.h. */
Matthias Klosec511b472010-05-08 11:01:39 +000011835#include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011836int
11837main ()
11838{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011839struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000011840 ;
11841 return 0;
11842}
11843_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011844if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011845 ac_cv_struct_addrinfo=yes
11846else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011847 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011848fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011849rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11850fi
11851
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011852{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5
11853$as_echo "$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011854if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011855
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011856$as_echo "#define HAVE_ADDRINFO 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011857
11858fi
11859
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011860{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5
11861$as_echo_n "checking for sockaddr_storage... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011862if ${ac_cv_struct_sockaddr_storage+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011863 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011864else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011865 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011866/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011867
11868# include <sys/types.h>
11869# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011870int
11871main ()
11872{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011873struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000011874 ;
11875 return 0;
11876}
11877_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011878if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011879 ac_cv_struct_sockaddr_storage=yes
11880else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011881 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011882fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011883rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11884fi
11885
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011886{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5
11887$as_echo "$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011888if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011889
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011890$as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011891
11892fi
11893
Guido van Rossum627b2d71993-12-24 10:39:16 +000011894# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000011895
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011896{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
11897$as_echo_n "checking whether char is unsigned... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011898if ${ac_cv_c_char_unsigned+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011899 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000011900else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011901 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011902/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011903$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000011904int
11905main ()
11906{
11907static int test_array [1 - 2 * !(((char) -1) < 0)];
Charles-François Natalibe2b9072013-01-08 19:47:00 +010011908test_array [0] = 0;
11909return test_array [0];
Martin v. Löwis11437992002-04-12 09:54:03 +000011910
11911 ;
11912 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000011913}
Martin v. Löwis11437992002-04-12 09:54:03 +000011914_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011915if ac_fn_c_try_compile "$LINENO"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000011916 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000011917else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011918 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011919fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011920rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000011921fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011922{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
11923$as_echo "$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011924if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011925 $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011926
11927fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000011928
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011929{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
11930$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011931if ${ac_cv_c_const+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011932 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000011933else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011934 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011935/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011936
Martin v. Löwis11437992002-04-12 09:54:03 +000011937int
11938main ()
11939{
Charles-François Natalibe2b9072013-01-08 19:47:00 +010011940
Martin v. Löwis11437992002-04-12 09:54:03 +000011941#ifndef __cplusplus
Charles-François Natalibe2b9072013-01-08 19:47:00 +010011942 /* Ultrix mips cc rejects this sort of thing. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011943 typedef int charset[2];
Charles-François Natalibe2b9072013-01-08 19:47:00 +010011944 const charset cs = { 0, 0 };
Martin v. Löwis11437992002-04-12 09:54:03 +000011945 /* SunOS 4.1.1 cc rejects this. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000011946 char const *const *pcpcc;
11947 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000011948 /* NEC SVR4.0.2 mips cc rejects this. */
11949 struct point {int x, y;};
11950 static struct point const zero = {0,0};
11951 /* AIX XL C 1.02.0.0 rejects this.
11952 It does not let you subtract one const X* pointer from another in
11953 an arm of an if-expression whose if-part is not a constant
11954 expression */
11955 const char *g = "string";
Martin v. Löwiseba40652007-08-30 20:10:57 +000011956 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000011957 /* HPUX 7.0 cc rejects these. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000011958 ++pcpcc;
11959 ppc = (char**) pcpcc;
11960 pcpcc = (char const *const *) ppc;
Charles-François Natalibe2b9072013-01-08 19:47:00 +010011961 { /* SCO 3.2v4 cc rejects this sort of thing. */
11962 char tx;
11963 char *t = &tx;
Martin v. Löwis11437992002-04-12 09:54:03 +000011964 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011965
Martin v. Löwis11437992002-04-12 09:54:03 +000011966 *t++ = 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +000011967 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011968 }
11969 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
11970 int x[] = {25, 17};
11971 const int *foo = &x[0];
11972 ++foo;
11973 }
11974 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
11975 typedef const int *iptr;
11976 iptr p = 0;
11977 ++p;
11978 }
Charles-François Natalibe2b9072013-01-08 19:47:00 +010011979 { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
Martin v. Löwis11437992002-04-12 09:54:03 +000011980 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
Charles-François Natalibe2b9072013-01-08 19:47:00 +010011981 struct s { int j; const int *ap[3]; } bx;
11982 struct s *b = &bx; b->j = 5;
Martin v. Löwis11437992002-04-12 09:54:03 +000011983 }
11984 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
11985 const int foo = 10;
Martin v. Löwiseba40652007-08-30 20:10:57 +000011986 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011987 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000011988 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000011989#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000011990
Martin v. Löwis11437992002-04-12 09:54:03 +000011991 ;
11992 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000011993}
Martin v. Löwis11437992002-04-12 09:54:03 +000011994_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011995if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011996 ac_cv_c_const=yes
11997else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011998 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011999fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012000rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012001fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012002{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
12003$as_echo "$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012004if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012005
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012006$as_echo "#define const /**/" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012007
12008fi
12009
Michael W. Hudson54241132001-12-07 15:38:26 +000012010
Guido van Rossumda88dad1995-01-26 00:46:29 +000012011works=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012012{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5
12013$as_echo_n "checking for working volatile... " >&6; }
12014cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012015/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000012016
Martin v. Löwis11437992002-04-12 09:54:03 +000012017int
12018main ()
12019{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012020volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012021 ;
12022 return 0;
12023}
12024_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012025if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000012026 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000012027else
Skip Montanaro6dead952003-09-25 14:50:04 +000012028
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012029$as_echo "#define volatile /**/" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000012030
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012031
Guido van Rossum627b2d71993-12-24 10:39:16 +000012032fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012033rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012034{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
12035$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000012036
Guido van Rossumda88dad1995-01-26 00:46:29 +000012037works=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012038{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working signed char" >&5
12039$as_echo_n "checking for working signed char... " >&6; }
12040cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012041/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000012042
Martin v. Löwis11437992002-04-12 09:54:03 +000012043int
12044main ()
12045{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012046signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000012047 ;
12048 return 0;
12049}
12050_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012051if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000012052 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000012053else
Skip Montanaro6dead952003-09-25 14:50:04 +000012054
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012055$as_echo "#define signed /**/" >>confdefs.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000012056
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012057
Guido van Rossum7f43da71994-08-01 12:15:30 +000012058fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012059rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012060{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
12061$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000012062
Guido van Rossumda88dad1995-01-26 00:46:29 +000012063have_prototypes=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012064{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototypes" >&5
12065$as_echo_n "checking for prototypes... " >&6; }
12066cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012067/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012068int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012069int
12070main ()
12071{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012072return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000012073 ;
12074 return 0;
12075}
12076_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012077if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012078
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012079$as_echo "#define HAVE_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012080
Matthias Klosec511b472010-05-08 11:01:39 +000012081 have_prototypes=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000012082fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012083rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012084{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_prototypes" >&5
12085$as_echo "$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012086
Guido van Rossumda88dad1995-01-26 00:46:29 +000012087works=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012088{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for variable length prototypes and stdarg.h" >&5
12089$as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; }
12090cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012091/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012092
12093#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000012094int foo(int x, ...) {
12095 va_list va;
12096 va_start(va, x);
12097 va_arg(va, int);
12098 va_arg(va, char *);
12099 va_arg(va, double);
12100 return 0;
12101}
Guido van Rossum7f43da71994-08-01 12:15:30 +000012102
Martin v. Löwis11437992002-04-12 09:54:03 +000012103int
12104main ()
12105{
Guido van Rossum90eea071996-08-30 20:58:57 +000012106return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000012107 ;
12108 return 0;
12109}
12110_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012111if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012112
12113
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012114$as_echo "#define HAVE_STDARG_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012115
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012116 works=yes
12117
Guido van Rossum627b2d71993-12-24 10:39:16 +000012118fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012119rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012120{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
12121$as_echo "$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012122
Martin v. Löwisd6320502004-08-12 13:45:08 +000012123# check for socketpair
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012124{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair" >&5
12125$as_echo_n "checking for socketpair... " >&6; }
12126cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000012127/* end confdefs.h. */
12128
12129#include <sys/types.h>
12130#include <sys/socket.h>
12131
12132int
12133main ()
12134{
12135void *x=socketpair
12136 ;
12137 return 0;
12138}
12139_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012140if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd6320502004-08-12 13:45:08 +000012141
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012142$as_echo "#define HAVE_SOCKETPAIR 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +000012143
Matthias Klosec511b472010-05-08 11:01:39 +000012144 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012145$as_echo "yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000012146else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012147 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12148$as_echo "no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000012149
12150fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012151rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000012152
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012153# check if sockaddr has sa_len member
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012154{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr has sa_len member" >&5
12155$as_echo_n "checking if sockaddr has sa_len member... " >&6; }
12156cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012157/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012158#include <sys/types.h>
12159#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012160int
12161main ()
12162{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012163struct sockaddr x;
12164x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012165 ;
12166 return 0;
12167}
12168_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012169if ac_fn_c_try_compile "$LINENO"; then :
12170 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12171$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012172
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012173$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012174
12175else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012176 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12177$as_echo "no" >&6; }
Matthias Klosec511b472010-05-08 11:01:39 +000012178
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012179fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012180rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012181
Guido van Rossumda88dad1995-01-26 00:46:29 +000012182va_list_is_array=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012183{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether va_list is an array" >&5
12184$as_echo_n "checking whether va_list is an array... " >&6; }
12185cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012186/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012187
12188#ifdef HAVE_STDARG_PROTOTYPES
12189#include <stdarg.h>
12190#else
12191#include <varargs.h>
12192#endif
12193
Martin v. Löwis11437992002-04-12 09:54:03 +000012194int
12195main ()
12196{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012197va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000012198 ;
12199 return 0;
12200}
12201_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012202if ac_fn_c_try_compile "$LINENO"; then :
12203
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012204else
Skip Montanaro6dead952003-09-25 14:50:04 +000012205
Martin v. Löwis11437992002-04-12 09:54:03 +000012206
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012207$as_echo "#define VA_LIST_IS_ARRAY 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012208
Guido van Rossumda88dad1995-01-26 00:46:29 +000012209 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012210
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012211fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012212rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012213{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $va_list_is_array" >&5
12214$as_echo "$va_list_is_array" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012215
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012216# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000012217
12218
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012219ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r"
Matthias Klose3cef2a92012-03-14 23:39:33 +010012220if test "x$ac_cv_func_gethostbyname_r" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012221
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012222 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000012223
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012224 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 6 args" >&5
12225$as_echo_n "checking gethostbyname_r with 6 args... " >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012226 OLD_CFLAGS=$CFLAGS
12227 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012228 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012229/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012230
12231# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012232
Martin v. Löwis11437992002-04-12 09:54:03 +000012233int
12234main ()
12235{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012236
12237 char *name;
12238 struct hostent *he, *res;
12239 char buffer[2048];
12240 int buflen = 2048;
12241 int h_errnop;
12242
12243 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000012244
12245 ;
12246 return 0;
12247}
12248_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012249if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012250
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012251 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000012252
Martin v. Löwis11437992002-04-12 09:54:03 +000012253
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012254$as_echo "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012255
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012256 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12257$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012258
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012259else
Skip Montanaro6dead952003-09-25 14:50:04 +000012260
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012261 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12262$as_echo "no" >&6; }
12263 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 5 args" >&5
12264$as_echo_n "checking gethostbyname_r with 5 args... " >&6; }
12265 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012266/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012267
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012268# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012269
Martin v. Löwis11437992002-04-12 09:54:03 +000012270int
12271main ()
12272{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012273
12274 char *name;
12275 struct hostent *he;
Matthias Klosec511b472010-05-08 11:01:39 +000012276 char buffer[2048];
12277 int buflen = 2048;
12278 int h_errnop;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012279
Matthias Klosec511b472010-05-08 11:01:39 +000012280 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000012281
12282 ;
12283 return 0;
12284}
12285_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012286if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012287
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012288 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000012289
Martin v. Löwis11437992002-04-12 09:54:03 +000012290
Matthias Klosec511b472010-05-08 11:01:39 +000012291$as_echo "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012292
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012293 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12294$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012295
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012296else
Skip Montanaro6dead952003-09-25 14:50:04 +000012297
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012298 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12299$as_echo "no" >&6; }
Matthias Klosec511b472010-05-08 11:01:39 +000012300 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 3 args" >&5
12301$as_echo_n "checking gethostbyname_r with 3 args... " >&6; }
12302 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12303/* end confdefs.h. */
12304
12305# include <netdb.h>
12306
12307int
12308main ()
12309{
12310
12311 char *name;
12312 struct hostent *he;
12313 struct hostent_data data;
12314
12315 (void) gethostbyname_r(name, he, &data);
12316
12317 ;
12318 return 0;
12319}
12320_ACEOF
12321if ac_fn_c_try_compile "$LINENO"; then :
12322
12323 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
12324
12325
12326$as_echo "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h
12327
12328 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12329$as_echo "yes" >&6; }
12330
12331else
12332
12333 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12334$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012335
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012336fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012337rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012338
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012339fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012340rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012341
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012342fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012343rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012344 CFLAGS=$OLD_CFLAGS
12345
12346else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012347
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012348 for ac_func in gethostbyname
12349do :
12350 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
Matthias Klose3cef2a92012-03-14 23:39:33 +010012351if test "x$ac_cv_func_gethostbyname" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012352 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012353#define HAVE_GETHOSTBYNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012354_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012355
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012356fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012357done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012358
Michael W. Hudson54241132001-12-07 15:38:26 +000012359
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012360fi
12361
Michael W. Hudson54241132001-12-07 15:38:26 +000012362
12363
12364
12365
12366
12367
Guido van Rossum627b2d71993-12-24 10:39:16 +000012368# checks for system services
12369# (none yet)
12370
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012371# Linux requires this for correct f.p. operations
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012372ac_fn_c_check_func "$LINENO" "__fpu_control" "ac_cv_func___fpu_control"
Matthias Klose3cef2a92012-03-14 23:39:33 +010012373if test "x$ac_cv_func___fpu_control" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012374
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000012375else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012376 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5
12377$as_echo_n "checking for __fpu_control in -lieee... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012378if ${ac_cv_lib_ieee___fpu_control+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012379 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012380else
Martin v. Löwis11437992002-04-12 09:54:03 +000012381 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012382LIBS="-lieee $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012383cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012384/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012385
Martin v. Löwiseba40652007-08-30 20:10:57 +000012386/* Override any GCC internal prototype to avoid an error.
12387 Use char because int might match the return type of a GCC
12388 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012389#ifdef __cplusplus
12390extern "C"
12391#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012392char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012393int
12394main ()
12395{
Martin v. Löwiseba40652007-08-30 20:10:57 +000012396return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012397 ;
12398 return 0;
12399}
12400_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012401if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012402 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000012403else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012404 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012405fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012406rm -f core conftest.err conftest.$ac_objext \
12407 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012408LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012409fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012410{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee___fpu_control" >&5
12411$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012412if test "x$ac_cv_lib_ieee___fpu_control" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012413 cat >>confdefs.h <<_ACEOF
12414#define HAVE_LIBIEEE 1
12415_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012416
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012417 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012418
Guido van Rossum627b2d71993-12-24 10:39:16 +000012419fi
12420
Michael W. Hudson54241132001-12-07 15:38:26 +000012421
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000012422fi
12423
Michael W. Hudson54241132001-12-07 15:38:26 +000012424
Guido van Rossum7f253911997-05-09 02:42:48 +000012425# Check for --with-fpectl
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012426{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-fpectl" >&5
12427$as_echo_n "checking for --with-fpectl... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012428
Martin v. Löwiseba40652007-08-30 20:10:57 +000012429# Check whether --with-fpectl was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012430if test "${with_fpectl+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +000012431 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000012432if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000012433then
12434
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012435$as_echo "#define WANT_SIGFPE_HANDLER 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012436
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012437 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12438$as_echo "yes" >&6; }
12439else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12440$as_echo "no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000012441fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000012442else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012443 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12444$as_echo "no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012445fi
12446
Guido van Rossum7f253911997-05-09 02:42:48 +000012447
Guido van Rossum7f43da71994-08-01 12:15:30 +000012448# check for --with-libm=...
12449
Guido van Rossum563e7081996-09-10 18:20:48 +000012450case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000012451Darwin) ;;
Guido van Rossumec95c7b1998-08-04 17:59:56 +000012452BeOS) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000012453*) LIBM=-lm
12454esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012455{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libm=STRING" >&5
12456$as_echo_n "checking for --with-libm=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012457
Martin v. Löwiseba40652007-08-30 20:10:57 +000012458# Check whether --with-libm was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012459if test "${with_libm+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +000012460 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000012461if test "$withval" = no
12462then LIBM=
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012463 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBM empty" >&5
12464$as_echo "force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000012465elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000012466then LIBM=$withval
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012467 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBM=\"$withval\"" >&5
12468$as_echo "set LIBM=\"$withval\"" >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +000012469else as_fn_error $? "proper usage is --with-libm=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000012470fi
Guido van Rossum7f253911997-05-09 02:42:48 +000012471else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012472 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBM=\"$LIBM\"" >&5
12473$as_echo "default LIBM=\"$LIBM\"" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012474fi
12475
Guido van Rossum7f43da71994-08-01 12:15:30 +000012476
12477# check for --with-libc=...
12478
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012479{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libc=STRING" >&5
12480$as_echo_n "checking for --with-libc=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012481
Martin v. Löwiseba40652007-08-30 20:10:57 +000012482# Check whether --with-libc was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012483if test "${with_libc+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +000012484 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000012485if test "$withval" = no
12486then LIBC=
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012487 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBC empty" >&5
12488$as_echo "force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000012489elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000012490then LIBC=$withval
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012491 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBC=\"$withval\"" >&5
12492$as_echo "set LIBC=\"$withval\"" >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +000012493else as_fn_error $? "proper usage is --with-libc=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000012494fi
Guido van Rossum7f253911997-05-09 02:42:48 +000012495else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012496 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBC=\"$LIBC\"" >&5
12497$as_echo "default LIBC=\"$LIBC\"" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012498fi
12499
Guido van Rossum7f43da71994-08-01 12:15:30 +000012500
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012501# **************************************************
12502# * Check for various properties of floating point *
12503# **************************************************
Mark Dickinson265d7382008-04-21 22:32:24 +000012504
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012505{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are little-endian IEEE 754 binary64" >&5
12506$as_echo_n "checking whether C doubles are little-endian IEEE 754 binary64... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012507if ${ac_cv_little_endian_double+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012508 $as_echo_n "(cached) " >&6
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012509else
12510
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012511if test "$cross_compiling" = yes; then :
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012512 ac_cv_little_endian_double=no
12513else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012514 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012515/* end confdefs.h. */
12516
12517#include <string.h>
12518int main() {
12519 double x = 9006104071832581.0;
12520 if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
12521 return 0;
12522 else
12523 return 1;
12524}
12525
12526_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012527if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012528 ac_cv_little_endian_double=yes
12529else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012530 ac_cv_little_endian_double=no
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012531fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012532rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12533 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012534fi
12535
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012536fi
12537
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012538{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_little_endian_double" >&5
12539$as_echo "$ac_cv_little_endian_double" >&6; }
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012540if test "$ac_cv_little_endian_double" = yes
12541then
12542
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012543$as_echo "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012544
12545fi
12546
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012547{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are big-endian IEEE 754 binary64" >&5
12548$as_echo_n "checking whether C doubles are big-endian IEEE 754 binary64... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012549if ${ac_cv_big_endian_double+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012550 $as_echo_n "(cached) " >&6
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012551else
12552
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012553if test "$cross_compiling" = yes; then :
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012554 ac_cv_big_endian_double=no
12555else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012556 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012557/* end confdefs.h. */
12558
12559#include <string.h>
12560int main() {
12561 double x = 9006104071832581.0;
12562 if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
12563 return 0;
12564 else
12565 return 1;
12566}
12567
12568_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012569if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012570 ac_cv_big_endian_double=yes
12571else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012572 ac_cv_big_endian_double=no
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012573fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012574rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12575 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012576fi
12577
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012578fi
12579
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012580{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_big_endian_double" >&5
12581$as_echo "$ac_cv_big_endian_double" >&6; }
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012582if test "$ac_cv_big_endian_double" = yes
12583then
12584
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012585$as_echo "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012586
12587fi
12588
12589# Some ARM platforms use a mixed-endian representation for doubles.
12590# While Python doesn't currently have full support for these platforms
12591# (see e.g., issue 1762561), we can at least make sure that float <-> string
12592# conversions work.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012593{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5
12594$as_echo_n "checking whether C doubles are ARM mixed-endian IEEE 754 binary64... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012595if ${ac_cv_mixed_endian_double+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012596 $as_echo_n "(cached) " >&6
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012597else
12598
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012599if test "$cross_compiling" = yes; then :
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012600 ac_cv_mixed_endian_double=no
12601else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012602 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012603/* end confdefs.h. */
12604
12605#include <string.h>
12606int main() {
12607 double x = 9006104071832581.0;
12608 if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
12609 return 0;
12610 else
12611 return 1;
12612}
12613
12614_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012615if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012616 ac_cv_mixed_endian_double=yes
12617else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012618 ac_cv_mixed_endian_double=no
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012619fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012620rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12621 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012622fi
12623
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012624fi
12625
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012626{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mixed_endian_double" >&5
12627$as_echo "$ac_cv_mixed_endian_double" >&6; }
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012628if test "$ac_cv_mixed_endian_double" = yes
12629then
12630
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012631$as_echo "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012632
12633fi
12634
12635# The short float repr introduced in Python 3.1 requires the
12636# correctly-rounded string <-> double conversion functions from
12637# Python/dtoa.c, which in turn require that the FPU uses 53-bit
12638# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsona548dee2009-11-15 13:12:43 +000012639# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012640# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsona548dee2009-11-15 13:12:43 +000012641
12642# This inline assembler syntax may also work for suncc and icc,
12643# so we try it on all platforms.
12644
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012645{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
12646$as_echo_n "checking whether we can use gcc inline assembler to get and set x87 control word... " >&6; }
12647cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012648/* end confdefs.h. */
12649
12650int
12651main ()
12652{
12653
Mark Dickinsona548dee2009-11-15 13:12:43 +000012654 unsigned short cw;
12655 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
12656 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012657
12658 ;
12659 return 0;
12660}
12661_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012662if ac_fn_c_try_compile "$LINENO"; then :
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012663 have_gcc_asm_for_x87=yes
12664else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012665 have_gcc_asm_for_x87=no
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012666fi
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012667rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012668{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x87" >&5
12669$as_echo "$have_gcc_asm_for_x87" >&6; }
Mark Dickinsona548dee2009-11-15 13:12:43 +000012670if test "$have_gcc_asm_for_x87" = yes
12671then
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012672
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012673$as_echo "#define HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012674
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012675fi
Mark Dickinson7a3d8642008-04-22 00:54:27 +000012676
Mark Dickinson04b27232009-01-04 12:29:36 +000012677# Detect whether system arithmetic is subject to x87-style double
12678# rounding issues. The result of this test has little meaning on non
12679# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
12680# mode is round-to-nearest and double rounding issues are present, and
12681# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012682{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x87-style double rounding" >&5
12683$as_echo_n "checking for x87-style double rounding... " >&6; }
Mark Dickinson99abd142009-10-24 13:44:16 +000012684# $BASECFLAGS may affect the result
12685ac_save_cc="$CC"
12686CC="$CC $BASECFLAGS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012687if test "$cross_compiling" = yes; then :
Mark Dickinson04b27232009-01-04 12:29:36 +000012688 ac_cv_x87_double_rounding=no
12689else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012690 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson04b27232009-01-04 12:29:36 +000012691/* end confdefs.h. */
12692
12693#include <stdlib.h>
12694#include <math.h>
12695int main() {
12696 volatile double x, y, z;
12697 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
12698 x = 0.99999999999999989; /* 1-2**-53 */
12699 y = 1./x;
12700 if (y != 1.)
12701 exit(0);
12702 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
12703 x = 1e16;
12704 y = 2.99999;
12705 z = x + y;
12706 if (z != 1e16+4.)
12707 exit(0);
12708 /* both tests show evidence of double rounding */
12709 exit(1);
12710}
12711
12712_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012713if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson04b27232009-01-04 12:29:36 +000012714 ac_cv_x87_double_rounding=no
12715else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012716 ac_cv_x87_double_rounding=yes
Mark Dickinson04b27232009-01-04 12:29:36 +000012717fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012718rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12719 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson04b27232009-01-04 12:29:36 +000012720fi
12721
Mark Dickinson99abd142009-10-24 13:44:16 +000012722CC="$ac_save_cc"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012723{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5
12724$as_echo "$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson04b27232009-01-04 12:29:36 +000012725if test "$ac_cv_x87_double_rounding" = yes
12726then
12727
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012728$as_echo "#define X87_DOUBLE_ROUNDING 1" >>confdefs.h
Mark Dickinson04b27232009-01-04 12:29:36 +000012729
12730fi
12731
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012732# ************************************
12733# * Check for mathematical functions *
12734# ************************************
12735
12736LIBS_SAVE=$LIBS
12737LIBS="$LIBS $LIBM"
12738
Mark Dickinson265d7382008-04-21 22:32:24 +000012739# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
12740# -0. on some architectures.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012741{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether tanh preserves the sign of zero" >&5
12742$as_echo_n "checking whether tanh preserves the sign of zero... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012743if ${ac_cv_tanh_preserves_zero_sign+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012744 $as_echo_n "(cached) " >&6
Mark Dickinson265d7382008-04-21 22:32:24 +000012745else
12746
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012747if test "$cross_compiling" = yes; then :
Mark Dickinson265d7382008-04-21 22:32:24 +000012748 ac_cv_tanh_preserves_zero_sign=no
12749else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012750 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson265d7382008-04-21 22:32:24 +000012751/* end confdefs.h. */
12752
12753#include <math.h>
Mark Dickinson7a3d8642008-04-22 00:54:27 +000012754#include <stdlib.h>
Mark Dickinson265d7382008-04-21 22:32:24 +000012755int main() {
12756 /* return 0 if either negative zeros don't exist
12757 on this platform or if negative zeros exist
12758 and tanh(-0.) == -0. */
12759 if (atan2(0., -1.) == atan2(-0., -1.) ||
12760 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
12761 else exit(1);
12762}
12763
12764_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012765if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson265d7382008-04-21 22:32:24 +000012766 ac_cv_tanh_preserves_zero_sign=yes
12767else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012768 ac_cv_tanh_preserves_zero_sign=no
Mark Dickinson265d7382008-04-21 22:32:24 +000012769fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012770rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12771 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson265d7382008-04-21 22:32:24 +000012772fi
12773
Mark Dickinson265d7382008-04-21 22:32:24 +000012774fi
12775
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012776{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_tanh_preserves_zero_sign" >&5
12777$as_echo "$ac_cv_tanh_preserves_zero_sign" >&6; }
Mark Dickinson265d7382008-04-21 22:32:24 +000012778if test "$ac_cv_tanh_preserves_zero_sign" = yes
12779then
12780
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012781$as_echo "#define TANH_PRESERVES_ZERO_SIGN 1" >>confdefs.h
Mark Dickinson265d7382008-04-21 22:32:24 +000012782
12783fi
12784
Mark Dickinson65898e02009-09-05 10:27:00 +000012785for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012786do :
12787 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12788ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Georg Brandl71f4fbb2011-02-25 11:04:50 +000012789if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinson65898e02009-09-05 10:27:00 +000012790 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012791#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Mark Dickinson65898e02009-09-05 10:27:00 +000012792_ACEOF
12793
12794fi
12795done
12796
Mark Dickinson65898e02009-09-05 10:27:00 +000012797for ac_func in hypot lgamma log1p round tgamma
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012798do :
12799 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12800ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Georg Brandl71f4fbb2011-02-25 11:04:50 +000012801if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Christian Heimes0a8143f2007-12-18 23:22:54 +000012802 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012803#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Christian Heimes0a8143f2007-12-18 23:22:54 +000012804_ACEOF
12805
12806fi
12807done
12808
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012809ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
12810"
Matthias Klose3cef2a92012-03-14 23:39:33 +010012811if test "x$ac_cv_have_decl_isinf" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012812 ac_have_decl=1
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012813else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012814 ac_have_decl=0
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012815fi
12816
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012817cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012818#define HAVE_DECL_ISINF $ac_have_decl
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012819_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012820ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h>
12821"
Matthias Klose3cef2a92012-03-14 23:39:33 +010012822if test "x$ac_cv_have_decl_isnan" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012823 ac_have_decl=1
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012824else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012825 ac_have_decl=0
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012826fi
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012827
12828cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012829#define HAVE_DECL_ISNAN $ac_have_decl
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012830_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012831ac_fn_c_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include <math.h>
12832"
Matthias Klose3cef2a92012-03-14 23:39:33 +010012833if test "x$ac_cv_have_decl_isfinite" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012834 ac_have_decl=1
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012835else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012836 ac_have_decl=0
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012837fi
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012838
12839cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012840#define HAVE_DECL_ISFINITE $ac_have_decl
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012841_ACEOF
12842
12843
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000012844LIBS=$LIBS_SAVE
12845
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012846# For multiprocessing module, check that sem_open
12847# actually works. For FreeBSD versions <= 7.2,
12848# the kernel module that provides POSIX semaphores
12849# isn't loaded by default, so an attempt to call
12850# sem_open results in a 'Signal 12' error.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012851{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX semaphores are enabled" >&5
12852$as_echo_n "checking whether POSIX semaphores are enabled... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012853if ${ac_cv_posix_semaphores_enabled+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012854 $as_echo_n "(cached) " >&6
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012855else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012856 if test "$cross_compiling" = yes; then :
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012857 ac_cv_posix_semaphores_enabled=yes
12858else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012859 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012860/* end confdefs.h. */
12861
12862#include <unistd.h>
12863#include <fcntl.h>
12864#include <stdio.h>
12865#include <semaphore.h>
12866#include <sys/stat.h>
12867
12868int main(void) {
12869 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
12870 if (a == SEM_FAILED) {
12871 perror("sem_open");
12872 return 1;
12873 }
12874 sem_close(a);
Mark Dickinson59dc89e2009-12-13 21:06:06 +000012875 sem_unlink("/autoconf");
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012876 return 0;
12877}
12878
12879_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012880if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012881 ac_cv_posix_semaphores_enabled=yes
12882else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012883 ac_cv_posix_semaphores_enabled=no
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012884fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012885rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12886 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012887fi
12888
12889
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012890fi
12891
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012892{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_semaphores_enabled" >&5
12893$as_echo "$ac_cv_posix_semaphores_enabled" >&6; }
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012894if test $ac_cv_posix_semaphores_enabled = no
12895then
12896
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012897$as_echo "#define POSIX_SEMAPHORES_NOT_ENABLED 1" >>confdefs.h
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012898
12899fi
12900
12901# Multiprocessing check for broken sem_getvalue
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012902{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken sem_getvalue" >&5
12903$as_echo_n "checking for broken sem_getvalue... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012904if ${ac_cv_broken_sem_getvalue+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012905 $as_echo_n "(cached) " >&6
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012906else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012907 if test "$cross_compiling" = yes; then :
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012908 ac_cv_broken_sem_getvalue=yes
12909else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012910 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012911/* end confdefs.h. */
12912
12913#include <unistd.h>
12914#include <fcntl.h>
12915#include <stdio.h>
12916#include <semaphore.h>
12917#include <sys/stat.h>
12918
12919int main(void){
Mark Dickinson59dc89e2009-12-13 21:06:06 +000012920 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012921 int count;
12922 int res;
12923 if(a==SEM_FAILED){
12924 perror("sem_open");
12925 return 1;
12926
12927 }
12928 res = sem_getvalue(a, &count);
12929 sem_close(a);
Mark Dickinson59dc89e2009-12-13 21:06:06 +000012930 sem_unlink("/autocftw");
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012931 return res==-1 ? 1 : 0;
12932}
12933
12934_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012935if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012936 ac_cv_broken_sem_getvalue=no
12937else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012938 ac_cv_broken_sem_getvalue=yes
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012939fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012940rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12941 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012942fi
12943
12944
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012945fi
12946
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012947{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_sem_getvalue" >&5
12948$as_echo "$ac_cv_broken_sem_getvalue" >&6; }
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012949if test $ac_cv_broken_sem_getvalue = yes
12950then
12951
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012952$as_echo "#define HAVE_BROKEN_SEM_GETVALUE 1" >>confdefs.h
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012953
12954fi
12955
Mark Dickinsonefc82f72009-03-20 15:51:55 +000012956# determine what size digit to use for Python's longs
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012957{ $as_echo "$as_me:${as_lineno-$LINENO}: checking digit size for Python's longs" >&5
12958$as_echo_n "checking digit size for Python's longs... " >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +000012959# Check whether --enable-big-digits was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012960if test "${enable_big_digits+set}" = set; then :
Mark Dickinsonefc82f72009-03-20 15:51:55 +000012961 enableval=$enable_big_digits; case $enable_big_digits in
12962yes)
12963 enable_big_digits=30 ;;
12964no)
12965 enable_big_digits=15 ;;
1296615|30)
12967 ;;
12968*)
Matthias Klose3cef2a92012-03-14 23:39:33 +010012969 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 +000012970esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012971{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_big_digits" >&5
12972$as_echo "$enable_big_digits" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +000012973
12974cat >>confdefs.h <<_ACEOF
12975#define PYLONG_BITS_IN_DIGIT $enable_big_digits
12976_ACEOF
12977
12978
12979else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012980 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
12981$as_echo "no value specified" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +000012982fi
12983
12984
Guido van Rossumef2255b2000-03-10 22:30:29 +000012985# check for wchar.h
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012986ac_fn_c_check_header_mongrel "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
Matthias Klose3cef2a92012-03-14 23:39:33 +010012987if test "x$ac_cv_header_wchar_h" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012988
12989
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012990$as_echo "#define HAVE_WCHAR_H 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012991
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012992 wchar_h="yes"
12993
Guido van Rossumef2255b2000-03-10 22:30:29 +000012994else
Martin v. Löwis11437992002-04-12 09:54:03 +000012995 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000012996
12997fi
12998
Michael W. Hudson54241132001-12-07 15:38:26 +000012999
Martin v. Löwis11437992002-04-12 09:54:03 +000013000
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013001# determine wchar_t size
13002if test "$wchar_h" = yes
13003then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013004 # The cast to long int works around a bug in the HP C Compiler
Martin v. Löwiseba40652007-08-30 20:10:57 +000013005# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
13006# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
13007# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013008{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
13009$as_echo_n "checking size of wchar_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013010if ${ac_cv_sizeof_wchar_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013011 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000013012else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013013 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "#include <wchar.h>
13014"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013015
Martin v. Löwis11437992002-04-12 09:54:03 +000013016else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013017 if test "$ac_cv_type_wchar_t" = yes; then
13018 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
13019$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +000013020as_fn_error 77 "cannot compute sizeof (wchar_t)
Matthias Klose3cef2a92012-03-14 23:39:33 +010013021See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000013022 else
13023 ac_cv_sizeof_wchar_t=0
13024 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013025fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013026
Martin v. Löwis11437992002-04-12 09:54:03 +000013027fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013028{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
13029$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000013030
13031
13032
Martin v. Löwis11437992002-04-12 09:54:03 +000013033cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013034#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000013035_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013036
Michael W. Hudson54241132001-12-07 15:38:26 +000013037
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013038fi
13039
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013040{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UCS-4 tcl" >&5
13041$as_echo_n "checking for UCS-4 tcl... " >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013042have_ucs4_tcl=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013043cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013044/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013045
13046#include <tcl.h>
13047#if TCL_UTF_MAX != 6
13048# error "NOT UCS4_TCL"
13049#endif
13050int
13051main ()
13052{
13053
13054 ;
13055 return 0;
13056}
13057_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013058if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013059
13060
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013061$as_echo "#define HAVE_UCS4_TCL 1" >>confdefs.h
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013062
13063 have_ucs4_tcl=yes
13064
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013065fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013066rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013067{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ucs4_tcl" >&5
13068$as_echo "$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013069
Skip Montanaro6dead952003-09-25 14:50:04 +000013070# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013071if test "$wchar_h" = yes
13072then
13073 # check whether wchar_t is signed or not
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013074 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is signed" >&5
13075$as_echo_n "checking whether wchar_t is signed... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013076 if ${ac_cv_wchar_t_signed+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013077 $as_echo_n "(cached) " >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013078else
13079
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013080 if test "$cross_compiling" = yes; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013081 ac_cv_wchar_t_signed=yes
13082else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013083 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013084/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013085
13086 #include <wchar.h>
13087 int main()
13088 {
Martin v. Löwis44fe0e42006-04-11 07:15:30 +000013089 /* Success: exit code 0 */
13090 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013091 }
13092
13093_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013094if ac_fn_c_try_run "$LINENO"; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013095 ac_cv_wchar_t_signed=yes
13096else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013097 ac_cv_wchar_t_signed=no
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013098fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013099rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13100 conftest.$ac_objext conftest.beam conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013101fi
13102
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013103fi
13104
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013105 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wchar_t_signed" >&5
13106$as_echo "$ac_cv_wchar_t_signed" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000013107fi
13108
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013109{ $as_echo "$as_me:${as_lineno-$LINENO}: checking what type to use for unicode" >&5
13110$as_echo_n "checking what type to use for unicode... " >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000013111# Check whether --enable-unicode was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013112if test "${enable_unicode+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +000013113 enableval=$enable_unicode;
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013114else
13115 enable_unicode=yes
Martin v. Löwiseba40652007-08-30 20:10:57 +000013116fi
13117
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013118
13119if test $enable_unicode = yes
13120then
Martin v. Löwisfd917792001-06-27 20:22:04 +000013121 # Without any arguments, Py_UNICODE defaults to two-byte mode
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013122 case "$have_ucs4_tcl" in
13123 yes) enable_unicode="ucs4"
13124 ;;
13125 *) enable_unicode="ucs2"
13126 ;;
13127 esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013128fi
13129
Martin v. Löwis0036cba2002-04-12 09:58:45 +000013130
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013131case "$enable_unicode" in
13132ucs2) unicode_size="2"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013133 $as_echo "#define Py_UNICODE_SIZE 2" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013134
13135 ;;
13136ucs4) unicode_size="4"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013137 $as_echo "#define Py_UNICODE_SIZE 4" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013138
13139 ;;
Martin v. Löwised11a5d2012-05-20 10:42:17 +020013140no) ;; # To allow --disable-unicode
Matthias Klose3cef2a92012-03-14 23:39:33 +010013141*) 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 +000013142esac
13143
Michael W. Hudson54241132001-12-07 15:38:26 +000013144
Martin v. Löwis11437992002-04-12 09:54:03 +000013145
13146
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013147if test "$enable_unicode" = "no"
13148then
Martin v. Löwis339d0f72001-08-17 18:39:25 +000013149 UNICODE_OBJS=""
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013150 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not used" >&5
13151$as_echo "not used" >&6; }
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013152else
Martin v. Löwis339d0f72001-08-17 18:39:25 +000013153 UNICODE_OBJS="Objects/unicodeobject.o Objects/unicodectype.o"
Martin v. Löwis11437992002-04-12 09:54:03 +000013154
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013155$as_echo "#define Py_USING_UNICODE 1" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013156
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013157
13158 # wchar_t is only usable if it maps to an unsigned type
13159 if test "$unicode_size" = "$ac_cv_sizeof_wchar_t" \
Matthias Klose7dbeed72004-12-24 08:22:17 +000013160 -a "$ac_cv_wchar_t_signed" = "no"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013161 then
13162 PY_UNICODE_TYPE="wchar_t"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013163
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013164$as_echo "#define HAVE_USABLE_WCHAR_T 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013165
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013166 $as_echo "#define PY_UNICODE_TYPE wchar_t" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013167
13168 elif test "$ac_cv_sizeof_short" = "$unicode_size"
13169 then
13170 PY_UNICODE_TYPE="unsigned short"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013171 $as_echo "#define PY_UNICODE_TYPE unsigned short" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013172
13173 elif test "$ac_cv_sizeof_long" = "$unicode_size"
13174 then
13175 PY_UNICODE_TYPE="unsigned long"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013176 $as_echo "#define PY_UNICODE_TYPE unsigned long" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013177
13178 else
13179 PY_UNICODE_TYPE="no type found"
13180 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013181 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PY_UNICODE_TYPE" >&5
13182$as_echo "$PY_UNICODE_TYPE" >&6; }
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013183fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000013184
13185# check for endianness
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013186 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
13187$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013188if ${ac_cv_c_bigendian+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013189 $as_echo_n "(cached) " >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000013190else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013191 ac_cv_c_bigendian=unknown
13192 # See if we're dealing with a universal compiler.
13193 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13194/* end confdefs.h. */
13195#ifndef __APPLE_CC__
13196 not a universal capable compiler
13197 #endif
13198 typedef int dummy;
13199
Skip Montanaro6dead952003-09-25 14:50:04 +000013200_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013201if ac_fn_c_try_compile "$LINENO"; then :
13202
13203 # Check for potential -arch flags. It is not universal unless
13204 # there are at least two -arch flags with different values.
13205 ac_arch=
13206 ac_prev=
13207 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
13208 if test -n "$ac_prev"; then
13209 case $ac_word in
13210 i?86 | x86_64 | ppc | ppc64)
13211 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
13212 ac_arch=$ac_word
13213 else
13214 ac_cv_c_bigendian=universal
13215 break
13216 fi
13217 ;;
13218 esac
13219 ac_prev=
13220 elif test "x$ac_word" = "x-arch"; then
13221 ac_prev=arch
13222 fi
13223 done
13224fi
13225rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13226 if test $ac_cv_c_bigendian = unknown; then
13227 # See if sys/param.h defines the BYTE_ORDER macro.
13228 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013229/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000013230#include <sys/types.h>
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013231 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000013232
Martin v. Löwis11437992002-04-12 09:54:03 +000013233int
13234main ()
13235{
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013236#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
13237 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
13238 && LITTLE_ENDIAN)
13239 bogus endian macros
13240 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013241
13242 ;
13243 return 0;
13244}
13245_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013246if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000013247 # It does; now see whether it defined to BIG_ENDIAN or not.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013248 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013249/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000013250#include <sys/types.h>
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013251 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000013252
Martin v. Löwis11437992002-04-12 09:54:03 +000013253int
13254main ()
13255{
Guido van Rossumef2255b2000-03-10 22:30:29 +000013256#if BYTE_ORDER != BIG_ENDIAN
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013257 not big endian
13258 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013259
13260 ;
13261 return 0;
13262}
13263_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013264if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000013265 ac_cv_c_bigendian=yes
13266else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013267 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000013268fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013269rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013270fi
13271rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13272 fi
13273 if test $ac_cv_c_bigendian = unknown; then
13274 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
13275 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013276/* end confdefs.h. */
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013277#include <limits.h>
13278
Martin v. Löwis11437992002-04-12 09:54:03 +000013279int
13280main ()
13281{
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013282#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
13283 bogus endian macros
13284 #endif
13285
Martin v. Löwis11437992002-04-12 09:54:03 +000013286 ;
13287 return 0;
13288}
13289_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013290if ac_fn_c_try_compile "$LINENO"; then :
13291 # It does; now see whether it defined to _BIG_ENDIAN or not.
13292 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13293/* end confdefs.h. */
13294#include <limits.h>
13295
13296int
13297main ()
13298{
13299#ifndef _BIG_ENDIAN
13300 not big endian
13301 #endif
13302
13303 ;
13304 return 0;
13305}
13306_ACEOF
13307if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013308 ac_cv_c_bigendian=yes
Alexandre Vassalottia2db6872009-07-17 07:46:46 +000013309else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013310 ac_cv_c_bigendian=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013311fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013312rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13313fi
13314rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13315 fi
13316 if test $ac_cv_c_bigendian = unknown; then
13317 # Compile a test program.
13318 if test "$cross_compiling" = yes; then :
13319 # Try to guess by grepping values from an object file.
13320 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13321/* end confdefs.h. */
13322short int ascii_mm[] =
13323 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
13324 short int ascii_ii[] =
13325 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
13326 int use_ascii (int i) {
13327 return ascii_mm[i] + ascii_ii[i];
13328 }
13329 short int ebcdic_ii[] =
13330 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
13331 short int ebcdic_mm[] =
13332 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
13333 int use_ebcdic (int i) {
13334 return ebcdic_mm[i] + ebcdic_ii[i];
13335 }
13336 extern int foo;
Martin v. Löwiseba40652007-08-30 20:10:57 +000013337
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013338int
13339main ()
13340{
13341return use_ascii (foo) == use_ebcdic (foo);
13342 ;
13343 return 0;
13344}
13345_ACEOF
13346if ac_fn_c_try_compile "$LINENO"; then :
13347 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
13348 ac_cv_c_bigendian=yes
13349 fi
13350 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
13351 if test "$ac_cv_c_bigendian" = unknown; then
13352 ac_cv_c_bigendian=no
13353 else
13354 # finding both strings is unlikely to happen, but who knows?
13355 ac_cv_c_bigendian=unknown
13356 fi
13357 fi
13358fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013359rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013360else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013361 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013362/* end confdefs.h. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000013363$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000013364int
13365main ()
13366{
Martin v. Löwiseba40652007-08-30 20:10:57 +000013367
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013368 /* Are we little or big endian? From Harbison&Steele. */
13369 union
13370 {
13371 long int l;
13372 char c[sizeof (long int)];
13373 } u;
13374 u.l = 1;
13375 return u.c[sizeof (long int) - 1] == 1;
Martin v. Löwiseba40652007-08-30 20:10:57 +000013376
13377 ;
13378 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000013379}
Martin v. Löwis11437992002-04-12 09:54:03 +000013380_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013381if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000013382 ac_cv_c_bigendian=no
13383else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013384 ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000013385fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013386rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13387 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000013388fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013389
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013390 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013391fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013392{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
13393$as_echo "$ac_cv_c_bigendian" >&6; }
13394 case $ac_cv_c_bigendian in #(
13395 yes)
13396 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
13397;; #(
13398 no)
13399 ;; #(
13400 universal)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013401
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013402$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Alexandre Vassalottia2db6872009-07-17 07:46:46 +000013403
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013404 ;; #(
13405 *)
Georg Brandl71f4fbb2011-02-25 11:04:50 +000013406 as_fn_error $? "unknown endianness
Matthias Klose3cef2a92012-03-14 23:39:33 +010013407 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013408 esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000013409
Michael W. Hudson54241132001-12-07 15:38:26 +000013410
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013411# Check whether right shifting a negative integer extends the sign bit
13412# or fills with zeros (like the Cray J90, according to Tim Peters).
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013413{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether right shift extends the sign bit" >&5
13414$as_echo_n "checking whether right shift extends the sign bit... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013415if ${ac_cv_rshift_extends_sign+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013416 $as_echo_n "(cached) " >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000013417else
Martin v. Löwis11437992002-04-12 09:54:03 +000013418
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013419if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000013420 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013421else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013422 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013423/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013424
13425int main()
13426{
Vladimir Marangozova6180282000-07-12 05:05:06 +000013427 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013428}
13429
Martin v. Löwis11437992002-04-12 09:54:03 +000013430_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013431if ac_fn_c_try_run "$LINENO"; then :
Vladimir Marangozova6180282000-07-12 05:05:06 +000013432 ac_cv_rshift_extends_sign=yes
13433else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013434 ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000013435fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013436rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13437 conftest.$ac_objext conftest.beam conftest.$ac_ext
Vladimir Marangozova6180282000-07-12 05:05:06 +000013438fi
13439
Martin v. Löwiseba40652007-08-30 20:10:57 +000013440fi
13441
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013442{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rshift_extends_sign" >&5
13443$as_echo "$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000013444if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013445then
Martin v. Löwis11437992002-04-12 09:54:03 +000013446
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013447$as_echo "#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1" >>confdefs.h
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013448
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013449fi
13450
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013451# check for getc_unlocked and related locking functions
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013452{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getc_unlocked() and friends" >&5
13453$as_echo_n "checking for getc_unlocked() and friends... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013454if ${ac_cv_have_getc_unlocked+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013455 $as_echo_n "(cached) " >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013456else
Martin v. Löwis11437992002-04-12 09:54:03 +000013457
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013458cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013459/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013460#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013461int
13462main ()
13463{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013464
13465 FILE *f = fopen("/dev/null", "r");
13466 flockfile(f);
13467 getc_unlocked(f);
13468 funlockfile(f);
13469
Martin v. Löwis11437992002-04-12 09:54:03 +000013470 ;
13471 return 0;
13472}
13473_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013474if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013475 ac_cv_have_getc_unlocked=yes
13476else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013477 ac_cv_have_getc_unlocked=no
13478fi
13479rm -f core conftest.err conftest.$ac_objext \
13480 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013481fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013482
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013483{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getc_unlocked" >&5
13484$as_echo "$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013485if test "$ac_cv_have_getc_unlocked" = yes
13486then
Martin v. Löwis11437992002-04-12 09:54:03 +000013487
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013488$as_echo "#define HAVE_GETC_UNLOCKED 1" >>confdefs.h
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013489
13490fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013491
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013492# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000013493# save the value of LIBS so we don't actually link Python with readline
13494LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013495
Gregory P. Smithcc023f12008-09-07 05:15:58 +000013496# On some systems we need to link readline to a termcap compatible
13497# library. NOTE: Keep the precedence of listed libraries synchronised
13498# with setup.py.
13499py_cv_lib_readline=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013500{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link readline libs" >&5
13501$as_echo_n "checking how to link readline libs... " >&6; }
Gregory P. Smithcc023f12008-09-07 05:15:58 +000013502for py_libtermcap in "" ncursesw ncurses curses termcap; do
13503 if test -z "$py_libtermcap"; then
13504 READLINE_LIBS="-lreadline"
13505 else
13506 READLINE_LIBS="-lreadline -l$py_libtermcap"
13507 fi
13508 LIBS="$READLINE_LIBS $LIBS_no_readline"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013509 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013510/* end confdefs.h. */
13511
Martin v. Löwiseba40652007-08-30 20:10:57 +000013512/* Override any GCC internal prototype to avoid an error.
13513 Use char because int might match the return type of a GCC
13514 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013515#ifdef __cplusplus
13516extern "C"
13517#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013518char readline ();
13519int
13520main ()
13521{
Martin v. Löwiseba40652007-08-30 20:10:57 +000013522return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013523 ;
13524 return 0;
13525}
13526_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013527if ac_fn_c_try_link "$LINENO"; then :
Gregory P. Smithcc023f12008-09-07 05:15:58 +000013528 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013529fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013530rm -f core conftest.err conftest.$ac_objext \
13531 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smithcc023f12008-09-07 05:15:58 +000013532 if test $py_cv_lib_readline = yes; then
13533 break
13534 fi
13535done
13536# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
13537#AC_SUBST([READLINE_LIBS])
Gregory P. Smithe080cdf2008-09-07 19:19:04 +000013538if test $py_cv_lib_readline = no; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013539 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
13540$as_echo "none" >&6; }
Gregory P. Smithcc023f12008-09-07 05:15:58 +000013541else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013542 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_LIBS" >&5
13543$as_echo "$READLINE_LIBS" >&6; }
Gregory P. Smithcc023f12008-09-07 05:15:58 +000013544
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013545$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013546
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013547fi
13548
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013549# check for readline 2.1
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013550{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_callback_handler_install in -lreadline" >&5
13551$as_echo_n "checking for rl_callback_handler_install in -lreadline... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013552if ${ac_cv_lib_readline_rl_callback_handler_install+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013553 $as_echo_n "(cached) " >&6
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013554else
13555 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000013556LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013557cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013558/* end confdefs.h. */
13559
Martin v. Löwiseba40652007-08-30 20:10:57 +000013560/* Override any GCC internal prototype to avoid an error.
13561 Use char because int might match the return type of a GCC
13562 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013563#ifdef __cplusplus
13564extern "C"
13565#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013566char rl_callback_handler_install ();
13567int
13568main ()
13569{
Martin v. Löwiseba40652007-08-30 20:10:57 +000013570return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013571 ;
13572 return 0;
13573}
13574_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013575if ac_fn_c_try_link "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013576 ac_cv_lib_readline_rl_callback_handler_install=yes
13577else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013578 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013579fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013580rm -f core conftest.err conftest.$ac_objext \
13581 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013582LIBS=$ac_check_lib_save_LIBS
13583fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013584{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
13585$as_echo "$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013586if test "x$ac_cv_lib_readline_rl_callback_handler_install" = xyes; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013587
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013588$as_echo "#define HAVE_RL_CALLBACK 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013589
13590fi
13591
13592
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013593# check for readline 2.2
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013594cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013595/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013596#include <readline/readline.h>
13597_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013598if ac_fn_c_try_cpp "$LINENO"; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013599 have_readline=yes
13600else
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013601 have_readline=no
Matthias Klosec511b472010-05-08 11:01:39 +000013602
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013603fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +000013604rm -f conftest.err conftest.i conftest.$ac_ext
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013605if test $have_readline = yes
13606then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013607 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013608/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013609#include <readline/readline.h>
13610
13611_ACEOF
13612if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013613 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013614
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013615$as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013616
13617fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +000013618rm -f conftest*
Antoine Pitroud9ff74e2009-10-26 19:16:46 +000013619
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013620 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroud9ff74e2009-10-26 19:16:46 +000013621/* end confdefs.h. */
13622#include <readline/readline.h>
13623
13624_ACEOF
13625if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013626 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then :
Antoine Pitroud9ff74e2009-10-26 19:16:46 +000013627
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013628$as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h
Antoine Pitroud9ff74e2009-10-26 19:16:46 +000013629
13630fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +000013631rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013632
13633fi
13634
Martin v. Löwis0daad592001-09-30 21:09:59 +000013635# check for readline 4.0
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013636{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -lreadline" >&5
13637$as_echo_n "checking for rl_pre_input_hook in -lreadline... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013638if ${ac_cv_lib_readline_rl_pre_input_hook+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013639 $as_echo_n "(cached) " >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000013640else
Martin v. Löwis11437992002-04-12 09:54:03 +000013641 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000013642LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013643cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013644/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013645
Martin v. Löwiseba40652007-08-30 20:10:57 +000013646/* Override any GCC internal prototype to avoid an error.
13647 Use char because int might match the return type of a GCC
13648 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013649#ifdef __cplusplus
13650extern "C"
13651#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013652char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013653int
13654main ()
13655{
Martin v. Löwiseba40652007-08-30 20:10:57 +000013656return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013657 ;
13658 return 0;
13659}
13660_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013661if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013662 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000013663else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013664 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000013665fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013666rm -f core conftest.err conftest.$ac_objext \
13667 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013668LIBS=$ac_check_lib_save_LIBS
13669fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013670{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
13671$as_echo "$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013672if test "x$ac_cv_lib_readline_rl_pre_input_hook" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000013673
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013674$as_echo "#define HAVE_RL_PRE_INPUT_HOOK 1" >>confdefs.h
Martin v. Löwis0daad592001-09-30 21:09:59 +000013675
Martin v. Löwis0daad592001-09-30 21:09:59 +000013676fi
13677
Michael W. Hudson54241132001-12-07 15:38:26 +000013678
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000013679# also in 4.0
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013680{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -lreadline" >&5
13681$as_echo_n "checking for rl_completion_display_matches_hook in -lreadline... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013682if ${ac_cv_lib_readline_rl_completion_display_matches_hook+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013683 $as_echo_n "(cached) " >&6
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000013684else
13685 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000013686LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013687cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000013688/* end confdefs.h. */
13689
13690/* Override any GCC internal prototype to avoid an error.
13691 Use char because int might match the return type of a GCC
13692 builtin and then its argument prototype would still apply. */
13693#ifdef __cplusplus
13694extern "C"
13695#endif
13696char rl_completion_display_matches_hook ();
13697int
13698main ()
13699{
13700return rl_completion_display_matches_hook ();
13701 ;
13702 return 0;
13703}
13704_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013705if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000013706 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
13707else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013708 ac_cv_lib_readline_rl_completion_display_matches_hook=no
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000013709fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013710rm -f core conftest.err conftest.$ac_objext \
13711 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000013712LIBS=$ac_check_lib_save_LIBS
13713fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013714{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
13715$as_echo "$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013716if test "x$ac_cv_lib_readline_rl_completion_display_matches_hook" = xyes; then :
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000013717
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013718$as_echo "#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000013719
13720fi
13721
13722
Martin v. Löwis0daad592001-09-30 21:09:59 +000013723# check for readline 4.2
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013724{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5
13725$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013726if ${ac_cv_lib_readline_rl_completion_matches+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013727 $as_echo_n "(cached) " >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000013728else
Martin v. Löwis11437992002-04-12 09:54:03 +000013729 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000013730LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013731cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013732/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013733
Martin v. Löwiseba40652007-08-30 20:10:57 +000013734/* Override any GCC internal prototype to avoid an error.
13735 Use char because int might match the return type of a GCC
13736 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013737#ifdef __cplusplus
13738extern "C"
13739#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013740char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013741int
13742main ()
13743{
Martin v. Löwiseba40652007-08-30 20:10:57 +000013744return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013745 ;
13746 return 0;
13747}
13748_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013749if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013750 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000013751else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013752 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000013753fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013754rm -f core conftest.err conftest.$ac_objext \
13755 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013756LIBS=$ac_check_lib_save_LIBS
13757fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013758{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_matches" >&5
13759$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013760if test "x$ac_cv_lib_readline_rl_completion_matches" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000013761
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013762$as_echo "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h
Guido van Rossum353ae582001-07-10 16:45:32 +000013763
Guido van Rossum353ae582001-07-10 16:45:32 +000013764fi
13765
Jack Jansendd19cf82001-12-06 22:36:17 +000013766
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013767# also in readline 4.2
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013768cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013769/* end confdefs.h. */
13770#include <readline/readline.h>
13771_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013772if ac_fn_c_try_cpp "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013773 have_readline=yes
13774else
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013775 have_readline=no
Matthias Klosec511b472010-05-08 11:01:39 +000013776
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013777fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +000013778rm -f conftest.err conftest.i conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013779if test $have_readline = yes
13780then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013781 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013782/* end confdefs.h. */
13783#include <readline/readline.h>
13784
13785_ACEOF
13786if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013787 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013788
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013789$as_echo "#define HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013790
13791fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +000013792rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013793
13794fi
13795
Martin v. Löwis82bca632006-02-10 20:49:30 +000013796# End of readline checks: restore LIBS
13797LIBS=$LIBS_no_readline
13798
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013799{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken nice()" >&5
13800$as_echo_n "checking for broken nice()... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013801if ${ac_cv_broken_nice+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013802 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000013803else
Martin v. Löwis11437992002-04-12 09:54:03 +000013804
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013805if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000013806 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013807else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013808 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013809/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013810
13811int main()
13812{
13813 int val1 = nice(1);
13814 if (val1 != -1 && val1 == nice(2))
13815 exit(0);
13816 exit(1);
13817}
13818
Martin v. Löwis11437992002-04-12 09:54:03 +000013819_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013820if ac_fn_c_try_run "$LINENO"; then :
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013821 ac_cv_broken_nice=yes
13822else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013823 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013824fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013825rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13826 conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013827fi
13828
Martin v. Löwiseba40652007-08-30 20:10:57 +000013829fi
13830
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013831{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_nice" >&5
13832$as_echo "$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013833if test "$ac_cv_broken_nice" = yes
13834then
Martin v. Löwis11437992002-04-12 09:54:03 +000013835
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013836$as_echo "#define HAVE_BROKEN_NICE 1" >>confdefs.h
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013837
13838fi
13839
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013840{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken poll()" >&5
13841$as_echo_n "checking for broken poll()... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013842if ${ac_cv_broken_poll+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013843 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013844else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013845 if test "$cross_compiling" = yes; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013846 ac_cv_broken_poll=no
13847else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013848 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013849/* end confdefs.h. */
13850
13851#include <poll.h>
13852
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013853int main()
13854{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013855 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013856 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013857
13858 close (42);
13859
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013860 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013861 if (poll_test < 0)
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013862 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013863 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013864 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013865 else
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013866 return 1;
13867}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013868
13869_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013870if ac_fn_c_try_run "$LINENO"; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013871 ac_cv_broken_poll=yes
13872else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013873 ac_cv_broken_poll=no
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013874fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013875rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13876 conftest.$ac_objext conftest.beam conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013877fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013878
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013879fi
13880
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013881{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_poll" >&5
13882$as_echo "$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013883if test "$ac_cv_broken_poll" = yes
13884then
13885
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013886$as_echo "#define HAVE_BROKEN_POLL 1" >>confdefs.h
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013887
13888fi
13889
Brett Cannon43802422005-02-10 20:48:03 +000013890# 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 +000013891# (which is not required by ISO C or UNIX spec) and/or if we support
13892# tzname[]
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013893ac_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 +000013894#include <$ac_cv_struct_tm>
13895
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013896"
Matthias Klose3cef2a92012-03-14 23:39:33 +010013897if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Brett Cannon43802422005-02-10 20:48:03 +000013898
13899cat >>confdefs.h <<_ACEOF
13900#define HAVE_STRUCT_TM_TM_ZONE 1
13901_ACEOF
13902
13903
13904fi
13905
13906if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
13907
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013908$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000013909
13910else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013911 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
13912"
Matthias Klose3cef2a92012-03-14 23:39:33 +010013913if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013914 ac_have_decl=1
Martin v. Löwiseba40652007-08-30 20:10:57 +000013915else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013916 ac_have_decl=0
Martin v. Löwiseba40652007-08-30 20:10:57 +000013917fi
13918
Martin v. Löwiseba40652007-08-30 20:10:57 +000013919cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013920#define HAVE_DECL_TZNAME $ac_have_decl
Martin v. Löwiseba40652007-08-30 20:10:57 +000013921_ACEOF
13922
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013923 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
13924$as_echo_n "checking for tzname... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013925if ${ac_cv_var_tzname+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013926 $as_echo_n "(cached) " >&6
Martin v. Löwiseba40652007-08-30 20:10:57 +000013927else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013928 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000013929/* end confdefs.h. */
13930#include <time.h>
Martin v. Löwiseba40652007-08-30 20:10:57 +000013931#if !HAVE_DECL_TZNAME
13932extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000013933#endif
13934
13935int
13936main ()
13937{
Martin v. Löwiseba40652007-08-30 20:10:57 +000013938return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000013939 ;
13940 return 0;
13941}
13942_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013943if ac_fn_c_try_link "$LINENO"; then :
Brett Cannon43802422005-02-10 20:48:03 +000013944 ac_cv_var_tzname=yes
13945else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013946 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000013947fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013948rm -f core conftest.err conftest.$ac_objext \
13949 conftest$ac_exeext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000013950fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013951{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
13952$as_echo "$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000013953 if test $ac_cv_var_tzname = yes; then
13954
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013955$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000013956
13957 fi
13958fi
13959
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013960
Martin v. Löwis1d459062005-03-14 21:23:33 +000013961# check tzset(3) exists and works like we expect it to
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013962{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working tzset()" >&5
13963$as_echo_n "checking for working tzset()... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013964if ${ac_cv_working_tzset+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013965 $as_echo_n "(cached) " >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013966else
13967
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013968if test "$cross_compiling" = yes; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013969 ac_cv_working_tzset=no
13970else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013971 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013972/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013973
13974#include <stdlib.h>
13975#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000013976#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000013977
13978#if HAVE_TZNAME
13979extern char *tzname[];
13980#endif
13981
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013982int main()
13983{
Brett Cannon18367812003-09-19 00:59:16 +000013984 /* Note that we need to ensure that not only does tzset(3)
13985 do 'something' with localtime, but it works as documented
13986 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000013987 This includes making sure that tzname is set properly if
13988 tm->tm_zone does not exist since it is the alternative way
13989 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000013990
13991 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000013992 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000013993 */
13994
Martin v. Löwis1d459062005-03-14 21:23:33 +000013995 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000013996 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
13997
Neal Norwitz7f2588c2003-04-11 15:35:53 +000013998 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013999 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000014000 if (localtime(&groundhogday)->tm_hour != 0)
14001 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000014002#if HAVE_TZNAME
14003 /* For UTC, tzname[1] is sometimes "", sometimes " " */
14004 if (strcmp(tzname[0], "UTC") ||
14005 (tzname[1][0] != 0 && tzname[1][0] != ' '))
14006 exit(1);
14007#endif
Brett Cannon18367812003-09-19 00:59:16 +000014008
Neal Norwitz7f2588c2003-04-11 15:35:53 +000014009 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014010 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000014011 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014012 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000014013#if HAVE_TZNAME
14014 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
14015 exit(1);
14016#endif
Brett Cannon18367812003-09-19 00:59:16 +000014017
14018 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
14019 tzset();
14020 if (localtime(&groundhogday)->tm_hour != 11)
14021 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000014022#if HAVE_TZNAME
14023 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
14024 exit(1);
14025#endif
14026
14027#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000014028 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
14029 exit(1);
14030 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
14031 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000014032#endif
Brett Cannon18367812003-09-19 00:59:16 +000014033
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014034 exit(0);
14035}
14036
14037_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014038if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014039 ac_cv_working_tzset=yes
14040else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014041 ac_cv_working_tzset=no
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014042fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014043rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14044 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014045fi
14046
Martin v. Löwiseba40652007-08-30 20:10:57 +000014047fi
14048
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014049{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_tzset" >&5
14050$as_echo "$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014051if test "$ac_cv_working_tzset" = yes
14052then
14053
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014054$as_echo "#define HAVE_WORKING_TZSET 1" >>confdefs.h
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014055
14056fi
14057
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014058# Look for subsecond timestamps in struct stat
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014059{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec in struct stat" >&5
14060$as_echo_n "checking for tv_nsec in struct stat... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010014061if ${ac_cv_stat_tv_nsec+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014062 $as_echo_n "(cached) " >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014063else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014064 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014065/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014066#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014067int
14068main ()
14069{
14070
14071struct stat st;
14072st.st_mtim.tv_nsec = 1;
14073
14074 ;
14075 return 0;
14076}
14077_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014078if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa32c9942002-09-09 16:17:47 +000014079 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014080else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014081 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014082fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014083rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14084fi
14085
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014086{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec" >&5
14087$as_echo "$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014088if test "$ac_cv_stat_tv_nsec" = yes
14089then
14090
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014091$as_echo "#define HAVE_STAT_TV_NSEC 1" >>confdefs.h
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014092
14093fi
14094
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014095# Look for BSD style subsecond timestamps in struct stat
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014096{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec2 in struct stat" >&5
14097$as_echo_n "checking for tv_nsec2 in struct stat... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010014098if ${ac_cv_stat_tv_nsec2+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014099 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014100else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014101 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014102/* end confdefs.h. */
14103#include <sys/stat.h>
14104int
14105main ()
14106{
14107
14108struct stat st;
14109st.st_mtimespec.tv_nsec = 1;
14110
14111 ;
14112 return 0;
14113}
14114_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014115if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014116 ac_cv_stat_tv_nsec2=yes
14117else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014118 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014119fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014120rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14121fi
14122
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014123{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec2" >&5
14124$as_echo "$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014125if test "$ac_cv_stat_tv_nsec2" = yes
14126then
14127
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014128$as_echo "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014129
14130fi
14131
doko@ubuntu.comf27ec3e2014-04-17 20:11:19 +020014132# first curses configure check
14133ac_save_cppflags="$CPPFLAGS"
14134CPPFLAGS="$CPPFLAGS -I/usr/include/ncursesw"
14135
14136for ac_header in curses.h ncurses.h
14137do :
14138 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
14139ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
14140if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
14141 cat >>confdefs.h <<_ACEOF
14142#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
14143_ACEOF
14144
14145fi
14146
14147done
14148
14149
14150# On Solaris, term.h requires curses.h
14151for ac_header in term.h
14152do :
14153 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "
14154#ifdef HAVE_CURSES_H
14155#include <curses.h>
14156#endif
14157
14158"
14159if test "x$ac_cv_header_term_h" = xyes; then :
14160 cat >>confdefs.h <<_ACEOF
14161#define HAVE_TERM_H 1
14162_ACEOF
14163
14164fi
14165
14166done
14167
14168
Jack Jansen666b1e72001-10-31 12:11:48 +000014169# On HP/UX 11.0, mvwdelch is a block with a return statement
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014170{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mvwdelch is an expression" >&5
14171$as_echo_n "checking whether mvwdelch is an expression... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010014172if ${ac_cv_mvwdelch_is_expression+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014173 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000014174else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014175 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014176/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000014177#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014178int
14179main ()
14180{
Jack Jansen666b1e72001-10-31 12:11:48 +000014181
14182 int rtn;
14183 rtn = mvwdelch(0,0,0);
14184
Martin v. Löwis11437992002-04-12 09:54:03 +000014185 ;
14186 return 0;
14187}
14188_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014189if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000014190 ac_cv_mvwdelch_is_expression=yes
14191else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014192 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000014193fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014194rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14195fi
14196
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014197{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mvwdelch_is_expression" >&5
14198$as_echo "$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000014199
14200if test "$ac_cv_mvwdelch_is_expression" = yes
14201then
Martin v. Löwis11437992002-04-12 09:54:03 +000014202
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014203$as_echo "#define MVWDELCH_IS_EXPRESSION 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000014204
14205fi
14206
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014207{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WINDOW has _flags" >&5
14208$as_echo_n "checking whether WINDOW has _flags... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010014209if ${ac_cv_window_has_flags+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014210 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000014211else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014212 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014213/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000014214#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014215int
14216main ()
14217{
Jack Jansen666b1e72001-10-31 12:11:48 +000014218
14219 WINDOW *w;
14220 w->_flags = 0;
14221
Martin v. Löwis11437992002-04-12 09:54:03 +000014222 ;
14223 return 0;
14224}
14225_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014226if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000014227 ac_cv_window_has_flags=yes
14228else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014229 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000014230fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014231rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14232fi
14233
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014234{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_window_has_flags" >&5
14235$as_echo "$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000014236
Jack Jansen666b1e72001-10-31 12:11:48 +000014237
14238if test "$ac_cv_window_has_flags" = yes
14239then
Martin v. Löwis11437992002-04-12 09:54:03 +000014240
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014241$as_echo "#define WINDOW_HAS_FLAGS 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000014242
14243fi
14244
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014245{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_term_resized" >&5
14246$as_echo_n "checking for is_term_resized... " >&6; }
14247cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Walter Dörwald4994d952006-06-19 08:07:50 +000014248/* end confdefs.h. */
14249#include <curses.h>
14250int
14251main ()
14252{
14253void *x=is_term_resized
14254 ;
14255 return 0;
14256}
14257_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014258if ac_fn_c_try_compile "$LINENO"; then :
Walter Dörwald4994d952006-06-19 08:07:50 +000014259
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014260$as_echo "#define HAVE_CURSES_IS_TERM_RESIZED 1" >>confdefs.h
Walter Dörwald4994d952006-06-19 08:07:50 +000014261
Matthias Klosec511b472010-05-08 11:01:39 +000014262 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014263$as_echo "yes" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000014264else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014265 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14266$as_echo "no" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000014267
14268fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014269rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14270
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014271{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resize_term" >&5
14272$as_echo_n "checking for resize_term... " >&6; }
14273cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Walter Dörwald4994d952006-06-19 08:07:50 +000014274/* end confdefs.h. */
14275#include <curses.h>
14276int
14277main ()
14278{
14279void *x=resize_term
14280 ;
14281 return 0;
14282}
14283_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014284if ac_fn_c_try_compile "$LINENO"; then :
Walter Dörwald4994d952006-06-19 08:07:50 +000014285
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014286$as_echo "#define HAVE_CURSES_RESIZE_TERM 1" >>confdefs.h
Walter Dörwald4994d952006-06-19 08:07:50 +000014287
Matthias Klosec511b472010-05-08 11:01:39 +000014288 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014289$as_echo "yes" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000014290else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014291 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14292$as_echo "no" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000014293
14294fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014295rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14296
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014297{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resizeterm" >&5
14298$as_echo_n "checking for resizeterm... " >&6; }
14299cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Walter Dörwald4994d952006-06-19 08:07:50 +000014300/* end confdefs.h. */
14301#include <curses.h>
14302int
14303main ()
14304{
14305void *x=resizeterm
14306 ;
14307 return 0;
14308}
14309_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014310if ac_fn_c_try_compile "$LINENO"; then :
Walter Dörwald4994d952006-06-19 08:07:50 +000014311
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014312$as_echo "#define HAVE_CURSES_RESIZETERM 1" >>confdefs.h
Walter Dörwald4994d952006-06-19 08:07:50 +000014313
Matthias Klosec511b472010-05-08 11:01:39 +000014314 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014315$as_echo "yes" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000014316else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014317 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14318$as_echo "no" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000014319
14320fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014321rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
doko@ubuntu.comf27ec3e2014-04-17 20:11:19 +020014322# last curses configure check
14323CPPFLAGS=$ac_save_cppflags
Martin v. Löwiseba40652007-08-30 20:10:57 +000014324
doko@python.orgd65e2ba2013-01-31 23:52:03 +010014325{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for device files" >&5
14326$as_echo "$as_me: checking for device files" >&6;}
14327
14328if test "x$cross_compiling" = xyes; then
14329 if test "${ac_cv_file__dev_ptmx+set}" != set; then
14330 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
14331$as_echo_n "checking for /dev/ptmx... " >&6; }
14332 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
14333$as_echo "not set" >&6; }
14334 as_fn_error $? "set ac_cv_file__dev_ptmx to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
14335 fi
14336 if test "${ac_cv_file__dev_ptc+set}" != set; then
14337 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
14338$as_echo_n "checking for /dev/ptc... " >&6; }
14339 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
14340$as_echo "not set" >&6; }
14341 as_fn_error $? "set ac_cv_file__dev_ptc to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
14342 fi
14343fi
14344
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014345{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
14346$as_echo_n "checking for /dev/ptmx... " >&6; }
doko@python.orgd65e2ba2013-01-31 23:52:03 +010014347if ${ac_cv_file__dev_ptmx+:} false; then :
14348 $as_echo_n "(cached) " >&6
14349else
14350 test "$cross_compiling" = yes &&
14351 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
14352if test -r "/dev/ptmx"; then
14353 ac_cv_file__dev_ptmx=yes
14354else
14355 ac_cv_file__dev_ptmx=no
14356fi
14357fi
14358{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptmx" >&5
14359$as_echo "$ac_cv_file__dev_ptmx" >&6; }
14360if test "x$ac_cv_file__dev_ptmx" = xyes; then :
Martin v. Löwisfefbc202006-10-17 18:59:23 +000014361
doko@python.orgd65e2ba2013-01-31 23:52:03 +010014362fi
14363
14364if test "x$ac_cv_file__dev_ptmx" = xyes; then
Martin v. Löwis24a880b2002-12-31 12:55:15 +000014365
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014366$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
Martin v. Löwis24a880b2002-12-31 12:55:15 +000014367
Martin v. Löwis24a880b2002-12-31 12:55:15 +000014368fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014369{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
14370$as_echo_n "checking for /dev/ptc... " >&6; }
doko@python.orgd65e2ba2013-01-31 23:52:03 +010014371if ${ac_cv_file__dev_ptc+:} false; then :
14372 $as_echo_n "(cached) " >&6
14373else
14374 test "$cross_compiling" = yes &&
14375 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
14376if test -r "/dev/ptc"; then
14377 ac_cv_file__dev_ptc=yes
14378else
14379 ac_cv_file__dev_ptc=no
14380fi
14381fi
14382{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptc" >&5
14383$as_echo "$ac_cv_file__dev_ptc" >&6; }
14384if test "x$ac_cv_file__dev_ptc" = xyes; then :
Martin v. Löwisfefbc202006-10-17 18:59:23 +000014385
doko@python.orgd65e2ba2013-01-31 23:52:03 +010014386fi
14387
14388if test "x$ac_cv_file__dev_ptc" = xyes; then
Neal Norwitz865400f2003-03-21 01:42:58 +000014389
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014390$as_echo "#define HAVE_DEV_PTC 1" >>confdefs.h
Neal Norwitz865400f2003-03-21 01:42:58 +000014391
Neal Norwitz865400f2003-03-21 01:42:58 +000014392fi
14393
Mark Dickinson82864d12009-11-15 16:18:58 +000014394if test "$have_long_long" = yes
14395then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014396 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for %lld and %llu printf() format support" >&5
14397$as_echo_n "checking for %lld and %llu printf() format support... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010014398 if ${ac_cv_have_long_long_format+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014399 $as_echo_n "(cached) " >&6
Mark Dickinson82864d12009-11-15 16:18:58 +000014400else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014401 if test "$cross_compiling" = yes; then :
doko@python.orgd65e2ba2013-01-31 23:52:03 +010014402 ac_cv_have_long_long_format="cross -- assuming no"
14403 if test x$GCC = xyes; then
14404 save_CFLAGS=$CFLAGS
14405 CFLAGS="$CFLAGS -Werror -Wformat"
14406 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14407/* end confdefs.h. */
14408
14409 #include <stdio.h>
14410 #include <stddef.h>
14411
14412int
14413main ()
14414{
14415
14416 char *buffer;
14417 sprintf(buffer, "%lld", (long long)123);
14418 sprintf(buffer, "%lld", (long long)-123);
14419 sprintf(buffer, "%llu", (unsigned long long)123);
14420
14421 ;
14422 return 0;
14423}
14424_ACEOF
14425if ac_fn_c_try_compile "$LINENO"; then :
14426 ac_cv_have_long_long_format=yes
14427
14428fi
14429rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14430 CFLAGS=$save_CFLAGS
14431 fi
Mark Dickinson82864d12009-11-15 16:18:58 +000014432else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014433 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson82864d12009-11-15 16:18:58 +000014434/* end confdefs.h. */
14435
14436 #include <stdio.h>
14437 #include <stddef.h>
14438 #include <string.h>
14439
14440 #ifdef HAVE_SYS_TYPES_H
14441 #include <sys/types.h>
14442 #endif
14443
14444 int main()
14445 {
14446 char buffer[256];
14447
14448 if (sprintf(buffer, "%lld", (long long)123) < 0)
14449 return 1;
14450 if (strcmp(buffer, "123"))
14451 return 1;
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, "%llu", (unsigned long long)123) < 0)
14459 return 1;
14460 if (strcmp(buffer, "123"))
14461 return 1;
14462
14463 return 0;
14464 }
14465
14466_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014467if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson82864d12009-11-15 16:18:58 +000014468 ac_cv_have_long_long_format=yes
14469else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014470 ac_cv_have_long_long_format=no
Mark Dickinson82864d12009-11-15 16:18:58 +000014471fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014472rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14473 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson82864d12009-11-15 16:18:58 +000014474fi
14475
14476
Mark Dickinson82864d12009-11-15 16:18:58 +000014477fi
14478
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014479 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_long_long_format" >&5
14480$as_echo "$ac_cv_have_long_long_format" >&6; }
Mark Dickinson82864d12009-11-15 16:18:58 +000014481fi
14482
Mark Dickinson5ce84742009-12-31 20:48:04 +000014483if test "$ac_cv_have_long_long_format" = yes
Mark Dickinson82864d12009-11-15 16:18:58 +000014484then
14485
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014486$as_echo "#define PY_FORMAT_LONG_LONG \"ll\"" >>confdefs.h
Mark Dickinson82864d12009-11-15 16:18:58 +000014487
14488fi
14489
Ronald Oussoren315cd0c2009-11-19 16:25:21 +000014490if test $ac_sys_system = Darwin
14491then
14492 LIBS="$LIBS -framework CoreFoundation"
14493fi
14494
Mark Dickinson82864d12009-11-15 16:18:58 +000014495
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014496{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for %zd printf() format support" >&5
14497$as_echo_n "checking for %zd printf() format support... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010014498if ${ac_cv_have_size_t_format+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014499 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014500else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014501 if test "$cross_compiling" = yes; then :
Gregory P. Smithc9ff3a72009-11-02 02:03:16 +000014502 ac_cv_have_size_t_format="cross -- assuming yes"
14503
Brett Cannon09d12362006-05-11 05:11:33 +000014504else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014505 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Brett Cannon09d12362006-05-11 05:11:33 +000014506/* end confdefs.h. */
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014507
Brett Cannon09d12362006-05-11 05:11:33 +000014508#include <stdio.h>
14509#include <stddef.h>
14510#include <string.h>
14511
Christian Heimesdb3d6cb2007-12-16 21:39:43 +000014512#ifdef HAVE_SYS_TYPES_H
14513#include <sys/types.h>
14514#endif
Neal Norwitz4a8fbdb2006-09-22 08:16:26 +000014515
14516#ifdef HAVE_SSIZE_T
14517typedef ssize_t Py_ssize_t;
14518#elif SIZEOF_VOID_P == SIZEOF_LONG
14519typedef long Py_ssize_t;
14520#else
14521typedef int Py_ssize_t;
14522#endif
Brett Cannon09d12362006-05-11 05:11:33 +000014523
Christian Heimesdb3d6cb2007-12-16 21:39:43 +000014524int main()
14525{
14526 char buffer[256];
14527
Brett Cannon09d12362006-05-11 05:11:33 +000014528 if(sprintf(buffer, "%zd", (size_t)123) < 0)
14529 return 1;
14530
Neal Norwitz4a8fbdb2006-09-22 08:16:26 +000014531 if (strcmp(buffer, "123"))
14532 return 1;
14533
14534 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
14535 return 1;
14536
14537 if (strcmp(buffer, "-123"))
Brett Cannon09d12362006-05-11 05:11:33 +000014538 return 1;
14539
14540 return 0;
14541}
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014542
Brett Cannon09d12362006-05-11 05:11:33 +000014543_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014544if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014545 ac_cv_have_size_t_format=yes
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014546else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014547 ac_cv_have_size_t_format=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014548fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014549rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14550 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +000014551fi
14552
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014553fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014554{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t_format" >&5
14555$as_echo "$ac_cv_have_size_t_format" >&6; }
Gregory P. Smithc9ff3a72009-11-02 02:03:16 +000014556if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014557
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014558$as_echo "#define PY_FORMAT_SIZE_T \"z\"" >>confdefs.h
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014559
14560fi
14561
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014562ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
Martin v. Löwis01c04012002-11-11 14:58:44 +000014563#ifdef HAVE_SYS_TYPES_H
14564#include <sys/types.h>
14565#endif
14566#ifdef HAVE_SYS_SOCKET_H
14567#include <sys/socket.h>
14568#endif
14569
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014570"
Matthias Klose3cef2a92012-03-14 23:39:33 +010014571if test "x$ac_cv_type_socklen_t" = xyes; then :
Martin v. Löwis01c04012002-11-11 14:58:44 +000014572
Martin v. Löwis11437992002-04-12 09:54:03 +000014573else
Guido van Rossum95713eb2000-05-18 20:53:31 +000014574
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014575$as_echo "#define socklen_t int" >>confdefs.h
Guido van Rossum95713eb2000-05-18 20:53:31 +000014576
14577fi
14578
Michael W. Hudson54241132001-12-07 15:38:26 +000014579
Benjamin Peterson7497e912010-10-16 00:53:39 +000014580case $ac_sys_system in
14581AIX*)
14582
14583$as_echo "#define HAVE_BROKEN_PIPE_BUF 1" >>confdefs.h
14584 ;;
14585esac
14586
14587
Michael W. Hudson54241132001-12-07 15:38:26 +000014588
14589
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000014590for h in `(cd $srcdir;echo Python/thread_*.h)`
14591do
14592 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
14593done
14594
Michael W. Hudson54241132001-12-07 15:38:26 +000014595
Neal Norwitzd24499d2005-12-18 21:36:39 +000014596SRCDIRS="Parser Grammar Objects Python Modules Mac"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014597{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5
14598$as_echo_n "checking for build directories... " >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000014599for dir in $SRCDIRS; do
14600 if test ! -d $dir; then
14601 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000014602 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000014603done
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014604{ $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
14605$as_echo "done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000014606
Guido van Rossum627b2d71993-12-24 10:39:16 +000014607# generate output files
Antoine Pitrouf2caeed2009-05-24 20:23:57 +000014608ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config Misc/python.pc"
Martin v. Löwis88afe662002-10-26 13:47:44 +000014609
Antoine Pitrouaabdceb2010-09-10 20:03:17 +000014610ac_config_files="$ac_config_files Modules/ld_so_aix"
14611
Martin v. Löwis11437992002-04-12 09:54:03 +000014612cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014613# This file is a shell script that caches the results of configure
14614# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000014615# scripts and configure runs, see configure's option --config-cache.
14616# It is not useful on other systems. If it contains results you don't
14617# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014618#
Martin v. Löwis11437992002-04-12 09:54:03 +000014619# config.status only pays attention to the cache file if you give it
14620# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014621#
Skip Montanaro6dead952003-09-25 14:50:04 +000014622# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000014623# loading this file, other *unset* `ac_cv_foo' will be assigned the
14624# following values.
14625
14626_ACEOF
14627
Guido van Rossumf78abae1997-01-21 22:02:36 +000014628# The following way of writing the cache mishandles newlines in values,
14629# but we know of no workaround that is simple, portable, and efficient.
Martin v. Löwiseba40652007-08-30 20:10:57 +000014630# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014631# Ultrix sh set writes to stderr and can't be redirected directly,
14632# and sets the high bit in the cache file unless we assign to the vars.
Martin v. Löwiseba40652007-08-30 20:10:57 +000014633(
14634 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
14635 eval ac_val=\$$ac_var
14636 case $ac_val in #(
14637 *${as_nl}*)
14638 case $ac_var in #(
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014639 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
14640$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000014641 esac
14642 case $ac_var in #(
14643 _ | IFS | as_nl) ;; #(
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014644 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
14645 *) { eval $ac_var=; unset $ac_var;} ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000014646 esac ;;
14647 esac
14648 done
14649
Martin v. Löwis11437992002-04-12 09:54:03 +000014650 (set) 2>&1 |
Martin v. Löwiseba40652007-08-30 20:10:57 +000014651 case $as_nl`(ac_space=' '; set) 2>&1` in #(
14652 *${as_nl}ac_space=\ *)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014653 # `set' does not quote correctly, so add quotes: double-quote
14654 # substitution turns \\\\ into \\, and sed turns \\ into \.
Martin v. Löwis11437992002-04-12 09:54:03 +000014655 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014656 "s/'/'\\\\''/g;
14657 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Martin v. Löwiseba40652007-08-30 20:10:57 +000014658 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000014659 *)
14660 # `set' quotes correctly as required by POSIX, so do not add quotes.
Martin v. Löwiseba40652007-08-30 20:10:57 +000014661 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000014662 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000014663 esac |
14664 sort
14665) |
Martin v. Löwis11437992002-04-12 09:54:03 +000014666 sed '
Martin v. Löwiseba40652007-08-30 20:10:57 +000014667 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000014668 t clear
Martin v. Löwiseba40652007-08-30 20:10:57 +000014669 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000014670 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
14671 t end
Martin v. Löwiseba40652007-08-30 20:10:57 +000014672 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
14673 :end' >>confcache
14674if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
14675 if test -w "$cache_file"; then
Matthias Klose3cef2a92012-03-14 23:39:33 +010014676 if test "x$cache_file" != "x/dev/null"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014677 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
14678$as_echo "$as_me: updating cache $cache_file" >&6;}
Matthias Klose3cef2a92012-03-14 23:39:33 +010014679 if test ! -f "$cache_file" || test -h "$cache_file"; then
14680 cat confcache >"$cache_file"
14681 else
14682 case $cache_file in #(
14683 */* | ?:*)
14684 mv -f confcache "$cache_file"$$ &&
14685 mv -f "$cache_file"$$ "$cache_file" ;; #(
14686 *)
14687 mv -f confcache "$cache_file" ;;
14688 esac
14689 fi
14690 fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014691 else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014692 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
14693$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014694 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014695fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014696rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000014697
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014698test "x$prefix" = xNONE && prefix=$ac_default_prefix
14699# Let make expand exec_prefix.
14700test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000014701
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014702DEFS=-DHAVE_CONFIG_H
14703
Skip Montanaro6dead952003-09-25 14:50:04 +000014704ac_libobjs=
14705ac_ltlibobjs=
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014706U=
Skip Montanaro6dead952003-09-25 14:50:04 +000014707for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
14708 # 1. Remove the extension, and $U if already installed.
Martin v. Löwiseba40652007-08-30 20:10:57 +000014709 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014710 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
Martin v. Löwiseba40652007-08-30 20:10:57 +000014711 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
14712 # will be set to the directory where LIBOBJS objects are built.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014713 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
14714 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000014715done
14716LIBOBJS=$ac_libobjs
14717
14718LTLIBOBJS=$ac_ltlibobjs
14719
14720
Martin v. Löwis11437992002-04-12 09:54:03 +000014721
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014722
Matthias Klose3cef2a92012-03-14 23:39:33 +010014723: "${CONFIG_STATUS=./config.status}"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014724ac_write_fail=0
Martin v. Löwis11437992002-04-12 09:54:03 +000014725ac_clean_files_save=$ac_clean_files
14726ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014727{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
14728$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
14729as_write_fail=0
14730cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014731#! $SHELL
14732# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000014733# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014734# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000014735# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000014736
Martin v. Löwis11437992002-04-12 09:54:03 +000014737debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000014738ac_cs_recheck=false
14739ac_cs_silent=false
Jack Jansendd19cf82001-12-06 22:36:17 +000014740
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014741SHELL=\${CONFIG_SHELL-$SHELL}
14742export SHELL
14743_ASEOF
14744cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
14745## -------------------- ##
14746## M4sh Initialization. ##
14747## -------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000014748
Martin v. Löwiseba40652007-08-30 20:10:57 +000014749# Be more Bourne compatible
14750DUALCASE=1; export DUALCASE # for MKS sh
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014751if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014752 emulate sh
14753 NULLCMD=:
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014754 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000014755 # is contrary to our usage. Disable this feature.
14756 alias -g '${1+"$@"}'='"$@"'
Martin v. Löwiseba40652007-08-30 20:10:57 +000014757 setopt NO_GLOB_SUBST
Skip Montanaro89e975f2007-08-22 19:05:21 +000014758else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014759 case `(set -o) 2>/dev/null` in #(
14760 *posix*) :
14761 set -o posix ;; #(
14762 *) :
14763 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000014764esac
Martin v. Löwis11437992002-04-12 09:54:03 +000014765fi
Michael W. Hudson54241132001-12-07 15:38:26 +000014766
Skip Montanaro6dead952003-09-25 14:50:04 +000014767
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014768as_nl='
14769'
14770export as_nl
14771# Printing a long string crashes Solaris 7 /usr/bin/printf.
14772as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
14773as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
14774as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
14775# Prefer a ksh shell builtin over an external printf program on Solaris,
14776# but without wasting forks for bash or zsh.
14777if test -z "$BASH_VERSION$ZSH_VERSION" \
14778 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
14779 as_echo='print -r --'
14780 as_echo_n='print -rn --'
14781elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
14782 as_echo='printf %s\n'
14783 as_echo_n='printf %s'
14784else
14785 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
14786 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
14787 as_echo_n='/usr/ucb/echo -n'
14788 else
14789 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
14790 as_echo_n_body='eval
14791 arg=$1;
14792 case $arg in #(
14793 *"$as_nl"*)
14794 expr "X$arg" : "X\\(.*\\)$as_nl";
14795 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
14796 esac;
14797 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
14798 '
14799 export as_echo_n_body
14800 as_echo_n='sh -c $as_echo_n_body as_echo'
14801 fi
14802 export as_echo_body
14803 as_echo='sh -c $as_echo_body as_echo'
14804fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014805
14806# The user is always right.
14807if test "${PATH_SEPARATOR+set}" != set; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014808 PATH_SEPARATOR=:
14809 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
14810 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
14811 PATH_SEPARATOR=';'
14812 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000014813fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014814
Martin v. Löwiseba40652007-08-30 20:10:57 +000014815
14816# IFS
14817# We need space, tab and new line, in precisely that order. Quoting is
14818# there to prevent editors from complaining about space-tab.
14819# (If _AS_PATH_WALK were called with IFS unset, it would disable word
14820# splitting by setting IFS to empty value.)
Martin v. Löwiseba40652007-08-30 20:10:57 +000014821IFS=" "" $as_nl"
14822
14823# Find who we are. Look in the path if we contain no directory separator.
Matthias Klose3cef2a92012-03-14 23:39:33 +010014824as_myself=
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014825case $0 in #((
Martin v. Löwiseba40652007-08-30 20:10:57 +000014826 *[\\/]* ) as_myself=$0 ;;
14827 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000014828for as_dir in $PATH
14829do
14830 IFS=$as_save_IFS
14831 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014832 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
14833 done
Martin v. Löwiseba40652007-08-30 20:10:57 +000014834IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000014835
Martin v. Löwiseba40652007-08-30 20:10:57 +000014836 ;;
14837esac
14838# We did not find ourselves, most probably we were run as `sh COMMAND'
14839# in which case we are not to be found in the path.
14840if test "x$as_myself" = x; then
14841 as_myself=$0
14842fi
14843if test ! -f "$as_myself"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014844 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
14845 exit 1
Martin v. Löwiseba40652007-08-30 20:10:57 +000014846fi
14847
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014848# Unset variables that we do not need and which cause bugs (e.g. in
14849# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
14850# suppresses any "Segmentation fault" message there. '((' could
14851# trigger a bug in pdksh 5.2.14.
14852for as_var in BASH_ENV ENV MAIL MAILPATH
14853do eval test x\${$as_var+set} = xset \
14854 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Martin v. Löwiseba40652007-08-30 20:10:57 +000014855done
14856PS1='$ '
14857PS2='> '
14858PS4='+ '
14859
14860# NLS nuisances.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014861LC_ALL=C
14862export LC_ALL
14863LANGUAGE=C
14864export LANGUAGE
Martin v. Löwiseba40652007-08-30 20:10:57 +000014865
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014866# CDPATH.
14867(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
14868
14869
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014870# as_fn_error STATUS ERROR [LINENO LOG_FD]
14871# ----------------------------------------
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014872# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
14873# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014874# script with STATUS, using 1 if that was 0.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014875as_fn_error ()
14876{
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014877 as_status=$1; test $as_status -eq 0 && as_status=1
14878 if test "$4"; then
14879 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
14880 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014881 fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014882 $as_echo "$as_me: error: $2" >&2
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014883 as_fn_exit $as_status
14884} # as_fn_error
14885
14886
14887# as_fn_set_status STATUS
14888# -----------------------
14889# Set $? to STATUS, without forking.
14890as_fn_set_status ()
14891{
14892 return $1
14893} # as_fn_set_status
14894
14895# as_fn_exit STATUS
14896# -----------------
14897# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
14898as_fn_exit ()
14899{
14900 set +e
14901 as_fn_set_status $1
14902 exit $1
14903} # as_fn_exit
14904
14905# as_fn_unset VAR
14906# ---------------
14907# Portably unset VAR.
14908as_fn_unset ()
14909{
14910 { eval $1=; unset $1;}
14911}
14912as_unset=as_fn_unset
14913# as_fn_append VAR VALUE
14914# ----------------------
14915# Append the text in VALUE to the end of the definition contained in VAR. Take
14916# advantage of any shell optimizations that allow amortized linear growth over
14917# repeated appends, instead of the typical quadratic growth present in naive
14918# implementations.
14919if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
14920 eval 'as_fn_append ()
14921 {
14922 eval $1+=\$2
14923 }'
14924else
14925 as_fn_append ()
14926 {
14927 eval $1=\$$1\$2
14928 }
14929fi # as_fn_append
14930
14931# as_fn_arith ARG...
14932# ------------------
14933# Perform arithmetic evaluation on the ARGs, and store the result in the
14934# global $as_val. Take advantage of shells that can avoid forks. The arguments
14935# must be portable across $(()) and expr.
14936if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
14937 eval 'as_fn_arith ()
14938 {
14939 as_val=$(( $* ))
14940 }'
14941else
14942 as_fn_arith ()
14943 {
14944 as_val=`expr "$@" || test $? -eq 1`
14945 }
14946fi # as_fn_arith
14947
14948
Martin v. Löwiseba40652007-08-30 20:10:57 +000014949if expr a : '\(a\)' >/dev/null 2>&1 &&
14950 test "X`expr 00001 : '.*\(...\)'`" = X001; then
14951 as_expr=expr
14952else
14953 as_expr=false
14954fi
14955
14956if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
14957 as_basename=basename
14958else
14959 as_basename=false
14960fi
14961
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014962if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
14963 as_dirname=dirname
14964else
14965 as_dirname=false
14966fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014967
Martin v. Löwiseba40652007-08-30 20:10:57 +000014968as_me=`$as_basename -- "$0" ||
14969$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
14970 X"$0" : 'X\(//\)$' \| \
14971 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014972$as_echo X/"$0" |
Martin v. Löwiseba40652007-08-30 20:10:57 +000014973 sed '/^.*\/\([^/][^/]*\)\/*$/{
14974 s//\1/
14975 q
14976 }
14977 /^X\/\(\/\/\)$/{
14978 s//\1/
14979 q
14980 }
14981 /^X\/\(\/\).*/{
14982 s//\1/
14983 q
14984 }
14985 s/.*/./; q'`
14986
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014987# Avoid depending upon Character Ranges.
14988as_cr_letters='abcdefghijklmnopqrstuvwxyz'
14989as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
14990as_cr_Letters=$as_cr_letters$as_cr_LETTERS
14991as_cr_digits='0123456789'
14992as_cr_alnum=$as_cr_Letters$as_cr_digits
Martin v. Löwiseba40652007-08-30 20:10:57 +000014993
14994ECHO_C= ECHO_N= ECHO_T=
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014995case `echo -n x` in #(((((
Martin v. Löwiseba40652007-08-30 20:10:57 +000014996-n*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014997 case `echo 'xy\c'` in
Martin v. Löwiseba40652007-08-30 20:10:57 +000014998 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014999 xy) ECHO_C='\c';;
15000 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
15001 ECHO_T=' ';;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015002 esac;;
15003*)
15004 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000015005esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015006
Martin v. Löwis11437992002-04-12 09:54:03 +000015007rm -f conf$$ conf$$.exe conf$$.file
Martin v. Löwiseba40652007-08-30 20:10:57 +000015008if test -d conf$$.dir; then
15009 rm -f conf$$.dir/conf$$.file
15010else
15011 rm -f conf$$.dir
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015012 mkdir conf$$.dir 2>/dev/null
Martin v. Löwiseba40652007-08-30 20:10:57 +000015013fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015014if (echo >conf$$.file) 2>/dev/null; then
15015 if ln -s conf$$.file conf$$ 2>/dev/null; then
15016 as_ln_s='ln -s'
15017 # ... but there are two gotchas:
15018 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
15019 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
Charles-François Natalibe2b9072013-01-08 19:47:00 +010015020 # In both cases, we have to default to `cp -pR'.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015021 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Charles-François Natalibe2b9072013-01-08 19:47:00 +010015022 as_ln_s='cp -pR'
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015023 elif ln conf$$.file conf$$ 2>/dev/null; then
15024 as_ln_s=ln
15025 else
Charles-François Natalibe2b9072013-01-08 19:47:00 +010015026 as_ln_s='cp -pR'
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015027 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015028else
Charles-François Natalibe2b9072013-01-08 19:47:00 +010015029 as_ln_s='cp -pR'
Martin v. Löwis11437992002-04-12 09:54:03 +000015030fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015031rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
15032rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000015033
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015034
15035# as_fn_mkdir_p
15036# -------------
15037# Create "$as_dir" as a directory, including parents if necessary.
15038as_fn_mkdir_p ()
15039{
15040
15041 case $as_dir in #(
15042 -*) as_dir=./$as_dir;;
15043 esac
15044 test -d "$as_dir" || eval $as_mkdir_p || {
15045 as_dirs=
15046 while :; do
15047 case $as_dir in #(
15048 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
15049 *) as_qdir=$as_dir;;
15050 esac
15051 as_dirs="'$as_qdir' $as_dirs"
15052 as_dir=`$as_dirname -- "$as_dir" ||
15053$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
15054 X"$as_dir" : 'X\(//\)[^/]' \| \
15055 X"$as_dir" : 'X\(//\)$' \| \
15056 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
15057$as_echo X"$as_dir" |
15058 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
15059 s//\1/
15060 q
15061 }
15062 /^X\(\/\/\)[^/].*/{
15063 s//\1/
15064 q
15065 }
15066 /^X\(\/\/\)$/{
15067 s//\1/
15068 q
15069 }
15070 /^X\(\/\).*/{
15071 s//\1/
15072 q
15073 }
15074 s/.*/./; q'`
15075 test -d "$as_dir" && break
15076 done
15077 test -z "$as_dirs" || eval "mkdir $as_dirs"
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015078 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015079
15080
15081} # as_fn_mkdir_p
Skip Montanaro6dead952003-09-25 14:50:04 +000015082if mkdir -p . 2>/dev/null; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015083 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +000015084else
Skip Montanarof0d5f792004-08-15 14:08:23 +000015085 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000015086 as_mkdir_p=false
15087fi
15088
Charles-François Natalibe2b9072013-01-08 19:47:00 +010015089
15090# as_fn_executable_p FILE
15091# -----------------------
15092# Test if FILE is an executable regular file.
15093as_fn_executable_p ()
15094{
15095 test -f "$1" && test -x "$1"
15096} # as_fn_executable_p
15097as_test_x='test -x'
15098as_executable_p=as_fn_executable_p
Martin v. Löwis11437992002-04-12 09:54:03 +000015099
15100# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000015101as_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 +000015102
15103# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000015104as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000015105
15106
Martin v. Löwis11437992002-04-12 09:54:03 +000015107exec 6>&1
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015108## ----------------------------------- ##
15109## Main body of $CONFIG_STATUS script. ##
15110## ----------------------------------- ##
15111_ASEOF
15112test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015113
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015114cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15115# Save the log message, to keep $0 and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000015116# report actual input values of CONFIG_FILES etc. instead of their
Martin v. Löwiseba40652007-08-30 20:10:57 +000015117# values after options handling.
15118ac_log="
Martin v. Löwis174440b2008-10-03 08:59:41 +000015119This file was extended by python $as_me 2.7, which was
Charles-François Natalibe2b9072013-01-08 19:47:00 +010015120generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000015121
15122 CONFIG_FILES = $CONFIG_FILES
15123 CONFIG_HEADERS = $CONFIG_HEADERS
15124 CONFIG_LINKS = $CONFIG_LINKS
15125 CONFIG_COMMANDS = $CONFIG_COMMANDS
15126 $ $0 $@
15127
Martin v. Löwiseba40652007-08-30 20:10:57 +000015128on `(hostname || uname -n) 2>/dev/null | sed 1q`
15129"
15130
Martin v. Löwis11437992002-04-12 09:54:03 +000015131_ACEOF
15132
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015133case $ac_config_files in *"
15134"*) set x $ac_config_files; shift; ac_config_files=$*;;
15135esac
15136
15137case $ac_config_headers in *"
15138"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
15139esac
15140
15141
15142cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015143# Files that config.status was made for.
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015144config_files="$ac_config_files"
15145config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000015146
Martin v. Löwiseba40652007-08-30 20:10:57 +000015147_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000015148
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015149cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015150ac_cs_usage="\
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015151\`$as_me' instantiates files and other configuration actions
15152from templates according to the current configuration. Unless the files
15153and actions are specified as TAGs, all are instantiated by default.
Martin v. Löwis11437992002-04-12 09:54:03 +000015154
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015155Usage: $0 [OPTION]... [TAG]...
Martin v. Löwis11437992002-04-12 09:54:03 +000015156
15157 -h, --help print this help, then exit
Martin v. Löwiseba40652007-08-30 20:10:57 +000015158 -V, --version print version number and configuration settings, then exit
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015159 --config print configuration, then exit
15160 -q, --quiet, --silent
15161 do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000015162 -d, --debug don't remove temporary files
15163 --recheck update $as_me by reconfiguring in the same conditions
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015164 --file=FILE[:TEMPLATE]
15165 instantiate the configuration file FILE
15166 --header=FILE[:TEMPLATE]
15167 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000015168
15169Configuration files:
15170$config_files
15171
15172Configuration headers:
15173$config_headers
15174
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015175Report bugs to <http://bugs.python.org/>."
Skip Montanaro89e975f2007-08-22 19:05:21 +000015176
Martin v. Löwiseba40652007-08-30 20:10:57 +000015177_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015178cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15179ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
Martin v. Löwis11437992002-04-12 09:54:03 +000015180ac_cs_version="\\
Martin v. Löwis174440b2008-10-03 08:59:41 +000015181python config.status 2.7
Charles-François Natalibe2b9072013-01-08 19:47:00 +010015182configured by $0, generated by GNU Autoconf 2.69,
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015183 with options \\"\$ac_cs_config\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000015184
Charles-François Natalibe2b9072013-01-08 19:47:00 +010015185Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000015186This config.status script is free software; the Free Software Foundation
15187gives unlimited permission to copy, distribute and modify it."
Martin v. Löwiseba40652007-08-30 20:10:57 +000015188
15189ac_pwd='$ac_pwd'
15190srcdir='$srcdir'
15191INSTALL='$INSTALL'
Trent Nelsonf6407a12012-08-30 14:56:13 +000015192MKDIR_P='$MKDIR_P'
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015193test -n "\$AWK" || AWK=awk
Martin v. Löwis11437992002-04-12 09:54:03 +000015194_ACEOF
15195
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015196cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15197# The default lists apply if the user does not specify any file.
Martin v. Löwis11437992002-04-12 09:54:03 +000015198ac_need_defaults=:
15199while test $# != 0
15200do
15201 case $1 in
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015202 --*=?*)
Martin v. Löwiseba40652007-08-30 20:10:57 +000015203 ac_option=`expr "X$1" : 'X\([^=]*\)='`
15204 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000015205 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000015206 ;;
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015207 --*=)
15208 ac_option=`expr "X$1" : 'X\([^=]*\)='`
15209 ac_optarg=
15210 ac_shift=:
15211 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015212 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000015213 ac_option=$1
15214 ac_optarg=$2
15215 ac_shift=shift
15216 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015217 esac
15218
Skip Montanaro6dead952003-09-25 14:50:04 +000015219 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000015220 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000015221 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
15222 ac_cs_recheck=: ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015223 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015224 $as_echo "$ac_cs_version"; exit ;;
15225 --config | --confi | --conf | --con | --co | --c )
15226 $as_echo "$ac_cs_config"; exit ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015227 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000015228 debug=: ;;
15229 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000015230 $ac_shift
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015231 case $ac_optarg in
15232 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015233 '') as_fn_error $? "missing file argument" ;;
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015234 esac
15235 as_fn_append CONFIG_FILES " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000015236 ac_need_defaults=false;;
15237 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000015238 $ac_shift
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015239 case $ac_optarg in
15240 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
15241 esac
15242 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000015243 ac_need_defaults=false;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015244 --he | --h)
15245 # Conflict between --help and --header
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015246 as_fn_error $? "ambiguous option: \`$1'
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015247Try \`$0 --help' for more information.";;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015248 --help | --hel | -h )
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015249 $as_echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000015250 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
15251 | -silent | --silent | --silen | --sile | --sil | --si | --s)
15252 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015253
15254 # This is an error.
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015255 -*) as_fn_error $? "unrecognized option: \`$1'
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015256Try \`$0 --help' for more information." ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015257
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015258 *) as_fn_append ac_config_targets " $1"
Martin v. Löwiseba40652007-08-30 20:10:57 +000015259 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015260
15261 esac
15262 shift
15263done
15264
Skip Montanaro6dead952003-09-25 14:50:04 +000015265ac_configure_extra_args=
15266
15267if $ac_cs_silent; then
15268 exec 6>/dev/null
15269 ac_configure_extra_args="$ac_configure_extra_args --silent"
15270fi
15271
15272_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015273cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Skip Montanaro6dead952003-09-25 14:50:04 +000015274if \$ac_cs_recheck; then
Charles-François Natalibe2b9072013-01-08 19:47:00 +010015275 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015276 shift
15277 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
15278 CONFIG_SHELL='$SHELL'
Martin v. Löwiseba40652007-08-30 20:10:57 +000015279 export CONFIG_SHELL
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015280 exec "\$@"
Skip Montanaro6dead952003-09-25 14:50:04 +000015281fi
15282
Martin v. Löwis11437992002-04-12 09:54:03 +000015283_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015284cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwiseba40652007-08-30 20:10:57 +000015285exec 5>>config.log
15286{
15287 echo
15288 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
15289## Running $as_me. ##
15290_ASBOX
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015291 $as_echo "$ac_log"
Martin v. Löwiseba40652007-08-30 20:10:57 +000015292} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015293
Martin v. Löwiseba40652007-08-30 20:10:57 +000015294_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015295cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwiseba40652007-08-30 20:10:57 +000015296_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000015297
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015298cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwiseba40652007-08-30 20:10:57 +000015299
15300# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000015301for ac_config_target in $ac_config_targets
15302do
Martin v. Löwiseba40652007-08-30 20:10:57 +000015303 case $ac_config_target in
15304 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
15305 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
15306 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
15307 "Mac/IDLE/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/IDLE/Makefile" ;;
Ronald Oussoren580c7fe2008-05-02 19:45:11 +000015308 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
15309 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015310 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
15311 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
Antoine Pitrouf2caeed2009-05-24 20:23:57 +000015312 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
Antoine Pitrouaabdceb2010-09-10 20:03:17 +000015313 "Modules/ld_so_aix") CONFIG_FILES="$CONFIG_FILES Modules/ld_so_aix" ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015314
Matthias Klose3cef2a92012-03-14 23:39:33 +010015315 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015316 esac
15317done
15318
Martin v. Löwiseba40652007-08-30 20:10:57 +000015319
Martin v. Löwis11437992002-04-12 09:54:03 +000015320# If the user did not use the arguments to specify the items to instantiate,
15321# then the envvar interface is used. Set only those that are not.
15322# We use the long form for the default assignment because of an extremely
15323# bizarre bug on SunOS 4.1.3.
15324if $ac_need_defaults; then
15325 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
15326 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
15327fi
15328
Skip Montanaro6dead952003-09-25 14:50:04 +000015329# Have a temporary directory for convenience. Make it in the build tree
Martin v. Löwiseba40652007-08-30 20:10:57 +000015330# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000015331# creating and moving files from /tmp can sometimes cause problems.
Martin v. Löwiseba40652007-08-30 20:10:57 +000015332# Hook for its removal unless debugging.
15333# Note that there is a small window in which the directory will not be cleaned:
15334# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000015335$debug ||
15336{
Matthias Klose3cef2a92012-03-14 23:39:33 +010015337 tmp= ac_tmp=
Martin v. Löwiseba40652007-08-30 20:10:57 +000015338 trap 'exit_status=$?
Matthias Klose3cef2a92012-03-14 23:39:33 +010015339 : "${ac_tmp:=$tmp}"
15340 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
Martin v. Löwiseba40652007-08-30 20:10:57 +000015341' 0
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015342 trap 'as_fn_exit 1' 1 2 13 15
Martin v. Löwis11437992002-04-12 09:54:03 +000015343}
Martin v. Löwis11437992002-04-12 09:54:03 +000015344# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000015345
Martin v. Löwis11437992002-04-12 09:54:03 +000015346{
Martin v. Löwiseba40652007-08-30 20:10:57 +000015347 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Matthias Klose3cef2a92012-03-14 23:39:33 +010015348 test -d "$tmp"
Martin v. Löwis11437992002-04-12 09:54:03 +000015349} ||
15350{
Martin v. Löwiseba40652007-08-30 20:10:57 +000015351 tmp=./conf$$-$RANDOM
15352 (umask 077 && mkdir "$tmp")
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015353} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
Matthias Klose3cef2a92012-03-14 23:39:33 +010015354ac_tmp=$tmp
Martin v. Löwis11437992002-04-12 09:54:03 +000015355
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015356# Set up the scripts for CONFIG_FILES section.
15357# No need to generate them if there are no CONFIG_FILES.
15358# This happens for instance with `./config.status config.h'.
Martin v. Löwiseba40652007-08-30 20:10:57 +000015359if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015360
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015361
15362ac_cr=`echo X | tr X '\015'`
15363# On cygwin, bash can eat \r inside `` if the user requested igncr.
15364# But we know of no other shell where ac_cr would be empty at this
15365# point, so we can use a bashism as a fallback.
15366if test "x$ac_cr" = x; then
15367 eval ac_cr=\$\'\\r\'
15368fi
15369ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
15370if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015371 ac_cs_awk_cr='\\r'
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015372else
15373 ac_cs_awk_cr=$ac_cr
15374fi
15375
Matthias Klose3cef2a92012-03-14 23:39:33 +010015376echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
Martin v. Löwis11437992002-04-12 09:54:03 +000015377_ACEOF
15378
Martin v. Löwiseba40652007-08-30 20:10:57 +000015379
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015380{
15381 echo "cat >conf$$subs.awk <<_ACEOF" &&
15382 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
15383 echo "_ACEOF"
15384} >conf$$subs.sh ||
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015385 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
15386ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
Martin v. Löwiseba40652007-08-30 20:10:57 +000015387ac_delim='%!_!# '
15388for ac_last_try in false false false false false :; do
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015389 . ./conf$$subs.sh ||
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015390 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015391
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015392 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
15393 if test $ac_delim_n = $ac_delim_num; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015394 break
15395 elif $ac_last_try; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015396 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015397 else
15398 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000015399 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015400done
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015401rm -f conf$$subs.sh
Martin v. Löwiseba40652007-08-30 20:10:57 +000015402
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015403cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Matthias Klose3cef2a92012-03-14 23:39:33 +010015404cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
Martin v. Löwiseba40652007-08-30 20:10:57 +000015405_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015406sed -n '
15407h
15408s/^/S["/; s/!.*/"]=/
15409p
15410g
15411s/^[^!]*!//
15412:repl
15413t repl
15414s/'"$ac_delim"'$//
15415t delim
15416:nl
15417h
15418s/\(.\{148\}\)..*/\1/
15419t more1
15420s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
15421p
15422n
15423b repl
15424:more1
15425s/["\\]/\\&/g; s/^/"/; s/$/"\\/
15426p
15427g
15428s/.\{148\}//
15429t nl
15430:delim
15431h
15432s/\(.\{148\}\)..*/\1/
15433t more2
15434s/["\\]/\\&/g; s/^/"/; s/$/"/
15435p
15436b
15437:more2
15438s/["\\]/\\&/g; s/^/"/; s/$/"\\/
15439p
15440g
15441s/.\{148\}//
15442t delim
15443' <conf$$subs.awk | sed '
15444/^[^""]/{
15445 N
15446 s/\n//
15447}
15448' >>$CONFIG_STATUS || ac_write_fail=1
15449rm -f conf$$subs.awk
15450cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15451_ACAWK
Matthias Klose3cef2a92012-03-14 23:39:33 +010015452cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015453 for (key in S) S_is_set[key] = 1
15454 FS = ""
15455
15456}
15457{
15458 line = $ 0
15459 nfields = split(line, field, "@")
15460 substed = 0
15461 len = length(field[1])
15462 for (i = 2; i < nfields; i++) {
15463 key = field[i]
15464 keylen = length(key)
15465 if (S_is_set[key]) {
15466 value = S[key]
15467 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
15468 len += length(value) + length(field[++i])
15469 substed = 1
15470 } else
15471 len += 1 + keylen
15472 }
15473
15474 print line
15475}
15476
15477_ACAWK
Martin v. Löwiseba40652007-08-30 20:10:57 +000015478_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015479cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15480if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
15481 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
15482else
15483 cat
Matthias Klose3cef2a92012-03-14 23:39:33 +010015484fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015485 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015486_ACEOF
15487
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015488# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
15489# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
Martin v. Löwiseba40652007-08-30 20:10:57 +000015490# trailing colons and then remove the whole line if VPATH becomes empty
15491# (actually we leave an empty line to preserve line numbers).
15492if test "x$srcdir" = x.; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015493 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
15494h
15495s///
15496s/^/:/
15497s/[ ]*$/:/
15498s/:\$(srcdir):/:/g
15499s/:\${srcdir}:/:/g
15500s/:@srcdir@:/:/g
15501s/^:*//
Martin v. Löwiseba40652007-08-30 20:10:57 +000015502s/:*$//
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015503x
15504s/\(=[ ]*\).*/\1/
15505G
15506s/\n//
Martin v. Löwiseba40652007-08-30 20:10:57 +000015507s/^[^=]*=[ ]*$//
15508}'
15509fi
15510
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015511cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015512fi # test -n "$CONFIG_FILES"
15513
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015514# Set up the scripts for CONFIG_HEADERS section.
15515# No need to generate them if there are no CONFIG_HEADERS.
15516# This happens for instance with `./config.status Makefile'.
15517if test -n "$CONFIG_HEADERS"; then
Matthias Klose3cef2a92012-03-14 23:39:33 +010015518cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015519BEGIN {
15520_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000015521
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015522# Transform confdefs.h into an awk script `defines.awk', embedded as
15523# here-document in config.status, that substitutes the proper values into
15524# config.h.in to produce config.h.
15525
15526# Create a delimiter string that does not exist in confdefs.h, to ease
15527# handling of long lines.
15528ac_delim='%!_!# '
15529for ac_last_try in false false :; do
Matthias Klose3cef2a92012-03-14 23:39:33 +010015530 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
15531 if test -z "$ac_tt"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015532 break
15533 elif $ac_last_try; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015534 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015535 else
15536 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
15537 fi
15538done
15539
15540# For the awk script, D is an array of macro values keyed by name,
15541# likewise P contains macro parameters if any. Preserve backslash
15542# newline sequences.
15543
15544ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
15545sed -n '
15546s/.\{148\}/&'"$ac_delim"'/g
15547t rset
15548:rset
15549s/^[ ]*#[ ]*define[ ][ ]*/ /
15550t def
15551d
15552:def
15553s/\\$//
15554t bsnl
15555s/["\\]/\\&/g
15556s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
15557D["\1"]=" \3"/p
15558s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
15559d
15560:bsnl
15561s/["\\]/\\&/g
15562s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
15563D["\1"]=" \3\\\\\\n"\\/p
15564t cont
15565s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
15566t cont
15567d
15568:cont
15569n
15570s/.\{148\}/&'"$ac_delim"'/g
15571t clear
15572:clear
15573s/\\$//
15574t bsnlc
15575s/["\\]/\\&/g; s/^/"/; s/$/"/p
15576d
15577:bsnlc
15578s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
15579b cont
15580' <confdefs.h | sed '
15581s/'"$ac_delim"'/"\\\
15582"/g' >>$CONFIG_STATUS || ac_write_fail=1
15583
15584cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15585 for (key in D) D_is_set[key] = 1
15586 FS = ""
15587}
15588/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
15589 line = \$ 0
15590 split(line, arg, " ")
15591 if (arg[1] == "#") {
15592 defundef = arg[2]
15593 mac1 = arg[3]
15594 } else {
15595 defundef = substr(arg[1], 2)
15596 mac1 = arg[2]
15597 }
15598 split(mac1, mac2, "(") #)
15599 macro = mac2[1]
15600 prefix = substr(line, 1, index(line, defundef) - 1)
15601 if (D_is_set[macro]) {
15602 # Preserve the white space surrounding the "#".
15603 print prefix "define", macro P[macro] D[macro]
15604 next
15605 } else {
15606 # Replace #undef with comments. This is necessary, for example,
15607 # in the case of _POSIX_SOURCE, which is predefined and required
15608 # on some systems where configure will not decide to define it.
15609 if (defundef == "undef") {
15610 print "/*", prefix defundef, macro, "*/"
15611 next
15612 }
15613 }
15614}
15615{ print }
15616_ACAWK
15617_ACEOF
15618cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015619 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015620fi # test -n "$CONFIG_HEADERS"
15621
15622
15623eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
15624shift
15625for ac_tag
Martin v. Löwiseba40652007-08-30 20:10:57 +000015626do
15627 case $ac_tag in
15628 :[FHLC]) ac_mode=$ac_tag; continue;;
15629 esac
15630 case $ac_mode$ac_tag in
15631 :[FHL]*:*);;
Matthias Klose3cef2a92012-03-14 23:39:33 +010015632 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015633 :[FH]-) ac_tag=-:-;;
15634 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
15635 esac
15636 ac_save_IFS=$IFS
15637 IFS=:
15638 set x $ac_tag
15639 IFS=$ac_save_IFS
15640 shift
15641 ac_file=$1
15642 shift
15643
15644 case $ac_mode in
15645 :L) ac_source=$1;;
15646 :[FH])
15647 ac_file_inputs=
15648 for ac_f
15649 do
15650 case $ac_f in
Matthias Klose3cef2a92012-03-14 23:39:33 +010015651 -) ac_f="$ac_tmp/stdin";;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015652 *) # Look for the file first in the build tree, then in the source tree
15653 # (if the path is not absolute). The absolute path cannot be DOS-style,
15654 # because $ac_f cannot contain `:'.
15655 test -f "$ac_f" ||
15656 case $ac_f in
15657 [\\/$]*) false;;
15658 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
15659 esac ||
Matthias Klose3cef2a92012-03-14 23:39:33 +010015660 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015661 esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015662 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
15663 as_fn_append ac_file_inputs " '$ac_f'"
Martin v. Löwiseba40652007-08-30 20:10:57 +000015664 done
15665
15666 # Let's still pretend it is `configure' which instantiates (i.e., don't
15667 # use $as_me), people would be surprised to read:
15668 # /* config.h. Generated by config.status. */
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015669 configure_input='Generated from '`
15670 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
15671 `' by configure.'
Martin v. Löwiseba40652007-08-30 20:10:57 +000015672 if test x"$ac_file" != x-; then
15673 configure_input="$ac_file. $configure_input"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015674 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
15675$as_echo "$as_me: creating $ac_file" >&6;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000015676 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015677 # Neutralize special characters interpreted by sed in replacement strings.
15678 case $configure_input in #(
15679 *\&* | *\|* | *\\* )
15680 ac_sed_conf_input=`$as_echo "$configure_input" |
15681 sed 's/[\\\\&|]/\\\\&/g'`;; #(
15682 *) ac_sed_conf_input=$configure_input;;
15683 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000015684
15685 case $ac_tag in
Matthias Klose3cef2a92012-03-14 23:39:33 +010015686 *:-:* | *:-) cat >"$ac_tmp/stdin" \
15687 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015688 esac
15689 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015690 esac
15691
Martin v. Löwiseba40652007-08-30 20:10:57 +000015692 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000015693$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015694 X"$ac_file" : 'X\(//\)[^/]' \| \
15695 X"$ac_file" : 'X\(//\)$' \| \
Martin v. Löwiseba40652007-08-30 20:10:57 +000015696 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015697$as_echo X"$ac_file" |
Martin v. Löwiseba40652007-08-30 20:10:57 +000015698 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
15699 s//\1/
15700 q
15701 }
15702 /^X\(\/\/\)[^/].*/{
15703 s//\1/
15704 q
15705 }
15706 /^X\(\/\/\)$/{
15707 s//\1/
15708 q
15709 }
15710 /^X\(\/\).*/{
15711 s//\1/
15712 q
15713 }
15714 s/.*/./; q'`
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015715 as_dir="$ac_dir"; as_fn_mkdir_p
Martin v. Löwis11437992002-04-12 09:54:03 +000015716 ac_builddir=.
15717
Martin v. Löwiseba40652007-08-30 20:10:57 +000015718case "$ac_dir" in
15719.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
15720*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015721 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Martin v. Löwiseba40652007-08-30 20:10:57 +000015722 # A ".." for each directory in $ac_dir_suffix.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015723 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Martin v. Löwiseba40652007-08-30 20:10:57 +000015724 case $ac_top_builddir_sub in
15725 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
15726 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
15727 esac ;;
15728esac
15729ac_abs_top_builddir=$ac_pwd
15730ac_abs_builddir=$ac_pwd$ac_dir_suffix
15731# for backward compatibility:
15732ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000015733
15734case $srcdir in
Martin v. Löwiseba40652007-08-30 20:10:57 +000015735 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000015736 ac_srcdir=.
Martin v. Löwiseba40652007-08-30 20:10:57 +000015737 ac_top_srcdir=$ac_top_builddir_sub
15738 ac_abs_top_srcdir=$ac_pwd ;;
15739 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000015740 ac_srcdir=$srcdir$ac_dir_suffix;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015741 ac_top_srcdir=$srcdir
15742 ac_abs_top_srcdir=$srcdir ;;
15743 *) # Relative name.
15744 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
15745 ac_top_srcdir=$ac_top_build_prefix$srcdir
15746 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015747esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000015748ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000015749
Martin v. Löwis11437992002-04-12 09:54:03 +000015750
Martin v. Löwiseba40652007-08-30 20:10:57 +000015751 case $ac_mode in
15752 :F)
15753 #
15754 # CONFIG_FILE
15755 #
Martin v. Löwis11437992002-04-12 09:54:03 +000015756
15757 case $INSTALL in
15758 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015759 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015760 esac
Trent Nelsonf6407a12012-08-30 14:56:13 +000015761 ac_MKDIR_P=$MKDIR_P
15762 case $MKDIR_P in
15763 [\\/$]* | ?:[\\/]* ) ;;
15764 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
15765 esac
Brett Cannon19fab762007-06-02 03:02:29 +000015766_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000015767
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015768cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwiseba40652007-08-30 20:10:57 +000015769# If the template does not know about datarootdir, expand it.
15770# FIXME: This hack should be removed a few years after 2.60.
15771ac_datarootdir_hack=; ac_datarootdir_seen=
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015772ac_sed_dataroot='
15773/datarootdir/ {
Martin v. Löwiseba40652007-08-30 20:10:57 +000015774 p
15775 q
15776}
15777/@datadir@/p
15778/@docdir@/p
15779/@infodir@/p
15780/@localedir@/p
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015781/@mandir@/p'
15782case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
Martin v. Löwiseba40652007-08-30 20:10:57 +000015783*datarootdir*) ac_datarootdir_seen=yes;;
15784*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015785 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
15786$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000015787_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015788cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwiseba40652007-08-30 20:10:57 +000015789 ac_datarootdir_hack='
15790 s&@datadir@&$datadir&g
15791 s&@docdir@&$docdir&g
15792 s&@infodir@&$infodir&g
15793 s&@localedir@&$localedir&g
15794 s&@mandir@&$mandir&g
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015795 s&\\\${datarootdir}&$datarootdir&g' ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015796esac
15797_ACEOF
15798
15799# Neutralize VPATH when `$srcdir' = `.'.
15800# Shell code in configure.ac might set extrasub.
15801# FIXME: do we really want to maintain this feature?
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015802cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15803ac_sed_extra="$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000015804$extrasub
15805_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015806cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015807:t
15808/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015809s|@configure_input@|$ac_sed_conf_input|;t t
Martin v. Löwiseba40652007-08-30 20:10:57 +000015810s&@top_builddir@&$ac_top_builddir_sub&;t t
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015811s&@top_build_prefix@&$ac_top_build_prefix&;t t
Martin v. Löwiseba40652007-08-30 20:10:57 +000015812s&@srcdir@&$ac_srcdir&;t t
15813s&@abs_srcdir@&$ac_abs_srcdir&;t t
15814s&@top_srcdir@&$ac_top_srcdir&;t t
15815s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
15816s&@builddir@&$ac_builddir&;t t
15817s&@abs_builddir@&$ac_abs_builddir&;t t
15818s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
15819s&@INSTALL@&$ac_INSTALL&;t t
Trent Nelsonf6407a12012-08-30 14:56:13 +000015820s&@MKDIR_P@&$ac_MKDIR_P&;t t
Martin v. Löwiseba40652007-08-30 20:10:57 +000015821$ac_datarootdir_hack
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015822"
Matthias Klose3cef2a92012-03-14 23:39:33 +010015823eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
15824 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015825
Martin v. Löwiseba40652007-08-30 20:10:57 +000015826test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
Matthias Klose3cef2a92012-03-14 23:39:33 +010015827 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
15828 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
15829 "$ac_tmp/out"`; test -z "$ac_out"; } &&
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015830 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015831which seems to be undefined. Please make sure it is defined" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015832$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015833which seems to be undefined. Please make sure it is defined" >&2;}
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015834
Matthias Klose3cef2a92012-03-14 23:39:33 +010015835 rm -f "$ac_tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000015836 case $ac_file in
Matthias Klose3cef2a92012-03-14 23:39:33 +010015837 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
15838 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015839 esac \
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015840 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015841 ;;
15842 :H)
15843 #
15844 # CONFIG_HEADER
15845 #
Martin v. Löwis11437992002-04-12 09:54:03 +000015846 if test x"$ac_file" != x-; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015847 {
15848 $as_echo "/* $configure_input */" \
Matthias Klose3cef2a92012-03-14 23:39:33 +010015849 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
15850 } >"$ac_tmp/config.h" \
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015851 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Matthias Klose3cef2a92012-03-14 23:39:33 +010015852 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015853 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
15854$as_echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000015855 else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015856 rm -f "$ac_file"
Matthias Klose3cef2a92012-03-14 23:39:33 +010015857 mv "$ac_tmp/config.h" "$ac_file" \
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015858 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000015859 fi
15860 else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015861 $as_echo "/* $configure_input */" \
Matthias Klose3cef2a92012-03-14 23:39:33 +010015862 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015863 || as_fn_error $? "could not create -" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000015864 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015865 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000015866
Martin v. Löwiseba40652007-08-30 20:10:57 +000015867
15868 esac
15869
Antoine Pitrouaabdceb2010-09-10 20:03:17 +000015870
15871 case $ac_file$ac_mode in
15872 "Modules/ld_so_aix":F) chmod +x Modules/ld_so_aix ;;
15873
15874 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000015875done # for ac_tag
15876
Guido van Rossum627b2d71993-12-24 10:39:16 +000015877
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015878as_fn_exit 0
Martin v. Löwis11437992002-04-12 09:54:03 +000015879_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000015880ac_clean_files=$ac_clean_files_save
15881
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015882test $ac_write_fail = 0 ||
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015883 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015884
Martin v. Löwis11437992002-04-12 09:54:03 +000015885
15886# configure is writing to config.log, and then calls config.status.
15887# config.status does its own redirection, appending to config.log.
15888# Unfortunately, on DOS this fails, as config.log is still kept open
15889# by configure, so config.status won't be able to write to it; its
15890# output is simply discarded. So we exec the FD to /dev/null,
15891# effectively closing config.log, so it can be properly (re)opened and
15892# appended to by config.status. When coming back to configure, we
15893# need to make the FD available again.
15894if test "$no_create" != yes; then
15895 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000015896 ac_config_status_args=
15897 test "$silent" = yes &&
15898 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000015899 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000015900 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000015901 exec 5>>config.log
15902 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
15903 # would make configure fail if this is the last instruction.
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015904 $ac_cs_success || as_fn_exit 1
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015905fi
15906if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
15907 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
15908$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000015909fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000015910
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000015911
Martin v. Löwisf7afe952006-04-14 15:16:15 +000015912echo "creating Modules/Setup"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000015913if test ! -f Modules/Setup
15914then
15915 cp $srcdir/Modules/Setup.dist Modules/Setup
15916fi
15917
Martin v. Löwisf7afe952006-04-14 15:16:15 +000015918echo "creating Modules/Setup.local"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000015919if test ! -f Modules/Setup.local
15920then
15921 echo "# Edit this file for local setup changes" >Modules/Setup.local
15922fi
15923
15924echo "creating Makefile"
15925$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
15926 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000015927 Modules/Setup.local Modules/Setup
Skip Montanaro89e975f2007-08-22 19:05:21 +000015928
15929case $ac_sys_system in
15930BeOS)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015931 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
Skip Montanaro89e975f2007-08-22 19:05:21 +000015932
15933 Support for BeOS is deprecated as of Python 2.6.
15934 See PEP 11 for the gory details.
15935 " >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015936$as_echo "$as_me: WARNING:
Skip Montanaro89e975f2007-08-22 19:05:21 +000015937
15938 Support for BeOS is deprecated as of Python 2.6.
15939 See PEP 11 for the gory details.
15940 " >&2;}
15941 ;;
15942*) ;;
15943esac
15944
Neil Schemenauerc761fc82001-02-19 04:50:49 +000015945mv config.c Modules