blob: e22a712de04753cbe4c85f436147934d9573c400 [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Matthias Klose3cef2a92012-03-14 23:39:33 +01002# From configure.ac Revision.
Guido van Rossum627b2d71993-12-24 10:39:16 +00003# Guess values for system-dependent variables and create Makefiles.
Charles-François Natalibe2b9072013-01-08 19:47:00 +01004# Generated by GNU Autoconf 2.69 for python 2.7.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005#
Georg Brandl464432d2009-05-20 18:24:08 +00006# Report bugs to <http://bugs.python.org/>.
Martin v. Löwis1d459062005-03-14 21:23:33 +00007#
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008#
Charles-François Natalibe2b9072013-01-08 19:47:00 +01009# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010#
11#
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012# This configure script is free software; the Free Software Foundation
13# gives unlimited permission to copy, distribute and modify it.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014## -------------------- ##
15## M4sh Initialization. ##
16## -------------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +000017
Martin v. Löwiseba40652007-08-30 20:10:57 +000018# Be more Bourne compatible
19DUALCASE=1; export DUALCASE # for MKS sh
Matthias Klosea0bea5d2010-05-08 10:00:28 +000020if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000021 emulate sh
22 NULLCMD=:
Matthias Klosea0bea5d2010-05-08 10:00:28 +000023 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000024 # is contrary to our usage. Disable this feature.
25 alias -g '${1+"$@"}'='"$@"'
Martin v. Löwiseba40652007-08-30 20:10:57 +000026 setopt NO_GLOB_SUBST
Skip Montanaro89e975f2007-08-22 19:05:21 +000027else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000028 case `(set -o) 2>/dev/null` in #(
29 *posix*) :
30 set -o posix ;; #(
31 *) :
32 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000033esac
Martin v. Löwis11437992002-04-12 09:54:03 +000034fi
35
Skip Montanaro6dead952003-09-25 14:50:04 +000036
Matthias Klosea0bea5d2010-05-08 10:00:28 +000037as_nl='
38'
39export as_nl
40# Printing a long string crashes Solaris 7 /usr/bin/printf.
41as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
42as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
43as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
44# Prefer a ksh shell builtin over an external printf program on Solaris,
45# but without wasting forks for bash or zsh.
46if test -z "$BASH_VERSION$ZSH_VERSION" \
47 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
48 as_echo='print -r --'
49 as_echo_n='print -rn --'
50elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
51 as_echo='printf %s\n'
52 as_echo_n='printf %s'
53else
54 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
55 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
56 as_echo_n='/usr/ucb/echo -n'
57 else
58 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
59 as_echo_n_body='eval
60 arg=$1;
61 case $arg in #(
62 *"$as_nl"*)
63 expr "X$arg" : "X\\(.*\\)$as_nl";
64 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
65 esac;
66 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
67 '
68 export as_echo_n_body
69 as_echo_n='sh -c $as_echo_n_body as_echo'
70 fi
71 export as_echo_body
72 as_echo='sh -c $as_echo_body as_echo'
73fi
Martin v. Löwis11437992002-04-12 09:54:03 +000074
75# The user is always right.
76if test "${PATH_SEPARATOR+set}" != set; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000077 PATH_SEPARATOR=:
78 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
79 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
80 PATH_SEPARATOR=';'
81 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000082fi
Martin v. Löwis11437992002-04-12 09:54:03 +000083
Martin v. Löwiseba40652007-08-30 20:10:57 +000084
85# IFS
86# We need space, tab and new line, in precisely that order. Quoting is
87# there to prevent editors from complaining about space-tab.
88# (If _AS_PATH_WALK were called with IFS unset, it would disable word
89# splitting by setting IFS to empty value.)
Martin v. Löwiseba40652007-08-30 20:10:57 +000090IFS=" "" $as_nl"
91
92# Find who we are. Look in the path if we contain no directory separator.
Matthias Klose3cef2a92012-03-14 23:39:33 +010093as_myself=
Matthias Klosea0bea5d2010-05-08 10:00:28 +000094case $0 in #((
Martin v. Löwiseba40652007-08-30 20:10:57 +000095 *[\\/]* ) as_myself=$0 ;;
96 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000097for as_dir in $PATH
98do
99 IFS=$as_save_IFS
100 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000101 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
102 done
Martin v. Löwiseba40652007-08-30 20:10:57 +0000103IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +0000104
Martin v. Löwiseba40652007-08-30 20:10:57 +0000105 ;;
106esac
107# We did not find ourselves, most probably we were run as `sh COMMAND'
108# in which case we are not to be found in the path.
109if test "x$as_myself" = x; then
110 as_myself=$0
111fi
112if test ! -f "$as_myself"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000113 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
114 exit 1
Martin v. Löwiseba40652007-08-30 20:10:57 +0000115fi
116
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000117# Unset variables that we do not need and which cause bugs (e.g. in
118# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
119# suppresses any "Segmentation fault" message there. '((' could
120# trigger a bug in pdksh 5.2.14.
121for as_var in BASH_ENV ENV MAIL MAILPATH
122do eval test x\${$as_var+set} = xset \
123 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Martin v. Löwiseba40652007-08-30 20:10:57 +0000124done
125PS1='$ '
126PS2='> '
127PS4='+ '
128
129# NLS nuisances.
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000130LC_ALL=C
131export LC_ALL
132LANGUAGE=C
133export LANGUAGE
Martin v. Löwiseba40652007-08-30 20:10:57 +0000134
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000135# CDPATH.
136(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
137
Charles-François Natalibe2b9072013-01-08 19:47:00 +0100138# Use a proper internal environment variable to ensure we don't fall
139 # into an infinite loop, continuously re-executing ourselves.
140 if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
141 _as_can_reexec=no; export _as_can_reexec;
142 # We cannot yet assume a decent shell, so we have to provide a
143# neutralization value for shells without unset; and this also
144# works around shells that cannot unset nonexistent variables.
145# Preserve -v and -x to the replacement shell.
146BASH_ENV=/dev/null
147ENV=/dev/null
148(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
149case $- in # ((((
150 *v*x* | *x*v* ) as_opts=-vx ;;
151 *v* ) as_opts=-v ;;
152 *x* ) as_opts=-x ;;
153 * ) as_opts= ;;
154esac
155exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
156# Admittedly, this is quite paranoid, since all the known shells bail
157# out after a failed `exec'.
158$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
159as_fn_exit 255
160 fi
161 # We don't want this to propagate to other subprocesses.
162 { _as_can_reexec=; unset _as_can_reexec;}
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000163if test "x$CONFIG_SHELL" = x; then
164 as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
165 emulate sh
166 NULLCMD=:
167 # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
168 # is contrary to our usage. Disable this feature.
169 alias -g '\${1+\"\$@\"}'='\"\$@\"'
170 setopt NO_GLOB_SUBST
171else
172 case \`(set -o) 2>/dev/null\` in #(
173 *posix*) :
174 set -o posix ;; #(
175 *) :
176 ;;
177esac
178fi
179"
180 as_required="as_fn_return () { (exit \$1); }
181as_fn_success () { as_fn_return 0; }
182as_fn_failure () { as_fn_return 1; }
183as_fn_ret_success () { return 0; }
184as_fn_ret_failure () { return 1; }
185
186exitcode=0
187as_fn_success || { exitcode=1; echo as_fn_success failed.; }
188as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
189as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
190as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
191if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
192
193else
194 exitcode=1; echo positional parameters were not saved.
195fi
Charles-François Natalibe2b9072013-01-08 19:47:00 +0100196test x\$exitcode = x0 || exit 1
197test -x / || exit 1"
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000198 as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
199 as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
200 eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
201 test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
202test \$(( 1 + 1 )) = 2 || exit 1"
203 if (eval "$as_required") 2>/dev/null; then :
204 as_have_required=yes
205else
206 as_have_required=no
207fi
208 if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
209
210else
211 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
212as_found=false
213for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
214do
215 IFS=$as_save_IFS
216 test -z "$as_dir" && as_dir=.
217 as_found=:
218 case $as_dir in #(
219 /*)
220 for as_base in sh bash ksh sh5; do
221 # Try only shells that exist, to save several forks.
222 as_shell=$as_dir/$as_base
223 if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
224 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
225 CONFIG_SHELL=$as_shell as_have_required=yes
226 if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
227 break 2
228fi
229fi
230 done;;
231 esac
232 as_found=false
233done
234$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
235 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
236 CONFIG_SHELL=$SHELL as_have_required=yes
237fi; }
238IFS=$as_save_IFS
239
240
241 if test "x$CONFIG_SHELL" != x; then :
Charles-François Natalibe2b9072013-01-08 19:47:00 +0100242 export CONFIG_SHELL
243 # We cannot yet assume a decent shell, so we have to provide a
244# neutralization value for shells without unset; and this also
245# works around shells that cannot unset nonexistent variables.
246# Preserve -v and -x to the replacement shell.
247BASH_ENV=/dev/null
248ENV=/dev/null
249(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
250case $- in # ((((
251 *v*x* | *x*v* ) as_opts=-vx ;;
252 *v* ) as_opts=-v ;;
253 *x* ) as_opts=-x ;;
254 * ) as_opts= ;;
255esac
256exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
257# Admittedly, this is quite paranoid, since all the known shells bail
258# out after a failed `exec'.
259$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
260exit 255
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000261fi
262
263 if test x$as_have_required = xno; then :
264 $as_echo "$0: This script requires a shell more modern than all"
265 $as_echo "$0: the shells that I found on your system."
266 if test x${ZSH_VERSION+set} = xset ; then
267 $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
268 $as_echo "$0: be upgraded to zsh 4.3.4 or later."
269 else
270 $as_echo "$0: Please tell bug-autoconf@gnu.org and
271$0: http://bugs.python.org/ about your system, including
272$0: any error possibly output before this message. Then
273$0: install a modern shell, or manually run the script
274$0: under such a shell if you do have one."
275 fi
276 exit 1
277fi
278fi
279fi
280SHELL=${CONFIG_SHELL-/bin/sh}
281export SHELL
282# Unset more variables known to interfere with behavior of common tools.
283CLICOLOR_FORCE= GREP_OPTIONS=
284unset CLICOLOR_FORCE GREP_OPTIONS
285
286## --------------------- ##
287## M4sh Shell Functions. ##
288## --------------------- ##
289# as_fn_unset VAR
290# ---------------
291# Portably unset VAR.
292as_fn_unset ()
293{
294 { eval $1=; unset $1;}
295}
296as_unset=as_fn_unset
297
298# as_fn_set_status STATUS
299# -----------------------
300# Set $? to STATUS, without forking.
301as_fn_set_status ()
302{
303 return $1
304} # as_fn_set_status
305
306# as_fn_exit STATUS
307# -----------------
308# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
309as_fn_exit ()
310{
311 set +e
312 as_fn_set_status $1
313 exit $1
314} # as_fn_exit
315
316# as_fn_mkdir_p
317# -------------
318# Create "$as_dir" as a directory, including parents if necessary.
319as_fn_mkdir_p ()
320{
321
322 case $as_dir in #(
323 -*) as_dir=./$as_dir;;
324 esac
325 test -d "$as_dir" || eval $as_mkdir_p || {
326 as_dirs=
327 while :; do
328 case $as_dir in #(
329 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
330 *) as_qdir=$as_dir;;
331 esac
332 as_dirs="'$as_qdir' $as_dirs"
333 as_dir=`$as_dirname -- "$as_dir" ||
334$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
335 X"$as_dir" : 'X\(//\)[^/]' \| \
336 X"$as_dir" : 'X\(//\)$' \| \
337 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
338$as_echo X"$as_dir" |
339 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
340 s//\1/
341 q
342 }
343 /^X\(\/\/\)[^/].*/{
344 s//\1/
345 q
346 }
347 /^X\(\/\/\)$/{
348 s//\1/
349 q
350 }
351 /^X\(\/\).*/{
352 s//\1/
353 q
354 }
355 s/.*/./; q'`
356 test -d "$as_dir" && break
357 done
358 test -z "$as_dirs" || eval "mkdir $as_dirs"
Georg Brandl71f4fbb2011-02-25 11:04:50 +0000359 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000360
361
362} # as_fn_mkdir_p
Charles-François Natalibe2b9072013-01-08 19:47:00 +0100363
364# as_fn_executable_p FILE
365# -----------------------
366# Test if FILE is an executable regular file.
367as_fn_executable_p ()
368{
369 test -f "$1" && test -x "$1"
370} # as_fn_executable_p
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000371# as_fn_append VAR VALUE
372# ----------------------
373# Append the text in VALUE to the end of the definition contained in VAR. Take
374# advantage of any shell optimizations that allow amortized linear growth over
375# repeated appends, instead of the typical quadratic growth present in naive
376# implementations.
377if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
378 eval 'as_fn_append ()
379 {
380 eval $1+=\$2
381 }'
382else
383 as_fn_append ()
384 {
385 eval $1=\$$1\$2
386 }
387fi # as_fn_append
388
389# as_fn_arith ARG...
390# ------------------
391# Perform arithmetic evaluation on the ARGs, and store the result in the
392# global $as_val. Take advantage of shells that can avoid forks. The arguments
393# must be portable across $(()) and expr.
394if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
395 eval 'as_fn_arith ()
396 {
397 as_val=$(( $* ))
398 }'
399else
400 as_fn_arith ()
401 {
402 as_val=`expr "$@" || test $? -eq 1`
403 }
404fi # as_fn_arith
405
406
Georg Brandl71f4fbb2011-02-25 11:04:50 +0000407# as_fn_error STATUS ERROR [LINENO LOG_FD]
408# ----------------------------------------
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000409# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
410# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Georg Brandl71f4fbb2011-02-25 11:04:50 +0000411# script with STATUS, using 1 if that was 0.
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000412as_fn_error ()
413{
Georg Brandl71f4fbb2011-02-25 11:04:50 +0000414 as_status=$1; test $as_status -eq 0 && as_status=1
415 if test "$4"; then
416 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
417 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000418 fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +0000419 $as_echo "$as_me: error: $2" >&2
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000420 as_fn_exit $as_status
421} # as_fn_error
422
Martin v. Löwiseba40652007-08-30 20:10:57 +0000423if expr a : '\(a\)' >/dev/null 2>&1 &&
424 test "X`expr 00001 : '.*\(...\)'`" = X001; then
425 as_expr=expr
426else
427 as_expr=false
428fi
429
430if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
431 as_basename=basename
432else
433 as_basename=false
434fi
435
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000436if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
437 as_dirname=dirname
438else
439 as_dirname=false
440fi
Martin v. Löwiseba40652007-08-30 20:10:57 +0000441
Martin v. Löwiseba40652007-08-30 20:10:57 +0000442as_me=`$as_basename -- "$0" ||
443$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
444 X"$0" : 'X\(//\)$' \| \
445 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000446$as_echo X/"$0" |
Martin v. Löwiseba40652007-08-30 20:10:57 +0000447 sed '/^.*\/\([^/][^/]*\)\/*$/{
448 s//\1/
449 q
450 }
451 /^X\/\(\/\/\)$/{
452 s//\1/
453 q
454 }
455 /^X\/\(\/\).*/{
456 s//\1/
457 q
458 }
459 s/.*/./; q'`
460
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000461# Avoid depending upon Character Ranges.
462as_cr_letters='abcdefghijklmnopqrstuvwxyz'
463as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
464as_cr_Letters=$as_cr_letters$as_cr_LETTERS
465as_cr_digits='0123456789'
466as_cr_alnum=$as_cr_Letters$as_cr_digits
Martin v. Löwiseba40652007-08-30 20:10:57 +0000467
468
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000469 as_lineno_1=$LINENO as_lineno_1a=$LINENO
470 as_lineno_2=$LINENO as_lineno_2a=$LINENO
471 eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
472 test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
473 # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
Martin v. Löwiseba40652007-08-30 20:10:57 +0000474 sed -n '
475 p
476 /[$]LINENO/=
477 ' <$as_myself |
Martin v. Löwis11437992002-04-12 09:54:03 +0000478 sed '
Martin v. Löwiseba40652007-08-30 20:10:57 +0000479 s/[$]LINENO.*/&-/
480 t lineno
481 b
482 :lineno
Martin v. Löwis11437992002-04-12 09:54:03 +0000483 N
Martin v. Löwiseba40652007-08-30 20:10:57 +0000484 :loop
485 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
Martin v. Löwis11437992002-04-12 09:54:03 +0000486 t loop
Martin v. Löwiseba40652007-08-30 20:10:57 +0000487 s/-\n.*//
Martin v. Löwis11437992002-04-12 09:54:03 +0000488 ' >$as_me.lineno &&
Martin v. Löwiseba40652007-08-30 20:10:57 +0000489 chmod +x "$as_me.lineno" ||
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000490 { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
Martin v. Löwis11437992002-04-12 09:54:03 +0000491
Charles-François Natalibe2b9072013-01-08 19:47:00 +0100492 # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
493 # already done that, so ensure we don't try to do so again and fall
494 # in an infinite loop. This has already happened in practice.
495 _as_can_reexec=no; export _as_can_reexec
Martin v. Löwis11437992002-04-12 09:54:03 +0000496 # Don't try to exec as it changes $[0], causing all sort of problems
497 # (the dirname of $[0] is not the place where we might find the
Martin v. Löwiseba40652007-08-30 20:10:57 +0000498 # original and so on. Autoconf is especially sensitive to this).
499 . "./$as_me.lineno"
Martin v. Löwis11437992002-04-12 09:54:03 +0000500 # Exit status is that of the last command.
501 exit
502}
503
Martin v. Löwiseba40652007-08-30 20:10:57 +0000504ECHO_C= ECHO_N= ECHO_T=
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000505case `echo -n x` in #(((((
Martin v. Löwiseba40652007-08-30 20:10:57 +0000506-n*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000507 case `echo 'xy\c'` in
Martin v. Löwiseba40652007-08-30 20:10:57 +0000508 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000509 xy) ECHO_C='\c';;
510 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
511 ECHO_T=' ';;
Martin v. Löwiseba40652007-08-30 20:10:57 +0000512 esac;;
513*)
514 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +0000515esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +0000516
Martin v. Löwis11437992002-04-12 09:54:03 +0000517rm -f conf$$ conf$$.exe conf$$.file
Martin v. Löwiseba40652007-08-30 20:10:57 +0000518if test -d conf$$.dir; then
519 rm -f conf$$.dir/conf$$.file
520else
521 rm -f conf$$.dir
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000522 mkdir conf$$.dir 2>/dev/null
Martin v. Löwiseba40652007-08-30 20:10:57 +0000523fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000524if (echo >conf$$.file) 2>/dev/null; then
525 if ln -s conf$$.file conf$$ 2>/dev/null; then
526 as_ln_s='ln -s'
527 # ... but there are two gotchas:
528 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
529 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
Charles-François Natalibe2b9072013-01-08 19:47:00 +0100530 # In both cases, we have to default to `cp -pR'.
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000531 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Charles-François Natalibe2b9072013-01-08 19:47:00 +0100532 as_ln_s='cp -pR'
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000533 elif ln conf$$.file conf$$ 2>/dev/null; then
534 as_ln_s=ln
535 else
Charles-François Natalibe2b9072013-01-08 19:47:00 +0100536 as_ln_s='cp -pR'
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000537 fi
Martin v. Löwis11437992002-04-12 09:54:03 +0000538else
Charles-François Natalibe2b9072013-01-08 19:47:00 +0100539 as_ln_s='cp -pR'
Martin v. Löwis11437992002-04-12 09:54:03 +0000540fi
Martin v. Löwiseba40652007-08-30 20:10:57 +0000541rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
542rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +0000543
Skip Montanaro6dead952003-09-25 14:50:04 +0000544if mkdir -p . 2>/dev/null; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000545 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +0000546else
Skip Montanarof0d5f792004-08-15 14:08:23 +0000547 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +0000548 as_mkdir_p=false
549fi
550
Charles-François Natalibe2b9072013-01-08 19:47:00 +0100551as_test_x='test -x'
552as_executable_p=as_fn_executable_p
Martin v. Löwis11437992002-04-12 09:54:03 +0000553
554# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +0000555as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +0000556
557# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +0000558as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +0000559
560
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000561test -n "$DJDIR" || exec 7<&0 </dev/null
562exec 6>&1
Martin v. Löwis11437992002-04-12 09:54:03 +0000563
564# Name of the host.
Georg Brandl71f4fbb2011-02-25 11:04:50 +0000565# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
Martin v. Löwis11437992002-04-12 09:54:03 +0000566# so uname gets run too.
567ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
568
Martin v. Löwis11437992002-04-12 09:54:03 +0000569#
570# Initializations.
571#
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000572ac_default_prefix=/usr/local
Martin v. Löwiseba40652007-08-30 20:10:57 +0000573ac_clean_files=
Skip Montanaro6dead952003-09-25 14:50:04 +0000574ac_config_libobj_dir=.
Martin v. Löwiseba40652007-08-30 20:10:57 +0000575LIBOBJS=
Martin v. Löwis11437992002-04-12 09:54:03 +0000576cross_compiling=no
577subdirs=
578MFLAGS=
579MAKEFLAGS=
Martin v. Löwis11437992002-04-12 09:54:03 +0000580
Martin v. Löwis11437992002-04-12 09:54:03 +0000581# Identity of this package.
Martin v. Löwis88afe662002-10-26 13:47:44 +0000582PACKAGE_NAME='python'
583PACKAGE_TARNAME='python'
Martin v. Löwis174440b2008-10-03 08:59:41 +0000584PACKAGE_VERSION='2.7'
585PACKAGE_STRING='python 2.7'
Georg Brandl464432d2009-05-20 18:24:08 +0000586PACKAGE_BUGREPORT='http://bugs.python.org/'
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000587PACKAGE_URL=''
Martin v. Löwis11437992002-04-12 09:54:03 +0000588
589ac_unique_file="Include/object.h"
590# Factoring default headers for most tests.
591ac_includes_default="\
592#include <stdio.h>
Martin v. Löwiseba40652007-08-30 20:10:57 +0000593#ifdef HAVE_SYS_TYPES_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000594# include <sys/types.h>
595#endif
Martin v. Löwiseba40652007-08-30 20:10:57 +0000596#ifdef HAVE_SYS_STAT_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000597# include <sys/stat.h>
598#endif
Martin v. Löwiseba40652007-08-30 20:10:57 +0000599#ifdef STDC_HEADERS
Martin v. Löwis11437992002-04-12 09:54:03 +0000600# include <stdlib.h>
601# include <stddef.h>
602#else
Martin v. Löwiseba40652007-08-30 20:10:57 +0000603# ifdef HAVE_STDLIB_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000604# include <stdlib.h>
605# endif
606#endif
Martin v. Löwiseba40652007-08-30 20:10:57 +0000607#ifdef HAVE_STRING_H
608# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000609# include <memory.h>
610# endif
611# include <string.h>
612#endif
Martin v. Löwiseba40652007-08-30 20:10:57 +0000613#ifdef HAVE_STRINGS_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000614# include <strings.h>
615#endif
Martin v. Löwiseba40652007-08-30 20:10:57 +0000616#ifdef HAVE_INTTYPES_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000617# include <inttypes.h>
Martin v. Löwis11437992002-04-12 09:54:03 +0000618#endif
Martin v. Löwiseba40652007-08-30 20:10:57 +0000619#ifdef HAVE_STDINT_H
620# include <stdint.h>
621#endif
622#ifdef HAVE_UNISTD_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000623# include <unistd.h>
624#endif"
625
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000626ac_subst_vars='LTLIBOBJS
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +0000627SRCDIRS
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000628THREADHEADERS
629UNICODE_OBJS
630LIBC
631LIBM
632HAVE_GETHOSTBYNAME
633HAVE_GETHOSTBYNAME_R
634HAVE_GETHOSTBYNAME_R_3_ARG
635HAVE_GETHOSTBYNAME_R_5_ARG
636HAVE_GETHOSTBYNAME_R_6_ARG
637LIBOBJS
638TRUE
639MACHDEP_OBJS
640DYNLOADFILE
641DLINCLDIR
642THREADOBJ
643LDLAST
644USE_THREAD_MODULE
645SIGNAL_OBJS
646USE_SIGNAL_MODULE
647LIBFFI_INCLUDEDIR
648PKG_CONFIG
649SHLIBS
650CFLAGSFORSHARED
651LINKFORSHARED
652CCSHARED
653BLDSHARED
654LDCXXSHARED
655LDSHARED
656SO
657LIBTOOL_CRUFT
658OTHER_LIBTOOL_OPT
659UNIVERSAL_ARCH_FLAGS
660BASECFLAGS
661OPT
662LN
Trent Nelsonf6407a12012-08-30 14:56:13 +0000663MKDIR_P
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000664INSTALL_DATA
665INSTALL_SCRIPT
666INSTALL_PROGRAM
Georg Brandl3a5508e2011-03-06 10:42:21 +0100667HAS_HG
668HGBRANCH
669HGTAG
670HGVERSION
Trent Nelsond86ceec2012-10-16 09:42:45 -0400671BASECPPFLAGS
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000672SVNVERSION
673ARFLAGS
674AR
675RANLIB
676GNULD
677LINKCC
678RUNSHARED
679INSTSONAME
680LDLIBRARYDIR
681BLDLIBRARY
682DLLLIBRARY
683LDLIBRARY
684LIBRARY
685BUILDEXEEXT
686EGREP
687GREP
688CPP
doko@python.org4e63fbe2013-01-25 13:08:27 +0100689MULTIARCH
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000690MAINCC
691CXX
692OBJEXT
693EXEEXT
694ac_ct_CC
695CPPFLAGS
696LDFLAGS
697CFLAGS
698CC
699EXPORT_MACOSX_DEPLOYMENT_TARGET
700CONFIGURE_MACOSX_DEPLOYMENT_TARGET
701EXTRAMACHDEPPATH
702EXTRAPLATDIR
703SGI_ABI
704MACHDEP
705FRAMEWORKINSTALLAPPSPREFIX
706FRAMEWORKUNIXTOOLSPREFIX
707FRAMEWORKALTINSTALLLAST
708FRAMEWORKALTINSTALLFIRST
709FRAMEWORKINSTALLLAST
710FRAMEWORKINSTALLFIRST
711PYTHONFRAMEWORKINSTALLDIR
712PYTHONFRAMEWORKPREFIX
713PYTHONFRAMEWORKDIR
714PYTHONFRAMEWORKIDENTIFIER
715PYTHONFRAMEWORK
716LIPO_32BIT_FLAGS
717ARCH_RUN_32BIT
718UNIVERSALSDK
719CONFIG_ARGS
720SOVERSION
721VERSION
722target_alias
723host_alias
724build_alias
725LIBS
726ECHO_T
727ECHO_N
728ECHO_C
729DEFS
730mandir
731localedir
732libdir
733psdir
734pdfdir
735dvidir
736htmldir
737infodir
738docdir
739oldincludedir
740includedir
741localstatedir
742sharedstatedir
743sysconfdir
744datadir
745datarootdir
746libexecdir
747sbindir
748bindir
749program_transform_name
750prefix
751exec_prefix
752PACKAGE_URL
753PACKAGE_BUGREPORT
754PACKAGE_STRING
755PACKAGE_VERSION
756PACKAGE_TARNAME
757PACKAGE_NAME
758PATH_SEPARATOR
759SHELL'
Skip Montanaro6dead952003-09-25 14:50:04 +0000760ac_subst_files=''
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000761ac_user_opts='
762enable_option_checking
763enable_universalsdk
764with_universal_archs
765with_framework_name
766enable_framework
767with_gcc
768with_cxx_main
769with_suffix
770enable_shared
771enable_profiling
772with_pydebug
773enable_toolbox_glue
774with_libs
775with_system_expat
776with_system_ffi
777with_dbmliborder
778with_signal_module
779with_dec_threads
780with_threads
781with_thread
782with_pth
783enable_ipv6
784with_doc_strings
785with_tsc
786with_pymalloc
787with_valgrind
788with_wctype_functions
789with_fpectl
790with_libm
791with_libc
792enable_big_digits
793enable_unicode
794'
Martin v. Löwiseba40652007-08-30 20:10:57 +0000795 ac_precious_vars='build_alias
796host_alias
797target_alias
798CC
799CFLAGS
800LDFLAGS
801LIBS
802CPPFLAGS
803CPP'
804
Guido van Rossum627b2d71993-12-24 10:39:16 +0000805
Guido van Rossum7f43da71994-08-01 12:15:30 +0000806# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000807ac_init_help=
808ac_init_version=false
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000809ac_unrecognized_opts=
810ac_unrecognized_sep=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000811# The variables have the same names as the options, with
812# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000813cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000814exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000815no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000816no_recursion=
817prefix=NONE
818program_prefix=NONE
819program_suffix=NONE
820program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000821silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000822site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000823srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000824verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000825x_includes=NONE
826x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000827
828# Installation directory options.
829# These are left unexpanded so users can "make install exec_prefix=/foo"
830# and all the variables that are supposed to be based on exec_prefix
831# by default will actually change.
832# Use braces instead of parens because sh, perl, etc. also accept them.
Martin v. Löwiseba40652007-08-30 20:10:57 +0000833# (The list follows the same order as the GNU Coding Standards.)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000834bindir='${exec_prefix}/bin'
835sbindir='${exec_prefix}/sbin'
836libexecdir='${exec_prefix}/libexec'
Martin v. Löwiseba40652007-08-30 20:10:57 +0000837datarootdir='${prefix}/share'
838datadir='${datarootdir}'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000839sysconfdir='${prefix}/etc'
840sharedstatedir='${prefix}/com'
841localstatedir='${prefix}/var'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000842includedir='${prefix}/include'
843oldincludedir='/usr/include'
Martin v. Löwiseba40652007-08-30 20:10:57 +0000844docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
845infodir='${datarootdir}/info'
846htmldir='${docdir}'
847dvidir='${docdir}'
848pdfdir='${docdir}'
849psdir='${docdir}'
850libdir='${exec_prefix}/lib'
851localedir='${datarootdir}/locale'
852mandir='${datarootdir}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000853
Guido van Rossum7f43da71994-08-01 12:15:30 +0000854ac_prev=
Martin v. Löwiseba40652007-08-30 20:10:57 +0000855ac_dashdash=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000856for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000857do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000858 # If the previous option needs an argument, assign it.
859 if test -n "$ac_prev"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +0000860 eval $ac_prev=\$ac_option
Guido van Rossum7f43da71994-08-01 12:15:30 +0000861 ac_prev=
862 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000863 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000864
Martin v. Löwiseba40652007-08-30 20:10:57 +0000865 case $ac_option in
Georg Brandl71f4fbb2011-02-25 11:04:50 +0000866 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
867 *=) ac_optarg= ;;
868 *) ac_optarg=yes ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +0000869 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000870
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000871 # Accept the important Cygnus configure options, so we can diagnose typos.
872
Martin v. Löwiseba40652007-08-30 20:10:57 +0000873 case $ac_dashdash$ac_option in
874 --)
875 ac_dashdash=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000876
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000877 -bindir | --bindir | --bindi | --bind | --bin | --bi)
878 ac_prev=bindir ;;
879 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000880 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000881
882 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000883 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000884 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000885 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000886
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000887 -cache-file | --cache-file | --cache-fil | --cache-fi \
888 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
889 ac_prev=cache_file ;;
890 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
891 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000892 cache_file=$ac_optarg ;;
893
894 --config-cache | -C)
895 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000896
Martin v. Löwiseba40652007-08-30 20:10:57 +0000897 -datadir | --datadir | --datadi | --datad)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000898 ac_prev=datadir ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +0000899 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000900 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000901
Martin v. Löwiseba40652007-08-30 20:10:57 +0000902 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
903 | --dataroo | --dataro | --datar)
904 ac_prev=datarootdir ;;
905 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
906 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
907 datarootdir=$ac_optarg ;;
908
Guido van Rossum7f43da71994-08-01 12:15:30 +0000909 -disable-* | --disable-*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000910 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000911 # Reject names that are not valid shell variable names.
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000912 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Georg Brandl71f4fbb2011-02-25 11:04:50 +0000913 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000914 ac_useropt_orig=$ac_useropt
915 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
916 case $ac_user_opts in
917 *"
918"enable_$ac_useropt"
919"*) ;;
920 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
921 ac_unrecognized_sep=', ';;
922 esac
923 eval enable_$ac_useropt=no ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +0000924
925 -docdir | --docdir | --docdi | --doc | --do)
926 ac_prev=docdir ;;
927 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
928 docdir=$ac_optarg ;;
929
930 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
931 ac_prev=dvidir ;;
932 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
933 dvidir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000934
935 -enable-* | --enable-*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000936 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000937 # Reject names that are not valid shell variable names.
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000938 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Georg Brandl71f4fbb2011-02-25 11:04:50 +0000939 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000940 ac_useropt_orig=$ac_useropt
941 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
942 case $ac_user_opts in
943 *"
944"enable_$ac_useropt"
945"*) ;;
946 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
947 ac_unrecognized_sep=', ';;
948 esac
949 eval enable_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000950
Guido van Rossum7f43da71994-08-01 12:15:30 +0000951 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
952 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
953 | --exec | --exe | --ex)
954 ac_prev=exec_prefix ;;
955 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
956 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
957 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000958 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000959
960 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000961 # Obsolete; use --with-gas.
962 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000963
Martin v. Löwis11437992002-04-12 09:54:03 +0000964 -help | --help | --hel | --he | -h)
965 ac_init_help=long ;;
966 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
967 ac_init_help=recursive ;;
968 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
969 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000970
971 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +0000972 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000973 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000974 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000975
Martin v. Löwiseba40652007-08-30 20:10:57 +0000976 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
977 ac_prev=htmldir ;;
978 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
979 | --ht=*)
980 htmldir=$ac_optarg ;;
981
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000982 -includedir | --includedir | --includedi | --included | --include \
983 | --includ | --inclu | --incl | --inc)
984 ac_prev=includedir ;;
985 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
986 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000987 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000988
989 -infodir | --infodir | --infodi | --infod | --info | --inf)
990 ac_prev=infodir ;;
991 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000992 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000993
994 -libdir | --libdir | --libdi | --libd)
995 ac_prev=libdir ;;
996 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000997 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000998
999 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1000 | --libexe | --libex | --libe)
1001 ac_prev=libexecdir ;;
1002 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1003 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001004 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001005
Martin v. Löwiseba40652007-08-30 20:10:57 +00001006 -localedir | --localedir | --localedi | --localed | --locale)
1007 ac_prev=localedir ;;
1008 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1009 localedir=$ac_optarg ;;
1010
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001011 -localstatedir | --localstatedir | --localstatedi | --localstated \
Martin v. Löwiseba40652007-08-30 20:10:57 +00001012 | --localstate | --localstat | --localsta | --localst | --locals)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001013 ac_prev=localstatedir ;;
1014 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Martin v. Löwiseba40652007-08-30 20:10:57 +00001015 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001016 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001017
1018 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1019 ac_prev=mandir ;;
1020 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001021 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001022
Guido van Rossum7f43da71994-08-01 12:15:30 +00001023 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001024 # Obsolete; use --without-fp.
1025 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001026
1027 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +00001028 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +00001029 no_create=yes ;;
1030
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001031 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1032 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1033 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001034
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001035 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1036 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1037 | --oldin | --oldi | --old | --ol | --o)
1038 ac_prev=oldincludedir ;;
1039 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1040 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1041 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001042 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001043
Guido van Rossum7f43da71994-08-01 12:15:30 +00001044 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1045 ac_prev=prefix ;;
1046 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001047 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001048
1049 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1050 | --program-pre | --program-pr | --program-p)
1051 ac_prev=program_prefix ;;
1052 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1053 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001054 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001055
1056 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1057 | --program-suf | --program-su | --program-s)
1058 ac_prev=program_suffix ;;
1059 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1060 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001061 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001062
1063 -program-transform-name | --program-transform-name \
1064 | --program-transform-nam | --program-transform-na \
1065 | --program-transform-n | --program-transform- \
1066 | --program-transform | --program-transfor \
1067 | --program-transfo | --program-transf \
1068 | --program-trans | --program-tran \
1069 | --progr-tra | --program-tr | --program-t)
1070 ac_prev=program_transform_name ;;
1071 -program-transform-name=* | --program-transform-name=* \
1072 | --program-transform-nam=* | --program-transform-na=* \
1073 | --program-transform-n=* | --program-transform-=* \
1074 | --program-transform=* | --program-transfor=* \
1075 | --program-transfo=* | --program-transf=* \
1076 | --program-trans=* | --program-tran=* \
1077 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001078 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001079
Martin v. Löwiseba40652007-08-30 20:10:57 +00001080 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1081 ac_prev=pdfdir ;;
1082 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1083 pdfdir=$ac_optarg ;;
1084
1085 -psdir | --psdir | --psdi | --psd | --ps)
1086 ac_prev=psdir ;;
1087 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1088 psdir=$ac_optarg ;;
1089
Guido van Rossum7f43da71994-08-01 12:15:30 +00001090 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1091 | -silent | --silent | --silen | --sile | --sil)
1092 silent=yes ;;
1093
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001094 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1095 ac_prev=sbindir ;;
1096 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1097 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001098 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001099
1100 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1101 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1102 | --sharedst | --shareds | --shared | --share | --shar \
1103 | --sha | --sh)
1104 ac_prev=sharedstatedir ;;
1105 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1106 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1107 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1108 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001109 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001110
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001111 -site | --site | --sit)
1112 ac_prev=site ;;
1113 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001114 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001115
Guido van Rossum7f43da71994-08-01 12:15:30 +00001116 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1117 ac_prev=srcdir ;;
1118 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001119 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001120
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001121 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1122 | --syscon | --sysco | --sysc | --sys | --sy)
1123 ac_prev=sysconfdir ;;
1124 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1125 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001126 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001127
Guido van Rossum7f43da71994-08-01 12:15:30 +00001128 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +00001129 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001130 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001131 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001132
1133 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1134 verbose=yes ;;
1135
Martin v. Löwis11437992002-04-12 09:54:03 +00001136 -version | --version | --versio | --versi | --vers | -V)
1137 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001138
1139 -with-* | --with-*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001140 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001141 # Reject names that are not valid shell variable names.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001142 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001143 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001144 ac_useropt_orig=$ac_useropt
1145 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1146 case $ac_user_opts in
1147 *"
1148"with_$ac_useropt"
1149"*) ;;
1150 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1151 ac_unrecognized_sep=', ';;
1152 esac
1153 eval with_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001154
1155 -without-* | --without-*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001156 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
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--without-$ac_useropt_orig"
1167 ac_unrecognized_sep=', ';;
1168 esac
1169 eval with_$ac_useropt=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001170
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001171 --x)
1172 # Obsolete; use --with-x.
1173 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001174
1175 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1176 | --x-incl | --x-inc | --x-in | --x-i)
1177 ac_prev=x_includes ;;
1178 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1179 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001180 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001181
1182 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1183 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1184 ac_prev=x_libraries ;;
1185 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1186 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001187 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001188
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001189 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1190Try \`$0 --help' for more information"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001191 ;;
1192
Martin v. Löwis11437992002-04-12 09:54:03 +00001193 *=*)
1194 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1195 # Reject names that are not valid shell variable names.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001196 case $ac_envvar in #(
1197 '' | [0-9]* | *[!_$as_cr_alnum]* )
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001198 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001199 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00001200 eval $ac_envvar=\$ac_optarg
Martin v. Löwis11437992002-04-12 09:54:03 +00001201 export $ac_envvar ;;
1202
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001203 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001204 # FIXME: should be removed in autoconf 3.0.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001205 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001206 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001207 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
Matthias Klose3cef2a92012-03-14 23:39:33 +01001208 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001209 ;;
1210
1211 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00001212done
1213
Guido van Rossum7f43da71994-08-01 12:15:30 +00001214if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001215 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001216 as_fn_error $? "missing argument to $ac_option"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001217fi
1218
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001219if test -n "$ac_unrecognized_opts"; then
1220 case $enable_option_checking in
1221 no) ;;
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001222 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001223 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1224 esac
1225fi
1226
1227# Check all directory arguments for consistency.
Martin v. Löwiseba40652007-08-30 20:10:57 +00001228for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1229 datadir sysconfdir sharedstatedir localstatedir includedir \
1230 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1231 libdir localedir mandir
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001232do
Martin v. Löwiseba40652007-08-30 20:10:57 +00001233 eval ac_val=\$$ac_var
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001234 # Remove trailing slashes.
1235 case $ac_val in
1236 */ )
1237 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1238 eval $ac_var=\$ac_val;;
1239 esac
1240 # Be sure to have absolute directory names.
Martin v. Löwis11437992002-04-12 09:54:03 +00001241 case $ac_val in
Martin v. Löwiseba40652007-08-30 20:10:57 +00001242 [\\/$]* | ?:[\\/]* ) continue;;
1243 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001244 esac
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001245 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
Martin v. Löwis11437992002-04-12 09:54:03 +00001246done
Guido van Rossum627b2d71993-12-24 10:39:16 +00001247
Martin v. Löwis11437992002-04-12 09:54:03 +00001248# There might be people who depend on the old broken behavior: `$host'
1249# used to hold the argument of --host etc.
1250# FIXME: To remove some day.
1251build=$build_alias
1252host=$host_alias
1253target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +00001254
Martin v. Löwis11437992002-04-12 09:54:03 +00001255# FIXME: To remove some day.
1256if test "x$host_alias" != x; then
1257 if test "x$build_alias" = x; then
1258 cross_compiling=maybe
Martin v. Löwis11437992002-04-12 09:54:03 +00001259 elif test "x$build_alias" != "x$host_alias"; then
1260 cross_compiling=yes
1261 fi
1262fi
1263
1264ac_tool_prefix=
1265test -n "$host_alias" && ac_tool_prefix=$host_alias-
1266
1267test "$silent" = yes && exec 6>/dev/null
1268
Guido van Rossum627b2d71993-12-24 10:39:16 +00001269
Martin v. Löwiseba40652007-08-30 20:10:57 +00001270ac_pwd=`pwd` && test -n "$ac_pwd" &&
1271ac_ls_di=`ls -di .` &&
1272ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001273 as_fn_error $? "working directory cannot be determined"
Martin v. Löwiseba40652007-08-30 20:10:57 +00001274test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001275 as_fn_error $? "pwd does not report name of working directory"
Martin v. Löwiseba40652007-08-30 20:10:57 +00001276
1277
Guido van Rossum627b2d71993-12-24 10:39:16 +00001278# Find the source files, if location was not specified.
1279if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001280 ac_srcdir_defaulted=yes
Martin v. Löwiseba40652007-08-30 20:10:57 +00001281 # Try the directory containing this script, then the parent directory.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001282 ac_confdir=`$as_dirname -- "$as_myself" ||
1283$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1284 X"$as_myself" : 'X\(//\)[^/]' \| \
1285 X"$as_myself" : 'X\(//\)$' \| \
1286 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1287$as_echo X"$as_myself" |
Martin v. Löwiseba40652007-08-30 20:10:57 +00001288 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1289 s//\1/
1290 q
1291 }
1292 /^X\(\/\/\)[^/].*/{
1293 s//\1/
1294 q
1295 }
1296 /^X\(\/\/\)$/{
1297 s//\1/
1298 q
1299 }
1300 /^X\(\/\).*/{
1301 s//\1/
1302 q
1303 }
1304 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001305 srcdir=$ac_confdir
Martin v. Löwiseba40652007-08-30 20:10:57 +00001306 if test ! -r "$srcdir/$ac_unique_file"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001307 srcdir=..
1308 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001309else
1310 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001311fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00001312if test ! -r "$srcdir/$ac_unique_file"; then
1313 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001314 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
Brett Cannon19fab762007-06-02 03:02:29 +00001315fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00001316ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1317ac_abs_confdir=`(
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001318 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
Martin v. Löwiseba40652007-08-30 20:10:57 +00001319 pwd)`
1320# When building in place, set srcdir=.
1321if test "$ac_abs_confdir" = "$ac_pwd"; then
1322 srcdir=.
1323fi
1324# Remove unnecessary trailing slashes from srcdir.
1325# Double slashes in file names in object file debugging info
1326# mess up M-x gdb in Emacs.
1327case $srcdir in
1328*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1329esac
1330for ac_var in $ac_precious_vars; do
1331 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1332 eval ac_env_${ac_var}_value=\$${ac_var}
1333 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1334 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1335done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001336
Martin v. Löwis11437992002-04-12 09:54:03 +00001337#
1338# Report the --help message.
1339#
1340if test "$ac_init_help" = "long"; then
1341 # Omit some internal or obsolete options to make the list less imposing.
1342 # This message is too long to be a string in the A/UX 3.1 sh.
1343 cat <<_ACEOF
Martin v. Löwis174440b2008-10-03 08:59:41 +00001344\`configure' configures python 2.7 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +00001345
1346Usage: $0 [OPTION]... [VAR=VALUE]...
1347
1348To assign environment variables (e.g., CC, CFLAGS...), specify them as
1349VAR=VALUE. See below for descriptions of some of the useful variables.
1350
1351Defaults for the options are specified in brackets.
1352
1353Configuration:
1354 -h, --help display this help and exit
1355 --help=short display options specific to this package
1356 --help=recursive display the short help of all the included packages
1357 -V, --version display version information and exit
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001358 -q, --quiet, --silent do not print \`checking ...' messages
Martin v. Löwis11437992002-04-12 09:54:03 +00001359 --cache-file=FILE cache test results in FILE [disabled]
1360 -C, --config-cache alias for \`--cache-file=config.cache'
1361 -n, --no-create do not create output files
1362 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1363
Martin v. Löwis11437992002-04-12 09:54:03 +00001364Installation directories:
1365 --prefix=PREFIX install architecture-independent files in PREFIX
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001366 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001367 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001368 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +00001369
1370By default, \`make install' will install all the files in
1371\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1372an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1373for instance \`--prefix=\$HOME'.
1374
1375For better control, use the options below.
1376
1377Fine tuning of the installation directories:
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001378 --bindir=DIR user executables [EPREFIX/bin]
1379 --sbindir=DIR system admin executables [EPREFIX/sbin]
1380 --libexecdir=DIR program executables [EPREFIX/libexec]
1381 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1382 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1383 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1384 --libdir=DIR object code libraries [EPREFIX/lib]
1385 --includedir=DIR C header files [PREFIX/include]
1386 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1387 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1388 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1389 --infodir=DIR info documentation [DATAROOTDIR/info]
1390 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1391 --mandir=DIR man documentation [DATAROOTDIR/man]
1392 --docdir=DIR documentation root [DATAROOTDIR/doc/python]
1393 --htmldir=DIR html documentation [DOCDIR]
1394 --dvidir=DIR dvi documentation [DOCDIR]
1395 --pdfdir=DIR pdf documentation [DOCDIR]
1396 --psdir=DIR ps documentation [DOCDIR]
Martin v. Löwis11437992002-04-12 09:54:03 +00001397_ACEOF
1398
1399 cat <<\_ACEOF
1400_ACEOF
1401fi
1402
1403if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +00001404 case $ac_init_help in
Martin v. Löwis174440b2008-10-03 08:59:41 +00001405 short | recursive ) echo "Configuration of python 2.7:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +00001406 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001407 cat <<\_ACEOF
1408
1409Optional Features:
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001410 --disable-option-checking ignore unrecognized --enable/--with options
Martin v. Löwis11437992002-04-12 09:54:03 +00001411 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1412 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Brett Cannon91a1dec2008-02-13 19:15:44 +00001413 --enable-universalsdk[=SDKDIR]
Brett Cannon9a8bb0e2008-02-03 02:07:55 +00001414 Build against Mac OS X 10.4u SDK (ppc/i386)
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001415 --enable-framework[=INSTALLDIR]
1416 Build (MacOSX|Darwin) framework
1417 --enable-shared disable/enable building shared python library
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00001418 --enable-profiling enable C-level code profiling
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001419 --enable-toolbox-glue disable/enable MacOSX glue code for extensions
1420 --enable-ipv6 Enable ipv6 (with ipv4) support
1421 --disable-ipv6 Disable ipv6 support
Mark Dickinsonefc82f72009-03-20 15:51:55 +00001422 --enable-big-digits[=BITS]
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001423 use big digits for Python longs [[BITS=30]]
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001424 --enable-unicode[=ucs[24]]
Benjamin Peterson66556b02010-05-25 02:23:32 +00001425 Enable Unicode strings (default is ucs2)
Martin v. Löwis11437992002-04-12 09:54:03 +00001426
1427Optional Packages:
1428 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1429 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Ronald Oussoren5640ce22008-06-05 12:58:24 +00001430 --with-universal-archs=ARCH
1431 select architectures for universal build ("32-bit",
Ronald Oussoren23d92532009-09-07 06:12:00 +00001432 "64-bit", "3-way", "intel" or "all")
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00001433 --with-framework-name=FRAMEWORK
1434 specify an alternate name of the framework built
1435 with --enable-framework
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001436 --without-gcc never use gcc
Martin v. Löwis0f48d982006-04-14 14:34:26 +00001437 --with-cxx-main=<compiler>
1438 compile main() and link python executable with C++
1439 compiler
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001440 --with-suffix=.exe set executable suffix
1441 --with-pydebug build with Py_DEBUG defined
1442 --with-libs='lib1 ...' link against additional libs
Benjamin Peterson2c196742009-12-31 03:17:18 +00001443 --with-system-expat build pyexpat module using an installed expat
1444 library
Martin v. Löwis9176fc12006-04-11 11:12:43 +00001445 --with-system-ffi build _ctypes module using an installed ffi library
Benjamin Peterson867475c2009-04-29 20:36:25 +00001446 --with-dbmliborder=db1:db2:...
1447 order to check db backends for dbm. Valid value is a
1448 colon separated string with the backend names
1449 `ndbm', `gdbm' and `bdb'.
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001450 --with-signal-module disable/enable signal module
1451 --with-dec-threads use DEC Alpha/OSF1 thread-safe libraries
1452 --with(out)-threads[=DIRECTORY]
1453 disable/enable thread support
1454 --with(out)-thread[=DIRECTORY]
1455 deprecated; use --with(out)-threads
1456 --with-pth use GNU pth threading libraries
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001457 --with(out)-doc-strings disable/enable documentation strings
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00001458 --with(out)-tsc enable/disable timestamp counter profile
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001459 --with(out)-pymalloc disable/enable specialized mallocs
Benjamin Peterson91c12eb2009-12-03 02:52:39 +00001460 --with-valgrind Enable Valgrind support
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001461 --with-wctype-functions use wctype.h functions
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001462 --with-fpectl enable SIGFPE catching
1463 --with-libm=STRING math library
1464 --with-libc=STRING C library
Martin v. Löwis11437992002-04-12 09:54:03 +00001465
1466Some influential environment variables:
1467 CC C compiler command
1468 CFLAGS C compiler flags
1469 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1470 nonstandard directory <lib dir>
Martin v. Löwiseba40652007-08-30 20:10:57 +00001471 LIBS libraries to pass to the linker, e.g. -l<library>
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001472 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
Martin v. Löwiseba40652007-08-30 20:10:57 +00001473 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001474 CPP C preprocessor
1475
1476Use these variables to override the choices made by `configure' or to help
1477it to find libraries and programs with nonstandard names/locations.
1478
Georg Brandl464432d2009-05-20 18:24:08 +00001479Report bugs to <http://bugs.python.org/>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001480_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00001481ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001482fi
1483
1484if test "$ac_init_help" = "recursive"; then
1485 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001486 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001487 test -d "$ac_dir" ||
1488 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1489 continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001490 ac_builddir=.
1491
Martin v. Löwiseba40652007-08-30 20:10:57 +00001492case "$ac_dir" in
1493.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1494*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001495 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Martin v. Löwiseba40652007-08-30 20:10:57 +00001496 # A ".." for each directory in $ac_dir_suffix.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001497 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Martin v. Löwiseba40652007-08-30 20:10:57 +00001498 case $ac_top_builddir_sub in
1499 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1500 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1501 esac ;;
1502esac
1503ac_abs_top_builddir=$ac_pwd
1504ac_abs_builddir=$ac_pwd$ac_dir_suffix
1505# for backward compatibility:
1506ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001507
1508case $srcdir in
Martin v. Löwiseba40652007-08-30 20:10:57 +00001509 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001510 ac_srcdir=.
Martin v. Löwiseba40652007-08-30 20:10:57 +00001511 ac_top_srcdir=$ac_top_builddir_sub
1512 ac_abs_top_srcdir=$ac_pwd ;;
1513 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001514 ac_srcdir=$srcdir$ac_dir_suffix;
Martin v. Löwiseba40652007-08-30 20:10:57 +00001515 ac_top_srcdir=$srcdir
1516 ac_abs_top_srcdir=$srcdir ;;
1517 *) # Relative name.
1518 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1519 ac_top_srcdir=$ac_top_build_prefix$srcdir
1520 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001521esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00001522ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001523
Martin v. Löwiseba40652007-08-30 20:10:57 +00001524 cd "$ac_dir" || { ac_status=$?; continue; }
1525 # Check for guested configure.
1526 if test -f "$ac_srcdir/configure.gnu"; then
1527 echo &&
1528 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1529 elif test -f "$ac_srcdir/configure"; then
1530 echo &&
1531 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001532 else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001533 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Martin v. Löwiseba40652007-08-30 20:10:57 +00001534 fi || ac_status=$?
1535 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001536 done
1537fi
1538
Martin v. Löwiseba40652007-08-30 20:10:57 +00001539test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001540if $ac_init_version; then
1541 cat <<\_ACEOF
Martin v. Löwis174440b2008-10-03 08:59:41 +00001542python configure 2.7
Charles-François Natalibe2b9072013-01-08 19:47:00 +01001543generated by GNU Autoconf 2.69
Martin v. Löwis11437992002-04-12 09:54:03 +00001544
Charles-François Natalibe2b9072013-01-08 19:47:00 +01001545Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001546This configure script is free software; the Free Software Foundation
1547gives unlimited permission to copy, distribute and modify it.
1548_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00001549 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001550fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001551
1552## ------------------------ ##
1553## Autoconf initialization. ##
1554## ------------------------ ##
1555
1556# ac_fn_c_try_compile LINENO
1557# --------------------------
1558# Try to compile conftest.$ac_ext, and return whether this succeeded.
1559ac_fn_c_try_compile ()
1560{
1561 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1562 rm -f conftest.$ac_objext
1563 if { { ac_try="$ac_compile"
1564case "(($ac_try" in
1565 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1566 *) ac_try_echo=$ac_try;;
1567esac
1568eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1569$as_echo "$ac_try_echo"; } >&5
1570 (eval "$ac_compile") 2>conftest.err
1571 ac_status=$?
1572 if test -s conftest.err; then
1573 grep -v '^ *+' conftest.err >conftest.er1
1574 cat conftest.er1 >&5
1575 mv -f conftest.er1 conftest.err
1576 fi
1577 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1578 test $ac_status = 0; } && {
1579 test -z "$ac_c_werror_flag" ||
1580 test ! -s conftest.err
1581 } && test -s conftest.$ac_objext; then :
1582 ac_retval=0
1583else
1584 $as_echo "$as_me: failed program was:" >&5
1585sed 's/^/| /' conftest.$ac_ext >&5
1586
1587 ac_retval=1
1588fi
Matthias Klose3cef2a92012-03-14 23:39:33 +01001589 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001590 as_fn_set_status $ac_retval
1591
1592} # ac_fn_c_try_compile
1593
1594# ac_fn_c_try_cpp LINENO
1595# ----------------------
1596# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1597ac_fn_c_try_cpp ()
1598{
1599 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1600 if { { ac_try="$ac_cpp conftest.$ac_ext"
1601case "(($ac_try" in
1602 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1603 *) ac_try_echo=$ac_try;;
1604esac
1605eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1606$as_echo "$ac_try_echo"; } >&5
1607 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1608 ac_status=$?
1609 if test -s conftest.err; then
1610 grep -v '^ *+' conftest.err >conftest.er1
1611 cat conftest.er1 >&5
1612 mv -f conftest.er1 conftest.err
1613 fi
1614 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001615 test $ac_status = 0; } > conftest.i && {
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001616 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1617 test ! -s conftest.err
1618 }; then :
1619 ac_retval=0
1620else
1621 $as_echo "$as_me: failed program was:" >&5
1622sed 's/^/| /' conftest.$ac_ext >&5
1623
1624 ac_retval=1
1625fi
Matthias Klose3cef2a92012-03-14 23:39:33 +01001626 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001627 as_fn_set_status $ac_retval
1628
1629} # ac_fn_c_try_cpp
1630
1631# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1632# -------------------------------------------------------
1633# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1634# the include files in INCLUDES and setting the cache variable VAR
1635# accordingly.
1636ac_fn_c_check_header_mongrel ()
1637{
1638 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Matthias Klose3cef2a92012-03-14 23:39:33 +01001639 if eval \${$3+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001640 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1641$as_echo_n "checking for $2... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01001642if eval \${$3+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001643 $as_echo_n "(cached) " >&6
1644fi
1645eval ac_res=\$$3
1646 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1647$as_echo "$ac_res" >&6; }
1648else
1649 # Is the header compilable?
1650{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1651$as_echo_n "checking $2 usability... " >&6; }
1652cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1653/* end confdefs.h. */
1654$4
1655#include <$2>
1656_ACEOF
1657if ac_fn_c_try_compile "$LINENO"; then :
1658 ac_header_compiler=yes
1659else
1660 ac_header_compiler=no
1661fi
1662rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1663{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1664$as_echo "$ac_header_compiler" >&6; }
1665
1666# Is the header present?
1667{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1668$as_echo_n "checking $2 presence... " >&6; }
1669cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1670/* end confdefs.h. */
1671#include <$2>
1672_ACEOF
1673if ac_fn_c_try_cpp "$LINENO"; then :
1674 ac_header_preproc=yes
1675else
1676 ac_header_preproc=no
1677fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001678rm -f conftest.err conftest.i conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001679{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1680$as_echo "$ac_header_preproc" >&6; }
1681
1682# So? What about this header?
1683case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1684 yes:no: )
1685 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1686$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1687 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1688$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1689 ;;
1690 no:yes:* )
1691 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1692$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1693 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1694$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1695 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1696$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1697 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1698$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1699 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1700$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001701( $as_echo "## -------------------------------------- ##
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001702## Report this to http://bugs.python.org/ ##
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001703## -------------------------------------- ##"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001704 ) | sed "s/^/$as_me: WARNING: /" >&2
1705 ;;
1706esac
1707 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1708$as_echo_n "checking for $2... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01001709if eval \${$3+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001710 $as_echo_n "(cached) " >&6
1711else
1712 eval "$3=\$ac_header_compiler"
1713fi
1714eval ac_res=\$$3
1715 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1716$as_echo "$ac_res" >&6; }
1717fi
Matthias Klose3cef2a92012-03-14 23:39:33 +01001718 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001719
1720} # ac_fn_c_check_header_mongrel
1721
1722# ac_fn_c_try_run LINENO
1723# ----------------------
1724# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1725# that executables *can* be run.
1726ac_fn_c_try_run ()
1727{
1728 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1729 if { { ac_try="$ac_link"
1730case "(($ac_try" in
1731 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1732 *) ac_try_echo=$ac_try;;
1733esac
1734eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1735$as_echo "$ac_try_echo"; } >&5
1736 (eval "$ac_link") 2>&5
1737 ac_status=$?
1738 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1739 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1740 { { case "(($ac_try" in
1741 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1742 *) ac_try_echo=$ac_try;;
1743esac
1744eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1745$as_echo "$ac_try_echo"; } >&5
1746 (eval "$ac_try") 2>&5
1747 ac_status=$?
1748 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1749 test $ac_status = 0; }; }; then :
1750 ac_retval=0
1751else
1752 $as_echo "$as_me: program exited with status $ac_status" >&5
1753 $as_echo "$as_me: failed program was:" >&5
1754sed 's/^/| /' conftest.$ac_ext >&5
1755
1756 ac_retval=$ac_status
1757fi
1758 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Matthias Klose3cef2a92012-03-14 23:39:33 +01001759 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001760 as_fn_set_status $ac_retval
1761
1762} # ac_fn_c_try_run
1763
1764# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1765# -------------------------------------------------------
1766# Tests whether HEADER exists and can be compiled using the include files in
1767# INCLUDES, setting the cache variable VAR accordingly.
1768ac_fn_c_check_header_compile ()
1769{
1770 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1771 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1772$as_echo_n "checking for $2... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01001773if eval \${$3+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001774 $as_echo_n "(cached) " >&6
1775else
1776 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1777/* end confdefs.h. */
1778$4
1779#include <$2>
1780_ACEOF
1781if ac_fn_c_try_compile "$LINENO"; then :
1782 eval "$3=yes"
1783else
1784 eval "$3=no"
1785fi
1786rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1787fi
1788eval ac_res=\$$3
1789 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1790$as_echo "$ac_res" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01001791 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001792
1793} # ac_fn_c_check_header_compile
1794
1795# ac_fn_c_try_link LINENO
1796# -----------------------
1797# Try to link conftest.$ac_ext, and return whether this succeeded.
1798ac_fn_c_try_link ()
1799{
1800 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1801 rm -f conftest.$ac_objext conftest$ac_exeext
1802 if { { ac_try="$ac_link"
1803case "(($ac_try" in
1804 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1805 *) ac_try_echo=$ac_try;;
1806esac
1807eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1808$as_echo "$ac_try_echo"; } >&5
1809 (eval "$ac_link") 2>conftest.err
1810 ac_status=$?
1811 if test -s conftest.err; then
1812 grep -v '^ *+' conftest.err >conftest.er1
1813 cat conftest.er1 >&5
1814 mv -f conftest.er1 conftest.err
1815 fi
1816 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1817 test $ac_status = 0; } && {
1818 test -z "$ac_c_werror_flag" ||
1819 test ! -s conftest.err
1820 } && test -s conftest$ac_exeext && {
1821 test "$cross_compiling" = yes ||
Charles-François Natalibe2b9072013-01-08 19:47:00 +01001822 test -x conftest$ac_exeext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001823 }; then :
1824 ac_retval=0
1825else
1826 $as_echo "$as_me: failed program was:" >&5
1827sed 's/^/| /' conftest.$ac_ext >&5
1828
1829 ac_retval=1
1830fi
1831 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1832 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1833 # interfere with the next link command; also delete a directory that is
1834 # left behind by Apple's compiler. We do this before executing the actions.
1835 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Matthias Klose3cef2a92012-03-14 23:39:33 +01001836 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001837 as_fn_set_status $ac_retval
1838
1839} # ac_fn_c_try_link
1840
1841# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
1842# -------------------------------------------
1843# Tests whether TYPE exists after having included INCLUDES, setting cache
1844# variable VAR accordingly.
1845ac_fn_c_check_type ()
1846{
1847 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1848 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1849$as_echo_n "checking for $2... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01001850if eval \${$3+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001851 $as_echo_n "(cached) " >&6
1852else
1853 eval "$3=no"
1854 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1855/* end confdefs.h. */
1856$4
1857int
1858main ()
1859{
1860if (sizeof ($2))
1861 return 0;
1862 ;
1863 return 0;
1864}
1865_ACEOF
1866if ac_fn_c_try_compile "$LINENO"; then :
1867 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1868/* end confdefs.h. */
1869$4
1870int
1871main ()
1872{
1873if (sizeof (($2)))
1874 return 0;
1875 ;
1876 return 0;
1877}
1878_ACEOF
1879if ac_fn_c_try_compile "$LINENO"; then :
1880
1881else
1882 eval "$3=yes"
1883fi
1884rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1885fi
1886rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1887fi
1888eval ac_res=\$$3
1889 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1890$as_echo "$ac_res" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01001891 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001892
1893} # ac_fn_c_check_type
1894
1895# ac_fn_c_find_uintX_t LINENO BITS VAR
1896# ------------------------------------
1897# Finds an unsigned integer type with width BITS, setting cache variable VAR
1898# accordingly.
1899ac_fn_c_find_uintX_t ()
1900{
1901 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1902 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uint$2_t" >&5
1903$as_echo_n "checking for uint$2_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01001904if eval \${$3+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001905 $as_echo_n "(cached) " >&6
1906else
1907 eval "$3=no"
1908 # Order is important - never check a type that is potentially smaller
1909 # than half of the expected target width.
1910 for ac_type in uint$2_t 'unsigned int' 'unsigned long int' \
1911 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
1912 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1913/* end confdefs.h. */
1914$ac_includes_default
1915int
1916main ()
1917{
1918static int test_array [1 - 2 * !((($ac_type) -1 >> ($2 / 2 - 1)) >> ($2 / 2 - 1) == 3)];
Charles-François Natalibe2b9072013-01-08 19:47:00 +01001919test_array [0] = 0;
1920return test_array [0];
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001921
1922 ;
1923 return 0;
1924}
1925_ACEOF
1926if ac_fn_c_try_compile "$LINENO"; then :
1927 case $ac_type in #(
1928 uint$2_t) :
1929 eval "$3=yes" ;; #(
1930 *) :
1931 eval "$3=\$ac_type" ;;
1932esac
1933fi
1934rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001935 if eval test \"x\$"$3"\" = x"no"; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001936
1937else
1938 break
1939fi
1940 done
1941fi
1942eval ac_res=\$$3
1943 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1944$as_echo "$ac_res" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01001945 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001946
1947} # ac_fn_c_find_uintX_t
1948
1949# ac_fn_c_find_intX_t LINENO BITS VAR
1950# -----------------------------------
1951# Finds a signed integer type with width BITS, setting cache variable VAR
1952# accordingly.
1953ac_fn_c_find_intX_t ()
1954{
1955 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1956 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for int$2_t" >&5
1957$as_echo_n "checking for int$2_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01001958if eval \${$3+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001959 $as_echo_n "(cached) " >&6
1960else
1961 eval "$3=no"
1962 # Order is important - never check a type that is potentially smaller
1963 # than half of the expected target width.
1964 for ac_type in int$2_t 'int' 'long int' \
1965 'long long int' 'short int' 'signed char'; do
1966 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1967/* end confdefs.h. */
1968$ac_includes_default
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001969 enum { N = $2 / 2 - 1 };
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001970int
1971main ()
1972{
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001973static 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 +01001974test_array [0] = 0;
1975return test_array [0];
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001976
1977 ;
1978 return 0;
1979}
1980_ACEOF
1981if ac_fn_c_try_compile "$LINENO"; then :
1982 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1983/* end confdefs.h. */
1984$ac_includes_default
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001985 enum { N = $2 / 2 - 1 };
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001986int
1987main ()
1988{
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001989static int test_array [1 - 2 * !(($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001990 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 2))];
Charles-François Natalibe2b9072013-01-08 19:47:00 +01001991test_array [0] = 0;
1992return test_array [0];
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001993
1994 ;
1995 return 0;
1996}
1997_ACEOF
1998if ac_fn_c_try_compile "$LINENO"; then :
1999
2000else
2001 case $ac_type in #(
2002 int$2_t) :
2003 eval "$3=yes" ;; #(
2004 *) :
2005 eval "$3=\$ac_type" ;;
2006esac
2007fi
2008rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2009fi
2010rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002011 if eval test \"x\$"$3"\" = x"no"; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002012
2013else
2014 break
2015fi
2016 done
2017fi
2018eval ac_res=\$$3
2019 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2020$as_echo "$ac_res" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01002021 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002022
2023} # ac_fn_c_find_intX_t
2024
2025# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2026# --------------------------------------------
2027# Tries to find the compile-time value of EXPR in a program that includes
2028# INCLUDES, setting VAR accordingly. Returns whether the value could be
2029# computed
2030ac_fn_c_compute_int ()
2031{
2032 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2033 if test "$cross_compiling" = yes; then
2034 # Depending upon the size, compute the lo and hi bounds.
2035cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2036/* end confdefs.h. */
2037$4
2038int
2039main ()
2040{
2041static int test_array [1 - 2 * !(($2) >= 0)];
Charles-François Natalibe2b9072013-01-08 19:47:00 +01002042test_array [0] = 0;
2043return test_array [0];
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002044
2045 ;
2046 return 0;
2047}
2048_ACEOF
2049if ac_fn_c_try_compile "$LINENO"; then :
2050 ac_lo=0 ac_mid=0
2051 while :; do
2052 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2053/* end confdefs.h. */
2054$4
2055int
2056main ()
2057{
2058static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Charles-François Natalibe2b9072013-01-08 19:47:00 +01002059test_array [0] = 0;
2060return test_array [0];
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002061
2062 ;
2063 return 0;
2064}
2065_ACEOF
2066if ac_fn_c_try_compile "$LINENO"; then :
2067 ac_hi=$ac_mid; break
2068else
2069 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2070 if test $ac_lo -le $ac_mid; then
2071 ac_lo= ac_hi=
2072 break
2073 fi
2074 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2075fi
2076rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2077 done
2078else
2079 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2080/* end confdefs.h. */
2081$4
2082int
2083main ()
2084{
2085static int test_array [1 - 2 * !(($2) < 0)];
Charles-François Natalibe2b9072013-01-08 19:47:00 +01002086test_array [0] = 0;
2087return test_array [0];
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002088
2089 ;
2090 return 0;
2091}
2092_ACEOF
2093if ac_fn_c_try_compile "$LINENO"; then :
2094 ac_hi=-1 ac_mid=-1
2095 while :; do
2096 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2097/* end confdefs.h. */
2098$4
2099int
2100main ()
2101{
2102static int test_array [1 - 2 * !(($2) >= $ac_mid)];
Charles-François Natalibe2b9072013-01-08 19:47:00 +01002103test_array [0] = 0;
2104return test_array [0];
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002105
2106 ;
2107 return 0;
2108}
2109_ACEOF
2110if ac_fn_c_try_compile "$LINENO"; then :
2111 ac_lo=$ac_mid; break
2112else
2113 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2114 if test $ac_mid -le $ac_hi; then
2115 ac_lo= ac_hi=
2116 break
2117 fi
2118 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2119fi
2120rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2121 done
2122else
2123 ac_lo= ac_hi=
2124fi
2125rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2126fi
2127rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2128# Binary search between lo and hi bounds.
2129while test "x$ac_lo" != "x$ac_hi"; do
2130 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2131 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2132/* end confdefs.h. */
2133$4
2134int
2135main ()
2136{
2137static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Charles-François Natalibe2b9072013-01-08 19:47:00 +01002138test_array [0] = 0;
2139return test_array [0];
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002140
2141 ;
2142 return 0;
2143}
2144_ACEOF
2145if ac_fn_c_try_compile "$LINENO"; then :
2146 ac_hi=$ac_mid
2147else
2148 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2149fi
2150rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2151done
2152case $ac_lo in #((
2153?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2154'') ac_retval=1 ;;
2155esac
2156 else
2157 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2158/* end confdefs.h. */
2159$4
2160static long int longval () { return $2; }
2161static unsigned long int ulongval () { return $2; }
2162#include <stdio.h>
2163#include <stdlib.h>
2164int
2165main ()
2166{
2167
2168 FILE *f = fopen ("conftest.val", "w");
2169 if (! f)
2170 return 1;
2171 if (($2) < 0)
2172 {
2173 long int i = longval ();
2174 if (i != ($2))
2175 return 1;
2176 fprintf (f, "%ld", i);
2177 }
2178 else
2179 {
2180 unsigned long int i = ulongval ();
2181 if (i != ($2))
2182 return 1;
2183 fprintf (f, "%lu", i);
2184 }
2185 /* Do not output a trailing newline, as this causes \r\n confusion
2186 on some platforms. */
2187 return ferror (f) || fclose (f) != 0;
2188
2189 ;
2190 return 0;
2191}
2192_ACEOF
2193if ac_fn_c_try_run "$LINENO"; then :
2194 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2195else
2196 ac_retval=1
2197fi
2198rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2199 conftest.$ac_objext conftest.beam conftest.$ac_ext
2200rm -f conftest.val
2201
2202 fi
Matthias Klose3cef2a92012-03-14 23:39:33 +01002203 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002204 as_fn_set_status $ac_retval
2205
2206} # ac_fn_c_compute_int
2207
2208# ac_fn_c_check_func LINENO FUNC VAR
2209# ----------------------------------
2210# Tests whether FUNC exists, setting the cache variable VAR accordingly
2211ac_fn_c_check_func ()
2212{
2213 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2214 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2215$as_echo_n "checking for $2... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01002216if eval \${$3+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002217 $as_echo_n "(cached) " >&6
2218else
2219 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2220/* end confdefs.h. */
2221/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2222 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2223#define $2 innocuous_$2
2224
2225/* System header to define __stub macros and hopefully few prototypes,
2226 which can conflict with char $2 (); below.
2227 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2228 <limits.h> exists even on freestanding compilers. */
2229
2230#ifdef __STDC__
2231# include <limits.h>
2232#else
2233# include <assert.h>
2234#endif
2235
2236#undef $2
2237
2238/* Override any GCC internal prototype to avoid an error.
2239 Use char because int might match the return type of a GCC
2240 builtin and then its argument prototype would still apply. */
2241#ifdef __cplusplus
2242extern "C"
2243#endif
2244char $2 ();
2245/* The GNU C library defines this for functions which it implements
2246 to always fail with ENOSYS. Some functions are actually named
2247 something starting with __ and the normal name is an alias. */
2248#if defined __stub_$2 || defined __stub___$2
2249choke me
2250#endif
2251
2252int
2253main ()
2254{
2255return $2 ();
2256 ;
2257 return 0;
2258}
2259_ACEOF
2260if ac_fn_c_try_link "$LINENO"; then :
2261 eval "$3=yes"
2262else
2263 eval "$3=no"
2264fi
2265rm -f core conftest.err conftest.$ac_objext \
2266 conftest$ac_exeext conftest.$ac_ext
2267fi
2268eval ac_res=\$$3
2269 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2270$as_echo "$ac_res" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01002271 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002272
2273} # ac_fn_c_check_func
2274
2275# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2276# ----------------------------------------------------
2277# Tries to find if the field MEMBER exists in type AGGR, after including
2278# INCLUDES, setting cache variable VAR accordingly.
2279ac_fn_c_check_member ()
2280{
2281 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2282 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2283$as_echo_n "checking for $2.$3... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01002284if eval \${$4+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002285 $as_echo_n "(cached) " >&6
2286else
2287 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2288/* end confdefs.h. */
2289$5
2290int
2291main ()
2292{
2293static $2 ac_aggr;
2294if (ac_aggr.$3)
2295return 0;
2296 ;
2297 return 0;
2298}
2299_ACEOF
2300if ac_fn_c_try_compile "$LINENO"; then :
2301 eval "$4=yes"
2302else
2303 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2304/* end confdefs.h. */
2305$5
2306int
2307main ()
2308{
2309static $2 ac_aggr;
2310if (sizeof ac_aggr.$3)
2311return 0;
2312 ;
2313 return 0;
2314}
2315_ACEOF
2316if ac_fn_c_try_compile "$LINENO"; then :
2317 eval "$4=yes"
2318else
2319 eval "$4=no"
2320fi
2321rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2322fi
2323rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2324fi
2325eval ac_res=\$$4
2326 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2327$as_echo "$ac_res" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01002328 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002329
2330} # ac_fn_c_check_member
2331
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002332# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2333# ---------------------------------------------
2334# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2335# accordingly.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002336ac_fn_c_check_decl ()
2337{
2338 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002339 as_decl_name=`echo $2|sed 's/ *(.*//'`
2340 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2341 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2342$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01002343if eval \${$3+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002344 $as_echo_n "(cached) " >&6
2345else
2346 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2347/* end confdefs.h. */
2348$4
2349int
2350main ()
2351{
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002352#ifndef $as_decl_name
2353#ifdef __cplusplus
2354 (void) $as_decl_use;
2355#else
2356 (void) $as_decl_name;
2357#endif
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002358#endif
2359
2360 ;
2361 return 0;
2362}
2363_ACEOF
2364if ac_fn_c_try_compile "$LINENO"; then :
2365 eval "$3=yes"
2366else
2367 eval "$3=no"
2368fi
2369rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2370fi
2371eval ac_res=\$$3
2372 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2373$as_echo "$ac_res" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01002374 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002375
2376} # ac_fn_c_check_decl
Martin v. Löwiseba40652007-08-30 20:10:57 +00002377cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00002378This file contains any messages produced by compilers while
2379running configure, to aid debugging if configure makes a mistake.
2380
Martin v. Löwis174440b2008-10-03 08:59:41 +00002381It was created by python $as_me 2.7, which was
Charles-François Natalibe2b9072013-01-08 19:47:00 +01002382generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00002383
2384 $ $0 $@
2385
2386_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00002387exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00002388{
2389cat <<_ASUNAME
2390## --------- ##
2391## Platform. ##
2392## --------- ##
2393
2394hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2395uname -m = `(uname -m) 2>/dev/null || echo unknown`
2396uname -r = `(uname -r) 2>/dev/null || echo unknown`
2397uname -s = `(uname -s) 2>/dev/null || echo unknown`
2398uname -v = `(uname -v) 2>/dev/null || echo unknown`
2399
2400/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2401/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2402
2403/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2404/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2405/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Martin v. Löwiseba40652007-08-30 20:10:57 +00002406/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00002407/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2408/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2409/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2410
2411_ASUNAME
2412
2413as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2414for as_dir in $PATH
2415do
2416 IFS=$as_save_IFS
2417 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002418 $as_echo "PATH: $as_dir"
2419 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002420IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002421
2422} >&5
2423
2424cat >&5 <<_ACEOF
2425
2426
2427## ----------- ##
2428## Core tests. ##
2429## ----------- ##
2430
2431_ACEOF
2432
2433
2434# Keep a trace of the command line.
2435# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00002436# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00002437# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00002438# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00002439ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00002440ac_configure_args0=
2441ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00002442ac_must_keep_next=false
2443for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00002444do
Skip Montanaro6dead952003-09-25 14:50:04 +00002445 for ac_arg
2446 do
2447 case $ac_arg in
2448 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2449 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2450 | -silent | --silent | --silen | --sile | --sil)
2451 continue ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00002452 *\'*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002453 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002454 esac
2455 case $ac_pass in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002456 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002457 2)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002458 as_fn_append ac_configure_args1 " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002459 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002460 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00002461 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00002462 case $ac_arg in
2463 *=* | --config-cache | -C | -disable-* | --disable-* \
2464 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2465 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2466 | -with-* | --with-* | -without-* | --without-* | --x)
2467 case "$ac_configure_args0 " in
2468 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2469 esac
2470 ;;
2471 -* ) ac_must_keep_next=true ;;
2472 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00002473 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002474 as_fn_append ac_configure_args " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002475 ;;
2476 esac
2477 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002478done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002479{ ac_configure_args0=; unset ac_configure_args0;}
2480{ ac_configure_args1=; unset ac_configure_args1;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002481
2482# When interrupted or exit'd, cleanup temporary files, and complete
2483# config.log. We remove comments because anyway the quotes in there
2484# would cause problems or look ugly.
Martin v. Löwiseba40652007-08-30 20:10:57 +00002485# WARNING: Use '\'' to represent an apostrophe within the trap.
2486# 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 +00002487trap 'exit_status=$?
2488 # Save into config.log some information that might help in debugging.
2489 {
2490 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002491
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002492 $as_echo "## ---------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002493## Cache variables. ##
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002494## ---------------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002495 echo
2496 # The following way of writing the cache mishandles newlines in values,
Martin v. Löwiseba40652007-08-30 20:10:57 +00002497(
2498 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2499 eval ac_val=\$$ac_var
2500 case $ac_val in #(
2501 *${as_nl}*)
2502 case $ac_var in #(
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002503 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2504$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00002505 esac
2506 case $ac_var in #(
2507 _ | IFS | as_nl) ;; #(
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002508 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2509 *) { eval $ac_var=; unset $ac_var;} ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00002510 esac ;;
2511 esac
2512 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002513 (set) 2>&1 |
Martin v. Löwiseba40652007-08-30 20:10:57 +00002514 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2515 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00002516 sed -n \
Martin v. Löwiseba40652007-08-30 20:10:57 +00002517 "s/'\''/'\''\\\\'\'''\''/g;
2518 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2519 ;; #(
Skip Montanaro89e975f2007-08-22 19:05:21 +00002520 *)
Martin v. Löwiseba40652007-08-30 20:10:57 +00002521 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaro89e975f2007-08-22 19:05:21 +00002522 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00002523 esac |
2524 sort
2525)
Martin v. Löwis11437992002-04-12 09:54:03 +00002526 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002527
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002528 $as_echo "## ----------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00002529## Output variables. ##
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002530## ----------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002531 echo
2532 for ac_var in $ac_subst_vars
2533 do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002534 eval ac_val=\$$ac_var
2535 case $ac_val in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002536 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00002537 esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002538 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002539 done | sort
2540 echo
2541
2542 if test -n "$ac_subst_files"; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002543 $as_echo "## ------------------- ##
Martin v. Löwiseba40652007-08-30 20:10:57 +00002544## File substitutions. ##
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002545## ------------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002546 echo
2547 for ac_var in $ac_subst_files
2548 do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002549 eval ac_val=\$$ac_var
2550 case $ac_val in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002551 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00002552 esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002553 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002554 done | sort
2555 echo
2556 fi
2557
Martin v. Löwis11437992002-04-12 09:54:03 +00002558 if test -s confdefs.h; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002559 $as_echo "## ----------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002560## confdefs.h. ##
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002561## ----------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002562 echo
Martin v. Löwiseba40652007-08-30 20:10:57 +00002563 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002564 echo
2565 fi
2566 test "$ac_signal" != 0 &&
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002567 $as_echo "$as_me: caught signal $ac_signal"
2568 $as_echo "$as_me: exit $exit_status"
Martin v. Löwis11437992002-04-12 09:54:03 +00002569 } >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00002570 rm -f core *.core core.conftest.* &&
2571 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00002572 exit $exit_status
Martin v. Löwiseba40652007-08-30 20:10:57 +00002573' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00002574for ac_signal in 1 2 13 15; do
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002575 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00002576done
2577ac_signal=0
2578
2579# confdefs.h avoids OS command line length limits that DEFS can exceed.
Martin v. Löwiseba40652007-08-30 20:10:57 +00002580rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002581
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002582$as_echo "/* confdefs.h */" > confdefs.h
2583
Martin v. Löwis11437992002-04-12 09:54:03 +00002584# Predefined preprocessor variables.
2585
2586cat >>confdefs.h <<_ACEOF
2587#define PACKAGE_NAME "$PACKAGE_NAME"
2588_ACEOF
2589
Martin v. Löwis11437992002-04-12 09:54:03 +00002590cat >>confdefs.h <<_ACEOF
2591#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2592_ACEOF
2593
Martin v. Löwis11437992002-04-12 09:54:03 +00002594cat >>confdefs.h <<_ACEOF
2595#define PACKAGE_VERSION "$PACKAGE_VERSION"
2596_ACEOF
2597
Martin v. Löwis11437992002-04-12 09:54:03 +00002598cat >>confdefs.h <<_ACEOF
2599#define PACKAGE_STRING "$PACKAGE_STRING"
2600_ACEOF
2601
Martin v. Löwis11437992002-04-12 09:54:03 +00002602cat >>confdefs.h <<_ACEOF
2603#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2604_ACEOF
2605
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002606cat >>confdefs.h <<_ACEOF
2607#define PACKAGE_URL "$PACKAGE_URL"
2608_ACEOF
2609
Martin v. Löwis11437992002-04-12 09:54:03 +00002610
2611# Let the site file select an alternate cache file if it wants to.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002612# Prefer an explicitly selected file to automatically selected ones.
2613ac_site_file1=NONE
2614ac_site_file2=NONE
Martin v. Löwiseba40652007-08-30 20:10:57 +00002615if test -n "$CONFIG_SITE"; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002616 # We do not want a PATH search for config.site.
2617 case $CONFIG_SITE in #((
2618 -*) ac_site_file1=./$CONFIG_SITE;;
2619 */*) ac_site_file1=$CONFIG_SITE;;
2620 *) ac_site_file1=./$CONFIG_SITE;;
2621 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00002622elif test "x$prefix" != xNONE; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002623 ac_site_file1=$prefix/share/config.site
2624 ac_site_file2=$prefix/etc/config.site
Martin v. Löwiseba40652007-08-30 20:10:57 +00002625else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002626 ac_site_file1=$ac_default_prefix/share/config.site
2627 ac_site_file2=$ac_default_prefix/etc/config.site
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002628fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002629for ac_site_file in "$ac_site_file1" "$ac_site_file2"
Martin v. Löwiseba40652007-08-30 20:10:57 +00002630do
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002631 test "x$ac_site_file" = xNONE && continue
2632 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2633 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2634$as_echo "$as_me: loading site script $ac_site_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002635 sed 's/^/| /' "$ac_site_file" >&5
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002636 . "$ac_site_file" \
2637 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2638$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2639as_fn_error $? "failed to load site script $ac_site_file
Matthias Klose3cef2a92012-03-14 23:39:33 +01002640See \`config.log' for more details" "$LINENO" 5; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002641 fi
2642done
2643
2644if test -r "$cache_file"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002645 # Some versions of bash will fail to source /dev/null (special files
2646 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2647 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2648 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2649$as_echo "$as_me: loading cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002650 case $cache_file in
Martin v. Löwiseba40652007-08-30 20:10:57 +00002651 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2652 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00002653 esac
2654 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002655else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002656 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2657$as_echo "$as_me: creating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002658 >$cache_file
2659fi
2660
2661# Check that the precious variables saved in the cache have kept the same
2662# value.
2663ac_cache_corrupted=false
Martin v. Löwiseba40652007-08-30 20:10:57 +00002664for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00002665 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2666 eval ac_new_set=\$ac_env_${ac_var}_set
Martin v. Löwiseba40652007-08-30 20:10:57 +00002667 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2668 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00002669 case $ac_old_set,$ac_new_set in
2670 set,)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002671 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2672$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 +00002673 ac_cache_corrupted=: ;;
2674 ,set)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002675 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2676$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002677 ac_cache_corrupted=: ;;
2678 ,);;
2679 *)
2680 if test "x$ac_old_val" != "x$ac_new_val"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002681 # differences in whitespace do not lead to failure.
2682 ac_old_val_w=`echo x $ac_old_val`
2683 ac_new_val_w=`echo x $ac_new_val`
2684 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2685 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2686$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2687 ac_cache_corrupted=:
2688 else
2689 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2690$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2691 eval $ac_var=\$ac_old_val
2692 fi
2693 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2694$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2695 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2696$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002697 fi;;
2698 esac
2699 # Pass precious variables to config.status.
2700 if test "$ac_new_set" = set; then
2701 case $ac_new_val in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002702 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002703 *) ac_arg=$ac_var=$ac_new_val ;;
2704 esac
2705 case " $ac_configure_args " in
2706 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002707 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002708 esac
2709 fi
2710done
2711if $ac_cache_corrupted; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002712 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2713$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2714 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2715$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002716 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002717fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002718## -------------------- ##
2719## Main body of script. ##
2720## -------------------- ##
Martin v. Löwiseba40652007-08-30 20:10:57 +00002721
Guido van Rossum7f43da71994-08-01 12:15:30 +00002722ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002723ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00002724ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2725ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2726ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002727
Guido van Rossum627b2d71993-12-24 10:39:16 +00002728
Michael W. Hudson54241132001-12-07 15:38:26 +00002729
Martin v. Löwiseba40652007-08-30 20:10:57 +00002730ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00002731
2732
Martin v. Löwis11437992002-04-12 09:54:03 +00002733
Georg Brandlbcd64a32009-03-31 21:45:18 +00002734if test "$prefix" != "/"; then
2735 prefix=`echo "$prefix" | sed -e 's/\/$//g'`
2736fi
2737
2738
Martin v. Löwis11437992002-04-12 09:54:03 +00002739
2740
Martin v. Löwis8316feb2003-06-14 07:48:07 +00002741# We don't use PACKAGE_ variables, and they cause conflicts
2742# with other autoconf-based packages that include Python.h
2743grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
2744rm confdefs.h
2745mv confdefs.h.new confdefs.h
2746
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00002747
Martin v. Löwis174440b2008-10-03 08:59:41 +00002748VERSION=2.7
Guido van Rossum1fd74a71997-07-19 19:36:02 +00002749
Martin v. Löwis1142de32002-03-29 16:28:31 +00002750
2751SOVERSION=1.0
2752
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002753# The later defininition of _XOPEN_SOURCE disables certain features
2754# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
2755
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002756$as_echo "#define _GNU_SOURCE 1" >>confdefs.h
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002757
2758
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002759# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2760# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
2761# them.
2762
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002763$as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002764
2765
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002766# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2767# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
2768# them.
2769
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002770$as_echo "#define __BSD_VISIBLE 1" >>confdefs.h
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002771
2772
Martin v. Löwisd6320502004-08-12 13:45:08 +00002773# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2774# u_int on Irix 5.3. Defining _BSD_TYPES brings it back.
2775
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002776$as_echo "#define _BSD_TYPES 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +00002777
2778
Ronald Oussoren5640ce22008-06-05 12:58:24 +00002779# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2780# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
2781# them.
2782
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002783$as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
Ronald Oussoren5640ce22008-06-05 12:58:24 +00002784
2785
2786
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002787define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002788
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00002789# Arguments passed to configure.
2790
2791CONFIG_ARGS="$ac_configure_args"
2792
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002793{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-universalsdk" >&5
2794$as_echo_n "checking for --enable-universalsdk... " >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00002795# Check whether --enable-universalsdk was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002796if test "${enable_universalsdk+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00002797 enableval=$enable_universalsdk;
Ronald Oussoren988117f2006-04-29 11:31:35 +00002798 case $enableval in
2799 yes)
2800 enableval=/Developer/SDKs/MacOSX10.4u.sdk
Ronald Oussoren3c0a1262010-01-17 19:27:57 +00002801 if test ! -d "${enableval}"
2802 then
2803 enableval=/
2804 fi
Ronald Oussoren988117f2006-04-29 11:31:35 +00002805 ;;
2806 esac
2807 case $enableval in
2808 no)
2809 UNIVERSALSDK=
2810 enable_universalsdk=
2811 ;;
2812 *)
2813 UNIVERSALSDK=$enableval
Ronald Oussoren3c0a1262010-01-17 19:27:57 +00002814 if test ! -d "${UNIVERSALSDK}"
2815 then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002816 as_fn_error $? "--enable-universalsdk specifies non-existing SDK: ${UNIVERSALSDK}" "$LINENO" 5
Ronald Oussoren3c0a1262010-01-17 19:27:57 +00002817 fi
Ronald Oussoren988117f2006-04-29 11:31:35 +00002818 ;;
2819 esac
2820
Ronald Oussoren3c0a1262010-01-17 19:27:57 +00002821
Ronald Oussoren988117f2006-04-29 11:31:35 +00002822else
2823
2824 UNIVERSALSDK=
2825 enable_universalsdk=
2826
Martin v. Löwiseba40652007-08-30 20:10:57 +00002827fi
Ronald Oussoren988117f2006-04-29 11:31:35 +00002828
Ronald Oussoren3c0a1262010-01-17 19:27:57 +00002829if test -n "${UNIVERSALSDK}"
2830then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002831 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSALSDK}" >&5
2832$as_echo "${UNIVERSALSDK}" >&6; }
Ronald Oussoren3c0a1262010-01-17 19:27:57 +00002833else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002834 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2835$as_echo "no" >&6; }
Ronald Oussoren3c0a1262010-01-17 19:27:57 +00002836fi
Ronald Oussoren988117f2006-04-29 11:31:35 +00002837
Martin v. Löwiseba40652007-08-30 20:10:57 +00002838
Benjamin Peterson0e6ea5d2008-07-16 20:17:04 +00002839
2840
Ronald Oussoren5640ce22008-06-05 12:58:24 +00002841UNIVERSAL_ARCHS="32-bit"
Ronald Oussoren92919a62009-12-24 13:30:58 +00002842
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002843{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-universal-archs" >&5
2844$as_echo_n "checking for --with-universal-archs... " >&6; }
Ronald Oussoren5640ce22008-06-05 12:58:24 +00002845
2846# Check whether --with-universal-archs was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002847if test "${with_universal_archs+set}" = set; then :
Ronald Oussoren5640ce22008-06-05 12:58:24 +00002848 withval=$with_universal_archs;
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002849 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
2850$as_echo "$withval" >&6; }
Ronald Oussoren5640ce22008-06-05 12:58:24 +00002851 UNIVERSAL_ARCHS="$withval"
Ronald Oussoren9ebd2422009-09-29 13:00:44 +00002852 if test "${enable_universalsdk}" ; then
2853 :
2854 else
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002855 as_fn_error $? "--with-universal-archs without --enable-universalsdk. See Mac/README" "$LINENO" 5
Ronald Oussoren9ebd2422009-09-29 13:00:44 +00002856 fi
Ronald Oussoren5640ce22008-06-05 12:58:24 +00002857
2858else
2859
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002860 { $as_echo "$as_me:${as_lineno-$LINENO}: result: 32-bit" >&5
2861$as_echo "32-bit" >&6; }
Ronald Oussoren5640ce22008-06-05 12:58:24 +00002862
2863fi
2864
2865
2866
2867
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00002868
2869# Check whether --with-framework-name was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002870if test "${with_framework_name+set}" = set; then :
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00002871 withval=$with_framework_name;
Ronald Oussoren9ebd2422009-09-29 13:00:44 +00002872 if test "${enable_framework}"; then
2873 :
2874 else
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002875 as_fn_error $? "--with-framework-name without --enable-framework. See Mac/README" "$LINENO" 5
Ronald Oussoren9ebd2422009-09-29 13:00:44 +00002876 fi
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00002877 PYTHONFRAMEWORK=${withval}
2878 PYTHONFRAMEWORKDIR=${withval}.framework
2879 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
2880
2881else
2882
2883 PYTHONFRAMEWORK=Python
2884 PYTHONFRAMEWORKDIR=Python.framework
2885 PYTHONFRAMEWORKIDENTIFIER=org.python.python
2886
2887fi
2888
Martin v. Löwiseba40652007-08-30 20:10:57 +00002889# Check whether --enable-framework was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002890if test "${enable_framework+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00002891 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00002892 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00002893 yes)
Jack Jansene578a632001-08-15 01:27:14 +00002894 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00002895 esac
2896 case $enableval in
2897 no)
2898 PYTHONFRAMEWORK=
2899 PYTHONFRAMEWORKDIR=no-framework
2900 PYTHONFRAMEWORKPREFIX=
2901 PYTHONFRAMEWORKINSTALLDIR=
Ronald Oussoren567a8ff2006-05-26 11:43:26 +00002902 FRAMEWORKINSTALLFIRST=
2903 FRAMEWORKINSTALLLAST=
Ronald Oussoren5b787322006-06-06 19:50:24 +00002904 FRAMEWORKALTINSTALLFIRST=
2905 FRAMEWORKALTINSTALLLAST=
Ronald Oussoren2db3a8f2006-06-07 19:06:01 +00002906 if test "x${prefix}" = "xNONE"; then
2907 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
2908 else
2909 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
2910 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00002911 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00002912 ;;
2913 *)
Ronald Oussoren01d149f2010-04-30 11:20:14 +00002914 PYTHONFRAMEWORKPREFIX="${enableval}"
Jack Jansen127e56e2001-09-11 14:41:54 +00002915 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Ronald Oussoren567a8ff2006-05-26 11:43:26 +00002916 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussoren5640ce22008-06-05 12:58:24 +00002917 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure bininstall maninstall"
Ronald Oussoren92919a62009-12-24 13:30:58 +00002918 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
2919 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
Ronald Oussoren01d149f2010-04-30 11:20:14 +00002920 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
Ronald Oussoren5640ce22008-06-05 12:58:24 +00002921
Ronald Oussoren2db3a8f2006-06-07 19:06:01 +00002922 if test "x${prefix}" = "xNONE" ; then
2923 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
Ronald Oussoren01d149f2010-04-30 11:20:14 +00002924
Ronald Oussoren2db3a8f2006-06-07 19:06:01 +00002925 else
2926 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
2927 fi
Ronald Oussoren01d149f2010-04-30 11:20:14 +00002928
2929 case "${enableval}" in
2930 /System*)
2931 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
2932 if test "${prefix}" = "NONE" ; then
2933 # See below
2934 FRAMEWORKUNIXTOOLSPREFIX="/usr"
2935 fi
2936 ;;
2937
2938 /Library*)
2939 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
2940 ;;
2941
2942 */Library/Frameworks)
2943 MDIR="`dirname "${enableval}"`"
2944 MDIR="`dirname "${MDIR}"`"
2945 FRAMEWORKINSTALLAPPSPREFIX="${MDIR}/Applications"
2946
2947 if test "${prefix}" = "NONE"; then
2948 # User hasn't specified the
2949 # --prefix option, but wants to install
2950 # the framework in a non-default location,
2951 # ensure that the compatibility links get
2952 # installed relative to that prefix as well
2953 # instead of in /usr/local.
2954 FRAMEWORKUNIXTOOLSPREFIX="${MDIR}"
2955 fi
2956 ;;
2957
2958 *)
2959 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
2960 ;;
2961 esac
2962
Jack Jansen127e56e2001-09-11 14:41:54 +00002963 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Ronald Oussoren836b0392006-05-14 19:56:34 +00002964
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00002965 # Add files for Mac specific code to the list of output
Ronald Oussoren836b0392006-05-14 19:56:34 +00002966 # files:
Martin v. Löwiseba40652007-08-30 20:10:57 +00002967 ac_config_files="$ac_config_files Mac/Makefile"
Ronald Oussoren836b0392006-05-14 19:56:34 +00002968
Martin v. Löwiseba40652007-08-30 20:10:57 +00002969 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Ronald Oussoren836b0392006-05-14 19:56:34 +00002970
Martin v. Löwiseba40652007-08-30 20:10:57 +00002971 ac_config_files="$ac_config_files Mac/IDLE/Makefile"
Ronald Oussoren836b0392006-05-14 19:56:34 +00002972
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00002973 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
2974
2975 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
2976
Jack Jansene578a632001-08-15 01:27:14 +00002977 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00002978
Guido van Rossum563e7081996-09-10 18:20:48 +00002979else
Martin v. Löwis11437992002-04-12 09:54:03 +00002980
Jack Jansene578a632001-08-15 01:27:14 +00002981 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00002982 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00002983 PYTHONFRAMEWORKPREFIX=
2984 PYTHONFRAMEWORKINSTALLDIR=
Ronald Oussoren567a8ff2006-05-26 11:43:26 +00002985 FRAMEWORKINSTALLFIRST=
2986 FRAMEWORKINSTALLLAST=
Ronald Oussoren5b787322006-06-06 19:50:24 +00002987 FRAMEWORKALTINSTALLFIRST=
2988 FRAMEWORKALTINSTALLLAST=
Ronald Oussoren2db3a8f2006-06-07 19:06:01 +00002989 if test "x${prefix}" = "xNONE" ; then
2990 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
2991 else
2992 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
2993 fi
Jack Jansene578a632001-08-15 01:27:14 +00002994 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002995
Ronald Oussoren5640ce22008-06-05 12:58:24 +00002996
Martin v. Löwiseba40652007-08-30 20:10:57 +00002997fi
2998
Michael W. Hudson54241132001-12-07 15:38:26 +00002999
3000
3001
3002
Jack Jansene578a632001-08-15 01:27:14 +00003003
Ronald Oussoren567a8ff2006-05-26 11:43:26 +00003004
3005
Ronald Oussoren5b787322006-06-06 19:50:24 +00003006
3007
3008
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00003009
Ronald Oussoren01d149f2010-04-30 11:20:14 +00003010
Jack Jansene578a632001-08-15 01:27:14 +00003011##AC_ARG_WITH(dyld,
Matthias Klose22520ea2010-05-08 10:14:46 +00003012## AS_HELP_STRING([--with-dyld],
3013## [Use (OpenStep|Rhapsody) dynamic linker]))
Jack Jansene578a632001-08-15 01:27:14 +00003014##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003015# Set name for machine-dependent library files
3016
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003017{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP" >&5
3018$as_echo_n "checking MACHDEP... " >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003019if test -z "$MACHDEP"
3020then
Guido van Rossum563e7081996-09-10 18:20:48 +00003021 ac_sys_system=`uname -s`
Georg Brandlfe18a112009-09-04 07:55:14 +00003022 if test "$ac_sys_system" = "AIX" \
Martin v. Löwis21ee4092002-09-30 16:19:48 +00003023 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00003024 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003025 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003026 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003027 fi
Guido van Rossum563e7081996-09-10 18:20:48 +00003028 ac_md_system=`echo $ac_sys_system |
3029 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
3030 ac_md_release=`echo $ac_sys_release |
Guido van Rossum67b26592001-10-20 14:21:45 +00003031 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
Guido van Rossumb97ef171997-09-28 05:44:03 +00003032 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00003033
Guido van Rossum07397971997-04-29 21:49:50 +00003034 case $MACHDEP in
Victor Stinneracacbaa2011-08-20 14:02:38 +02003035 linux*) MACHDEP="linux2";;
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00003036 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00003037 darwin*) MACHDEP="darwin";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00003038 atheos*) MACHDEP="atheos";;
Martin v. Löwisf3322282003-07-13 09:46:13 +00003039 irix646) MACHDEP="irix6";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00003040 '') MACHDEP="unknown";;
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003041 esac
3042fi
Guido van Rossum91922671997-10-09 20:24:13 +00003043
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003044# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
3045# disable features if it is defined, without any means to access these
3046# features as extensions. For these systems, we skip the definition of
3047# _XOPEN_SOURCE. Before adding a system to the list to gain access to
3048# some feature, make sure there is no alternative way to access this
3049# feature. Also, when using wildcards, make sure you have verified the
3050# need for not defining _XOPEN_SOURCE on all systems matching the
3051# wildcard, and that the wildcard does not include future systems
3052# (which may remove their limitations).
3053case $ac_sys_system/$ac_sys_release in
3054 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
3055 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00003056 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Martin v. Löwis7875ef62010-02-15 21:41:12 +00003057 # In addition, Stefan Krah confirms that issue #1244610 exists through
3058 # OpenBSD 4.6, but is fixed in 4.7.
Charles-François Natali97781b02011-07-22 23:43:42 +02003059 OpenBSD/2.* | OpenBSD/3.* | OpenBSD/4.[0123456])
Martin v. Löwiscb78de62007-12-29 18:49:21 +00003060 define_xopen_source=no
3061 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3062 # also defined. This can be overridden by defining _BSD_SOURCE
3063 # As this has a different meaning on Linux, only define it on OpenBSD
3064
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003065$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Martin v. Löwiscb78de62007-12-29 18:49:21 +00003066
3067 ;;
Charles-François Natali97781b02011-07-22 23:43:42 +02003068 OpenBSD/*)
Martin v. Löwis5e2dd862010-02-15 08:32:00 +00003069 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3070 # also defined. This can be overridden by defining _BSD_SOURCE
3071 # As this has a different meaning on Linux, only define it on OpenBSD
3072
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003073$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Martin v. Löwis5e2dd862010-02-15 08:32:00 +00003074
3075 ;;
Martin v. Löwis4d542ec2006-11-25 15:39:19 +00003076 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
3077 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
3078 # Marc Recht
Benjamin Petersoneac68f42008-11-16 17:54:55 +00003079 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 +00003080 define_xopen_source=no;;
Martin v. Löwisb41afb52010-05-28 15:28:47 +00003081 # From the perspective of Solaris, _XOPEN_SOURCE is not so much a
3082 # request to enable features supported by the standard as a request
3083 # to disable features not supported by the standard. The best way
3084 # for Python to use Solaris is simply to leave _XOPEN_SOURCE out
3085 # entirely and define __EXTENSIONS__ instead.
3086 SunOS/*)
Martin v. Löwisa9d71422003-03-28 18:43:31 +00003087 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003088 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
3089 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00003090 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00003091 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003092 define_xopen_source=no;;
3093 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003094 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003095 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003096 define_xopen_source=no;;
Martin v. Löwisbb86d832008-11-04 20:40:09 +00003097 # On FreeBSD 4, the math functions C89 does not cover are never defined
3098 # with _XOPEN_SOURCE and __BSD_VISIBLE does not re-enable them.
3099 FreeBSD/4.*)
3100 define_xopen_source=no;;
3101 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
3102 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
3103 # identifies itself as Darwin/7.*
3104 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3105 # disables platform specific features beyond repair.
3106 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3107 # has no effect, don't bother defining them
3108 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00003109 define_xopen_source=no;;
Ronald Oussorena55af9a2010-01-17 16:25:57 +00003110 Darwin/1[0-9].*)
3111 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003112 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
3113 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
3114 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00003115 AIX/4)
3116 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003117 AIX/5)
3118 if test `uname -r` -eq 1; then
3119 define_xopen_source=no
3120 fi
3121 ;;
Martin v. Löwis8c255e42008-05-23 15:06:50 +00003122 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
3123 # defining NI_NUMERICHOST.
3124 QNX/6.3.2)
3125 define_xopen_source=no
3126 ;;
Martin v. Löwisa0588362006-04-04 06:03:50 +00003127
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003128esac
3129
3130if test $define_xopen_source = yes
3131then
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003132
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003133$as_echo "#define _XOPEN_SOURCE 600" >>confdefs.h
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003134
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003135
3136 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
3137 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
3138 # several APIs are not declared. Since this is also needed in some
3139 # cases for HP-UX, we define it globally.
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003140
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003141$as_echo "#define _XOPEN_SOURCE_EXTENDED 1" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003142
3143
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003144
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003145$as_echo "#define _POSIX_C_SOURCE 200112L" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003146
3147
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003148fi
3149
Guido van Rossum91922671997-10-09 20:24:13 +00003150#
3151# SGI compilers allow the specification of the both the ABI and the
3152# ISA on the command line. Depending on the values of these switches,
3153# different and often incompatable code will be generated.
3154#
3155# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
3156# thus supply support for various ABI/ISA combinations. The MACHDEP
3157# variable is also adjusted.
3158#
3159
3160if test ! -z "$SGI_ABI"
3161then
3162 CC="cc $SGI_ABI"
3163 LDFLAGS="$SGI_ABI $LDFLAGS"
3164 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
3165fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003166{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP" >&5
3167$as_echo "$MACHDEP" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003168
Jack Jansen83f898c2002-12-30 22:23:40 +00003169# And add extra plat-mac for darwin
3170
Jack Jansen7b59b422003-03-17 15:44:10 +00003171
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003172{ $as_echo "$as_me:${as_lineno-$LINENO}: checking EXTRAPLATDIR" >&5
3173$as_echo_n "checking EXTRAPLATDIR... " >&6; }
Jack Jansen83f898c2002-12-30 22:23:40 +00003174if test -z "$EXTRAPLATDIR"
3175then
3176 case $MACHDEP in
Jack Jansen7b59b422003-03-17 15:44:10 +00003177 darwin)
3178 EXTRAPLATDIR="\$(PLATMACDIRS)"
3179 EXTRAMACHDEPPATH="\$(PLATMACPATH)"
3180 ;;
3181 *)
3182 EXTRAPLATDIR=""
3183 EXTRAMACHDEPPATH=""
3184 ;;
Jack Jansen83f898c2002-12-30 22:23:40 +00003185 esac
3186fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003187{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXTRAPLATDIR" >&5
3188$as_echo "$EXTRAPLATDIR" >&6; }
Jack Jansen83f898c2002-12-30 22:23:40 +00003189
Jack Jansen6b08a402004-06-03 12:41:45 +00003190# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
3191# it may influence the way we can build extensions, so distutils
3192# needs to check it
3193
Ronald Oussoren988117f2006-04-29 11:31:35 +00003194
Jack Jansen6b08a402004-06-03 12:41:45 +00003195CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Ronald Oussoren988117f2006-04-29 11:31:35 +00003196EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00003197
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003198{ $as_echo "$as_me:${as_lineno-$LINENO}: checking machine type as reported by uname -m" >&5
3199$as_echo_n "checking machine type as reported by uname -m... " >&6; }
Mark Dickinson65134662008-04-25 16:11:04 +00003200ac_sys_machine=`uname -m`
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003201{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_sys_machine" >&5
3202$as_echo "$ac_sys_machine" >&6; }
Mark Dickinson65134662008-04-25 16:11:04 +00003203
Guido van Rossum627b2d71993-12-24 10:39:16 +00003204# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00003205
3206# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
3207# for debug/optimization stuff. BASECFLAGS is for flags that are required
3208# just to get things to compile and link. Users are free to override OPT
3209# when running configure or make. The build should not break if they do.
3210# BASECFLAGS should generally not be messed with, however.
3211
3212# XXX shouldn't some/most/all of this code be merged with the stuff later
3213# on that fiddles with OPT and BASECFLAGS?
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003214{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --without-gcc" >&5
3215$as_echo_n "checking for --without-gcc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003216
Martin v. Löwiseba40652007-08-30 20:10:57 +00003217# Check whether --with-gcc was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003218if test "${with_gcc+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00003219 withval=$with_gcc;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003220 case $withval in
Mark Dickinson04b27232009-01-04 12:29:36 +00003221 no) CC=${CC:-cc}
Guido van Rossumda88dad1995-01-26 00:46:29 +00003222 without_gcc=yes;;
3223 yes) CC=gcc
3224 without_gcc=no;;
3225 *) CC=$withval
3226 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003227 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00003228else
Martin v. Löwis11437992002-04-12 09:54:03 +00003229
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003230 case $ac_sys_system in
Antoine Pitrou285cd162010-09-21 15:23:17 +00003231 AIX*) CC=${CC:-xlc_r}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003232 without_gcc=;;
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003233 BeOS*)
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003234 case $BE_HOST_CPU in
3235 ppc)
Fred Drake5790be12000-10-09 17:06:13 +00003236 CC=mwcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003237 without_gcc=yes
Skip Montanarodecc6a42003-01-01 20:07:49 +00003238 BASECFLAGS="$BASECFLAGS -export pragma"
3239 OPT="$OPT -O"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003240 LDFLAGS="$LDFLAGS -nodup"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003241 ;;
3242 x86)
Fred Drake5790be12000-10-09 17:06:13 +00003243 CC=gcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003244 without_gcc=no
Skip Montanarodecc6a42003-01-01 20:07:49 +00003245 OPT="$OPT -O"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003246 ;;
3247 *)
Georg Brandl71f4fbb2011-02-25 11:04:50 +00003248 as_fn_error $? "Unknown BeOS platform \"$BE_HOST_CPU\"" "$LINENO" 5
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003249 ;;
3250 esac
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003251 AR="\$(srcdir)/Modules/ar_beos"
3252 RANLIB=:
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003253 ;;
Martin v. Löwis130fb172001-07-19 11:00:41 +00003254 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00003255 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00003256fi
3257
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003258{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $without_gcc" >&5
3259$as_echo "$without_gcc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003260
Guido van Rossum8b131c51995-03-09 14:10:13 +00003261# If the user switches compilers, we can't believe the cache
3262if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
3263then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00003264 as_fn_error $? "cached CC is different -- throw away $cache_file
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003265(it is also a good idea to do 'make clean' before compiling)" "$LINENO" 5
Guido van Rossum8b131c51995-03-09 14:10:13 +00003266fi
3267
Trent Nelson15daa352012-12-13 06:46:39 +00003268if test "$MACHDEP" = "irix6" && test "$CC" != "gcc"; then
3269 # Normally, MIPSpro CC treats #error directives as warnings, which means
3270 # a successful exit code is returned (0). This is a problem because IRIX
3271 # has a bunch of system headers with this guard at the top:
3272 #
3273 # #ifndef __c99
3274 # #error This header file is to be used only for c99 mode compilations
3275 # #else
3276 #
3277 # When autoconf tests for such a header, like stdint.h, this happens:
3278 #
3279 # configure:4619: cc -c conftest.c >&5
3280 # cc-1035 cc: WARNING File = /usr/include/stdint.h, Line = 5
3281 # #error directive: This header file is to be used only for c99 mode
3282 # compilations
3283 #
3284 # #error This header file is to be used only for c99 mode compilations
3285 # ^
3286 #
3287 # configure:4619: $? = 0
3288 # configure:4619: result: yes
3289 #
3290 # Therefore, we use `-diag_error 1035` to have the compiler treat the
3291 # warning as an error, which causes cc to return a non-zero result,
3292 # which autoconf can interpret correctly.
3293 CFLAGS="$CFLAGS -diag_error 1035"
3294 # Whilst we're here, we might as well make sure CXX defaults to something
3295 # sensible if we're not using gcc.
3296 if test -z "$CXX"; then
3297 CXX="CC"
3298 fi
3299fi
3300
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00003301# If the user set CFLAGS, use this instead of the automatically
3302# determined setting
3303preset_cflags="$CFLAGS"
Martin v. Löwis11437992002-04-12 09:54:03 +00003304ac_ext=c
3305ac_cpp='$CPP $CPPFLAGS'
3306ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3307ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3308ac_compiler_gnu=$ac_cv_c_compiler_gnu
3309if test -n "$ac_tool_prefix"; then
3310 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3311set dummy ${ac_tool_prefix}gcc; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003312{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3313$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01003314if ${ac_cv_prog_CC+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003315 $as_echo_n "(cached) " >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003316else
3317 if test -n "$CC"; then
3318 ac_cv_prog_CC="$CC" # Let the user override the test.
3319else
Martin v. Löwis11437992002-04-12 09:54:03 +00003320as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3321for as_dir in $PATH
3322do
3323 IFS=$as_save_IFS
3324 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003325 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01003326 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003327 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003328 $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 +00003329 break 2
3330 fi
3331done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003332 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003333IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003334
Jack Jansendd19cf82001-12-06 22:36:17 +00003335fi
3336fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003337CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00003338if test -n "$CC"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003339 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3340$as_echo "$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003341else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003342 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3343$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003344fi
3345
Martin v. Löwiseba40652007-08-30 20:10:57 +00003346
Martin v. Löwis11437992002-04-12 09:54:03 +00003347fi
3348if test -z "$ac_cv_prog_CC"; then
3349 ac_ct_CC=$CC
3350 # Extract the first word of "gcc", so it can be a program name with args.
3351set dummy gcc; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003352{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3353$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01003354if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003355 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003356else
3357 if test -n "$ac_ct_CC"; then
3358 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3359else
3360as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3361for as_dir in $PATH
3362do
3363 IFS=$as_save_IFS
3364 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003365 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01003366 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003367 ac_cv_prog_ac_ct_CC="gcc"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003368 $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 +00003369 break 2
3370 fi
3371done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003372 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003373IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003374
3375fi
3376fi
3377ac_ct_CC=$ac_cv_prog_ac_ct_CC
3378if test -n "$ac_ct_CC"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003379 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3380$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003381else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003382 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3383$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003384fi
3385
Martin v. Löwiseba40652007-08-30 20:10:57 +00003386 if test "x$ac_ct_CC" = x; then
3387 CC=""
3388 else
3389 case $cross_compiling:$ac_tool_warned in
3390yes:)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003391{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3392$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00003393ac_tool_warned=yes ;;
3394esac
3395 CC=$ac_ct_CC
3396 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003397else
3398 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00003399fi
3400
Jack Jansendd19cf82001-12-06 22:36:17 +00003401if test -z "$CC"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00003402 if test -n "$ac_tool_prefix"; then
3403 # 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 +00003404set dummy ${ac_tool_prefix}cc; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003405{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3406$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01003407if ${ac_cv_prog_CC+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003408 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00003409else
3410 if test -n "$CC"; then
3411 ac_cv_prog_CC="$CC" # Let the user override the test.
3412else
Martin v. Löwis11437992002-04-12 09:54:03 +00003413as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3414for as_dir in $PATH
3415do
3416 IFS=$as_save_IFS
3417 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003418 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01003419 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003420 ac_cv_prog_CC="${ac_tool_prefix}cc"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003421 $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 +00003422 break 2
3423 fi
3424done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003425 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003426IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003427
3428fi
3429fi
3430CC=$ac_cv_prog_CC
3431if test -n "$CC"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003432 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3433$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003434else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003435 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3436$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003437fi
3438
Martin v. Löwiseba40652007-08-30 20:10:57 +00003439
Martin v. Löwis11437992002-04-12 09:54:03 +00003440 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003441fi
3442if test -z "$CC"; then
3443 # Extract the first word of "cc", so it can be a program name with args.
3444set dummy cc; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003445{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3446$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01003447if ${ac_cv_prog_CC+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003448 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003449else
3450 if test -n "$CC"; then
3451 ac_cv_prog_CC="$CC" # Let the user override the test.
3452else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003453 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003454as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3455for as_dir in $PATH
3456do
3457 IFS=$as_save_IFS
3458 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003459 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01003460 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003461 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3462 ac_prog_rejected=yes
3463 continue
3464 fi
3465 ac_cv_prog_CC="cc"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003466 $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 +00003467 break 2
3468 fi
3469done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003470 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003471IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003472
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003473if test $ac_prog_rejected = yes; then
3474 # We found a bogon in the path, so make sure we never use it.
3475 set dummy $ac_cv_prog_CC
3476 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00003477 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003478 # We chose a different compiler from the bogus one.
3479 # However, it has the same basename, so the bogon will be chosen
3480 # first if we set CC to just the basename; use the full file name.
3481 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00003482 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003483 fi
3484fi
3485fi
3486fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003487CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003488if test -n "$CC"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003489 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3490$as_echo "$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003491else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003492 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3493$as_echo "no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003494fi
3495
Martin v. Löwiseba40652007-08-30 20:10:57 +00003496
Martin v. Löwis11437992002-04-12 09:54:03 +00003497fi
3498if test -z "$CC"; then
3499 if test -n "$ac_tool_prefix"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00003500 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003501 do
3502 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3503set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003504{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3505$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01003506if ${ac_cv_prog_CC+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003507 $as_echo_n "(cached) " >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003508else
3509 if test -n "$CC"; then
3510 ac_cv_prog_CC="$CC" # Let the user override the test.
3511else
Martin v. Löwis11437992002-04-12 09:54:03 +00003512as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3513for as_dir in $PATH
3514do
3515 IFS=$as_save_IFS
3516 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003517 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01003518 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003519 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003520 $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 +00003521 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00003522 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003523done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003524 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003525IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003526
3527fi
3528fi
3529CC=$ac_cv_prog_CC
3530if test -n "$CC"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003531 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3532$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003533else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003534 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3535$as_echo "no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003536fi
3537
Martin v. Löwiseba40652007-08-30 20:10:57 +00003538
Martin v. Löwis11437992002-04-12 09:54:03 +00003539 test -n "$CC" && break
3540 done
3541fi
3542if test -z "$CC"; then
3543 ac_ct_CC=$CC
Martin v. Löwiseba40652007-08-30 20:10:57 +00003544 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003545do
3546 # Extract the first word of "$ac_prog", so it can be a program name with args.
3547set dummy $ac_prog; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003548{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3549$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01003550if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003551 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003552else
3553 if test -n "$ac_ct_CC"; then
3554 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3555else
3556as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3557for as_dir in $PATH
3558do
3559 IFS=$as_save_IFS
3560 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003561 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01003562 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003563 ac_cv_prog_ac_ct_CC="$ac_prog"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003564 $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 +00003565 break 2
3566 fi
3567done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003568 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003569IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00003570
Martin v. Löwis11437992002-04-12 09:54:03 +00003571fi
3572fi
3573ac_ct_CC=$ac_cv_prog_ac_ct_CC
3574if test -n "$ac_ct_CC"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003575 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3576$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003577else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003578 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3579$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003580fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003581
Martin v. Löwiseba40652007-08-30 20:10:57 +00003582
Martin v. Löwis11437992002-04-12 09:54:03 +00003583 test -n "$ac_ct_CC" && break
3584done
Michael W. Hudson54241132001-12-07 15:38:26 +00003585
Martin v. Löwiseba40652007-08-30 20:10:57 +00003586 if test "x$ac_ct_CC" = x; then
3587 CC=""
3588 else
3589 case $cross_compiling:$ac_tool_warned in
3590yes:)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003591{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3592$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00003593ac_tool_warned=yes ;;
3594esac
3595 CC=$ac_ct_CC
3596 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003597fi
3598
3599fi
3600
3601
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003602test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3603$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00003604as_fn_error $? "no acceptable C compiler found in \$PATH
Matthias Klose3cef2a92012-03-14 23:39:33 +01003605See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003606
3607# Provide some information about the compiler.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003608$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3609set X $ac_compile
3610ac_compiler=$2
3611for ac_option in --version -v -V -qversion; do
3612 { { ac_try="$ac_compiler $ac_option >&5"
Martin v. Löwiseba40652007-08-30 20:10:57 +00003613case "(($ac_try" in
3614 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3615 *) ac_try_echo=$ac_try;;
3616esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003617eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3618$as_echo "$ac_try_echo"; } >&5
3619 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003620 ac_status=$?
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003621 if test -s conftest.err; then
3622 sed '10a\
3623... rest of stderr output deleted ...
3624 10q' conftest.err >conftest.er1
3625 cat conftest.er1 >&5
3626 fi
3627 rm -f conftest.er1 conftest.err
3628 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3629 test $ac_status = 0; }
3630done
Martin v. Löwis11437992002-04-12 09:54:03 +00003631
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003632cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003633/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00003634
Martin v. Löwis11437992002-04-12 09:54:03 +00003635int
3636main ()
3637{
3638
3639 ;
3640 return 0;
3641}
3642_ACEOF
3643ac_clean_files_save=$ac_clean_files
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003644ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00003645# Try to create an executable without -o first, disregard a.out.
3646# It will help us diagnose broken compilers, and finding out an intuition
3647# of exeext.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003648{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3649$as_echo_n "checking whether the C compiler works... " >&6; }
3650ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3651
3652# The possible output files:
3653ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3654
Martin v. Löwiseba40652007-08-30 20:10:57 +00003655ac_rmfiles=
3656for ac_file in $ac_files
3657do
3658 case $ac_file in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003659 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00003660 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3661 esac
3662done
3663rm -f $ac_rmfiles
3664
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003665if { { ac_try="$ac_link_default"
Martin v. Löwiseba40652007-08-30 20:10:57 +00003666case "(($ac_try" in
3667 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3668 *) ac_try_echo=$ac_try;;
3669esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003670eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3671$as_echo "$ac_try_echo"; } >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003672 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003673 ac_status=$?
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003674 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3675 test $ac_status = 0; }; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00003676 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3677# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3678# in a Makefile. We should not override ac_cv_exeext if it was cached,
3679# so that the user can short-circuit this test for compilers unknown to
3680# Autoconf.
3681for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00003682do
3683 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00003684 case $ac_file in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003685 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
Skip Montanarof0d5f792004-08-15 14:08:23 +00003686 ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003687 [ab].out )
Skip Montanarof0d5f792004-08-15 14:08:23 +00003688 # We found the default executable, but exeext='' is most
3689 # certainly right.
3690 break;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003691 *.* )
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003692 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
Martin v. Löwiseba40652007-08-30 20:10:57 +00003693 then :; else
3694 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3695 fi
3696 # We set ac_cv_exeext here because the later test for it is not
3697 # safe: cross compilers may not add the suffix if given an `-o'
3698 # argument, so we may need to know it at that point already.
3699 # Even if this section looks crufty: it has the advantage of
3700 # actually working.
Skip Montanarof0d5f792004-08-15 14:08:23 +00003701 break;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003702 * )
Skip Montanarof0d5f792004-08-15 14:08:23 +00003703 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003704 esac
3705done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003706test "$ac_cv_exeext" = no && ac_cv_exeext=
3707
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003708else
Martin v. Löwiseba40652007-08-30 20:10:57 +00003709 ac_file=''
3710fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003711if test -z "$ac_file"; then :
3712 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3713$as_echo "no" >&6; }
3714$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003715sed 's/^/| /' conftest.$ac_ext >&5
3716
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003717{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3718$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00003719as_fn_error 77 "C compiler cannot create executables
Matthias Klose3cef2a92012-03-14 23:39:33 +01003720See \`config.log' for more details" "$LINENO" 5; }
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003721else
3722 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3723$as_echo "yes" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003724fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003725{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3726$as_echo_n "checking for C compiler default output file name... " >&6; }
3727{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3728$as_echo "$ac_file" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003729ac_exeext=$ac_cv_exeext
Michael W. Hudson54241132001-12-07 15:38:26 +00003730
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003731rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
Martin v. Löwis11437992002-04-12 09:54:03 +00003732ac_clean_files=$ac_clean_files_save
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003733{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3734$as_echo_n "checking for suffix of executables... " >&6; }
3735if { { ac_try="$ac_link"
Martin v. Löwiseba40652007-08-30 20:10:57 +00003736case "(($ac_try" in
3737 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3738 *) ac_try_echo=$ac_try;;
3739esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003740eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3741$as_echo "$ac_try_echo"; } >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003742 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003743 ac_status=$?
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003744 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3745 test $ac_status = 0; }; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00003746 # If both `conftest.exe' and `conftest' are `present' (well, observable)
3747# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
3748# work properly (i.e., refer to `conftest.exe'), while it won't with
3749# `rm'.
Skip Montanaro6dead952003-09-25 14:50:04 +00003750for ac_file in conftest.exe conftest conftest.*; do
3751 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00003752 case $ac_file in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003753 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003754 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
Skip Montanarof0d5f792004-08-15 14:08:23 +00003755 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003756 * ) break;;
3757 esac
3758done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003759else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003760 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3761$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00003762as_fn_error $? "cannot compute suffix of executables: cannot compile and link
Matthias Klose3cef2a92012-03-14 23:39:33 +01003763See \`config.log' for more details" "$LINENO" 5; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003764fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003765rm -f conftest conftest$ac_cv_exeext
3766{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3767$as_echo "$ac_cv_exeext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003768
3769rm -f conftest.$ac_ext
3770EXEEXT=$ac_cv_exeext
3771ac_exeext=$EXEEXT
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003772cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3773/* end confdefs.h. */
3774#include <stdio.h>
3775int
3776main ()
3777{
3778FILE *f = fopen ("conftest.out", "w");
3779 return ferror (f) || fclose (f) != 0;
3780
3781 ;
3782 return 0;
3783}
Skip Montanaro6dead952003-09-25 14:50:04 +00003784_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003785ac_clean_files="$ac_clean_files conftest.out"
3786# Check that the compiler produces executables we can run. If not, either
3787# the compiler is broken, or we cross compile.
3788{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
3789$as_echo_n "checking whether we are cross compiling... " >&6; }
3790if test "$cross_compiling" != yes; then
3791 { { ac_try="$ac_link"
3792case "(($ac_try" in
3793 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3794 *) ac_try_echo=$ac_try;;
3795esac
3796eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3797$as_echo "$ac_try_echo"; } >&5
3798 (eval "$ac_link") 2>&5
3799 ac_status=$?
3800 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3801 test $ac_status = 0; }
3802 if { ac_try='./conftest$ac_cv_exeext'
3803 { { case "(($ac_try" in
3804 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3805 *) ac_try_echo=$ac_try;;
3806esac
3807eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3808$as_echo "$ac_try_echo"; } >&5
3809 (eval "$ac_try") 2>&5
3810 ac_status=$?
3811 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3812 test $ac_status = 0; }; }; then
3813 cross_compiling=no
3814 else
3815 if test "$cross_compiling" = maybe; then
3816 cross_compiling=yes
3817 else
3818 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3819$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00003820as_fn_error $? "cannot run C compiled programs.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003821If you meant to cross compile, use \`--host'.
Matthias Klose3cef2a92012-03-14 23:39:33 +01003822See \`config.log' for more details" "$LINENO" 5; }
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003823 fi
3824 fi
3825fi
3826{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
3827$as_echo "$cross_compiling" >&6; }
3828
3829rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
3830ac_clean_files=$ac_clean_files_save
3831{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
3832$as_echo_n "checking for suffix of object files... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01003833if ${ac_cv_objext+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003834 $as_echo_n "(cached) " >&6
3835else
3836 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003837/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003838
Martin v. Löwis11437992002-04-12 09:54:03 +00003839int
3840main ()
3841{
3842
3843 ;
3844 return 0;
3845}
3846_ACEOF
3847rm -f conftest.o conftest.obj
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003848if { { ac_try="$ac_compile"
Martin v. Löwiseba40652007-08-30 20:10:57 +00003849case "(($ac_try" in
3850 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3851 *) ac_try_echo=$ac_try;;
3852esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003853eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3854$as_echo "$ac_try_echo"; } >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003855 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003856 ac_status=$?
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003857 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3858 test $ac_status = 0; }; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00003859 for ac_file in conftest.o conftest.obj conftest.*; do
3860 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00003861 case $ac_file in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003862 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003863 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3864 break;;
3865 esac
3866done
3867else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003868 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003869sed 's/^/| /' conftest.$ac_ext >&5
3870
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003871{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3872$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00003873as_fn_error $? "cannot compute suffix of object files: cannot compile
Matthias Klose3cef2a92012-03-14 23:39:33 +01003874See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003875fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003876rm -f conftest.$ac_cv_objext conftest.$ac_ext
3877fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003878{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
3879$as_echo "$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003880OBJEXT=$ac_cv_objext
3881ac_objext=$OBJEXT
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003882{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
3883$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01003884if ${ac_cv_c_compiler_gnu+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003885 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003886else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003887 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003888/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003889
Martin v. Löwis11437992002-04-12 09:54:03 +00003890int
3891main ()
3892{
3893#ifndef __GNUC__
3894 choke me
3895#endif
3896
3897 ;
3898 return 0;
3899}
3900_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003901if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00003902 ac_compiler_gnu=yes
3903else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003904 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003905fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003906rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00003907ac_cv_c_compiler_gnu=$ac_compiler_gnu
3908
3909fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003910{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
3911$as_echo "$ac_cv_c_compiler_gnu" >&6; }
3912if test $ac_compiler_gnu = yes; then
3913 GCC=yes
3914else
3915 GCC=
3916fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003917ac_test_CFLAGS=${CFLAGS+set}
3918ac_save_CFLAGS=$CFLAGS
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003919{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
3920$as_echo_n "checking whether $CC accepts -g... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01003921if ${ac_cv_prog_cc_g+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003922 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003923else
Martin v. Löwiseba40652007-08-30 20:10:57 +00003924 ac_save_c_werror_flag=$ac_c_werror_flag
3925 ac_c_werror_flag=yes
3926 ac_cv_prog_cc_g=no
3927 CFLAGS="-g"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003928 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003929/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003930
Martin v. Löwis11437992002-04-12 09:54:03 +00003931int
3932main ()
3933{
3934
3935 ;
3936 return 0;
3937}
3938_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003939if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumf78abae1997-01-21 22:02:36 +00003940 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003941else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003942 CFLAGS=""
3943 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +00003944/* end confdefs.h. */
3945
3946int
3947main ()
3948{
3949
3950 ;
3951 return 0;
3952}
3953_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003954if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00003955
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003956else
3957 ac_c_werror_flag=$ac_save_c_werror_flag
Martin v. Löwiseba40652007-08-30 20:10:57 +00003958 CFLAGS="-g"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003959 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +00003960/* end confdefs.h. */
3961
3962int
3963main ()
3964{
3965
3966 ;
3967 return 0;
3968}
3969_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003970if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00003971 ac_cv_prog_cc_g=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00003972fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003973rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003974fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003975rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3976fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003977rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3978 ac_c_werror_flag=$ac_save_c_werror_flag
3979fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003980{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
3981$as_echo "$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003982if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003983 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003984elif test $ac_cv_prog_cc_g = yes; then
3985 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00003986 CFLAGS="-g -O2"
3987 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003988 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003989 fi
3990else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003991 if test "$GCC" = yes; then
3992 CFLAGS="-O2"
3993 else
3994 CFLAGS=
3995 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003996fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003997{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
3998$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01003999if ${ac_cv_prog_cc_c89+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004000 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004001else
Martin v. Löwiseba40652007-08-30 20:10:57 +00004002 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00004003ac_save_CC=$CC
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004004cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004005/* end confdefs.h. */
4006#include <stdarg.h>
4007#include <stdio.h>
Charles-François Natalibe2b9072013-01-08 19:47:00 +01004008struct stat;
Skip Montanaro6dead952003-09-25 14:50:04 +00004009/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4010struct buf { int x; };
4011FILE * (*rcsopen) (struct buf *, struct stat *, int);
4012static char *e (p, i)
4013 char **p;
4014 int i;
4015{
4016 return p[i];
4017}
4018static char *f (char * (*g) (char **, int), char **p, ...)
4019{
4020 char *s;
4021 va_list v;
4022 va_start (v,p);
4023 s = g (p, va_arg (v,int));
4024 va_end (v);
4025 return s;
4026}
Skip Montanarof0d5f792004-08-15 14:08:23 +00004027
4028/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
4029 function prototypes and stuff, but not '\xHH' hex character constants.
4030 These don't provoke an error unfortunately, instead are silently treated
Martin v. Löwiseba40652007-08-30 20:10:57 +00004031 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00004032 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
4033 array size at least. It's necessary to write '\x00'==0 to get something
Martin v. Löwiseba40652007-08-30 20:10:57 +00004034 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00004035int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4036
Martin v. Löwiseba40652007-08-30 20:10:57 +00004037/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4038 inside strings and character constants. */
4039#define FOO(x) 'x'
4040int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4041
Skip Montanaro6dead952003-09-25 14:50:04 +00004042int test (int i, double x);
4043struct s1 {int (*f) (int a);};
4044struct s2 {int (*f) (double a);};
4045int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4046int argc;
4047char **argv;
4048int
4049main ()
4050{
4051return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4052 ;
4053 return 0;
4054}
4055_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00004056for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4057 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00004058do
4059 CC="$ac_save_CC $ac_arg"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004060 if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00004061 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00004062fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004063rm -f core conftest.err conftest.$ac_objext
4064 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00004065done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004066rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004067CC=$ac_save_CC
4068
4069fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004070# AC_CACHE_VAL
4071case "x$ac_cv_prog_cc_c89" in
4072 x)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004073 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4074$as_echo "none needed" >&6; } ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00004075 xno)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004076 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4077$as_echo "unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004078 *)
Martin v. Löwiseba40652007-08-30 20:10:57 +00004079 CC="$CC $ac_cv_prog_cc_c89"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004080 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4081$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004082esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004083if test "x$ac_cv_prog_cc_c89" != xno; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004084
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004085fi
Skip Montanaro6dead952003-09-25 14:50:04 +00004086
Martin v. Löwis11437992002-04-12 09:54:03 +00004087ac_ext=c
4088ac_cpp='$CPP $CPPFLAGS'
4089ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4090ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4091ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004092
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00004093if test ! -z "$preset_cflags"
4094then
4095 CFLAGS=$preset_cflags
4096fi
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004097
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004098
4099
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004100{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-cxx-main=<compiler>" >&5
4101$as_echo_n "checking for --with-cxx-main=<compiler>... " >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004102
Martin v. Löwiseba40652007-08-30 20:10:57 +00004103# Check whether --with-cxx_main was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004104if test "${with_cxx_main+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00004105 withval=$with_cxx_main;
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004106
4107 case $withval in
4108 no) with_cxx_main=no
4109 MAINCC='$(CC)';;
4110 yes) with_cxx_main=yes
4111 MAINCC='$(CXX)';;
4112 *) with_cxx_main=yes
4113 MAINCC=$withval
4114 if test -z "$CXX"
4115 then
4116 CXX=$withval
4117 fi;;
4118 esac
4119else
4120
4121 with_cxx_main=no
4122 MAINCC='$(CC)'
4123
Martin v. Löwiseba40652007-08-30 20:10:57 +00004124fi
4125
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004126{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_cxx_main" >&5
4127$as_echo "$with_cxx_main" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004128
4129preset_cxx="$CXX"
4130if test -z "$CXX"
4131then
4132 case "$CC" in
4133 gcc) # Extract the first word of "g++", so it can be a program name with args.
4134set dummy g++; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004135{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4136$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01004137if ${ac_cv_path_CXX+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004138 $as_echo_n "(cached) " >&6
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004139else
4140 case $CXX in
4141 [\\/]* | ?:[\\/]*)
4142 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4143 ;;
4144 *)
4145 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4146for as_dir in notfound
4147do
4148 IFS=$as_save_IFS
4149 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004150 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01004151 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004152 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004153 $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 +00004154 break 2
4155 fi
4156done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004157 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004158IFS=$as_save_IFS
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004159
4160 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="g++"
4161 ;;
4162esac
4163fi
4164CXX=$ac_cv_path_CXX
Skip Montanaro89e975f2007-08-22 19:05:21 +00004165if test -n "$CXX"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004166 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4167$as_echo "$CXX" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00004168else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004169 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4170$as_echo "no" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00004171fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004172
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004173 ;;
4174 cc) # Extract the first word of "c++", so it can be a program name with args.
4175set dummy c++; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004176{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4177$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01004178if ${ac_cv_path_CXX+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004179 $as_echo_n "(cached) " >&6
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004180else
4181 case $CXX in
4182 [\\/]* | ?:[\\/]*)
4183 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4184 ;;
4185 *)
4186 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4187for as_dir in notfound
4188do
4189 IFS=$as_save_IFS
4190 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004191 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01004192 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004193 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004194 $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 +00004195 break 2
4196 fi
4197done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004198 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004199IFS=$as_save_IFS
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004200
4201 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="c++"
4202 ;;
4203esac
4204fi
4205CXX=$ac_cv_path_CXX
Skip Montanaro89e975f2007-08-22 19:05:21 +00004206if test -n "$CXX"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004207 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4208$as_echo "$CXX" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00004209else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004210 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4211$as_echo "no" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00004212fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004213
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004214 ;;
4215 esac
4216 if test "$CXX" = "notfound"
4217 then
4218 CXX=""
4219 fi
4220fi
4221if test -z "$CXX"
4222then
4223 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
4224do
4225 # Extract the first word of "$ac_prog", so it can be a program name with args.
4226set dummy $ac_prog; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004227{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4228$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01004229if ${ac_cv_prog_CXX+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004230 $as_echo_n "(cached) " >&6
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004231else
4232 if test -n "$CXX"; then
4233 ac_cv_prog_CXX="$CXX" # Let the user override the test.
4234else
4235as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4236for as_dir in $PATH
4237do
4238 IFS=$as_save_IFS
4239 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004240 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01004241 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004242 ac_cv_prog_CXX="$ac_prog"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004243 $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 +00004244 break 2
4245 fi
4246done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004247 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004248IFS=$as_save_IFS
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004249
4250fi
4251fi
4252CXX=$ac_cv_prog_CXX
4253if test -n "$CXX"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004254 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4255$as_echo "$CXX" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004256else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004257 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4258$as_echo "no" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004259fi
4260
Martin v. Löwiseba40652007-08-30 20:10:57 +00004261
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004262 test -n "$CXX" && break
4263done
4264test -n "$CXX" || CXX="notfound"
4265
4266 if test "$CXX" = "notfound"
4267 then
4268 CXX=""
4269 fi
4270fi
4271if test "$preset_cxx" != "$CXX"
4272then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004273 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004274
4275 By default, distutils will build C++ extension modules with \"$CXX\".
4276 If this is not intended, then set CXX on the configure command line.
4277 " >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004278$as_echo "$as_me: WARNING:
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004279
4280 By default, distutils will build C++ extension modules with \"$CXX\".
4281 If this is not intended, then set CXX on the configure command line.
4282 " >&2;}
4283fi
4284
doko@python.org4e63fbe2013-01-25 13:08:27 +01004285MULTIARCH=$($CC --print-multiarch 2>/dev/null)
4286
4287
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004288
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004289# checks for UNIX variants that set C preprocessor variables
Martin v. Löwis11437992002-04-12 09:54:03 +00004290
4291ac_ext=c
4292ac_cpp='$CPP $CPPFLAGS'
4293ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4294ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4295ac_compiler_gnu=$ac_cv_c_compiler_gnu
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004296{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4297$as_echo_n "checking how to run the C preprocessor... " >&6; }
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004298# On Suns, sometimes $CPP names a directory.
4299if test -n "$CPP" && test -d "$CPP"; then
4300 CPP=
4301fi
4302if test -z "$CPP"; then
Matthias Klose3cef2a92012-03-14 23:39:33 +01004303 if ${ac_cv_prog_CPP+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004304 $as_echo_n "(cached) " >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004305else
Martin v. Löwis11437992002-04-12 09:54:03 +00004306 # Double quotes because CPP needs to be expanded
4307 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4308 do
4309 ac_preproc_ok=false
4310for ac_c_preproc_warn_flag in '' yes
4311do
4312 # Use a header file that comes with gcc, so configuring glibc
4313 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00004314 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4315 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004316 # On the NeXT, cc -E runs the code through the compiler's parser,
Martin v. Löwis11437992002-04-12 09:54:03 +00004317 # not just through cpp. "Syntax error" is here to catch this case.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004318 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004319/* end confdefs.h. */
4320#ifdef __STDC__
4321# include <limits.h>
4322#else
4323# include <assert.h>
4324#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00004325 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00004326_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004327if ac_fn_c_try_cpp "$LINENO"; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004328
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004329else
Martin v. Löwis11437992002-04-12 09:54:03 +00004330 # Broken: fails on valid input.
4331continue
Jack Jansendd19cf82001-12-06 22:36:17 +00004332fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004333rm -f conftest.err conftest.i conftest.$ac_ext
Jack Jansendd19cf82001-12-06 22:36:17 +00004334
Martin v. Löwiseba40652007-08-30 20:10:57 +00004335 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00004336 # can be detected and how.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004337 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004338/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004339#include <ac_nonexistent.h>
4340_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004341if ac_fn_c_try_cpp "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004342 # Broken: success on invalid input.
4343continue
4344else
Martin v. Löwis11437992002-04-12 09:54:03 +00004345 # Passes both tests.
4346ac_preproc_ok=:
4347break
4348fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004349rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004350
4351done
4352# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004353rm -f conftest.i conftest.err conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004354if $ac_preproc_ok; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004355 break
4356fi
4357
4358 done
4359 ac_cv_prog_CPP=$CPP
4360
4361fi
4362 CPP=$ac_cv_prog_CPP
4363else
4364 ac_cv_prog_CPP=$CPP
4365fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004366{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4367$as_echo "$CPP" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004368ac_preproc_ok=false
4369for ac_c_preproc_warn_flag in '' yes
4370do
4371 # Use a header file that comes with gcc, so configuring glibc
4372 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00004373 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4374 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis11437992002-04-12 09:54:03 +00004375 # On the NeXT, cc -E runs the code through the compiler's parser,
4376 # not just through cpp. "Syntax error" is here to catch this case.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004377 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004378/* end confdefs.h. */
4379#ifdef __STDC__
4380# include <limits.h>
4381#else
4382# include <assert.h>
4383#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00004384 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00004385_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004386if ac_fn_c_try_cpp "$LINENO"; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004387
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004388else
Martin v. Löwis11437992002-04-12 09:54:03 +00004389 # Broken: fails on valid input.
4390continue
4391fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004392rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004393
Martin v. Löwiseba40652007-08-30 20:10:57 +00004394 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00004395 # can be detected and how.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004396 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004397/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004398#include <ac_nonexistent.h>
4399_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004400if ac_fn_c_try_cpp "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004401 # Broken: success on invalid input.
4402continue
4403else
Martin v. Löwis11437992002-04-12 09:54:03 +00004404 # Passes both tests.
4405ac_preproc_ok=:
4406break
4407fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004408rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004409
4410done
4411# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004412rm -f conftest.i conftest.err conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004413if $ac_preproc_ok; then :
4414
Martin v. Löwis11437992002-04-12 09:54:03 +00004415else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004416 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4417$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004418as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
Matthias Klose3cef2a92012-03-14 23:39:33 +01004419See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004420fi
4421
4422ac_ext=c
4423ac_cpp='$CPP $CPPFLAGS'
4424ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4425ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4426ac_compiler_gnu=$ac_cv_c_compiler_gnu
4427
4428
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004429{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4430$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01004431if ${ac_cv_path_GREP+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004432 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004433else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004434 if test -z "$GREP"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00004435 ac_path_GREP_found=false
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004436 # Loop through the user's path and test for each of PROGNAME-LIST
4437 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwiseba40652007-08-30 20:10:57 +00004438for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4439do
4440 IFS=$as_save_IFS
4441 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004442 for ac_prog in grep ggrep; do
4443 for ac_exec_ext in '' $ac_executable_extensions; do
4444 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
Charles-François Natalibe2b9072013-01-08 19:47:00 +01004445 as_fn_executable_p "$ac_path_GREP" || continue
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004446# Check for GNU ac_path_GREP and select it if it is found.
Martin v. Löwiseba40652007-08-30 20:10:57 +00004447 # Check for GNU $ac_path_GREP
4448case `"$ac_path_GREP" --version 2>&1` in
4449*GNU*)
4450 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4451*)
4452 ac_count=0
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004453 $as_echo_n 0123456789 >"conftest.in"
Martin v. Löwiseba40652007-08-30 20:10:57 +00004454 while :
4455 do
4456 cat "conftest.in" "conftest.in" >"conftest.tmp"
4457 mv "conftest.tmp" "conftest.in"
4458 cp "conftest.in" "conftest.nl"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004459 $as_echo 'GREP' >> "conftest.nl"
Martin v. Löwiseba40652007-08-30 20:10:57 +00004460 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4461 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004462 as_fn_arith $ac_count + 1 && ac_count=$as_val
Martin v. Löwiseba40652007-08-30 20:10:57 +00004463 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4464 # Best one so far, save it but keep looking for a better one
4465 ac_cv_path_GREP="$ac_path_GREP"
4466 ac_path_GREP_max=$ac_count
Skip Montanaro6dead952003-09-25 14:50:04 +00004467 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004468 # 10*(2^10) chars as input seems more than enough
4469 test $ac_count -gt 10 && break
4470 done
4471 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4472esac
4473
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004474 $ac_path_GREP_found && break 3
4475 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004476 done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004477 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004478IFS=$as_save_IFS
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004479 if test -z "$ac_cv_path_GREP"; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004480 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 +00004481 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004482else
4483 ac_cv_path_GREP=$GREP
4484fi
4485
Martin v. Löwiseba40652007-08-30 20:10:57 +00004486fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004487{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4488$as_echo "$ac_cv_path_GREP" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00004489 GREP="$ac_cv_path_GREP"
4490
4491
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004492{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
4493$as_echo_n "checking for egrep... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01004494if ${ac_cv_path_EGREP+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004495 $as_echo_n "(cached) " >&6
Martin v. Löwiseba40652007-08-30 20:10:57 +00004496else
4497 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
4498 then ac_cv_path_EGREP="$GREP -E"
4499 else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004500 if test -z "$EGREP"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00004501 ac_path_EGREP_found=false
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004502 # Loop through the user's path and test for each of PROGNAME-LIST
4503 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwiseba40652007-08-30 20:10:57 +00004504for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4505do
4506 IFS=$as_save_IFS
4507 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004508 for ac_prog in egrep; do
4509 for ac_exec_ext in '' $ac_executable_extensions; do
4510 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
Charles-François Natalibe2b9072013-01-08 19:47:00 +01004511 as_fn_executable_p "$ac_path_EGREP" || continue
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004512# Check for GNU ac_path_EGREP and select it if it is found.
Martin v. Löwiseba40652007-08-30 20:10:57 +00004513 # Check for GNU $ac_path_EGREP
4514case `"$ac_path_EGREP" --version 2>&1` in
4515*GNU*)
4516 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
4517*)
4518 ac_count=0
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004519 $as_echo_n 0123456789 >"conftest.in"
Martin v. Löwiseba40652007-08-30 20:10:57 +00004520 while :
4521 do
4522 cat "conftest.in" "conftest.in" >"conftest.tmp"
4523 mv "conftest.tmp" "conftest.in"
4524 cp "conftest.in" "conftest.nl"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004525 $as_echo 'EGREP' >> "conftest.nl"
Martin v. Löwiseba40652007-08-30 20:10:57 +00004526 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4527 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004528 as_fn_arith $ac_count + 1 && ac_count=$as_val
Martin v. Löwiseba40652007-08-30 20:10:57 +00004529 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
4530 # Best one so far, save it but keep looking for a better one
4531 ac_cv_path_EGREP="$ac_path_EGREP"
4532 ac_path_EGREP_max=$ac_count
4533 fi
4534 # 10*(2^10) chars as input seems more than enough
4535 test $ac_count -gt 10 && break
4536 done
4537 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4538esac
4539
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004540 $ac_path_EGREP_found && break 3
4541 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004542 done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004543 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004544IFS=$as_save_IFS
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004545 if test -z "$ac_cv_path_EGREP"; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004546 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 +00004547 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004548else
4549 ac_cv_path_EGREP=$EGREP
4550fi
4551
Martin v. Löwiseba40652007-08-30 20:10:57 +00004552 fi
4553fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004554{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
4555$as_echo "$ac_cv_path_EGREP" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00004556 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00004557
4558
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004559{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
4560$as_echo_n "checking for ANSI C header files... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01004561if ${ac_cv_header_stdc+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004562 $as_echo_n "(cached) " >&6
4563else
4564 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitrouf2caeed2009-05-24 20:23:57 +00004565/* end confdefs.h. */
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004566#include <stdlib.h>
4567#include <stdarg.h>
4568#include <string.h>
4569#include <float.h>
4570
4571int
4572main ()
4573{
4574
4575 ;
4576 return 0;
4577}
4578_ACEOF
4579if ac_fn_c_try_compile "$LINENO"; then :
4580 ac_cv_header_stdc=yes
4581else
4582 ac_cv_header_stdc=no
4583fi
4584rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4585
4586if test $ac_cv_header_stdc = yes; then
4587 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4588 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4589/* end confdefs.h. */
4590#include <string.h>
Antoine Pitrouf2caeed2009-05-24 20:23:57 +00004591
Antoine Pitrouf2caeed2009-05-24 20:23:57 +00004592_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004593if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004594 $EGREP "memchr" >/dev/null 2>&1; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004595
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004596else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004597 ac_cv_header_stdc=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004598fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00004599rm -f conftest*
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004600
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004601fi
4602
4603if test $ac_cv_header_stdc = yes; then
4604 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4605 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4606/* end confdefs.h. */
4607#include <stdlib.h>
4608
4609_ACEOF
4610if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4611 $EGREP "free" >/dev/null 2>&1; then :
4612
4613else
4614 ac_cv_header_stdc=no
4615fi
4616rm -f conftest*
4617
4618fi
4619
4620if test $ac_cv_header_stdc = yes; then
4621 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4622 if test "$cross_compiling" = yes; then :
4623 :
4624else
4625 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4626/* end confdefs.h. */
4627#include <ctype.h>
4628#include <stdlib.h>
4629#if ((' ' & 0x0FF) == 0x020)
4630# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4631# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4632#else
4633# define ISLOWER(c) \
4634 (('a' <= (c) && (c) <= 'i') \
4635 || ('j' <= (c) && (c) <= 'r') \
4636 || ('s' <= (c) && (c) <= 'z'))
4637# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4638#endif
4639
4640#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4641int
4642main ()
4643{
4644 int i;
4645 for (i = 0; i < 256; i++)
4646 if (XOR (islower (i), ISLOWER (i))
4647 || toupper (i) != TOUPPER (i))
4648 return 2;
4649 return 0;
4650}
4651_ACEOF
4652if ac_fn_c_try_run "$LINENO"; then :
4653
4654else
4655 ac_cv_header_stdc=no
4656fi
4657rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4658 conftest.$ac_objext conftest.beam conftest.$ac_ext
4659fi
4660
4661fi
4662fi
4663{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
4664$as_echo "$ac_cv_header_stdc" >&6; }
4665if test $ac_cv_header_stdc = yes; then
4666
4667$as_echo "#define STDC_HEADERS 1" >>confdefs.h
4668
4669fi
4670
4671# On IRIX 5.3, sys/types and inttypes.h are conflicting.
4672for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
4673 inttypes.h stdint.h unistd.h
4674do :
4675 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
4676ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
4677"
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004678if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004679 cat >>confdefs.h <<_ACEOF
4680#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
4681_ACEOF
4682
4683fi
4684
4685done
4686
4687
4688
4689 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 +01004690if test "x$ac_cv_header_minix_config_h" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004691 MINIX=yes
4692else
4693 MINIX=
4694fi
4695
4696
4697 if test "$MINIX" = yes; then
4698
4699$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
4700
4701
4702$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
4703
4704
4705$as_echo "#define _MINIX 1" >>confdefs.h
4706
4707 fi
4708
4709
4710 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
4711$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01004712if ${ac_cv_safe_to_define___extensions__+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004713 $as_echo_n "(cached) " >&6
4714else
4715 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4716/* end confdefs.h. */
4717
Charles-François Natalibe2b9072013-01-08 19:47:00 +01004718# define __EXTENSIONS__ 1
4719 $ac_includes_default
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004720int
4721main ()
4722{
4723
4724 ;
4725 return 0;
4726}
4727_ACEOF
4728if ac_fn_c_try_compile "$LINENO"; then :
4729 ac_cv_safe_to_define___extensions__=yes
4730else
4731 ac_cv_safe_to_define___extensions__=no
4732fi
4733rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4734fi
4735{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
4736$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
4737 test $ac_cv_safe_to_define___extensions__ = yes &&
4738 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
4739
4740 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
4741
4742 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
4743
4744 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
4745
4746 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
4747
4748
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004749
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004750# Check for unsupported systems
4751case $ac_sys_system/$ac_sys_release in
4752atheos*|Linux*/1*)
4753 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
4754 echo See README for details.
4755 exit 1;;
4756esac
4757
4758
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004759{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-suffix" >&5
4760$as_echo_n "checking for --with-suffix... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004761
4762# Check whether --with-suffix was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004763if test "${with_suffix+set}" = set; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004764 withval=$with_suffix;
4765 case $withval in
4766 no) EXEEXT=;;
4767 yes) EXEEXT=.exe;;
4768 *) EXEEXT=$withval;;
4769 esac
4770fi
4771
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004772{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXEEXT" >&5
4773$as_echo "$EXEEXT" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004774
4775# Test whether we're running on a non-case-sensitive system, in which
4776# case we give a warning if no ext is given
4777
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004778{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for case-insensitive build directory" >&5
4779$as_echo_n "checking for case-insensitive build directory... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004780if test ! -d CaseSensitiveTestDir; then
4781mkdir CaseSensitiveTestDir
4782fi
4783
4784if test -d casesensitivetestdir
4785then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004786 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4787$as_echo "yes" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004788 BUILDEXEEXT=.exe
4789else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004790 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4791$as_echo "no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004792 BUILDEXEEXT=$EXEEXT
4793fi
4794rmdir CaseSensitiveTestDir
4795
4796case $MACHDEP in
4797bsdos*)
4798 case $CC in
4799 gcc) CC="$CC -D_HAVE_BSDI";;
4800 esac;;
4801esac
4802
4803case $ac_sys_system in
4804hp*|HP*)
4805 case $CC in
4806 cc|*/cc) CC="$CC -Ae";;
4807 esac;;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004808SunOS*)
4809 # Some functions have a prototype only with that define, e.g. confstr
4810
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004811$as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004812
4813 ;;
4814esac
4815
4816
4817
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004818{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBRARY" >&5
4819$as_echo_n "checking LIBRARY... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004820if test -z "$LIBRARY"
4821then
4822 LIBRARY='libpython$(VERSION).a'
4823fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004824{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBRARY" >&5
4825$as_echo "$LIBRARY" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004826
4827# LDLIBRARY is the name of the library to link against (as opposed to the
4828# name of the library into which to insert object files). BLDLIBRARY is also
4829# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
4830# is blank as the main program is not linked directly against LDLIBRARY.
4831# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
4832# systems without shared libraries, LDLIBRARY is the same as LIBRARY
4833# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
4834# DLLLIBRARY is the shared (i.e., DLL) library.
4835#
4836# RUNSHARED is used to run shared python without installed libraries
4837#
4838# INSTSONAME is the name of the shared library that will be use to install
4839# on the system - some systems like version suffix, others don't
4840
4841
4842
4843
4844
4845
4846LDLIBRARY="$LIBRARY"
4847BLDLIBRARY='$(LDLIBRARY)'
4848INSTSONAME='$(LDLIBRARY)'
4849DLLLIBRARY=''
4850LDLIBRARYDIR=''
4851RUNSHARED=''
4852
4853# LINKCC is the command that links the python executable -- default is $(CC).
4854# If CXX is set, and if it is needed to link a main function that was
4855# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
4856# python might then depend on the C++ runtime
4857# This is altered for AIX in order to build the export list before
4858# linking.
4859
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004860{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKCC" >&5
4861$as_echo_n "checking LINKCC... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004862if test -z "$LINKCC"
4863then
4864 LINKCC='$(PURIFY) $(MAINCC)'
4865 case $ac_sys_system in
4866 AIX*)
4867 exp_extra="\"\""
4868 if test $ac_sys_release -ge 5 -o \
4869 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
4870 exp_extra="."
4871 fi
4872 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004873 QNX*)
4874 # qcc must be used because the other compilers do not
4875 # support -N.
4876 LINKCC=qcc;;
4877 esac
4878fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004879{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKCC" >&5
4880$as_echo "$LINKCC" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004881
4882# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
4883# make sure we default having it set to "no": this is used by
4884# distutils.unixccompiler to know if it should add --enable-new-dtags
4885# to linker command lines, and failing to detect GNU ld simply results
4886# in the same bahaviour as before.
4887
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004888{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
4889$as_echo_n "checking for GNU ld... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004890ac_prog=ld
4891if test "$GCC" = yes; then
4892 ac_prog=`$CC -print-prog-name=ld`
4893fi
4894case `"$ac_prog" -V 2>&1 < /dev/null` in
4895 *GNU*)
4896 GNULD=yes;;
4897 *)
4898 GNULD=no;;
4899esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004900{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNULD" >&5
4901$as_echo "$GNULD" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004902
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004903{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-shared" >&5
4904$as_echo_n "checking for --enable-shared... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004905# Check whether --enable-shared was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004906if test "${enable_shared+set}" = set; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004907 enableval=$enable_shared;
4908fi
4909
4910
4911if test -z "$enable_shared"
4912then
4913 case $ac_sys_system in
4914 CYGWIN* | atheos*)
4915 enable_shared="yes";;
4916 *)
4917 enable_shared="no";;
4918 esac
4919fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004920{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
4921$as_echo "$enable_shared" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004922
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004923{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-profiling" >&5
4924$as_echo_n "checking for --enable-profiling... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004925# Check whether --enable-profiling was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004926if test "${enable_profiling+set}" = set; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004927 enableval=$enable_profiling; ac_save_cc="$CC"
4928 CC="$CC -pg"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004929 if test "$cross_compiling" = yes; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004930 ac_enable_profiling="no"
4931else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004932 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004933/* end confdefs.h. */
4934int main() { return 0; }
4935_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004936if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004937 ac_enable_profiling="yes"
4938else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004939 ac_enable_profiling="no"
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004940fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004941rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4942 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004943fi
4944
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004945 CC="$ac_save_cc"
4946fi
4947
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004948{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_enable_profiling" >&5
4949$as_echo "$ac_enable_profiling" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004950
4951case "$ac_enable_profiling" in
4952 "yes")
4953 BASECFLAGS="-pg $BASECFLAGS"
4954 LDFLAGS="-pg $LDFLAGS"
4955 ;;
4956esac
4957
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004958{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDLIBRARY" >&5
4959$as_echo_n "checking LDLIBRARY... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004960
4961# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
4962# library that we build, but we do not want to link against it (we
4963# will find it with a -framework option). For this reason there is an
4964# extra variable BLDLIBRARY against which Python and the extension
4965# modules are linked, BLDLIBRARY. This is normally the same as
4966# LDLIBRARY, but empty for MacOSX framework builds.
4967if test "$enable_framework"
4968then
4969 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
4970 RUNSHARED=DYLD_FRAMEWORK_PATH="`pwd`:$DYLD_FRAMEWORK_PATH"
4971 BLDLIBRARY=''
4972else
4973 BLDLIBRARY='$(LDLIBRARY)'
4974fi
4975
4976# Other platforms follow
4977if test $enable_shared = "yes"; then
4978
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004979$as_echo "#define Py_ENABLE_SHARED 1" >>confdefs.h
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004980
4981 case $ac_sys_system in
4982 BeOS*)
4983 LDLIBRARY='libpython$(VERSION).so'
4984 ;;
4985 CYGWIN*)
4986 LDLIBRARY='libpython$(VERSION).dll.a'
4987 DLLLIBRARY='libpython$(VERSION).dll'
4988 ;;
4989 SunOS*)
4990 LDLIBRARY='libpython$(VERSION).so'
4991 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(VERSION)'
4992 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4993 INSTSONAME="$LDLIBRARY".$SOVERSION
4994 ;;
Charles-François Natali3de8c732011-07-24 22:33:35 +02004995 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*|OpenBSD*)
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004996 LDLIBRARY='libpython$(VERSION).so'
4997 BLDLIBRARY='-L. -lpython$(VERSION)'
4998 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4999 case $ac_sys_system in
5000 FreeBSD*)
5001 SOVERSION=`echo $SOVERSION|cut -d "." -f 1`
5002 ;;
5003 esac
5004 INSTSONAME="$LDLIBRARY".$SOVERSION
5005 ;;
5006 hp*|HP*)
5007 case `uname -m` in
5008 ia64)
5009 LDLIBRARY='libpython$(VERSION).so'
5010 ;;
5011 *)
5012 LDLIBRARY='libpython$(VERSION).sl'
5013 ;;
5014 esac
5015 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(VERSION)'
5016 RUNSHARED=SHLIB_PATH=`pwd`:${SHLIB_PATH}
5017 ;;
5018 OSF*)
5019 LDLIBRARY='libpython$(VERSION).so'
5020 BLDLIBRARY='-rpath $(LIBDIR) -L. -lpython$(VERSION)'
5021 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
5022 ;;
5023 atheos*)
5024 LDLIBRARY='libpython$(VERSION).so'
5025 BLDLIBRARY='-L. -lpython$(VERSION)'
5026 RUNSHARED=DLL_PATH=`pwd`:${DLL_PATH:-/atheos/sys/libs:/atheos/autolnk/lib}
5027 ;;
5028 Darwin*)
5029 LDLIBRARY='libpython$(VERSION).dylib'
5030 BLDLIBRARY='-L. -lpython$(VERSION)'
5031 RUNSHARED='DYLD_LIBRARY_PATH=`pwd`:${DYLD_LIBRARY_PATH}'
5032 ;;
Antoine Pitrouaabdceb2010-09-10 20:03:17 +00005033 AIX*)
5034 LDLIBRARY='libpython$(VERSION).so'
5035 RUNSHARED=LIBPATH=`pwd`:${LIBPATH}
5036 ;;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005037
5038 esac
5039else # shared is disabled
5040 case $ac_sys_system in
5041 CYGWIN*)
5042 BLDLIBRARY='$(LIBRARY)'
5043 LDLIBRARY='libpython$(VERSION).dll.a'
5044 ;;
5045 esac
5046fi
5047
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005048{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDLIBRARY" >&5
5049$as_echo "$LDLIBRARY" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005050
5051if test -n "$ac_tool_prefix"; then
5052 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
5053set dummy ${ac_tool_prefix}ranlib; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005054{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5055$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01005056if ${ac_cv_prog_RANLIB+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005057 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005058else
5059 if test -n "$RANLIB"; then
5060 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
5061else
5062as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5063for as_dir in $PATH
5064do
5065 IFS=$as_save_IFS
5066 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005067 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01005068 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005069 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005070 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005071 break 2
5072 fi
5073done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005074 done
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005075IFS=$as_save_IFS
5076
5077fi
5078fi
5079RANLIB=$ac_cv_prog_RANLIB
5080if test -n "$RANLIB"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005081 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
5082$as_echo "$RANLIB" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005083else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005084 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5085$as_echo "no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005086fi
5087
5088
5089fi
5090if test -z "$ac_cv_prog_RANLIB"; then
5091 ac_ct_RANLIB=$RANLIB
5092 # Extract the first word of "ranlib", so it can be a program name with args.
5093set dummy ranlib; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005094{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5095$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01005096if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005097 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005098else
5099 if test -n "$ac_ct_RANLIB"; then
5100 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
5101else
5102as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5103for as_dir in $PATH
5104do
5105 IFS=$as_save_IFS
5106 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005107 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01005108 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005109 ac_cv_prog_ac_ct_RANLIB="ranlib"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005110 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005111 break 2
5112 fi
5113done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005114 done
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005115IFS=$as_save_IFS
5116
5117fi
5118fi
5119ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
5120if test -n "$ac_ct_RANLIB"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005121 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
5122$as_echo "$ac_ct_RANLIB" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005123else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005124 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5125$as_echo "no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005126fi
5127
5128 if test "x$ac_ct_RANLIB" = x; then
5129 RANLIB=":"
5130 else
5131 case $cross_compiling:$ac_tool_warned in
5132yes:)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005133{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5134$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005135ac_tool_warned=yes ;;
5136esac
5137 RANLIB=$ac_ct_RANLIB
5138 fi
5139else
5140 RANLIB="$ac_cv_prog_RANLIB"
5141fi
5142
5143
5144for ac_prog in ar aal
5145do
5146 # Extract the first word of "$ac_prog", so it can be a program name with args.
5147set dummy $ac_prog; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005148{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5149$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01005150if ${ac_cv_prog_AR+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005151 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005152else
5153 if test -n "$AR"; then
5154 ac_cv_prog_AR="$AR" # Let the user override the test.
5155else
5156as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5157for as_dir in $PATH
5158do
5159 IFS=$as_save_IFS
5160 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005161 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01005162 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005163 ac_cv_prog_AR="$ac_prog"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005164 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005165 break 2
5166 fi
5167done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005168 done
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005169IFS=$as_save_IFS
5170
5171fi
5172fi
5173AR=$ac_cv_prog_AR
5174if test -n "$AR"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005175 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
5176$as_echo "$AR" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005177else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005178 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5179$as_echo "no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005180fi
5181
5182
5183 test -n "$AR" && break
5184done
5185test -n "$AR" || AR="ar"
5186
5187
5188# tweak ARFLAGS only if the user didn't set it on the command line
5189
5190if test -z "$ARFLAGS"
5191then
5192 ARFLAGS="rc"
5193fi
5194
5195
5196# Extract the first word of "svnversion", so it can be a program name with args.
5197set dummy svnversion; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005198{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5199$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01005200if ${ac_cv_prog_SVNVERSION+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005201 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005202else
5203 if test -n "$SVNVERSION"; then
5204 ac_cv_prog_SVNVERSION="$SVNVERSION" # Let the user override the test.
5205else
5206as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5207for as_dir in $PATH
5208do
5209 IFS=$as_save_IFS
5210 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005211 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01005212 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005213 ac_cv_prog_SVNVERSION="found"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005214 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005215 break 2
5216 fi
5217done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005218 done
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005219IFS=$as_save_IFS
5220
5221 test -z "$ac_cv_prog_SVNVERSION" && ac_cv_prog_SVNVERSION="not-found"
5222fi
5223fi
5224SVNVERSION=$ac_cv_prog_SVNVERSION
5225if test -n "$SVNVERSION"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005226 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SVNVERSION" >&5
5227$as_echo "$SVNVERSION" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005228else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005229 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5230$as_echo "no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005231fi
5232
5233
5234if test $SVNVERSION = found
5235then
5236 SVNVERSION="svnversion \$(srcdir)"
5237else
5238 SVNVERSION="echo Unversioned directory"
5239fi
5240
Trent Nelsond86ceec2012-10-16 09:42:45 -04005241
Trent Nelsonabf20512012-10-17 04:32:49 -04005242if test "$abs_srcdir" != "$abs_builddir"; then
Trent Nelsond86ceec2012-10-16 09:42:45 -04005243 # If we're building out-of-tree make sure Include (in the current dir)
5244 # gets picked up before its $srcdir counterpart in order for Python-ast.h
5245 # and graminit.h to get picked up from the correct directory.
5246 # (A side effect of this is that these resources will automatically be
5247 # regenerated when building out-of-tree, regardless of whether or not
5248 # the $srcdir counterpart is up-to-date. This is an acceptable trade
5249 # off.)
5250 BASECPPFLAGS="-IInclude"
5251else
5252 BASECPPFLAGS=""
5253fi
5254
Georg Brandl3a5508e2011-03-06 10:42:21 +01005255
5256
5257
5258# Extract the first word of "hg", so it can be a program name with args.
5259set dummy hg; ac_word=$2
5260{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5261$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01005262if ${ac_cv_prog_HAS_HG+:} false; then :
Georg Brandl3a5508e2011-03-06 10:42:21 +01005263 $as_echo_n "(cached) " >&6
5264else
5265 if test -n "$HAS_HG"; then
5266 ac_cv_prog_HAS_HG="$HAS_HG" # Let the user override the test.
5267else
5268as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5269for as_dir in $PATH
5270do
5271 IFS=$as_save_IFS
5272 test -z "$as_dir" && as_dir=.
5273 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01005274 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Georg Brandl3a5508e2011-03-06 10:42:21 +01005275 ac_cv_prog_HAS_HG="found"
5276 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5277 break 2
5278 fi
5279done
5280 done
5281IFS=$as_save_IFS
5282
5283 test -z "$ac_cv_prog_HAS_HG" && ac_cv_prog_HAS_HG="not-found"
5284fi
5285fi
5286HAS_HG=$ac_cv_prog_HAS_HG
5287if test -n "$HAS_HG"; then
5288 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAS_HG" >&5
5289$as_echo "$HAS_HG" >&6; }
5290else
5291 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5292$as_echo "no" >&6; }
5293fi
5294
5295
5296if test $HAS_HG = found
5297then
5298 HGVERSION="hg id -i \$(srcdir)"
5299 HGTAG="hg id -t \$(srcdir)"
5300 HGBRANCH="hg id -b \$(srcdir)"
5301else
5302 HGVERSION=""
5303 HGTAG=""
5304 HGBRANCH=""
5305fi
5306
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005307case $MACHDEP in
5308bsdos*|hp*|HP*)
5309 # install -d does not work on BSDI or HP-UX
5310 if test -z "$INSTALL"
5311 then
5312 INSTALL="${srcdir}/install-sh -c"
5313 fi
5314esac
5315ac_aux_dir=
5316for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
Georg Brandl71f4fbb2011-02-25 11:04:50 +00005317 if test -f "$ac_dir/install-sh"; then
5318 ac_aux_dir=$ac_dir
5319 ac_install_sh="$ac_aux_dir/install-sh -c"
5320 break
5321 elif test -f "$ac_dir/install.sh"; then
5322 ac_aux_dir=$ac_dir
5323 ac_install_sh="$ac_aux_dir/install.sh -c"
5324 break
5325 elif test -f "$ac_dir/shtool"; then
5326 ac_aux_dir=$ac_dir
5327 ac_install_sh="$ac_aux_dir/shtool install -c"
5328 break
5329 fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005330done
5331if test -z "$ac_aux_dir"; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00005332 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005333fi
5334
5335# These three variables are undocumented and unsupported,
5336# and are intended to be withdrawn in a future Autoconf release.
5337# They can cause serious problems if a builder's source tree is in a directory
5338# whose full name contains unusual characters.
5339ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
5340ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
5341ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
5342
5343
5344# Find a good install program. We prefer a C program (faster),
5345# so one script is as good as another. But avoid the broken or
5346# incompatible versions:
5347# SysV /etc/install, /usr/sbin/install
5348# SunOS /usr/etc/install
5349# IRIX /sbin/install
5350# AIX /bin/install
5351# AmigaOS /C/install, which installs bootblocks on floppy discs
5352# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
5353# AFS /usr/afsws/bin/install, which mishandles nonexistent args
5354# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
5355# OS/2's system install, which has a completely different semantic
5356# ./install, which can be erroneously created by make from ./install.sh.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005357# Reject install programs that cannot install multiple files.
5358{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
5359$as_echo_n "checking for a BSD-compatible install... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005360if test -z "$INSTALL"; then
Matthias Klose3cef2a92012-03-14 23:39:33 +01005361if ${ac_cv_path_install+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005362 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005363else
5364 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5365for as_dir in $PATH
5366do
5367 IFS=$as_save_IFS
5368 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005369 # Account for people who put trailing slashes in PATH elements.
5370case $as_dir/ in #((
5371 ./ | .// | /[cC]/* | \
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005372 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005373 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005374 /usr/ucb/* ) ;;
5375 *)
5376 # OSF1 and SCO ODT 3.0 have their own names for install.
5377 # Don't use installbsd from OSF since it installs stuff as root
5378 # by default.
5379 for ac_prog in ginstall scoinst install; do
5380 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01005381 if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005382 if test $ac_prog = install &&
5383 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
5384 # AIX install. It has an incompatible calling convention.
5385 :
5386 elif test $ac_prog = install &&
5387 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
5388 # program-specific install script used by HP pwplus--don't use.
5389 :
5390 else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005391 rm -rf conftest.one conftest.two conftest.dir
5392 echo one > conftest.one
5393 echo two > conftest.two
5394 mkdir conftest.dir
5395 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
5396 test -s conftest.one && test -s conftest.two &&
5397 test -s conftest.dir/conftest.one &&
5398 test -s conftest.dir/conftest.two
5399 then
5400 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
5401 break 3
5402 fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005403 fi
5404 fi
5405 done
5406 done
5407 ;;
5408esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005409
5410 done
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005411IFS=$as_save_IFS
5412
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005413rm -rf conftest.one conftest.two conftest.dir
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005414
5415fi
5416 if test "${ac_cv_path_install+set}" = set; then
5417 INSTALL=$ac_cv_path_install
5418 else
5419 # As a last resort, use the slow shell script. Don't cache a
5420 # value for INSTALL within a source directory, because that will
5421 # break other packages using the cache if that directory is
5422 # removed, or if the value is a relative name.
5423 INSTALL=$ac_install_sh
5424 fi
5425fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005426{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
5427$as_echo "$INSTALL" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005428
5429# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
5430# It thinks the first close brace ends the variable substitution.
5431test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
5432
5433test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
5434
5435test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
5436
Trent Nelsonf6407a12012-08-30 14:56:13 +00005437{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
5438$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
5439if test -z "$MKDIR_P"; then
5440 if ${ac_cv_path_mkdir+:} false; then :
5441 $as_echo_n "(cached) " >&6
5442else
5443 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5444for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
5445do
5446 IFS=$as_save_IFS
5447 test -z "$as_dir" && as_dir=.
5448 for ac_prog in mkdir gmkdir; do
5449 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01005450 as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
Trent Nelsonf6407a12012-08-30 14:56:13 +00005451 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
5452 'mkdir (GNU coreutils) '* | \
5453 'mkdir (coreutils) '* | \
5454 'mkdir (fileutils) '4.1*)
5455 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
5456 break 3;;
5457 esac
5458 done
5459 done
5460 done
5461IFS=$as_save_IFS
5462
5463fi
5464
5465 test -d ./--version && rmdir ./--version
5466 if test "${ac_cv_path_mkdir+set}" = set; then
5467 MKDIR_P="$ac_cv_path_mkdir -p"
5468 else
5469 # As a last resort, use the slow shell script. Don't cache a
5470 # value for MKDIR_P within a source directory, because that will
5471 # break other packages using the cache if that directory is
5472 # removed, or if the value is a relative name.
5473 MKDIR_P="$ac_install_sh -d"
5474 fi
5475fi
5476{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
5477$as_echo "$MKDIR_P" >&6; }
5478
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005479
5480# Not every filesystem supports hard links
5481
5482if test -z "$LN" ; then
5483 case $ac_sys_system in
5484 BeOS*) LN="ln -s";;
5485 CYGWIN*) LN="ln -s";;
5486 atheos*) LN="ln -s";;
5487 *) LN=ln;;
5488 esac
5489fi
5490
5491# Check for --with-pydebug
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005492{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pydebug" >&5
5493$as_echo_n "checking for --with-pydebug... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005494
5495# Check whether --with-pydebug was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005496if test "${with_pydebug+set}" = set; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005497 withval=$with_pydebug;
5498if test "$withval" != no
5499then
5500
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005501$as_echo "#define Py_DEBUG 1" >>confdefs.h
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005502
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005503 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5504$as_echo "yes" >&6; };
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005505 Py_DEBUG='true'
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005506else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5507$as_echo "no" >&6; }; Py_DEBUG='false'
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005508fi
5509else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005510 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5511$as_echo "no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005512fi
5513
5514
5515# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
5516# merged with this chunk of code?
5517
5518# Optimizer/debugger flags
5519# ------------------------
5520# (The following bit of code is complicated enough - please keep things
5521# indented properly. Just pretend you're editing Python code. ;-)
5522
5523# There are two parallel sets of case statements below, one that checks to
5524# see if OPT was set and one that does BASECFLAGS setting based upon
5525# compiler and platform. BASECFLAGS tweaks need to be made even if the
5526# user set OPT.
5527
5528# tweak OPT based on compiler and platform, only if the user didn't set
5529# it on the command line
5530
Benjamin Petersond4b721b2010-03-23 20:58:37 +00005531if test "${OPT-unset}" = "unset"
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005532then
5533 case $GCC in
5534 yes)
5535 if test "$CC" != 'g++' ; then
5536 STRICT_PROTO="-Wstrict-prototypes"
5537 fi
5538 # For gcc 4.x we need to use -fwrapv so lets check if its supported
5539 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
5540 WRAP="-fwrapv"
5541 fi
Stefan Krah503e5e12011-09-14 15:19:42 +02005542
5543 # Clang also needs -fwrapv
Stefan Krah2bc1e8f2011-12-08 22:26:06 +01005544 case $CC in
5545 *clang*) WRAP="-fwrapv"
5546 ;;
5547 esac
Stefan Krah503e5e12011-09-14 15:19:42 +02005548
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005549 case $ac_cv_prog_cc_g in
5550 yes)
5551 if test "$Py_DEBUG" = 'true' ; then
5552 # Optimization messes up debuggers, so turn it off for
5553 # debug builds.
Mark Dickinsond2f3e3f2010-05-05 22:23:58 +00005554 OPT="-g -O0 -Wall $STRICT_PROTO"
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005555 else
5556 OPT="-g $WRAP -O3 -Wall $STRICT_PROTO"
5557 fi
5558 ;;
5559 *)
5560 OPT="-O3 -Wall $STRICT_PROTO"
5561 ;;
5562 esac
5563 case $ac_sys_system in
5564 SCO_SV*) OPT="$OPT -m486 -DSCO5"
5565 ;;
5566 esac
5567 ;;
5568
5569 *)
5570 OPT="-O"
5571 ;;
5572 esac
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005573fi
5574
5575
5576
5577# The -arch flags for universal builds on OSX
5578UNIVERSAL_ARCH_FLAGS=
5579
5580
5581# tweak BASECFLAGS based on compiler and platform
5582case $GCC in
5583yes)
5584 # Python violates C99 rules, by casting between incompatible
5585 # pointer types. GCC may generate bad code as a result of that,
5586 # so use -fno-strict-aliasing if supported.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005587 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -fno-strict-aliasing" >&5
5588$as_echo_n "checking whether $CC accepts -fno-strict-aliasing... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005589 ac_save_cc="$CC"
5590 CC="$CC -fno-strict-aliasing"
Matthias Klose3cef2a92012-03-14 23:39:33 +01005591 if ${ac_cv_no_strict_aliasing_ok+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005592 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00005593else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005594 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005595/* end confdefs.h. */
Gregory P. Smith373469a2009-11-01 21:03:38 +00005596
5597int
5598main ()
5599{
Mark Dickinson5e13e292010-05-11 08:55:06 +00005600
Gregory P. Smith373469a2009-11-01 21:03:38 +00005601 ;
5602 return 0;
5603}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005604_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005605if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005606 ac_cv_no_strict_aliasing_ok=yes
5607else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005608 ac_cv_no_strict_aliasing_ok=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005609fi
Gregory P. Smith373469a2009-11-01 21:03:38 +00005610rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00005611fi
5612
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005613 CC="$ac_save_cc"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005614 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_no_strict_aliasing_ok" >&5
5615$as_echo "$ac_cv_no_strict_aliasing_ok" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005616 if test $ac_cv_no_strict_aliasing_ok = yes
5617 then
5618 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
5619 fi
5620
5621 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
5622 # support. Without this, treatment of subnormals doesn't follow
5623 # the standard.
5624 case $ac_sys_machine in
5625 alpha*)
5626 BASECFLAGS="$BASECFLAGS -mieee"
5627 ;;
5628 esac
5629
5630 case $ac_sys_system in
5631 SCO_SV*)
5632 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
5633 ;;
5634 # is there any other compiler on Darwin besides gcc?
5635 Darwin*)
5636 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
5637 # used to be here, but non-Apple gcc doesn't accept them.
Ronald Oussorena55af9a2010-01-17 16:25:57 +00005638 if test "${CC}" = gcc
5639 then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005640 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which compiler should be used" >&5
5641$as_echo_n "checking which compiler should be used... " >&6; }
Ronald Oussorena55af9a2010-01-17 16:25:57 +00005642 case "${UNIVERSALSDK}" in
5643 */MacOSX10.4u.sdk)
5644 # Build using 10.4 SDK, force usage of gcc when the
5645 # compiler is gcc, otherwise the user will get very
5646 # confusing error messages when building on OSX 10.6
5647 CC=gcc-4.0
5648 CPP=cpp-4.0
5649 ;;
5650 esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005651 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
5652$as_echo "$CC" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005653 fi
5654
5655 # Calculate the right deployment target for this build.
5656 #
5657 cur_target=`sw_vers -productVersion | sed 's/\(10\.[0-9]*\).*/\1/'`
5658 if test ${cur_target} '>' 10.2; then
5659 cur_target=10.3
Ronald Oussoren25967582009-09-06 10:00:26 +00005660 if test ${enable_universalsdk}; then
5661 if test "${UNIVERSAL_ARCHS}" = "all"; then
5662 # Ensure that the default platform for a
5663 # 4-way universal build is OSX 10.5,
5664 # that's the first OS release where
5665 # 4-way builds make sense.
5666 cur_target='10.5'
Ronald Oussoren23d92532009-09-07 06:12:00 +00005667
5668 elif test "${UNIVERSAL_ARCHS}" = "3-way"; then
5669 cur_target='10.5'
5670
5671 elif test "${UNIVERSAL_ARCHS}" = "intel"; then
5672 cur_target='10.5'
5673
5674 elif test "${UNIVERSAL_ARCHS}" = "64-bit"; then
5675 cur_target='10.5'
Ronald Oussoren25967582009-09-06 10:00:26 +00005676 fi
5677 else
Ronald Oussorenbc0e83c2010-02-11 13:26:54 +00005678 if test `/usr/bin/arch` = "i386"; then
Ronald Oussoren25967582009-09-06 10:00:26 +00005679 # On Intel macs default to a deployment
5680 # target of 10.4, that's the first OSX
5681 # release with Intel support.
5682 cur_target="10.4"
5683 fi
5684 fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005685 fi
5686 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
5687
5688 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
5689 # environment with a value that is the same as what we'll use
5690 # in the Makefile to ensure that we'll get the same compiler
5691 # environment during configure and build time.
5692 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
5693 export MACOSX_DEPLOYMENT_TARGET
5694 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
5695
Ronald Oussorena55af9a2010-01-17 16:25:57 +00005696 if test "${enable_universalsdk}"; then
5697 UNIVERSAL_ARCH_FLAGS=""
5698 if test "$UNIVERSAL_ARCHS" = "32-bit" ; then
5699 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
5700 ARCH_RUN_32BIT=""
Ronald Oussoren75912852010-04-08 08:13:31 +00005701 LIPO_32BIT_FLAGS=""
Ronald Oussorena55af9a2010-01-17 16:25:57 +00005702
5703 elif test "$UNIVERSAL_ARCHS" = "64-bit" ; then
5704 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
5705 LIPO_32BIT_FLAGS=""
5706 ARCH_RUN_32BIT="true"
5707
5708 elif test "$UNIVERSAL_ARCHS" = "all" ; then
5709 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
5710 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Ronald Oussoren92397ce2010-01-17 19:32:00 +00005711 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
Ronald Oussorena55af9a2010-01-17 16:25:57 +00005712
5713 elif test "$UNIVERSAL_ARCHS" = "intel" ; then
5714 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
5715 LIPO_32BIT_FLAGS="-extract i386"
Ronald Oussoren92397ce2010-01-17 19:32:00 +00005716 ARCH_RUN_32BIT="/usr/bin/arch -i386"
Ronald Oussorena55af9a2010-01-17 16:25:57 +00005717
5718 elif test "$UNIVERSAL_ARCHS" = "3-way" ; then
5719 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
5720 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Ronald Oussoren9922f172010-02-11 13:19:34 +00005721 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
Ronald Oussorena55af9a2010-01-17 16:25:57 +00005722
5723 else
Georg Brandl71f4fbb2011-02-25 11:04:50 +00005724 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 +00005725
5726 fi
5727
5728
Ronald Oussoren974eb5e2010-04-18 17:59:37 +00005729 CFLAGS="${UNIVERSAL_ARCH_FLAGS} ${CFLAGS}"
5730 if test "${UNIVERSALSDK}" != "/"
5731 then
5732 CPPFLAGS="-isysroot ${UNIVERSALSDK} ${CPPFLAGS}"
5733 LDFLAGS="-isysroot ${UNIVERSALSDK} ${LDFLAGS}"
5734 CFLAGS="-isysroot ${UNIVERSALSDK} ${CFLAGS}"
Ronald Oussorena55af9a2010-01-17 16:25:57 +00005735 fi
5736
5737 fi
5738
5739
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005740 ;;
5741 OSF*)
5742 BASECFLAGS="$BASECFLAGS -mieee"
5743 ;;
5744 esac
5745 ;;
5746
5747*)
5748 case $ac_sys_system in
5749 OpenUNIX*|UnixWare*)
5750 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
5751 ;;
5752 OSF*)
5753 BASECFLAGS="$BASECFLAGS -ieee -std"
5754 ;;
5755 SCO_SV*)
5756 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
5757 ;;
5758 esac
5759 ;;
5760esac
5761
5762if test "$Py_DEBUG" = 'true'; then
5763 :
5764else
5765 OPT="-DNDEBUG $OPT"
5766fi
5767
5768if test "$ac_arch_flags"
5769then
5770 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
5771fi
5772
5773# disable check for icc since it seems to pass, but generates a warning
5774if test "$CC" = icc
5775then
5776 ac_cv_opt_olimit_ok=no
5777fi
5778
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005779{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -OPT:Olimit=0" >&5
5780$as_echo_n "checking whether $CC accepts -OPT:Olimit=0... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01005781if ${ac_cv_opt_olimit_ok+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005782 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005783else
5784 ac_save_cc="$CC"
5785CC="$CC -OPT:Olimit=0"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005786cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005787/* end confdefs.h. */
Gregory P. Smith373469a2009-11-01 21:03:38 +00005788
5789int
5790main ()
5791{
Mark Dickinson5e13e292010-05-11 08:55:06 +00005792
Gregory P. Smith373469a2009-11-01 21:03:38 +00005793 ;
5794 return 0;
5795}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005796_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005797if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005798 ac_cv_opt_olimit_ok=yes
5799else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005800 ac_cv_opt_olimit_ok=no
Matthias Klosec511b472010-05-08 11:01:39 +00005801
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005802fi
Gregory P. Smith373469a2009-11-01 21:03:38 +00005803rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005804CC="$ac_save_cc"
5805fi
5806
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005807{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_opt_olimit_ok" >&5
5808$as_echo "$ac_cv_opt_olimit_ok" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005809if test $ac_cv_opt_olimit_ok = yes; then
5810 case $ac_sys_system in
5811 # XXX is this branch needed? On MacOSX 10.2.2 the result of the
5812 # olimit_ok test is "no". Is it "yes" in some other Darwin-esque
5813 # environment?
5814 Darwin*)
5815 ;;
Trent Nelson34562e12012-10-17 18:01:12 -04005816 # XXX thankfully this useless troublemaker of a flag has been
5817 # eradicated in the 3.x line. For now, make sure it isn't picked
5818 # up by any of our other platforms that use CC.
5819 AIX*|SunOS*|HP-UX*|IRIX*)
5820 ;;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005821 *)
5822 BASECFLAGS="$BASECFLAGS -OPT:Olimit=0"
5823 ;;
5824 esac
5825else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005826 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Olimit 1500" >&5
5827$as_echo_n "checking whether $CC accepts -Olimit 1500... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01005828 if ${ac_cv_olimit_ok+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005829 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005830else
5831 ac_save_cc="$CC"
5832 CC="$CC -Olimit 1500"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005833 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005834/* end confdefs.h. */
Gregory P. Smith373469a2009-11-01 21:03:38 +00005835
5836int
5837main ()
5838{
Mark Dickinson5e13e292010-05-11 08:55:06 +00005839
Gregory P. Smith373469a2009-11-01 21:03:38 +00005840 ;
5841 return 0;
5842}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005843_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005844if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005845 ac_cv_olimit_ok=yes
5846else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005847 ac_cv_olimit_ok=no
Matthias Klosec511b472010-05-08 11:01:39 +00005848
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005849fi
Gregory P. Smith373469a2009-11-01 21:03:38 +00005850rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005851 CC="$ac_save_cc"
5852fi
5853
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005854 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_olimit_ok" >&5
5855$as_echo "$ac_cv_olimit_ok" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005856 if test $ac_cv_olimit_ok = yes; then
Stefan Krah67473262012-11-29 00:17:05 +01005857 case $ac_sys_system in
5858 # Issue #16534: On HP-UX ac_cv_olimit_ok=yes is a false positive.
5859 HP-UX*)
5860 ;;
5861 *)
5862 BASECFLAGS="$BASECFLAGS -Olimit 1500"
5863 ;;
5864 esac
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005865 fi
5866fi
5867
5868# Check whether GCC supports PyArg_ParseTuple format
5869if test "$GCC" = "yes"
5870then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005871 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc supports ParseTuple __format__" >&5
5872$as_echo_n "checking whether gcc supports ParseTuple __format__... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005873 save_CFLAGS=$CFLAGS
5874 CFLAGS="$CFLAGS -Werror"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005875 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005876/* end confdefs.h. */
5877
5878 void f(char*,...)__attribute((format(PyArg_ParseTuple, 1, 2)));
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005879int
5880main ()
5881{
5882
5883 ;
5884 return 0;
5885}
Matthias Klosec511b472010-05-08 11:01:39 +00005886
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005887_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005888if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005889
Matthias Klosec511b472010-05-08 11:01:39 +00005890
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005891$as_echo "#define HAVE_ATTRIBUTE_FORMAT_PARSETUPLE 1" >>confdefs.h
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005892
Matthias Klosec511b472010-05-08 11:01:39 +00005893 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005894$as_echo "yes" >&6; }
Matthias Klosec511b472010-05-08 11:01:39 +00005895
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005896else
Matthias Klosec511b472010-05-08 11:01:39 +00005897
5898 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005899$as_echo "no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005900
5901fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005902rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5903 CFLAGS=$save_CFLAGS
5904fi
5905
5906# On some compilers, pthreads are available without further options
5907# (e.g. MacOS X). On some of these systems, the compiler will not
5908# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
5909# So we have to see first whether pthreads are available without
5910# options before we can check whether -Kpthread improves anything.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005911{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads are available without options" >&5
5912$as_echo_n "checking whether pthreads are available without options... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01005913if ${ac_cv_pthread_is_default+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005914 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005915else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005916 if test "$cross_compiling" = yes; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005917 ac_cv_pthread_is_default=no
5918else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005919 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005920/* end confdefs.h. */
5921
Stefan Krahae66ca62012-11-22 22:36:57 +01005922#include <stdio.h>
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005923#include <pthread.h>
5924
5925void* routine(void* p){return NULL;}
5926
5927int main(){
5928 pthread_t p;
5929 if(pthread_create(&p,NULL,routine,NULL)!=0)
5930 return 1;
5931 (void)pthread_detach(p);
5932 return 0;
5933}
5934
5935_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005936if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005937
5938 ac_cv_pthread_is_default=yes
5939 ac_cv_kthread=no
5940 ac_cv_pthread=no
5941
5942else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005943 ac_cv_pthread_is_default=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005944fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005945rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5946 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005947fi
5948
5949
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005950fi
5951
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005952{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_is_default" >&5
5953$as_echo "$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005954
5955
5956if test $ac_cv_pthread_is_default = yes
5957then
5958 ac_cv_kpthread=no
5959else
5960# -Kpthread, if available, provides the right #defines
5961# and linker options to make pthread_create available
5962# Some compilers won't report that they do not support -Kpthread,
5963# so we need to run a program to see whether it really made the
5964# function available.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005965{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kpthread" >&5
5966$as_echo_n "checking whether $CC accepts -Kpthread... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01005967if ${ac_cv_kpthread+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005968 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005969else
5970 ac_save_cc="$CC"
5971CC="$CC -Kpthread"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005972if test "$cross_compiling" = yes; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005973 ac_cv_kpthread=no
5974else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005975 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005976/* end confdefs.h. */
5977
Stefan Krahae66ca62012-11-22 22:36:57 +01005978#include <stdio.h>
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005979#include <pthread.h>
5980
5981void* routine(void* p){return NULL;}
5982
5983int main(){
5984 pthread_t p;
5985 if(pthread_create(&p,NULL,routine,NULL)!=0)
5986 return 1;
5987 (void)pthread_detach(p);
5988 return 0;
5989}
5990
5991_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005992if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005993 ac_cv_kpthread=yes
5994else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005995 ac_cv_kpthread=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005996fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005997rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5998 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005999fi
6000
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006001CC="$ac_save_cc"
6002fi
6003
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006004{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kpthread" >&5
6005$as_echo "$ac_cv_kpthread" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006006fi
6007
6008if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
6009then
6010# -Kthread, if available, provides the right #defines
6011# and linker options to make pthread_create available
6012# Some compilers won't report that they do not support -Kthread,
6013# so we need to run a program to see whether it really made the
6014# function available.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006015{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kthread" >&5
6016$as_echo_n "checking whether $CC accepts -Kthread... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01006017if ${ac_cv_kthread+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006018 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006019else
6020 ac_save_cc="$CC"
6021CC="$CC -Kthread"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006022if test "$cross_compiling" = yes; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006023 ac_cv_kthread=no
6024else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006025 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006026/* end confdefs.h. */
6027
Stefan Krahae66ca62012-11-22 22:36:57 +01006028#include <stdio.h>
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006029#include <pthread.h>
6030
6031void* routine(void* p){return NULL;}
6032
6033int main(){
6034 pthread_t p;
6035 if(pthread_create(&p,NULL,routine,NULL)!=0)
6036 return 1;
6037 (void)pthread_detach(p);
6038 return 0;
6039}
6040
6041_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006042if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006043 ac_cv_kthread=yes
6044else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006045 ac_cv_kthread=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006046fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006047rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6048 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006049fi
6050
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006051CC="$ac_save_cc"
6052fi
6053
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006054{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kthread" >&5
6055$as_echo "$ac_cv_kthread" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006056fi
6057
6058if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
6059then
6060# -pthread, if available, provides the right #defines
6061# and linker options to make pthread_create available
6062# Some compilers won't report that they do not support -pthread,
6063# so we need to run a program to see whether it really made the
6064# function available.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006065{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -pthread" >&5
6066$as_echo_n "checking whether $CC accepts -pthread... " >&6; }
doko@python.orgfa3f9a32013-01-25 15:32:31 +01006067if ${ac_cv_pthread+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006068 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006069else
6070 ac_save_cc="$CC"
6071CC="$CC -pthread"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006072if test "$cross_compiling" = yes; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006073 ac_cv_pthread=no
6074else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006075 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006076/* end confdefs.h. */
6077
Stefan Krahae66ca62012-11-22 22:36:57 +01006078#include <stdio.h>
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006079#include <pthread.h>
6080
6081void* routine(void* p){return NULL;}
6082
6083int main(){
6084 pthread_t p;
6085 if(pthread_create(&p,NULL,routine,NULL)!=0)
6086 return 1;
6087 (void)pthread_detach(p);
6088 return 0;
6089}
6090
6091_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006092if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006093 ac_cv_pthread=yes
6094else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006095 ac_cv_pthread=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006096fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006097rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6098 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006099fi
6100
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006101CC="$ac_save_cc"
6102fi
6103
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006104{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread" >&5
6105$as_echo "$ac_cv_pthread" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006106fi
6107
6108# If we have set a CC compiler flag for thread support then
6109# check if it works for CXX, too.
6110ac_cv_cxx_thread=no
6111if test ! -z "$CXX"
6112then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006113{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX also accepts flags for thread support" >&5
6114$as_echo_n "checking whether $CXX also accepts flags for thread support... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006115ac_save_cxx="$CXX"
6116
6117if test "$ac_cv_kpthread" = "yes"
6118then
6119 CXX="$CXX -Kpthread"
6120 ac_cv_cxx_thread=yes
6121elif test "$ac_cv_kthread" = "yes"
6122then
6123 CXX="$CXX -Kthread"
6124 ac_cv_cxx_thread=yes
6125elif test "$ac_cv_pthread" = "yes"
6126then
6127 CXX="$CXX -pthread"
6128 ac_cv_cxx_thread=yes
6129fi
6130
6131if test $ac_cv_cxx_thread = yes
6132then
6133 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
6134 $CXX -c conftest.$ac_ext 2>&5
6135 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
6136 && test -s conftest$ac_exeext && ./conftest$ac_exeext
6137 then
6138 ac_cv_cxx_thread=yes
6139 else
6140 ac_cv_cxx_thread=no
6141 fi
6142 rm -fr conftest*
6143fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006144{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_thread" >&5
6145$as_echo "$ac_cv_cxx_thread" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006146fi
6147CXX="$ac_save_cxx"
6148
6149
6150# checks for header files
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006151{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
6152$as_echo_n "checking for ANSI C header files... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01006153if ${ac_cv_header_stdc+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006154 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006155else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006156 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006157/* end confdefs.h. */
6158#include <stdlib.h>
6159#include <stdarg.h>
6160#include <string.h>
6161#include <float.h>
6162
6163int
6164main ()
6165{
6166
6167 ;
6168 return 0;
6169}
6170_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006171if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006172 ac_cv_header_stdc=yes
6173else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006174 ac_cv_header_stdc=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006175fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006176rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6177
6178if test $ac_cv_header_stdc = yes; then
6179 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006180 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006181/* end confdefs.h. */
6182#include <string.h>
6183
6184_ACEOF
6185if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006186 $EGREP "memchr" >/dev/null 2>&1; then :
6187
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006188else
6189 ac_cv_header_stdc=no
6190fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00006191rm -f conftest*
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006192
6193fi
6194
6195if test $ac_cv_header_stdc = yes; then
6196 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006197 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006198/* end confdefs.h. */
6199#include <stdlib.h>
6200
6201_ACEOF
6202if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006203 $EGREP "free" >/dev/null 2>&1; then :
6204
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006205else
6206 ac_cv_header_stdc=no
6207fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00006208rm -f conftest*
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006209
6210fi
6211
6212if test $ac_cv_header_stdc = yes; then
6213 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006214 if test "$cross_compiling" = yes; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006215 :
6216else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006217 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006218/* end confdefs.h. */
6219#include <ctype.h>
6220#include <stdlib.h>
6221#if ((' ' & 0x0FF) == 0x020)
6222# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
6223# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
6224#else
6225# define ISLOWER(c) \
6226 (('a' <= (c) && (c) <= 'i') \
6227 || ('j' <= (c) && (c) <= 'r') \
6228 || ('s' <= (c) && (c) <= 'z'))
6229# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
6230#endif
6231
6232#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
6233int
6234main ()
6235{
6236 int i;
6237 for (i = 0; i < 256; i++)
6238 if (XOR (islower (i), ISLOWER (i))
6239 || toupper (i) != TOUPPER (i))
6240 return 2;
6241 return 0;
6242}
6243_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006244if ac_fn_c_try_run "$LINENO"; then :
6245
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006246else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006247 ac_cv_header_stdc=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006248fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006249rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6250 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006251fi
6252
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006253fi
6254fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006255{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
6256$as_echo "$ac_cv_header_stdc" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006257if test $ac_cv_header_stdc = yes; then
6258
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006259$as_echo "#define STDC_HEADERS 1" >>confdefs.h
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006260
6261fi
6262
Martin v. Löwis0e8bd7e2006-06-10 12:23:46 +00006263for ac_header in asm/types.h conio.h curses.h direct.h dlfcn.h errno.h \
6264fcntl.h grp.h \
Neal Norwitz9fdfaaf2008-03-28 05:34:59 +00006265ieeefp.h io.h langinfo.h libintl.h ncurses.h poll.h process.h pthread.h \
Martin v. Löwis40e9aed2006-10-02 15:20:37 +00006266shadow.h signal.h stdint.h stropts.h termios.h thread.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00006267unistd.h utime.h \
Christian Heimes0e9ab5f2008-03-21 23:49:44 +00006268sys/audioio.h sys/bsdtty.h sys/epoll.h sys/event.h sys/file.h sys/loadavg.h \
6269sys/lock.h sys/mkdev.h sys/modem.h \
Martin v. Löwis0e8bd7e2006-06-10 12:23:46 +00006270sys/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 +00006271sys/termio.h sys/time.h \
Martin v. Löwis0e8bd7e2006-06-10 12:23:46 +00006272sys/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 +00006273sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Ronald Oussorena55af9a2010-01-17 16:25:57 +00006274bluetooth/bluetooth.h linux/tipc.h spawn.h util.h
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006275do :
6276 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
6277ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
Georg Brandl71f4fbb2011-02-25 11:04:50 +00006278if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006279 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006280#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00006281_ACEOF
6282
6283fi
6284
Guido van Rossum627b2d71993-12-24 10:39:16 +00006285done
6286
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006287ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00006288for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006289 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
6290{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
6291$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01006292if eval \${$as_ac_Header+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006293 $as_echo_n "(cached) " >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00006294else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006295 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006296/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006297#include <sys/types.h>
6298#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00006299
Martin v. Löwis11437992002-04-12 09:54:03 +00006300int
6301main ()
6302{
6303if ((DIR *) 0)
6304return 0;
6305 ;
6306 return 0;
6307}
6308_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006309if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006310 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00006311else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006312 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006313fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006314rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006315fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006316eval ac_res=\$$as_ac_Header
6317 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
6318$as_echo "$ac_res" >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00006319if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006320 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006321#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00006322_ACEOF
6323
6324ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00006325fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006326
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006327done
6328# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
6329if test $ac_header_dirent = dirent.h; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006330 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
6331$as_echo_n "checking for library containing opendir... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01006332if ${ac_cv_search_opendir+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006333 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006334else
Martin v. Löwis11437992002-04-12 09:54:03 +00006335 ac_func_search_save_LIBS=$LIBS
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006336cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006337/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006338
Martin v. Löwiseba40652007-08-30 20:10:57 +00006339/* Override any GCC internal prototype to avoid an error.
6340 Use char because int might match the return type of a GCC
6341 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006342#ifdef __cplusplus
6343extern "C"
6344#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006345char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006346int
6347main ()
6348{
Martin v. Löwiseba40652007-08-30 20:10:57 +00006349return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006350 ;
6351 return 0;
6352}
6353_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00006354for ac_lib in '' dir; do
6355 if test -z "$ac_lib"; then
6356 ac_res="none required"
6357 else
6358 ac_res=-l$ac_lib
Skip Montanaro89e975f2007-08-22 19:05:21 +00006359 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Martin v. Löwiseba40652007-08-30 20:10:57 +00006360 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006361 if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00006362 ac_cv_search_opendir=$ac_res
Brett Cannon19fab762007-06-02 03:02:29 +00006363fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006364rm -f core conftest.err conftest.$ac_objext \
6365 conftest$ac_exeext
Matthias Klose3cef2a92012-03-14 23:39:33 +01006366 if ${ac_cv_search_opendir+:} false; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00006367 break
Skip Montanaro89e975f2007-08-22 19:05:21 +00006368fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006369done
Matthias Klose3cef2a92012-03-14 23:39:33 +01006370if ${ac_cv_search_opendir+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006371
Martin v. Löwiseba40652007-08-30 20:10:57 +00006372else
6373 ac_cv_search_opendir=no
6374fi
6375rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006376LIBS=$ac_func_search_save_LIBS
6377fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006378{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
6379$as_echo "$ac_cv_search_opendir" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006380ac_res=$ac_cv_search_opendir
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006381if test "$ac_res" != no; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00006382 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00006383
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006384fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006385
Michael W. Hudson54241132001-12-07 15:38:26 +00006386else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006387 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
6388$as_echo_n "checking for library containing opendir... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01006389if ${ac_cv_search_opendir+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006390 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006391else
6392 ac_func_search_save_LIBS=$LIBS
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006393cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006394/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006395
Martin v. Löwiseba40652007-08-30 20:10:57 +00006396/* Override any GCC internal prototype to avoid an error.
6397 Use char because int might match the return type of a GCC
6398 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006399#ifdef __cplusplus
6400extern "C"
6401#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006402char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006403int
6404main ()
6405{
Martin v. Löwiseba40652007-08-30 20:10:57 +00006406return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006407 ;
6408 return 0;
6409}
6410_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00006411for ac_lib in '' x; do
6412 if test -z "$ac_lib"; then
6413 ac_res="none required"
6414 else
6415 ac_res=-l$ac_lib
Skip Montanaro89e975f2007-08-22 19:05:21 +00006416 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Martin v. Löwiseba40652007-08-30 20:10:57 +00006417 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006418 if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00006419 ac_cv_search_opendir=$ac_res
Brett Cannon19fab762007-06-02 03:02:29 +00006420fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006421rm -f core conftest.err conftest.$ac_objext \
6422 conftest$ac_exeext
Matthias Klose3cef2a92012-03-14 23:39:33 +01006423 if ${ac_cv_search_opendir+:} false; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00006424 break
Skip Montanaro89e975f2007-08-22 19:05:21 +00006425fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006426done
Matthias Klose3cef2a92012-03-14 23:39:33 +01006427if ${ac_cv_search_opendir+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006428
Martin v. Löwiseba40652007-08-30 20:10:57 +00006429else
6430 ac_cv_search_opendir=no
6431fi
6432rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006433LIBS=$ac_func_search_save_LIBS
6434fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006435{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
6436$as_echo "$ac_cv_search_opendir" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006437ac_res=$ac_cv_search_opendir
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006438if test "$ac_res" != no; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00006439 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00006440
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006441fi
6442
6443fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00006444
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006445{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5
6446$as_echo_n "checking whether sys/types.h defines makedev... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01006447if ${ac_cv_header_sys_types_h_makedev+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006448 $as_echo_n "(cached) " >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006449else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006450 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006451/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006452#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006453int
6454main ()
6455{
6456return makedev(0, 0);
6457 ;
6458 return 0;
6459}
6460_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006461if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006462 ac_cv_header_sys_types_h_makedev=yes
6463else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006464 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006465fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006466rm -f core conftest.err conftest.$ac_objext \
6467 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006468
6469fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006470{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_types_h_makedev" >&5
6471$as_echo "$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006472
6473if test $ac_cv_header_sys_types_h_makedev = no; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006474ac_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 +01006475if test "x$ac_cv_header_sys_mkdev_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006476
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006477$as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006478
6479fi
6480
6481
6482
6483 if test $ac_cv_header_sys_mkdev_h = no; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006484 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 +01006485if test "x$ac_cv_header_sys_sysmacros_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006486
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006487$as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006488
6489fi
6490
6491
6492 fi
6493fi
6494
Michael W. Hudson54241132001-12-07 15:38:26 +00006495
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006496# On Solaris, term.h requires curses.h
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006497for ac_header in term.h
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006498do :
6499 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "
Martin v. Löwis5d52e782004-09-18 10:07:03 +00006500#ifdef HAVE_CURSES_H
6501#include <curses.h>
6502#endif
6503
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006504"
Matthias Klose3cef2a92012-03-14 23:39:33 +01006505if test "x$ac_cv_header_term_h" = xyes; then :
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006506 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006507#define HAVE_TERM_H 1
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006508_ACEOF
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006509
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006510fi
6511
6512done
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006513
6514
Martin v. Löwis11017b12006-01-14 18:12:57 +00006515# On Linux, netlink.h requires asm/types.h
Martin v. Löwis11017b12006-01-14 18:12:57 +00006516for ac_header in linux/netlink.h
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006517do :
6518 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 +00006519#ifdef HAVE_ASM_TYPES_H
6520#include <asm/types.h>
6521#endif
6522#ifdef HAVE_SYS_SOCKET_H
6523#include <sys/socket.h>
6524#endif
6525
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006526"
Matthias Klose3cef2a92012-03-14 23:39:33 +01006527if test "x$ac_cv_header_linux_netlink_h" = xyes; then :
Martin v. Löwis11017b12006-01-14 18:12:57 +00006528 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006529#define HAVE_LINUX_NETLINK_H 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00006530_ACEOF
6531
6532fi
6533
6534done
6535
6536
Guido van Rossum627b2d71993-12-24 10:39:16 +00006537# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00006538was_it_defined=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006539{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_t in time.h" >&5
6540$as_echo_n "checking for clock_t in time.h... " >&6; }
6541cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006542/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006543#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006544
6545_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006546if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006547 $EGREP "clock_t" >/dev/null 2>&1; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +00006548 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006549else
Martin v. Löwis11437992002-04-12 09:54:03 +00006550
6551
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006552$as_echo "#define clock_t long" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00006553
Martin v. Löwisc45929e2002-04-06 10:10:49 +00006554
Guido van Rossum627b2d71993-12-24 10:39:16 +00006555fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00006556rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00006557
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006558{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
6559$as_echo "$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00006560
Neal Norwitz11690112002-07-30 01:08:28 +00006561# Check whether using makedev requires defining _OSF_SOURCE
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006562{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for makedev" >&5
6563$as_echo_n "checking for makedev... " >&6; }
6564cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006565/* end confdefs.h. */
Jesus Cea616de772010-04-28 10:32:30 +00006566
6567#if defined(MAJOR_IN_MKDEV)
6568#include <sys/mkdev.h>
6569#elif defined(MAJOR_IN_SYSMACROS)
6570#include <sys/sysmacros.h>
6571#else
Neal Norwitz6eb37f02003-02-23 23:28:15 +00006572#include <sys/types.h>
Jesus Cea616de772010-04-28 10:32:30 +00006573#endif
Neal Norwitz11690112002-07-30 01:08:28 +00006574int
6575main ()
6576{
6577 makedev(0, 0)
6578 ;
6579 return 0;
6580}
6581_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006582if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00006583 ac_cv_has_makedev=yes
6584else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006585 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006586fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006587rm -f core conftest.err conftest.$ac_objext \
6588 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00006589if test "$ac_cv_has_makedev" = "no"; then
6590 # we didn't link, try if _OSF_SOURCE will allow us to link
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006591 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006592/* end confdefs.h. */
Neal Norwitz11690112002-07-30 01:08:28 +00006593
Neal Norwitz6eb37f02003-02-23 23:28:15 +00006594#define _OSF_SOURCE 1
6595#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00006596
Neal Norwitz11690112002-07-30 01:08:28 +00006597int
6598main ()
6599{
6600 makedev(0, 0)
6601 ;
6602 return 0;
6603}
6604_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006605if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00006606 ac_cv_has_makedev=yes
6607else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006608 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006609fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006610rm -f core conftest.err conftest.$ac_objext \
6611 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00006612 if test "$ac_cv_has_makedev" = "yes"; then
6613
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006614$as_echo "#define _OSF_SOURCE 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00006615
6616 fi
6617fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006618{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_makedev" >&5
6619$as_echo "$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00006620if test "$ac_cv_has_makedev" = "yes"; then
6621
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006622$as_echo "#define HAVE_MAKEDEV 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00006623
6624fi
6625
Martin v. Löwis399a6892002-10-04 10:22:02 +00006626# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
6627# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
6628# defined, but the compiler does not support pragma redefine_extname,
6629# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
6630# structures (such as rlimit64) without declaring them. As a
6631# work-around, disable LFS on such configurations
6632
6633use_lfs=yes
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006634{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Solaris LFS bug" >&5
6635$as_echo_n "checking Solaris LFS bug... " >&6; }
6636cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006637/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00006638
6639#define _LARGEFILE_SOURCE 1
6640#define _FILE_OFFSET_BITS 64
6641#include <sys/resource.h>
6642
Martin v. Löwis399a6892002-10-04 10:22:02 +00006643int
6644main ()
6645{
6646struct rlimit foo;
6647 ;
6648 return 0;
6649}
6650_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006651if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis399a6892002-10-04 10:22:02 +00006652 sol_lfs_bug=no
6653else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006654 sol_lfs_bug=yes
Martin v. Löwis399a6892002-10-04 10:22:02 +00006655fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006656rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006657{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $sol_lfs_bug" >&5
6658$as_echo "$sol_lfs_bug" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00006659if test "$sol_lfs_bug" = "yes"; then
6660 use_lfs=no
6661fi
6662
6663if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00006664# Two defines needed to enable largefile support on various platforms
6665# These may affect some typedefs
Georg Brandl94800df2011-02-25 11:09:02 +00006666case $ac_sys_system/$ac_sys_release in
6667AIX*)
6668
6669$as_echo "#define _LARGE_FILES 1" >>confdefs.h
6670
6671 ;;
6672esac
Guido van Rossum810cc512001-09-09 23:51:39 +00006673
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006674$as_echo "#define _LARGEFILE_SOURCE 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00006675
6676
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006677$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
Guido van Rossum810cc512001-09-09 23:51:39 +00006678
Martin v. Löwis399a6892002-10-04 10:22:02 +00006679fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006680
Guido van Rossum84e7b241996-08-19 21:59:00 +00006681# Add some code to confdefs.h so that the test for off_t works on SCO
6682cat >> confdefs.h <<\EOF
6683#if defined(SCO_DS)
6684#undef _OFF_T
6685#endif
6686EOF
6687
Guido van Rossumef2255b2000-03-10 22:30:29 +00006688# Type availability checks
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006689ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
Matthias Klose3cef2a92012-03-14 23:39:33 +01006690if test "x$ac_cv_type_mode_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006691
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006692else
Martin v. Löwis11437992002-04-12 09:54:03 +00006693
6694cat >>confdefs.h <<_ACEOF
6695#define mode_t int
6696_ACEOF
6697
6698fi
6699
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006700ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
Matthias Klose3cef2a92012-03-14 23:39:33 +01006701if test "x$ac_cv_type_off_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006702
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006703else
Martin v. Löwis11437992002-04-12 09:54:03 +00006704
6705cat >>confdefs.h <<_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00006706#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00006707_ACEOF
6708
6709fi
6710
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006711ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
Matthias Klose3cef2a92012-03-14 23:39:33 +01006712if test "x$ac_cv_type_pid_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006713
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006714else
Martin v. Löwis11437992002-04-12 09:54:03 +00006715
6716cat >>confdefs.h <<_ACEOF
6717#define pid_t int
6718_ACEOF
6719
6720fi
6721
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006722
Martin v. Löwis11437992002-04-12 09:54:03 +00006723cat >>confdefs.h <<_ACEOF
Matthias Klosecbf54b12010-05-08 11:04:18 +00006724#define RETSIGTYPE void
Martin v. Löwis11437992002-04-12 09:54:03 +00006725_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00006726
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006727ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
Matthias Klose3cef2a92012-03-14 23:39:33 +01006728if test "x$ac_cv_type_size_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006729
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006730else
Martin v. Löwis11437992002-04-12 09:54:03 +00006731
6732cat >>confdefs.h <<_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00006733#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00006734_ACEOF
6735
6736fi
6737
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006738{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
6739$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01006740if ${ac_cv_type_uid_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006741 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006742else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006743 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006744/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006745#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006746
6747_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006748if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006749 $EGREP "uid_t" >/dev/null 2>&1; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006750 ac_cv_type_uid_t=yes
6751else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006752 ac_cv_type_uid_t=no
6753fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00006754rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00006755
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006756fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006757{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
6758$as_echo "$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00006759if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006760
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006761$as_echo "#define uid_t int" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00006762
6763
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006764$as_echo "#define gid_t int" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006765
6766fi
6767
Mark Dickinson17c50cd2012-12-02 13:13:56 +00006768
6769# There are two separate checks for each of the exact-width integer types we
6770# need. First we check whether the type is available using the usual
6771# AC_CHECK_TYPE macro with the default includes (which includes <inttypes.h>
6772# and <stdint.h> where available). We then also use the special type checks of
6773# the form AC_TYPE_UINT32_T, which in the case that uint32_t is not available
6774# directly, #define's uint32_t to be a suitable type.
6775
6776ac_fn_c_check_type "$LINENO" "uint32_t" "ac_cv_type_uint32_t" "$ac_includes_default"
6777if test "x$ac_cv_type_uint32_t" = xyes; then :
6778
6779$as_echo "#define HAVE_UINT32_T 1" >>confdefs.h
6780
6781fi
6782
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006783ac_fn_c_find_uintX_t "$LINENO" "32" "ac_cv_c_uint32_t"
6784case $ac_cv_c_uint32_t in #(
Mark Dickinsonefc82f72009-03-20 15:51:55 +00006785 no|yes) ;; #(
6786 *)
6787
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006788$as_echo "#define _UINT32_T 1" >>confdefs.h
Mark Dickinsonefc82f72009-03-20 15:51:55 +00006789
6790
6791cat >>confdefs.h <<_ACEOF
6792#define uint32_t $ac_cv_c_uint32_t
6793_ACEOF
6794;;
6795 esac
6796
Mark Dickinson17c50cd2012-12-02 13:13:56 +00006797
6798ac_fn_c_check_type "$LINENO" "uint64_t" "ac_cv_type_uint64_t" "$ac_includes_default"
6799if test "x$ac_cv_type_uint64_t" = xyes; then :
6800
6801$as_echo "#define HAVE_UINT64_T 1" >>confdefs.h
6802
6803fi
6804
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006805ac_fn_c_find_uintX_t "$LINENO" "64" "ac_cv_c_uint64_t"
6806case $ac_cv_c_uint64_t in #(
Mark Dickinsonefc82f72009-03-20 15:51:55 +00006807 no|yes) ;; #(
6808 *)
6809
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006810$as_echo "#define _UINT64_T 1" >>confdefs.h
Mark Dickinsonefc82f72009-03-20 15:51:55 +00006811
6812
6813cat >>confdefs.h <<_ACEOF
6814#define uint64_t $ac_cv_c_uint64_t
6815_ACEOF
6816;;
6817 esac
6818
Mark Dickinson17c50cd2012-12-02 13:13:56 +00006819
6820ac_fn_c_check_type "$LINENO" "int32_t" "ac_cv_type_int32_t" "$ac_includes_default"
6821if test "x$ac_cv_type_int32_t" = xyes; then :
6822
6823$as_echo "#define HAVE_INT32_T 1" >>confdefs.h
6824
6825fi
6826
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006827ac_fn_c_find_intX_t "$LINENO" "32" "ac_cv_c_int32_t"
6828case $ac_cv_c_int32_t in #(
Mark Dickinsonefc82f72009-03-20 15:51:55 +00006829 no|yes) ;; #(
6830 *)
6831
6832cat >>confdefs.h <<_ACEOF
6833#define int32_t $ac_cv_c_int32_t
6834_ACEOF
6835;;
Mark Dickinsonefc82f72009-03-20 15:51:55 +00006836esac
6837
Mark Dickinson17c50cd2012-12-02 13:13:56 +00006838
6839ac_fn_c_check_type "$LINENO" "int64_t" "ac_cv_type_int64_t" "$ac_includes_default"
6840if test "x$ac_cv_type_int64_t" = xyes; then :
6841
6842$as_echo "#define HAVE_INT64_T 1" >>confdefs.h
6843
6844fi
6845
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006846ac_fn_c_find_intX_t "$LINENO" "64" "ac_cv_c_int64_t"
6847case $ac_cv_c_int64_t in #(
Mark Dickinsonefc82f72009-03-20 15:51:55 +00006848 no|yes) ;; #(
6849 *)
6850
6851cat >>confdefs.h <<_ACEOF
6852#define int64_t $ac_cv_c_int64_t
6853_ACEOF
6854;;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006855esac
Martin v. Löwis18e16552006-02-15 17:27:45 +00006856
Mark Dickinson17c50cd2012-12-02 13:13:56 +00006857
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006858ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
Matthias Klose3cef2a92012-03-14 23:39:33 +01006859if test "x$ac_cv_type_ssize_t" = xyes; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00006860
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006861$as_echo "#define HAVE_SSIZE_T 1" >>confdefs.h
Martin v. Löwis18e16552006-02-15 17:27:45 +00006862
6863fi
6864
Jack Jansendd19cf82001-12-06 22:36:17 +00006865
Michael W. Hudson54241132001-12-07 15:38:26 +00006866# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00006867# ANSI C requires sizeof(char) == 1, so no need to check it
Martin v. Löwiseba40652007-08-30 20:10:57 +00006868# The cast to long int works around a bug in the HP C Compiler
6869# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6870# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6871# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006872{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
6873$as_echo_n "checking size of int... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01006874if ${ac_cv_sizeof_int+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006875 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006876else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006877 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 +00006878
Martin v. Löwis11437992002-04-12 09:54:03 +00006879else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006880 if test "$ac_cv_type_int" = yes; then
6881 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6882$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00006883as_fn_error 77 "cannot compute sizeof (int)
Matthias Klose3cef2a92012-03-14 23:39:33 +01006884See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006885 else
6886 ac_cv_sizeof_int=0
6887 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006888fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006889
Martin v. Löwis11437992002-04-12 09:54:03 +00006890fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006891{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
6892$as_echo "$ac_cv_sizeof_int" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006893
6894
6895
Martin v. Löwis11437992002-04-12 09:54:03 +00006896cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006897#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00006898_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006899
6900
Martin v. Löwiseba40652007-08-30 20:10:57 +00006901# The cast to long int works around a bug in the HP C Compiler
6902# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6903# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6904# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006905{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
6906$as_echo_n "checking size of long... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01006907if ${ac_cv_sizeof_long+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006908 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006909else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006910 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 +00006911
Martin v. Löwis11437992002-04-12 09:54:03 +00006912else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006913 if test "$ac_cv_type_long" = yes; then
6914 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6915$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00006916as_fn_error 77 "cannot compute sizeof (long)
Matthias Klose3cef2a92012-03-14 23:39:33 +01006917See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006918 else
6919 ac_cv_sizeof_long=0
6920 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006921fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006922
Martin v. Löwis11437992002-04-12 09:54:03 +00006923fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006924{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
6925$as_echo "$ac_cv_sizeof_long" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006926
6927
6928
Martin v. Löwis11437992002-04-12 09:54:03 +00006929cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006930#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00006931_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006932
6933
Martin v. Löwiseba40652007-08-30 20:10:57 +00006934# The cast to long int works around a bug in the HP C Compiler
6935# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6936# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6937# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006938{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
6939$as_echo_n "checking size of void *... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01006940if ${ac_cv_sizeof_void_p+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006941 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006942else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006943 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 +00006944
Martin v. Löwis11437992002-04-12 09:54:03 +00006945else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006946 if test "$ac_cv_type_void_p" = yes; then
6947 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6948$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00006949as_fn_error 77 "cannot compute sizeof (void *)
Matthias Klose3cef2a92012-03-14 23:39:33 +01006950See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006951 else
6952 ac_cv_sizeof_void_p=0
6953 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006954fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006955
Martin v. Löwis11437992002-04-12 09:54:03 +00006956fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006957{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
6958$as_echo "$ac_cv_sizeof_void_p" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006959
6960
6961
Martin v. Löwis11437992002-04-12 09:54:03 +00006962cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00006963#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00006964_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00006965
6966
Martin v. Löwiseba40652007-08-30 20:10:57 +00006967# The cast to long int works around a bug in the HP C Compiler
6968# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6969# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6970# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006971{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
6972$as_echo_n "checking size of short... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01006973if ${ac_cv_sizeof_short+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006974 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006975else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006976 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 +00006977
Martin v. Löwis11437992002-04-12 09:54:03 +00006978else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006979 if test "$ac_cv_type_short" = yes; then
6980 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6981$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00006982as_fn_error 77 "cannot compute sizeof (short)
Matthias Klose3cef2a92012-03-14 23:39:33 +01006983See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006984 else
6985 ac_cv_sizeof_short=0
6986 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006987fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006988
Martin v. Löwis11437992002-04-12 09:54:03 +00006989fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006990{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
6991$as_echo "$ac_cv_sizeof_short" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006992
6993
6994
Martin v. Löwis11437992002-04-12 09:54:03 +00006995cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006996#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00006997_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006998
6999
Martin v. Löwiseba40652007-08-30 20:10:57 +00007000# The cast to long int works around a bug in the HP C Compiler
7001# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7002# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7003# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007004{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of float" >&5
7005$as_echo_n "checking size of float... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007006if ${ac_cv_sizeof_float+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007007 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007008else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007009 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 +00007010
Martin v. Löwis11437992002-04-12 09:54:03 +00007011else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007012 if test "$ac_cv_type_float" = yes; then
7013 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7014$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007015as_fn_error 77 "cannot compute sizeof (float)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007016See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007017 else
7018 ac_cv_sizeof_float=0
7019 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007020fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007021
Martin v. Löwis11437992002-04-12 09:54:03 +00007022fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007023{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_float" >&5
7024$as_echo "$ac_cv_sizeof_float" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007025
7026
7027
Martin v. Löwis11437992002-04-12 09:54:03 +00007028cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007029#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00007030_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007031
7032
Martin v. Löwiseba40652007-08-30 20:10:57 +00007033# The cast to long int works around a bug in the HP C Compiler
7034# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7035# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7036# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007037{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of double" >&5
7038$as_echo_n "checking size of double... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007039if ${ac_cv_sizeof_double+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007040 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007041else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007042 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 +00007043
Martin v. Löwis11437992002-04-12 09:54:03 +00007044else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007045 if test "$ac_cv_type_double" = yes; then
7046 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7047$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007048as_fn_error 77 "cannot compute sizeof (double)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007049See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007050 else
7051 ac_cv_sizeof_double=0
7052 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007053fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007054
Martin v. Löwis11437992002-04-12 09:54:03 +00007055fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007056{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5
7057$as_echo "$ac_cv_sizeof_double" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007058
7059
7060
Martin v. Löwis11437992002-04-12 09:54:03 +00007061cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007062#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00007063_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007064
7065
Martin v. Löwiseba40652007-08-30 20:10:57 +00007066# The cast to long int works around a bug in the HP C Compiler
7067# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7068# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7069# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007070{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of fpos_t" >&5
7071$as_echo_n "checking size of fpos_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007072if ${ac_cv_sizeof_fpos_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007073 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007074else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007075 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 +00007076
Martin v. Löwis11437992002-04-12 09:54:03 +00007077else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007078 if test "$ac_cv_type_fpos_t" = yes; then
7079 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7080$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007081as_fn_error 77 "cannot compute sizeof (fpos_t)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007082See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007083 else
7084 ac_cv_sizeof_fpos_t=0
7085 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007086fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007087
Martin v. Löwis11437992002-04-12 09:54:03 +00007088fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007089{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_fpos_t" >&5
7090$as_echo "$ac_cv_sizeof_fpos_t" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007091
7092
7093
Martin v. Löwis11437992002-04-12 09:54:03 +00007094cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007095#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007096_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007097
Michael W. Hudson54241132001-12-07 15:38:26 +00007098
Martin v. Löwiseba40652007-08-30 20:10:57 +00007099# The cast to long int works around a bug in the HP C Compiler
7100# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7101# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7102# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007103{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
7104$as_echo_n "checking size of size_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007105if ${ac_cv_sizeof_size_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007106 $as_echo_n "(cached) " >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00007107else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007108 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 +00007109
Martin v. Löwis18e16552006-02-15 17:27:45 +00007110else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007111 if test "$ac_cv_type_size_t" = yes; then
7112 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7113$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007114as_fn_error 77 "cannot compute sizeof (size_t)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007115See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007116 else
7117 ac_cv_sizeof_size_t=0
7118 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +00007119fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007120
Martin v. Löwis18e16552006-02-15 17:27:45 +00007121fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007122{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
7123$as_echo "$ac_cv_sizeof_size_t" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007124
7125
7126
Martin v. Löwis18e16552006-02-15 17:27:45 +00007127cat >>confdefs.h <<_ACEOF
7128#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
7129_ACEOF
7130
7131
Christian Heimes951cc0f2008-01-31 23:08:23 +00007132# The cast to long int works around a bug in the HP C Compiler
7133# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7134# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7135# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007136{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pid_t" >&5
7137$as_echo_n "checking size of pid_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007138if ${ac_cv_sizeof_pid_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007139 $as_echo_n "(cached) " >&6
Christian Heimes951cc0f2008-01-31 23:08:23 +00007140else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007141 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 +00007142
Christian Heimes951cc0f2008-01-31 23:08:23 +00007143else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007144 if test "$ac_cv_type_pid_t" = yes; then
7145 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7146$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007147as_fn_error 77 "cannot compute sizeof (pid_t)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007148See \`config.log' for more details" "$LINENO" 5; }
Christian Heimes951cc0f2008-01-31 23:08:23 +00007149 else
7150 ac_cv_sizeof_pid_t=0
7151 fi
7152fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007153
Christian Heimes951cc0f2008-01-31 23:08:23 +00007154fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007155{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pid_t" >&5
7156$as_echo "$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes951cc0f2008-01-31 23:08:23 +00007157
7158
7159
7160cat >>confdefs.h <<_ACEOF
7161#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
7162_ACEOF
7163
7164
Michael W. Hudson54241132001-12-07 15:38:26 +00007165
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007166{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support" >&5
7167$as_echo_n "checking for long long support... " >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007168have_long_long=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007169cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007170/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007171
Martin v. Löwis11437992002-04-12 09:54:03 +00007172int
7173main ()
7174{
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007175long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007176 ;
7177 return 0;
7178}
7179_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007180if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007181
7182
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007183$as_echo "#define HAVE_LONG_LONG 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007184
Martin v. Löwisc45929e2002-04-06 10:10:49 +00007185 have_long_long=yes
7186
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007187fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007188rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007189{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_long" >&5
7190$as_echo "$have_long_long" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +00007191if test "$have_long_long" = yes ; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00007192# The cast to long int works around a bug in the HP C Compiler
7193# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7194# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7195# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007196{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
7197$as_echo_n "checking size of long long... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007198if ${ac_cv_sizeof_long_long+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007199 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007200else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007201 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 +00007202
Martin v. Löwis11437992002-04-12 09:54:03 +00007203else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007204 if test "$ac_cv_type_long_long" = yes; then
7205 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7206$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007207as_fn_error 77 "cannot compute sizeof (long long)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007208See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007209 else
7210 ac_cv_sizeof_long_long=0
7211 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007212fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007213
Martin v. Löwis11437992002-04-12 09:54:03 +00007214fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007215{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
7216$as_echo "$ac_cv_sizeof_long_long" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007217
7218
7219
Martin v. Löwis11437992002-04-12 09:54:03 +00007220cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007221#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +00007222_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007223
Michael W. Hudson54241132001-12-07 15:38:26 +00007224
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007225fi
7226
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007227{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support" >&5
7228$as_echo_n "checking for long double support... " >&6; }
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007229have_long_double=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007230cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007231/* end confdefs.h. */
7232
7233int
7234main ()
7235{
Matthias Klosec511b472010-05-08 11:01:39 +00007236long double x; x = (long double)0;
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007237 ;
7238 return 0;
7239}
7240_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007241if ac_fn_c_try_compile "$LINENO"; then :
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007242
7243
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007244$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007245
7246 have_long_double=yes
7247
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007248fi
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007249rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007250{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_double" >&5
7251$as_echo "$have_long_double" >&6; }
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007252if test "$have_long_double" = yes ; then
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007253# The cast to long int works around a bug in the HP C Compiler
7254# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7255# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7256# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007257{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long double" >&5
7258$as_echo_n "checking size of long double... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007259if ${ac_cv_sizeof_long_double+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007260 $as_echo_n "(cached) " >&6
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007261else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007262 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 +00007263
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007264else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007265 if test "$ac_cv_type_long_double" = yes; then
7266 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7267$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007268as_fn_error 77 "cannot compute sizeof (long double)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007269See \`config.log' for more details" "$LINENO" 5; }
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007270 else
7271 ac_cv_sizeof_long_double=0
7272 fi
7273fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007274
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007275fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007276{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double" >&5
7277$as_echo "$ac_cv_sizeof_long_double" >&6; }
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007278
7279
7280
7281cat >>confdefs.h <<_ACEOF
7282#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
7283_ACEOF
7284
7285
7286fi
7287
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007288{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _Bool support" >&5
7289$as_echo_n "checking for _Bool support... " >&6; }
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007290have_c99_bool=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007291cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007292/* end confdefs.h. */
7293
7294int
7295main ()
7296{
7297_Bool x; x = (_Bool)0;
7298 ;
7299 return 0;
7300}
7301_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007302if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007303
7304
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007305$as_echo "#define HAVE_C99_BOOL 1" >>confdefs.h
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007306
7307 have_c99_bool=yes
7308
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007309fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007310rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007311{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_c99_bool" >&5
7312$as_echo "$have_c99_bool" >&6; }
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007313if test "$have_c99_bool" = yes ; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00007314# The cast to long int works around a bug in the HP C Compiler
7315# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7316# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7317# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007318{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of _Bool" >&5
7319$as_echo_n "checking size of _Bool... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007320if ${ac_cv_sizeof__Bool+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007321 $as_echo_n "(cached) " >&6
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007322else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007323 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 +00007324
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007325else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007326 if test "$ac_cv_type__Bool" = yes; then
7327 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7328$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007329as_fn_error 77 "cannot compute sizeof (_Bool)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007330See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007331 else
7332 ac_cv_sizeof__Bool=0
7333 fi
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007334fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007335
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007336fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007337{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof__Bool" >&5
7338$as_echo "$ac_cv_sizeof__Bool" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007339
7340
7341
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007342cat >>confdefs.h <<_ACEOF
7343#define SIZEOF__BOOL $ac_cv_sizeof__Bool
7344_ACEOF
7345
7346
7347fi
7348
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007349ac_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 +00007350 #include <stdint.h>
7351 #endif
Antoine Pitrou7be5a652010-10-10 08:14:41 +00007352 #ifdef HAVE_INTTYPES_H
7353 #include <inttypes.h>
7354 #endif
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007355"
Matthias Klose3cef2a92012-03-14 23:39:33 +01007356if test "x$ac_cv_type_uintptr_t" = xyes; then :
Martin v. Löwisebe26702006-10-02 14:55:51 +00007357
7358cat >>confdefs.h <<_ACEOF
7359#define HAVE_UINTPTR_T 1
7360_ACEOF
7361
Martin v. Löwiseba40652007-08-30 20:10:57 +00007362# The cast to long int works around a bug in the HP C Compiler
7363# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7364# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7365# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007366{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of uintptr_t" >&5
7367$as_echo_n "checking size of uintptr_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007368if ${ac_cv_sizeof_uintptr_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007369 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007370else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007371 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 +00007372
Martin v. Löwis11437992002-04-12 09:54:03 +00007373else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007374 if test "$ac_cv_type_uintptr_t" = yes; then
7375 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7376$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007377as_fn_error 77 "cannot compute sizeof (uintptr_t)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007378See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007379 else
7380 ac_cv_sizeof_uintptr_t=0
7381 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007382fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007383
Martin v. Löwis11437992002-04-12 09:54:03 +00007384fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007385{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uintptr_t" >&5
7386$as_echo "$ac_cv_sizeof_uintptr_t" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007387
7388
7389
Martin v. Löwis11437992002-04-12 09:54:03 +00007390cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007391#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007392_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007393
Michael W. Hudson54241132001-12-07 15:38:26 +00007394
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007395fi
7396
Martin v. Löwisebe26702006-10-02 14:55:51 +00007397
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007398# The cast to long int works around a bug in the HP C Compiler
7399# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7400# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7401# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007402{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
7403$as_echo_n "checking size of off_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007404if ${ac_cv_sizeof_off_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007405 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007406else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007407 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007408#ifdef HAVE_SYS_TYPES_H
7409#include <sys/types.h>
7410#endif
7411
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007412"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007413
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007414else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007415 if test "$ac_cv_type_off_t" = yes; then
7416 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7417$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007418as_fn_error 77 "cannot compute sizeof (off_t)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007419See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007420 else
7421 ac_cv_sizeof_off_t=0
7422 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007423fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007424
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007425fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007426{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
7427$as_echo "$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007428
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007429
7430
Martin v. Löwis11437992002-04-12 09:54:03 +00007431cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007432#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007433_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007434
Michael W. Hudson54241132001-12-07 15:38:26 +00007435
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007436
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007437{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable large file support" >&5
7438$as_echo_n "checking whether to enable large file support... " >&6; }
Mark Dickinson0ef0b912009-12-31 21:11:48 +00007439if test "$have_long_long" = yes
7440then
7441if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +00007442 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007443
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007444$as_echo "#define HAVE_LARGEFILE_SUPPORT 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007445
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007446 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7447$as_echo "yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007448else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007449 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7450$as_echo "no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007451fi
Mark Dickinson0ef0b912009-12-31 21:11:48 +00007452else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007453 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7454$as_echo "no" >&6; }
Mark Dickinson0ef0b912009-12-31 21:11:48 +00007455fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007456
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007457# The cast to long int works around a bug in the HP C Compiler
7458# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7459# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7460# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007461{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
7462$as_echo_n "checking size of time_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007463if ${ac_cv_sizeof_time_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007464 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007465else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007466 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007467#ifdef HAVE_SYS_TYPES_H
7468#include <sys/types.h>
7469#endif
7470#ifdef HAVE_TIME_H
7471#include <time.h>
7472#endif
7473
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007474"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007475
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007476else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007477 if test "$ac_cv_type_time_t" = yes; then
7478 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7479$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007480as_fn_error 77 "cannot compute sizeof (time_t)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007481See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007482 else
7483 ac_cv_sizeof_time_t=0
7484 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007485fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007486
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007487fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007488{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
7489$as_echo "$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007490
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007491
7492
Martin v. Löwis11437992002-04-12 09:54:03 +00007493cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007494#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007495_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007496
Michael W. Hudson54241132001-12-07 15:38:26 +00007497
7498
Trent Mick635f6fb2000-08-23 21:33:05 +00007499# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00007500ac_save_cc="$CC"
7501if test "$ac_cv_kpthread" = "yes"
7502then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00007503elif test "$ac_cv_kthread" = "yes"
7504then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00007505elif test "$ac_cv_pthread" = "yes"
7506then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00007507fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007508{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_t" >&5
7509$as_echo_n "checking for pthread_t... " >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00007510have_pthread_t=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007511cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007512/* end confdefs.h. */
Matthias Klosec511b472010-05-08 11:01:39 +00007513
7514 #include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007515int
7516main ()
7517{
Guido van Rossum12580492000-09-24 16:47:19 +00007518pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007519 ;
7520 return 0;
7521}
Matthias Klosec511b472010-05-08 11:01:39 +00007522
Martin v. Löwis11437992002-04-12 09:54:03 +00007523_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007524if ac_fn_c_try_compile "$LINENO"; then :
Trent Mick635f6fb2000-08-23 21:33:05 +00007525 have_pthread_t=yes
Trent Mick635f6fb2000-08-23 21:33:05 +00007526fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007527rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007528{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_pthread_t" >&5
7529$as_echo "$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00007530if test "$have_pthread_t" = yes ; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007531 # The cast to long int works around a bug in the HP C Compiler
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007532# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7533# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7534# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007535{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
7536$as_echo_n "checking size of pthread_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007537if ${ac_cv_sizeof_pthread_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007538 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007539else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007540 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t" "
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007541#ifdef HAVE_PTHREAD_H
7542#include <pthread.h>
7543#endif
7544
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007545"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007546
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007547else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007548 if test "$ac_cv_type_pthread_t" = yes; then
7549 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7550$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007551as_fn_error 77 "cannot compute sizeof (pthread_t)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007552See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007553 else
7554 ac_cv_sizeof_pthread_t=0
7555 fi
Trent Mick635f6fb2000-08-23 21:33:05 +00007556fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007557
Trent Mick635f6fb2000-08-23 21:33:05 +00007558fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007559{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
7560$as_echo "$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007561
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007562
7563
Martin v. Löwis11437992002-04-12 09:54:03 +00007564cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00007565#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007566_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00007567
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007568
Trent Mick635f6fb2000-08-23 21:33:05 +00007569fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00007570CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00007571
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007572{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-toolbox-glue" >&5
7573$as_echo_n "checking for --enable-toolbox-glue... " >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007574# Check whether --enable-toolbox-glue was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007575if test "${enable_toolbox_glue+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00007576 enableval=$enable_toolbox_glue;
7577fi
Jack Jansene578a632001-08-15 01:27:14 +00007578
7579
7580if test -z "$enable_toolbox_glue"
Martin v. Löwis11437992002-04-12 09:54:03 +00007581then
Jack Jansene578a632001-08-15 01:27:14 +00007582 case $ac_sys_system/$ac_sys_release in
7583 Darwin/*)
7584 enable_toolbox_glue="yes";;
7585 *)
7586 enable_toolbox_glue="no";;
7587 esac
7588fi
7589case "$enable_toolbox_glue" in
7590yes)
Jack Jansene578a632001-08-15 01:27:14 +00007591 extra_machdep_objs="Python/mactoolboxglue.o"
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00007592 extra_undefs="-u _PyMac_Error"
Martin v. Löwis11437992002-04-12 09:54:03 +00007593
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007594$as_echo "#define USE_TOOLBOX_OBJECT_GLUE 1" >>confdefs.h
Jack Jansene578a632001-08-15 01:27:14 +00007595
7596 ;;
7597*)
Jack Jansene578a632001-08-15 01:27:14 +00007598 extra_machdep_objs=""
Jack Jansen591cbed2001-08-15 13:55:15 +00007599 extra_undefs=""
Jack Jansene578a632001-08-15 01:27:14 +00007600 ;;
7601esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007602{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_toolbox_glue" >&5
7603$as_echo "$enable_toolbox_glue" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00007604
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007605
Ronald Oussoren0d236eb2008-06-06 21:31:33 +00007606
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007607case $ac_sys_system/$ac_sys_release in
Anthony Baxter82201742006-04-09 15:07:40 +00007608 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +00007609 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
7610 ;;
7611 Darwin/*)
7612 OTHER_LIBTOOL_OPT=""
7613 ;;
7614esac
7615
7616
Ronald Oussoren25967582009-09-06 10:00:26 +00007617ARCH_RUN_32BIT=""
7618
Bob Ippolito7026a0a2005-03-28 23:23:47 +00007619case $ac_sys_system/$ac_sys_release in
Anthony Baxter82201742006-04-09 15:07:40 +00007620 Darwin/[01567]\..*)
Ronald Oussoren988117f2006-04-29 11:31:35 +00007621 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
7622 if test "${enable_universalsdk}"; then
7623 :
7624 else
Ronald Oussorenbc0e83c2010-02-11 13:26:54 +00007625 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Ronald Oussoren988117f2006-04-29 11:31:35 +00007626 fi
Jack Jansenb36687a2004-07-16 08:43:47 +00007627 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00007628 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00007629 Darwin/*)
Ronald Oussorena55af9a2010-01-17 16:25:57 +00007630 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +00007631 if test ${gcc_version} '<' 4.0
7632 then
7633 LIBTOOL_CRUFT="-lcc_dynamic"
7634 else
7635 LIBTOOL_CRUFT=""
7636 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007637 if test "$cross_compiling" = yes; then :
Ronald Oussoren23d92532009-09-07 06:12:00 +00007638 ac_osx_32bit=yes
Ronald Oussoren25967582009-09-06 10:00:26 +00007639else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007640 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren25967582009-09-06 10:00:26 +00007641/* end confdefs.h. */
Ronald Oussoren23d92532009-09-07 06:12:00 +00007642
Ronald Oussoren25967582009-09-06 10:00:26 +00007643 #include <unistd.h>
7644 int main(int argc, char*argv[])
7645 {
7646 if (sizeof(long) == 4) {
7647 return 0;
7648 } else {
7649 return 1;
7650 }
Ronald Oussoren84ddd722009-09-08 07:17:10 +00007651 }
Ronald Oussoren23d92532009-09-07 06:12:00 +00007652
Ronald Oussoren25967582009-09-06 10:00:26 +00007653_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007654if ac_fn_c_try_run "$LINENO"; then :
Ronald Oussoren25967582009-09-06 10:00:26 +00007655 ac_osx_32bit=yes
7656else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007657 ac_osx_32bit=no
Ronald Oussoren25967582009-09-06 10:00:26 +00007658fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007659rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7660 conftest.$ac_objext conftest.beam conftest.$ac_ext
Ronald Oussoren25967582009-09-06 10:00:26 +00007661fi
7662
7663
Ronald Oussoren25967582009-09-06 10:00:26 +00007664 if test "${ac_osx_32bit}" = "yes"; then
Ronald Oussorenbc0e83c2010-02-11 13:26:54 +00007665 case `/usr/bin/arch` in
Ronald Oussoren25967582009-09-06 10:00:26 +00007666 i386)
7667 MACOSX_DEFAULT_ARCH="i386"
7668 ;;
7669 ppc)
7670 MACOSX_DEFAULT_ARCH="ppc"
7671 ;;
7672 *)
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007673 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren25967582009-09-06 10:00:26 +00007674 ;;
7675 esac
7676 else
Ronald Oussorenbc0e83c2010-02-11 13:26:54 +00007677 case `/usr/bin/arch` in
Ronald Oussoren25967582009-09-06 10:00:26 +00007678 i386)
7679 MACOSX_DEFAULT_ARCH="x86_64"
7680 ;;
7681 ppc)
7682 MACOSX_DEFAULT_ARCH="ppc64"
7683 ;;
7684 *)
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007685 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren25967582009-09-06 10:00:26 +00007686 ;;
7687 esac
7688
7689 #ARCH_RUN_32BIT="true"
7690 fi
7691
7692 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +00007693 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00007694 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007695esac
7696
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007697{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-framework" >&5
7698$as_echo_n "checking for --enable-framework... " >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00007699if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007700then
Skip Montanarodecc6a42003-01-01 20:07:49 +00007701 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00007702 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00007703 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007704
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007705$as_echo "#define WITH_NEXT_FRAMEWORK 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007706
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007707 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7708$as_echo "yes" >&6; }
Ronald Oussoren450d5612009-06-08 21:12:41 +00007709 if test $enable_shared = "yes"
7710 then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007711 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 +00007712 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007713else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007714 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7715$as_echo "no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007716fi
7717
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007718{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dyld" >&5
7719$as_echo_n "checking for dyld... " >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00007720case $ac_sys_system/$ac_sys_release in
7721 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007722
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007723$as_echo "#define WITH_DYLD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007724
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007725 { $as_echo "$as_me:${as_lineno-$LINENO}: result: always on for Darwin" >&5
7726$as_echo "always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00007727 ;;
7728 *)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007729 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7730$as_echo "no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00007731 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00007732esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007733
Guido van Rossum0a516c91994-09-12 10:58:40 +00007734# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00007735
Michael W. Hudson54241132001-12-07 15:38:26 +00007736
7737
7738
7739
Ronald Oussoren75912852010-04-08 08:13:31 +00007740
Guido van Rossum0a516c91994-09-12 10:58:40 +00007741# SO is the extension of shared libraries `(including the dot!)
Guido van Rossumaef734b2001-01-10 21:09:12 +00007742# -- usually .so, .sl on HP-UX, .dll on Cygwin
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007743{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SO" >&5
7744$as_echo_n "checking SO... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007745if test -z "$SO"
7746then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007747 case $ac_sys_system in
Neal Norwitz58e28882006-05-19 07:00:58 +00007748 hp*|HP*)
7749 case `uname -m` in
7750 ia64) SO=.so;;
7751 *) SO=.sl;;
7752 esac
7753 ;;
Guido van Rossumaef734b2001-01-10 21:09:12 +00007754 CYGWIN*) SO=.dll;;
Guido van Rossum563e7081996-09-10 18:20:48 +00007755 *) SO=.so;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00007756 esac
Martin v. Löwis368de8f2003-06-14 14:46:38 +00007757else
7758 # this might also be a termcap variable, see #610332
7759 echo
7760 echo '====================================================================='
7761 echo '+ +'
7762 echo '+ WARNING: You have set SO in your environment. +'
7763 echo '+ Do you really mean to change the extension for shared libraries? +'
7764 echo '+ Continuing in 10 seconds to let you to ponder. +'
7765 echo '+ +'
7766 echo '====================================================================='
7767 sleep 10
Guido van Rossum0a516c91994-09-12 10:58:40 +00007768fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007769{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SO" >&5
7770$as_echo "$SO" >&6; }
Neal Norwitz58e28882006-05-19 07:00:58 +00007771
Ronald Oussoren79f90492009-01-02 10:44:46 +00007772
Neal Norwitz58e28882006-05-19 07:00:58 +00007773cat >>confdefs.h <<_ACEOF
7774#define SHLIB_EXT "$SO"
7775_ACEOF
7776
Guido van Rossum0a516c91994-09-12 10:58:40 +00007777# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +00007778# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007779# (Shared libraries in this instance are shared modules to be loaded into
7780# Python, as opposed to building Python itself as a shared library.)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007781{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDSHARED" >&5
7782$as_echo_n "checking LDSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007783if test -z "$LDSHARED"
7784then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007785 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007786 AIX*)
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007787 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:\$(srcdir)/Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +00007788 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007789 ;;
7790 BeOS*)
7791 BLDSHARED="\$(srcdir)/Modules/ld_so_beos $LDLIBRARY"
Guido van Rossumce608b02001-09-28 15:59:38 +00007792 LDSHARED="\$(BINLIBDEST)/config/ld_so_beos \$(LIBDIR)/$LDLIBRARY"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007793 ;;
Guido van Rossum07397971997-04-29 21:49:50 +00007794 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00007795 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +00007796 SunOS/5*)
Ronald Oussoren75912852010-04-08 08:13:31 +00007797 if test "$GCC" = "yes" ; then
7798 LDSHARED='$(CC) -shared'
7799 LDCXXSHARED='$(CXX) -shared'
7800 else
7801 LDSHARED='$(CC) -G'
7802 LDCXXSHARED='$(CXX) -G'
Greg Ward57c9a662000-05-26 12:22:54 +00007803 fi ;;
Thomas Hellerdc96a772008-04-04 10:07:55 +00007804 hp*|HP*)
Ronald Oussoren75912852010-04-08 08:13:31 +00007805 if test "$GCC" = "yes" ; then
7806 LDSHARED='$(CC) -shared'
7807 LDCXXSHARED='$(CXX) -shared'
7808 else
7809 LDSHARED='ld -b'
Thomas Hellerdc96a772008-04-04 10:07:55 +00007810 fi ;;
Guido van Rossumda88dad1995-01-26 00:46:29 +00007811 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
Jack Jansen418c3b12001-11-14 10:59:57 +00007812 Darwin/1.3*)
Stefan Krah3a3e2032010-11-28 15:30:05 +00007813 LDSHARED='$(CC) -bundle'
7814 LDCXXSHARED='$(CXX) -bundle'
Jack Jansena3891ea2001-09-07 14:25:12 +00007815 if test "$enable_framework" ; then
7816 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00007817 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
7818 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Ronald Oussoren75912852010-04-08 08:13:31 +00007819 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00007820 else
7821 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00007822 LDSHARED="$LDSHARED -undefined suppress"
Ronald Oussoren75912852010-04-08 08:13:31 +00007823 LDCXXSHARED="$LDCXXSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00007824 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00007825 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Stefan Krah3a3e2032010-11-28 15:30:05 +00007826 LDSHARED='$(CC) -bundle'
7827 LDCXXSHARED='$(CXX) -bundle'
Jack Jansene578a632001-08-15 01:27:14 +00007828 if test "$enable_framework" ; then
7829 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00007830 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
7831 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Ronald Oussoren75912852010-04-08 08:13:31 +00007832 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00007833 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00007834 # No framework, use the Python app as bundle-loader
7835 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00007836 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Ronald Oussoren75912852010-04-08 08:13:31 +00007837 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007838 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00007839 Darwin/*)
7840 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
7841 # This allows an extension to be used in any Python
Ronald Oussoren38f1b982007-09-02 09:46:07 +00007842
Ronald Oussoren5640ce22008-06-05 12:58:24 +00007843 if test ${MACOSX_DEPLOYMENT_TARGET} '>' 10.2
Jack Jansen6b08a402004-06-03 12:41:45 +00007844 then
Ronald Oussoren988117f2006-04-29 11:31:35 +00007845 if test "${enable_universalsdk}"; then
Ronald Oussoren5640ce22008-06-05 12:58:24 +00007846 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Ronald Oussoren988117f2006-04-29 11:31:35 +00007847 fi
Stefan Krah3a3e2032010-11-28 15:30:05 +00007848 LDSHARED='$(CC) -bundle -undefined dynamic_lookup'
7849 LDCXXSHARED='$(CXX) -bundle -undefined dynamic_lookup'
Jack Jansen6b08a402004-06-03 12:41:45 +00007850 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +00007851 else
Stefan Krah3a3e2032010-11-28 15:30:05 +00007852 LDSHARED='$(CC) -bundle'
7853 LDCXXSHARED='$(CXX) -bundle'
Jack Jansen6b08a402004-06-03 12:41:45 +00007854 if test "$enable_framework" ; then
7855 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00007856 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
7857 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Ronald Oussoren75912852010-04-08 08:13:31 +00007858 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +00007859 else
7860 # No framework, use the Python app as bundle-loader
7861 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
7862 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Ronald Oussoren75912852010-04-08 08:13:31 +00007863 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Jack Jansen6b08a402004-06-03 12:41:45 +00007864 fi
7865 fi
7866 ;;
Ronald Oussoren75912852010-04-08 08:13:31 +00007867 Linux*|GNU*|QNX*)
7868 LDSHARED='$(CC) -shared'
7869 LDCXXSHARED='$(CXX) -shared';;
7870 BSD/OS*/4*)
7871 LDSHARED="gcc -shared"
7872 LDCXXSHARED="g++ -shared";;
Martin v. Löwis222c5152006-06-03 07:37:13 +00007873 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00007874 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00007875 then
Stefan Krah3a3e2032010-11-28 15:30:05 +00007876 LDSHARED='$(CC) -shared'
7877 LDCXXSHARED='$(CXX) -shared'
Guido van Rossum0286ae82000-08-29 15:06:49 +00007878 else
Stefan Krah3a3e2032010-11-28 15:30:05 +00007879 LDSHARED="ld -Bshareable"
Guido van Rossum0286ae82000-08-29 15:06:49 +00007880 fi;;
Martin v. Löwis222c5152006-06-03 07:37:13 +00007881 OpenBSD*)
7882 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
7883 then
Stefan Krah3a3e2032010-11-28 15:30:05 +00007884 LDSHARED='$(CC) -shared $(CCSHARED)'
7885 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Martin v. Löwis222c5152006-06-03 07:37:13 +00007886 else
7887 case `uname -r` in
7888 [01].* | 2.[0-7] | 2.[0-7].*)
7889 LDSHARED="ld -Bshareable ${LDFLAGS}"
7890 ;;
7891 *)
Stefan Krah3a3e2032010-11-28 15:30:05 +00007892 LDSHARED='$(CC) -shared $(CCSHARED)'
7893 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Martin v. Löwis222c5152006-06-03 07:37:13 +00007894 ;;
7895 esac
7896 fi;;
Ronald Oussoren75912852010-04-08 08:13:31 +00007897 NetBSD*|DragonFly*)
Antoine Pitroucb402772011-01-02 20:51:34 +00007898 LDSHARED='$(CC) -shared'
7899 LDCXXSHARED='$(CXX) -shared';;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00007900 OpenUNIX*|UnixWare*)
Ronald Oussoren75912852010-04-08 08:13:31 +00007901 if test "$GCC" = "yes" ; then
7902 LDSHARED='$(CC) -shared'
7903 LDCXXSHARED='$(CXX) -shared'
7904 else
7905 LDSHARED='$(CC) -G'
7906 LDCXXSHARED='$(CXX) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00007907 fi;;
Ronald Oussoren75912852010-04-08 08:13:31 +00007908 SCO_SV*)
7909 LDSHARED='$(CC) -Wl,-G,-Bexport'
7910 LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
7911 CYGWIN*)
7912 LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
7913 LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
7914 atheos*)
7915 LDSHARED="gcc -shared"
7916 LDCXXSHARED="g++ -shared";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00007917 *) LDSHARED="ld";;
7918 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00007919fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007920{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDSHARED" >&5
7921$as_echo "$LDSHARED" >&6; }
Ronald Oussoren75912852010-04-08 08:13:31 +00007922LDCXXSHARED=${LDCXXSHARED-$LDSHARED}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007923BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00007924# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007925# library (module) -- this is only needed for a few systems
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007926{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CCSHARED" >&5
7927$as_echo_n "checking CCSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007928if test -z "$CCSHARED"
7929then
Guido van Rossum07397971997-04-29 21:49:50 +00007930 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00007931 SunOS*) if test "$GCC" = yes;
Martin v. Löwiseb623572007-03-12 10:50:39 +00007932 then CCSHARED="-fPIC";
7933 elif test `uname -p` = sparc;
7934 then CCSHARED="-xcode=pic32";
7935 else CCSHARED="-Kpic";
7936 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00007937 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00007938 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00007939 else CCSHARED="+z";
7940 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00007941 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00007942 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00007943 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00007944 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00007945 if test "$GCC" = "yes"
7946 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00007947 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00007948 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00007949 SCO_SV*)
7950 if test "$GCC" = "yes"
7951 then CCSHARED="-fPIC"
7952 else CCSHARED="-Kpic -belf"
7953 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007954 IRIX*/6*) case $CC in
7955 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00007956 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007957 esac;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007958 atheos*) CCSHARED="-fPIC";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00007959 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00007960fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007961{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCSHARED" >&5
7962$as_echo "$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007963# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007964# the python executable -- this is only needed for a few systems
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007965{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKFORSHARED" >&5
7966$as_echo_n "checking LINKFORSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007967if test -z "$LINKFORSHARED"
7968then
Guido van Rossum07397971997-04-29 21:49:50 +00007969 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007970 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007971 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00007972 LINKFORSHARED="-Wl,-E -Wl,+s";;
7973# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00007974 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00007975 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007976 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00007977 Darwin/*)
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00007978 # -u _PyMac_Error is needed to pull in the mac toolbox glue,
7979 # which is
Jack Jansene578a632001-08-15 01:27:14 +00007980 # not used by the core itself but which needs to be in the core so
7981 # that dynamically loaded extension modules have access to it.
Jack Jansen97e3f002003-02-23 22:59:01 +00007982 # -prebind is no longer used, because it actually seems to give a
7983 # slowdown in stead of a speedup, maybe due to the large number of
7984 # dynamic loads Python does.
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00007985
7986 LINKFORSHARED="$extra_undefs"
Jack Jansene578a632001-08-15 01:27:14 +00007987 if test "$enable_framework"
7988 then
Jack Jansenda49e192005-01-07 13:08:22 +00007989 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00007990 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00007991 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00007992 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00007993 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00007994 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00007995 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +00007996 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
7997 then
7998 LINKFORSHARED="-Wl,--export-dynamic"
7999 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008000 SunOS/5*) case $CC in
8001 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00008002 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00008003 then
8004 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008005 fi;;
8006 esac;;
Jason Tishler30765592003-09-04 11:04:06 +00008007 CYGWIN*)
8008 if test $enable_shared = "no"
8009 then
8010 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
8011 fi;;
Martin v. Löwis8c255e42008-05-23 15:06:50 +00008012 QNX*)
8013 # -Wl,-E causes the symbols to be added to the dynamic
8014 # symbol table so that they can be found when a module
8015 # is loaded. -N 2048K causes the stack size to be set
8016 # to 2048 kilobytes so that the stack doesn't overflow
8017 # when running test_compile.py.
8018 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008019 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008020fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008021{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKFORSHARED" >&5
8022$as_echo "$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008023
Michael W. Hudson54241132001-12-07 15:38:26 +00008024
Ronald Oussoren0d236eb2008-06-06 21:31:33 +00008025
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008026{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAGSFORSHARED" >&5
8027$as_echo_n "checking CFLAGSFORSHARED... " >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00008028if test ! "$LIBRARY" = "$LDLIBRARY"
8029then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00008030 case $ac_sys_system in
8031 CYGWIN*)
8032 # Cygwin needs CCSHARED when building extension DLLs
8033 # but not when building the interpreter DLL.
8034 CFLAGSFORSHARED='';;
8035 *)
8036 CFLAGSFORSHARED='$(CCSHARED)'
8037 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00008038fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008039{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CFLAGSFORSHARED" >&5
8040$as_echo "$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00008041
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008042# SHLIBS are libraries (except -lc and -lm) to link to the python shared
8043# library (with --enable-shared).
8044# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00008045# symbols, this must be set to $(LIBS) (expanded by make). We do this even
8046# if it is not required, since it creates a dependency of the shared library
8047# to LIBS. This, in turn, means that applications linking the shared libpython
8048# don't need to link LIBS explicitly. The default should be only changed
8049# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008050
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008051{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SHLIBS" >&5
8052$as_echo_n "checking SHLIBS... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008053case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008054 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00008055 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008056esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008057{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIBS" >&5
8058$as_echo "$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008059
8060
Guido van Rossum627b2d71993-12-24 10:39:16 +00008061# checks for libraries
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008062{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
8063$as_echo_n "checking for dlopen in -ldl... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008064if ${ac_cv_lib_dl_dlopen+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008065 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008066else
Martin v. Löwis11437992002-04-12 09:54:03 +00008067 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008068LIBS="-ldl $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008069cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008070/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008071
Martin v. Löwiseba40652007-08-30 20:10:57 +00008072/* Override any GCC internal prototype to avoid an error.
8073 Use char because int might match the return type of a GCC
8074 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008075#ifdef __cplusplus
8076extern "C"
8077#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008078char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008079int
8080main ()
8081{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008082return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008083 ;
8084 return 0;
8085}
8086_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008087if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008088 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008089else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008090 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008091fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008092rm -f core conftest.err conftest.$ac_objext \
8093 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008094LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00008095fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008096{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
8097$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008098if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008099 cat >>confdefs.h <<_ACEOF
8100#define HAVE_LIBDL 1
8101_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00008102
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008103 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00008104
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008105fi
8106 # Dynamic linking for SunOS/Solaris and SYSV
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008107{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
8108$as_echo_n "checking for shl_load in -ldld... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008109if ${ac_cv_lib_dld_shl_load+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008110 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008111else
Martin v. Löwis11437992002-04-12 09:54:03 +00008112 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008113LIBS="-ldld $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008114cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008115/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008116
Martin v. Löwiseba40652007-08-30 20:10:57 +00008117/* Override any GCC internal prototype to avoid an error.
8118 Use char because int might match the return type of a GCC
8119 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008120#ifdef __cplusplus
8121extern "C"
8122#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008123char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008124int
8125main ()
8126{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008127return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008128 ;
8129 return 0;
8130}
8131_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008132if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008133 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008134else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008135 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008136fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008137rm -f core conftest.err conftest.$ac_objext \
8138 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008139LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00008140fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008141{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
8142$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008143if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008144 cat >>confdefs.h <<_ACEOF
8145#define HAVE_LIBDLD 1
8146_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00008147
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008148 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008149
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008150fi
8151 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +00008152
Ronald Oussoren79f90492009-01-02 10:44:46 +00008153# only check for sem_init if thread support is requested
Martin v. Löwis519adae2003-09-20 10:47:47 +00008154if test "$with_threads" = "yes" -o -z "$with_threads"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008155 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
8156$as_echo_n "checking for library containing sem_init... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008157if ${ac_cv_search_sem_init+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008158 $as_echo_n "(cached) " >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00008159else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00008160 ac_func_search_save_LIBS=$LIBS
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008161cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008162/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008163
Martin v. Löwiseba40652007-08-30 20:10:57 +00008164/* Override any GCC internal prototype to avoid an error.
8165 Use char because int might match the return type of a GCC
8166 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008167#ifdef __cplusplus
8168extern "C"
8169#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008170char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008171int
8172main ()
8173{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008174return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008175 ;
8176 return 0;
8177}
8178_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00008179for ac_lib in '' pthread rt posix4; do
8180 if test -z "$ac_lib"; then
8181 ac_res="none required"
8182 else
8183 ac_res=-l$ac_lib
Skip Montanaro89e975f2007-08-22 19:05:21 +00008184 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Martin v. Löwiseba40652007-08-30 20:10:57 +00008185 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008186 if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00008187 ac_cv_search_sem_init=$ac_res
Brett Cannon19fab762007-06-02 03:02:29 +00008188fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008189rm -f core conftest.err conftest.$ac_objext \
8190 conftest$ac_exeext
Matthias Klose3cef2a92012-03-14 23:39:33 +01008191 if ${ac_cv_search_sem_init+:} false; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00008192 break
Skip Montanaro89e975f2007-08-22 19:05:21 +00008193fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008194done
Matthias Klose3cef2a92012-03-14 23:39:33 +01008195if ${ac_cv_search_sem_init+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008196
Martin v. Löwiseba40652007-08-30 20:10:57 +00008197else
8198 ac_cv_search_sem_init=no
8199fi
8200rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00008201LIBS=$ac_func_search_save_LIBS
8202fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008203{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
8204$as_echo "$ac_cv_search_sem_init" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008205ac_res=$ac_cv_search_sem_init
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008206if test "$ac_res" != no; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00008207 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00008208
Martin v. Löwis41933dd2002-03-21 15:10:58 +00008209fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +00008210 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +00008211 # posix4 on Solaris 2.6
8212 # pthread (first!) on Linux
8213fi
8214
Martin v. Löwis19d17342003-06-14 21:03:05 +00008215# check if we need libintl for locale functions
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008216{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for textdomain in -lintl" >&5
8217$as_echo_n "checking for textdomain in -lintl... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008218if ${ac_cv_lib_intl_textdomain+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008219 $as_echo_n "(cached) " >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +00008220else
8221 ac_check_lib_save_LIBS=$LIBS
8222LIBS="-lintl $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008223cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008224/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00008225
Martin v. Löwiseba40652007-08-30 20:10:57 +00008226/* Override any GCC internal prototype to avoid an error.
8227 Use char because int might match the return type of a GCC
8228 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00008229#ifdef __cplusplus
8230extern "C"
8231#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +00008232char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00008233int
8234main ()
8235{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008236return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00008237 ;
8238 return 0;
8239}
8240_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008241if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00008242 ac_cv_lib_intl_textdomain=yes
8243else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008244 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +00008245fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008246rm -f core conftest.err conftest.$ac_objext \
8247 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +00008248LIBS=$ac_check_lib_save_LIBS
8249fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008250{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_textdomain" >&5
8251$as_echo "$ac_cv_lib_intl_textdomain" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008252if test "x$ac_cv_lib_intl_textdomain" = xyes; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00008253
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008254$as_echo "#define WITH_LIBINTL 1" >>confdefs.h
Martin v. Löwis19d17342003-06-14 21:03:05 +00008255
8256fi
8257
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008258
8259# checks for system dependent C++ extensions support
8260case "$ac_sys_system" in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008261 AIX*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for genuine AIX C++ extensions support" >&5
8262$as_echo_n "checking for genuine AIX C++ extensions support... " >&6; }
8263 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008264/* end confdefs.h. */
Matthias Klosec511b472010-05-08 11:01:39 +00008265
Georg Brandl94800df2011-02-25 11:09:02 +00008266 #include <load.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008267int
8268main ()
8269{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008270loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00008271 ;
8272 return 0;
8273}
Matthias Klosec511b472010-05-08 11:01:39 +00008274
Martin v. Löwis11437992002-04-12 09:54:03 +00008275_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008276if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008277
Matthias Klosec511b472010-05-08 11:01:39 +00008278
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008279$as_echo "#define AIX_GENUINE_CPLUSPLUS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008280
Matthias Klosec511b472010-05-08 11:01:39 +00008281 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008282$as_echo "yes" >&6; }
Matthias Klosec511b472010-05-08 11:01:39 +00008283
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008284else
Matthias Klosec511b472010-05-08 11:01:39 +00008285
8286 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008287$as_echo "no" >&6; }
Matthias Klosec511b472010-05-08 11:01:39 +00008288
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008289fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008290rm -f core conftest.err conftest.$ac_objext \
8291 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008292 *) ;;
8293esac
8294
Guido van Rossum70c7f481998-03-26 18:44:10 +00008295# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008296# BeOS' sockets are stashed in libnet.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008297{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_open in -lnsl" >&5
8298$as_echo_n "checking for t_open in -lnsl... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008299if ${ac_cv_lib_nsl_t_open+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008300 $as_echo_n "(cached) " >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008301else
Martin v. Löwis11437992002-04-12 09:54:03 +00008302 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008303LIBS="-lnsl $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008304cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008305/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008306
Martin v. Löwiseba40652007-08-30 20:10:57 +00008307/* Override any GCC internal prototype to avoid an error.
8308 Use char because int might match the return type of a GCC
8309 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008310#ifdef __cplusplus
8311extern "C"
8312#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008313char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008314int
8315main ()
8316{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008317return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008318 ;
8319 return 0;
8320}
8321_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008322if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008323 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008324else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008325 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008326fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008327rm -f core conftest.err conftest.$ac_objext \
8328 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008329LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008330fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008331{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_t_open" >&5
8332$as_echo "$ac_cv_lib_nsl_t_open" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008333if test "x$ac_cv_lib_nsl_t_open" = xyes; then :
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008334 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008335fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00008336 # SVR4
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008337{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
8338$as_echo_n "checking for socket in -lsocket... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008339if ${ac_cv_lib_socket_socket+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008340 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008341else
Martin v. Löwis11437992002-04-12 09:54:03 +00008342 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008343LIBS="-lsocket $LIBS $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008344cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008345/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008346
Martin v. Löwiseba40652007-08-30 20:10:57 +00008347/* Override any GCC internal prototype to avoid an error.
8348 Use char because int might match the return type of a GCC
8349 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008350#ifdef __cplusplus
8351extern "C"
8352#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008353char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008354int
8355main ()
8356{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008357return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008358 ;
8359 return 0;
8360}
8361_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008362if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008363 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008364else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008365 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008366fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008367rm -f core conftest.err conftest.$ac_objext \
8368 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008369LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008370fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008371{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
8372$as_echo "$ac_cv_lib_socket_socket" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008373if test "x$ac_cv_lib_socket_socket" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +00008374 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +00008375fi
8376 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +00008377
Jeremy Hyltoncb25d5e2000-07-27 21:23:28 +00008378case "$ac_sys_system" in
8379BeOS*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008380{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lnet" >&5
8381$as_echo_n "checking for socket in -lnet... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008382if ${ac_cv_lib_net_socket+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008383 $as_echo_n "(cached) " >&6
Guido van Rossumad678af1998-10-02 14:42:15 +00008384else
Martin v. Löwis11437992002-04-12 09:54:03 +00008385 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +00008386LIBS="-lnet $LIBS $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008387cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008388/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008389
Martin v. Löwiseba40652007-08-30 20:10:57 +00008390/* Override any GCC internal prototype to avoid an error.
8391 Use char because int might match the return type of a GCC
8392 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008393#ifdef __cplusplus
8394extern "C"
8395#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008396char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008397int
8398main ()
8399{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008400return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008401 ;
8402 return 0;
8403}
8404_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008405if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008406 ac_cv_lib_net_socket=yes
Guido van Rossumad678af1998-10-02 14:42:15 +00008407else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008408 ac_cv_lib_net_socket=no
Guido van Rossumad678af1998-10-02 14:42:15 +00008409fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008410rm -f core conftest.err conftest.$ac_objext \
8411 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008412LIBS=$ac_check_lib_save_LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +00008413fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008414{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_net_socket" >&5
8415$as_echo "$ac_cv_lib_net_socket" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008416if test "x$ac_cv_lib_net_socket" = xyes; then :
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008417 LIBS="-lnet $LIBS"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008418fi
8419 # BeOS
8420;;
8421esac
Guido van Rossum70c7f481998-03-26 18:44:10 +00008422
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008423{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libs" >&5
8424$as_echo_n "checking for --with-libs... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008425
Martin v. Löwiseba40652007-08-30 20:10:57 +00008426# Check whether --with-libs was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008427if test "${with_libs+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00008428 withval=$with_libs;
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008429{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
8430$as_echo "$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +00008431LIBS="$withval $LIBS"
8432
8433else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008434 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8435$as_echo "no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008436fi
8437
Guido van Rossum7f43da71994-08-01 12:15:30 +00008438
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00008439if test -n "$ac_tool_prefix"; then
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008440 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
8441set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008442{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8443$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008444if ${ac_cv_path_PKG_CONFIG+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008445 $as_echo_n "(cached) " >&6
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008446else
8447 case $PKG_CONFIG in
8448 [\\/]* | ?:[\\/]*)
8449 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
8450 ;;
8451 *)
8452 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8453for as_dir in $PATH
8454do
8455 IFS=$as_save_IFS
8456 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008457 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01008458 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008459 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008460 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008461 break 2
8462 fi
8463done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008464 done
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008465IFS=$as_save_IFS
8466
8467 ;;
8468esac
8469fi
8470PKG_CONFIG=$ac_cv_path_PKG_CONFIG
8471if test -n "$PKG_CONFIG"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008472 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
8473$as_echo "$PKG_CONFIG" >&6; }
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008474else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008475 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8476$as_echo "no" >&6; }
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008477fi
8478
8479
8480fi
8481if test -z "$ac_cv_path_PKG_CONFIG"; then
8482 ac_pt_PKG_CONFIG=$PKG_CONFIG
8483 # Extract the first word of "pkg-config", so it can be a program name with args.
8484set dummy pkg-config; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008485{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8486$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008487if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008488 $as_echo_n "(cached) " >&6
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008489else
8490 case $ac_pt_PKG_CONFIG in
8491 [\\/]* | ?:[\\/]*)
8492 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
8493 ;;
8494 *)
8495 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8496for as_dir in $PATH
8497do
8498 IFS=$as_save_IFS
8499 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008500 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01008501 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008502 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008503 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008504 break 2
8505 fi
8506done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008507 done
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008508IFS=$as_save_IFS
8509
8510 ;;
8511esac
8512fi
8513ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
8514if test -n "$ac_pt_PKG_CONFIG"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008515 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
8516$as_echo "$ac_pt_PKG_CONFIG" >&6; }
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008517else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008518 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8519$as_echo "no" >&6; }
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008520fi
8521
8522 if test "x$ac_pt_PKG_CONFIG" = x; then
8523 PKG_CONFIG=""
8524 else
8525 case $cross_compiling:$ac_tool_warned in
8526yes:)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008527{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8528$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008529ac_tool_warned=yes ;;
8530esac
8531 PKG_CONFIG=$ac_pt_PKG_CONFIG
8532 fi
8533else
8534 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
8535fi
8536
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00008537
8538# Check for use of the system expat library
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008539{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-expat" >&5
8540$as_echo_n "checking for --with-system-expat... " >&6; }
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00008541
8542# Check whether --with-system_expat was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008543if test "${with_system_expat+set}" = set; then :
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00008544 withval=$with_system_expat;
Benjamin Petersonf2d1b2a2010-10-31 16:53:53 +00008545else
8546 with_system_expat="no"
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00008547fi
8548
8549
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008550{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_expat" >&5
8551$as_echo "$with_system_expat" >&6; }
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00008552
8553# Check for use of the system libffi library
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008554{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-ffi" >&5
8555$as_echo_n "checking for --with-system-ffi... " >&6; }
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00008556
8557# Check whether --with-system_ffi was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008558if test "${with_system_ffi+set}" = set; then :
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00008559 withval=$with_system_ffi;
Benjamin Petersonf2d1b2a2010-10-31 16:53:53 +00008560else
8561 with_system_ffi="no"
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00008562fi
8563
8564
8565if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008566 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
8567else
8568 LIBFFI_INCLUDEDIR=""
8569fi
8570
8571
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008572{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_ffi" >&5
8573$as_echo "$with_system_ffi" >&6; }
Martin v. Löwis9176fc12006-04-11 11:12:43 +00008574
Benjamin Peterson867475c2009-04-29 20:36:25 +00008575# Check for --with-dbmliborder
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008576{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dbmliborder" >&5
8577$as_echo_n "checking for --with-dbmliborder... " >&6; }
Benjamin Peterson867475c2009-04-29 20:36:25 +00008578
8579# Check whether --with-dbmliborder was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008580if test "${with_dbmliborder+set}" = set; then :
Benjamin Peterson867475c2009-04-29 20:36:25 +00008581 withval=$with_dbmliborder;
8582if test x$with_dbmliborder = xyes
8583then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00008584as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Benjamin Peterson867475c2009-04-29 20:36:25 +00008585else
8586 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
8587 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
8588 then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00008589 as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Benjamin Peterson867475c2009-04-29 20:36:25 +00008590 fi
8591 done
8592fi
8593fi
8594
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008595{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dbmliborder" >&5
8596$as_echo "$with_dbmliborder" >&6; }
Benjamin Peterson867475c2009-04-29 20:36:25 +00008597
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00008598# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +00008599
8600
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008601{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-signal-module" >&5
8602$as_echo_n "checking for --with-signal-module... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008603
Martin v. Löwiseba40652007-08-30 20:10:57 +00008604# Check whether --with-signal-module was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008605if test "${with_signal_module+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00008606 withval=$with_signal_module;
8607fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +00008608
8609
8610if test -z "$with_signal_module"
8611then with_signal_module="yes"
8612fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008613{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_signal_module" >&5
8614$as_echo "$with_signal_module" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +00008615
8616if test "${with_signal_module}" = "yes"; then
8617 USE_SIGNAL_MODULE=""
8618 SIGNAL_OBJS=""
8619else
8620 USE_SIGNAL_MODULE="#"
8621 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
8622fi
8623
Guido van Rossum3d15bd82001-01-10 18:53:48 +00008624# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +00008625
Barry Warsawc0d24d82000-06-29 16:12:00 +00008626USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +00008627
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008628{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dec-threads" >&5
8629$as_echo_n "checking for --with-dec-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008630
Guido van Rossumec2f0731997-01-22 20:54:01 +00008631
Martin v. Löwiseba40652007-08-30 20:10:57 +00008632# Check whether --with-dec-threads was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008633if test "${with_dec_threads+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00008634 withval=$with_dec_threads;
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008635{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
8636$as_echo "$withval" >&6; }
Guido van Rossumec2f0731997-01-22 20:54:01 +00008637LDLAST=-threads
Guido van Rossumf78abae1997-01-21 22:02:36 +00008638if test "${with_thread+set}" != set; then
Guido van Rossumec2f0731997-01-22 20:54:01 +00008639 with_thread="$withval";
Guido van Rossumf78abae1997-01-21 22:02:36 +00008640fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00008641else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008642 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8643$as_echo "no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008644fi
8645
Martin v. Löwis11437992002-04-12 09:54:03 +00008646
8647# Templates for things AC_DEFINEd more than once.
8648# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +00008649
8650
Martin v. Löwis11437992002-04-12 09:54:03 +00008651
8652
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008653{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-threads" >&5
8654$as_echo_n "checking for --with-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008655
Martin v. Löwiseba40652007-08-30 20:10:57 +00008656# Check whether --with-threads was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008657if test "${with_threads+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00008658 withval=$with_threads;
8659fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00008660
8661
Barry Warsawc0d24d82000-06-29 16:12:00 +00008662# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +00008663
Martin v. Löwiseba40652007-08-30 20:10:57 +00008664# Check whether --with-thread was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008665if test "${with_thread+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00008666 withval=$with_thread; with_threads=$with_thread
8667fi
8668
Barry Warsawc0d24d82000-06-29 16:12:00 +00008669
8670if test -z "$with_threads"
8671then with_threads="yes"
8672fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008673{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_threads" >&5
8674$as_echo "$with_threads" >&6; }
Barry Warsawc0d24d82000-06-29 16:12:00 +00008675
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008676
Barry Warsawc0d24d82000-06-29 16:12:00 +00008677if test "$with_threads" = "no"
8678then
8679 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008680elif test "$ac_cv_pthread_is_default" = yes
8681then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008682 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008683
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008684 # Defining _REENTRANT on system with POSIX threads should not hurt.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008685 $as_echo "#define _REENTRANT 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008686
8687 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +00008688 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008689elif test "$ac_cv_kpthread" = "yes"
8690then
8691 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00008692 if test "$ac_cv_cxx_thread" = "yes"; then
8693 CXX="$CXX -Kpthread"
8694 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008695 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum2242f2f2001-04-11 20:58:20 +00008696
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008697 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008698 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00008699elif test "$ac_cv_kthread" = "yes"
8700then
8701 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00008702 if test "$ac_cv_cxx_thread" = "yes"; then
8703 CXX="$CXX -Kthread"
8704 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008705 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis5f433f02003-05-05 05:05:30 +00008706
8707 posix_threads=yes
8708 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008709elif test "$ac_cv_pthread" = "yes"
8710then
8711 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00008712 if test "$ac_cv_cxx_thread" = "yes"; then
8713 CXX="$CXX -pthread"
8714 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008715 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008716
8717 posix_threads=yes
8718 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008719else
8720 if test ! -z "$with_threads" -a -d "$with_threads"
8721 then LDFLAGS="$LDFLAGS -L$with_threads"
8722 fi
8723 if test ! -z "$withval" -a -d "$withval"
8724 then LDFLAGS="$LDFLAGS -L$withval"
8725 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008726
8727 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +00008728 # define _POSIX_THREADS in unistd.h. Some apparently don't
8729 # (e.g. gnu pth with pthread emulation)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008730 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _POSIX_THREADS in unistd.h" >&5
8731$as_echo_n "checking for _POSIX_THREADS in unistd.h... " >&6; }
8732 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008733/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +00008734
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008735#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +00008736#ifdef _POSIX_THREADS
8737yes
8738#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008739
8740_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008741if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008742 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008743 unistd_defines_pthreads=yes
8744else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008745 unistd_defines_pthreads=no
8746fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00008747rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008748
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008749 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $unistd_defines_pthreads" >&5
8750$as_echo "$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008751
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008752 $as_echo "#define _REENTRANT 1" >>confdefs.h
Guido van Rossum9caf77a1996-08-01 00:52:26 +00008753
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008754 ac_fn_c_check_header_mongrel "$LINENO" "cthreads.h" "ac_cv_header_cthreads_h" "$ac_includes_default"
Matthias Klose3cef2a92012-03-14 23:39:33 +01008755if test "x$ac_cv_header_cthreads_h" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008756 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +00008757
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008758 $as_echo "#define C_THREADS 1" >>confdefs.h
Guido van Rossum7b3853f1996-07-30 18:09:35 +00008759
Martin v. Löwis11437992002-04-12 09:54:03 +00008760
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008761$as_echo "#define HURD_C_THREADS 1" >>confdefs.h
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008762
8763 LIBS="$LIBS -lthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008764 THREADOBJ="Python/thread.o"
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008765else
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008766
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008767 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 +01008768if test "x$ac_cv_header_mach_cthreads_h" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008769 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +00008770
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008771 $as_echo "#define C_THREADS 1" >>confdefs.h
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008772
Martin v. Löwis11437992002-04-12 09:54:03 +00008773
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008774$as_echo "#define MACH_C_THREADS 1" >>confdefs.h
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008775
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008776 THREADOBJ="Python/thread.o"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00008777else
Guido van Rossum7b3853f1996-07-30 18:09:35 +00008778
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008779 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pth" >&5
8780$as_echo_n "checking for --with-pth... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008781
Martin v. Löwiseba40652007-08-30 20:10:57 +00008782# Check whether --with-pth was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008783if test "${with_pth+set}" = set; then :
8784 withval=$with_pth; { $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
8785$as_echo "$withval" >&6; }
8786 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008787
8788
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008789$as_echo "#define HAVE_PTH 1" >>confdefs.h
Guido van Rossum9e8181b2000-09-19 00:46:46 +00008790
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00008791 LIBS="-lpth $LIBS"
8792 THREADOBJ="Python/thread.o"
Guido van Rossum9e8181b2000-09-19 00:46:46 +00008793else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008794 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8795$as_echo "no" >&6; }
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008796
8797 # Just looking for pthread_create in libpthread is not enough:
8798 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
8799 # So we really have to include pthread.h, and then link.
8800 _libs=$LIBS
8801 LIBS="$LIBS -lpthread"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008802 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
8803$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
8804 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008805/* end confdefs.h. */
Stefan Krahae66ca62012-11-22 22:36:57 +01008806
8807#include <stdio.h>
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008808#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +00008809
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008810void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +00008811int
8812main ()
8813{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008814
8815pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +00008816 ;
8817 return 0;
8818}
8819_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008820if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008821
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008822 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8823$as_echo "yes" >&6; }
8824 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum02a1c402000-02-25 19:26:31 +00008825
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008826 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008827 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +00008828else
Martin v. Löwis11437992002-04-12 09:54:03 +00008829
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008830 LIBS=$_libs
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008831 ac_fn_c_check_func "$LINENO" "pthread_detach" "ac_cv_func_pthread_detach"
Matthias Klose3cef2a92012-03-14 23:39:33 +01008832if test "x$ac_cv_func_pthread_detach" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008833 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumad678af1998-10-02 14:42:15 +00008834
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008835 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008836 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +00008837else
Guido van Rossumad678af1998-10-02 14:42:15 +00008838
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008839 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 +01008840if test "x$ac_cv_header_atheos_threads_h" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008841 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008842
8843
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008844$as_echo "#define ATHEOS_THREADS 1" >>confdefs.h
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008845
8846 THREADOBJ="Python/thread.o"
8847else
8848
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008849 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 +01008850if test "x$ac_cv_header_kernel_OS_h" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008851 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008852
8853
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008854$as_echo "#define BEOS_THREADS 1" >>confdefs.h
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008855
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008856 THREADOBJ="Python/thread.o"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008857else
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008858
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008859 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5
8860$as_echo_n "checking for pthread_create in -lpthreads... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008861if ${ac_cv_lib_pthreads_pthread_create+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008862 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008863else
Martin v. Löwis11437992002-04-12 09:54:03 +00008864 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008865LIBS="-lpthreads $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008866cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008867/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008868
Martin v. Löwiseba40652007-08-30 20:10:57 +00008869/* Override any GCC internal prototype to avoid an error.
8870 Use char because int might match the return type of a GCC
8871 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008872#ifdef __cplusplus
8873extern "C"
8874#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008875char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008876int
8877main ()
8878{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008879return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008880 ;
8881 return 0;
8882}
8883_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008884if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008885 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +00008886else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008887 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +00008888fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008889rm -f core conftest.err conftest.$ac_objext \
8890 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008891LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00008892fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008893{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5
8894$as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008895if test "x$ac_cv_lib_pthreads_pthread_create" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008896 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Greg Steinadf63d62000-07-05 10:38:09 +00008897
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008898 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008899 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008900 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +00008901else
Greg Steinadf63d62000-07-05 10:38:09 +00008902
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008903 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5
8904$as_echo_n "checking for pthread_create in -lc_r... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008905if ${ac_cv_lib_c_r_pthread_create+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008906 $as_echo_n "(cached) " >&6
Greg Steinadf63d62000-07-05 10:38:09 +00008907else
Martin v. Löwis11437992002-04-12 09:54:03 +00008908 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00008909LIBS="-lc_r $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008910cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008911/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008912
Martin v. Löwiseba40652007-08-30 20:10:57 +00008913/* Override any GCC internal prototype to avoid an error.
8914 Use char because int might match the return type of a GCC
8915 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008916#ifdef __cplusplus
8917extern "C"
8918#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008919char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008920int
8921main ()
8922{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008923return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008924 ;
8925 return 0;
8926}
8927_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008928if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008929 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +00008930else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008931 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +00008932fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008933rm -f core conftest.err conftest.$ac_objext \
8934 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008935LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +00008936fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008937{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5
8938$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008939if test "x$ac_cv_lib_c_r_pthread_create" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008940 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum49545951997-12-02 19:28:29 +00008941
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008942 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008943 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008944 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +00008945else
Guido van Rossum07bd90e2000-05-08 13:41:38 +00008946
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008947 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_create_system in -lpthread" >&5
8948$as_echo_n "checking for __pthread_create_system in -lpthread... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008949if ${ac_cv_lib_pthread___pthread_create_system+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008950 $as_echo_n "(cached) " >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008951else
Martin v. Löwis11437992002-04-12 09:54:03 +00008952 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008953LIBS="-lpthread $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008954cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008955/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008956
Martin v. Löwiseba40652007-08-30 20:10:57 +00008957/* Override any GCC internal prototype to avoid an error.
8958 Use char because int might match the return type of a GCC
8959 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008960#ifdef __cplusplus
8961extern "C"
8962#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008963char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008964int
8965main ()
8966{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008967return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008968 ;
8969 return 0;
8970}
8971_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008972if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008973 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008974else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008975 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008976fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008977rm -f core conftest.err conftest.$ac_objext \
8978 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008979LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008980fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008981{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_create_system" >&5
8982$as_echo "$ac_cv_lib_pthread___pthread_create_system" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008983if test "x$ac_cv_lib_pthread___pthread_create_system" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008984 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008985
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008986 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008987 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008988 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008989else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008990
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008991 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lcma" >&5
8992$as_echo_n "checking for pthread_create in -lcma... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008993if ${ac_cv_lib_cma_pthread_create+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008994 $as_echo_n "(cached) " >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +00008995else
Martin v. Löwis11437992002-04-12 09:54:03 +00008996 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00008997LIBS="-lcma $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008998cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008999/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009000
Martin v. Löwiseba40652007-08-30 20:10:57 +00009001/* Override any GCC internal prototype to avoid an error.
9002 Use char because int might match the return type of a GCC
9003 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009004#ifdef __cplusplus
9005extern "C"
9006#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009007char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009008int
9009main ()
9010{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009011return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009012 ;
9013 return 0;
9014}
9015_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009016if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009017 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +00009018else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009019 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +00009020fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009021rm -f core conftest.err conftest.$ac_objext \
9022 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009023LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00009024fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009025{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cma_pthread_create" >&5
9026$as_echo "$ac_cv_lib_cma_pthread_create" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009027if test "x$ac_cv_lib_cma_pthread_create" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009028 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumb93a8621998-05-07 13:27:32 +00009029
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009030 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00009031 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009032 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +00009033else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +00009034
Martin v. Löwis130fb172001-07-19 11:00:41 +00009035 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +00009036fi
9037
Guido van Rossum627b2d71993-12-24 10:39:16 +00009038
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009039fi
9040
Guido van Rossum0be3e491997-05-22 20:33:33 +00009041fi
9042
Guido van Rossum49545951997-12-02 19:28:29 +00009043fi
9044
Guido van Rossumb93a8621998-05-07 13:27:32 +00009045fi
9046
Guido van Rossum07bd90e2000-05-08 13:41:38 +00009047
Michael W. Hudson54241132001-12-07 15:38:26 +00009048fi
9049
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009050
9051fi
9052
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009053fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009054rm -f core conftest.err conftest.$ac_objext \
9055 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009056fi
9057
Martin v. Löwis11437992002-04-12 09:54:03 +00009058fi
9059
9060
9061fi
9062
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009063
Michael W. Hudson54241132001-12-07 15:38:26 +00009064
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009065 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usconfig in -lmpc" >&5
9066$as_echo_n "checking for usconfig in -lmpc... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009067if ${ac_cv_lib_mpc_usconfig+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009068 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009069else
Martin v. Löwis11437992002-04-12 09:54:03 +00009070 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009071LIBS="-lmpc $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009072cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009073/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009074
Martin v. Löwiseba40652007-08-30 20:10:57 +00009075/* Override any GCC internal prototype to avoid an error.
9076 Use char because int might match the return type of a GCC
9077 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009078#ifdef __cplusplus
9079extern "C"
9080#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009081char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009082int
9083main ()
9084{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009085return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009086 ;
9087 return 0;
9088}
9089_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009090if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009091 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009092else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009093 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009094fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009095rm -f core conftest.err conftest.$ac_objext \
9096 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009097LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009098fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009099{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpc_usconfig" >&5
9100$as_echo "$ac_cv_lib_mpc_usconfig" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009101if test "x$ac_cv_lib_mpc_usconfig" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009102 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00009103
Martin v. Löwis130fb172001-07-19 11:00:41 +00009104 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009105 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009106 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +00009107fi
9108
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00009109
Neal Norwitza978ab02002-11-02 16:58:05 +00009110 if test "$posix_threads" != "yes"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009111 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thr_create in -lthread" >&5
9112$as_echo_n "checking for thr_create in -lthread... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009113if ${ac_cv_lib_thread_thr_create+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009114 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009115else
Martin v. Löwis11437992002-04-12 09:54:03 +00009116 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009117LIBS="-lthread $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009118cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009119/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009120
Martin v. Löwiseba40652007-08-30 20:10:57 +00009121/* Override any GCC internal prototype to avoid an error.
9122 Use char because int might match the return type of a GCC
9123 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009124#ifdef __cplusplus
9125extern "C"
9126#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009127char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009128int
9129main ()
9130{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009131return thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009132 ;
9133 return 0;
9134}
9135_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009136if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009137 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009138else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009139 ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009140fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009141rm -f core conftest.err conftest.$ac_objext \
9142 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009143LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009144fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009145{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_thread_thr_create" >&5
9146$as_echo "$ac_cv_lib_thread_thr_create" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009147if test "x$ac_cv_lib_thread_thr_create" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009148 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00009149
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00009150 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009151 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00009152 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +00009153fi
9154
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00009155 fi
Michael W. Hudson54241132001-12-07 15:38:26 +00009156
Martin v. Löwis130fb172001-07-19 11:00:41 +00009157 if test "$USE_THREAD_MODULE" != "#"
9158 then
9159 # If the above checks didn't disable threads, (at least) OSF1
9160 # needs this '-threads' argument during linking.
9161 case $ac_sys_system in
9162 OSF1) LDLAST=-threads;;
9163 esac
Jeremy Hylton1a2ca862000-10-16 16:59:12 +00009164 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009165fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00009166
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009167if test "$posix_threads" = "yes"; then
9168 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00009169
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009170$as_echo "#define _POSIX_THREADS 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009171
9172 fi
9173
9174 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
9175 case $ac_sys_system/$ac_sys_release in
Charles-François Natali4929eb92011-07-21 19:41:04 +02009176 SunOS/5.6)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009177$as_echo "#define HAVE_PTHREAD_DESTRUCTOR 1" >>confdefs.h
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00009178
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009179 ;;
9180 SunOS/5.8)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009181$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009182
9183 ;;
Charles-François Natali4929eb92011-07-21 19:41:04 +02009184 AIX/*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009185$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Christian Heimescba36bb2008-01-30 22:54:18 +00009186
9187 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009188 esac
9189
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009190 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
9191$as_echo_n "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009192 if ${ac_cv_pthread_system_supported+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009193 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009194else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009195 if test "$cross_compiling" = yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009196 ac_cv_pthread_system_supported=no
9197else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009198 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009199/* end confdefs.h. */
Stefan Krahae66ca62012-11-22 22:36:57 +01009200
9201 #include <stdio.h>
9202 #include <pthread.h>
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009203 void *foo(void *parm) {
9204 return NULL;
9205 }
9206 main() {
9207 pthread_attr_t attr;
9208 pthread_t id;
9209 if (pthread_attr_init(&attr)) exit(-1);
9210 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
9211 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
9212 exit(0);
9213 }
9214_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009215if ac_fn_c_try_run "$LINENO"; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009216 ac_cv_pthread_system_supported=yes
9217else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009218 ac_cv_pthread_system_supported=no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009219fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009220rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9221 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009222fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00009223
Martin v. Löwiseba40652007-08-30 20:10:57 +00009224
Guido van Rossum627b2d71993-12-24 10:39:16 +00009225fi
9226
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009227 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_system_supported" >&5
9228$as_echo "$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009229 if test "$ac_cv_pthread_system_supported" = "yes"; then
9230
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009231$as_echo "#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009232
9233 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009234 for ac_func in pthread_sigmask
9235do :
9236 ac_fn_c_check_func "$LINENO" "pthread_sigmask" "ac_cv_func_pthread_sigmask"
Matthias Klose3cef2a92012-03-14 23:39:33 +01009237if test "x$ac_cv_func_pthread_sigmask" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009238 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009239#define HAVE_PTHREAD_SIGMASK 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009240_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +00009241 case $ac_sys_system in
9242 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009243
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009244$as_echo "#define HAVE_BROKEN_PTHREAD_SIGMASK 1" >>confdefs.h
Jason Tishlerfac083d2003-07-22 15:20:49 +00009245
9246 ;;
9247 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009248fi
9249done
9250
9251fi
9252
9253
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009254# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +00009255
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009256{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if --enable-ipv6 is specified" >&5
9257$as_echo_n "checking if --enable-ipv6 is specified... " >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009258# Check whether --enable-ipv6 was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009259if test "${enable_ipv6+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00009260 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009261 no)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009262 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9263$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009264 ipv6=no
9265 ;;
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009266 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9267$as_echo "yes" >&6; }
9268 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009269
9270 ipv6=yes
9271 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009272 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009273else
Martin v. Löwis11437992002-04-12 09:54:03 +00009274
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009275 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009276/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009277 /* AF_INET6 available check */
9278#include <sys/types.h>
9279#include <sys/socket.h>
Charles-François Natalibe2b9072013-01-08 19:47:00 +01009280int
9281main ()
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009282{
Charles-François Natalibe2b9072013-01-08 19:47:00 +01009283int domain = AF_INET6;
9284 ;
9285 return 0;
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009286}
Martin v. Löwis11437992002-04-12 09:54:03 +00009287_ACEOF
Charles-François Natalibe2b9072013-01-08 19:47:00 +01009288if ac_fn_c_try_compile "$LINENO"; then :
Matthias Klosec511b472010-05-08 11:01:39 +00009289
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009290 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9291$as_echo "yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009292 ipv6=yes
Matthias Klosec511b472010-05-08 11:01:39 +00009293
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009294else
Matthias Klosec511b472010-05-08 11:01:39 +00009295
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009296 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9297$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009298 ipv6=no
Matthias Klosec511b472010-05-08 11:01:39 +00009299
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009300fi
Charles-François Natalibe2b9072013-01-08 19:47:00 +01009301rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009302
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009303if test "$ipv6" = "yes"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009304 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RFC2553 API is available" >&5
9305$as_echo_n "checking if RFC2553 API is available... " >&6; }
9306 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009307/* end confdefs.h. */
Matthias Klosec511b472010-05-08 11:01:39 +00009308
9309 #include <sys/types.h>
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009310#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009311int
9312main ()
9313{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009314struct sockaddr_in6 x;
Matthias Klosec511b472010-05-08 11:01:39 +00009315 x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +00009316 ;
9317 return 0;
9318}
Matthias Klosec511b472010-05-08 11:01:39 +00009319
Martin v. Löwis11437992002-04-12 09:54:03 +00009320_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009321if ac_fn_c_try_compile "$LINENO"; then :
Matthias Klosec511b472010-05-08 11:01:39 +00009322
9323 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009324$as_echo "yes" >&6; }
Matthias Klosec511b472010-05-08 11:01:39 +00009325 ipv6=yes
9326
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009327else
Matthias Klosec511b472010-05-08 11:01:39 +00009328
9329 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009330$as_echo "no" >&6; }
Matthias Klosec511b472010-05-08 11:01:39 +00009331 ipv6=no
9332
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009333fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009334rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009335fi
9336
9337if test "$ipv6" = "yes"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009338 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009339
9340fi
9341
Martin v. Löwiseba40652007-08-30 20:10:57 +00009342fi
9343
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009344
9345ipv6type=unknown
9346ipv6lib=none
9347ipv6trylibc=no
9348
9349if test "$ipv6" = "yes"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009350 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5
9351$as_echo_n "checking ipv6 stack type... " >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +00009352 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
9353 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009354 case $i in
9355 inria)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009356 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009357/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009358
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009359#include <netinet/in.h>
9360#ifdef IPV6_INRIA_VERSION
9361yes
9362#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009363_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009364if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009365 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00009366 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009367fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00009368rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009369
9370 ;;
9371 kame)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009372 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009373/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009374
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009375#include <netinet/in.h>
9376#ifdef __KAME__
9377yes
9378#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009379_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009380if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009381 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009382 ipv6type=$i;
9383 ipv6lib=inet6
9384 ipv6libdir=/usr/local/v6/lib
9385 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009386fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00009387rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009388
9389 ;;
9390 linux-glibc)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009391 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009392/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009393
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009394#include <features.h>
9395#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
9396yes
9397#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009398_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009399if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009400 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009401 ipv6type=$i;
9402 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009403fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00009404rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009405
9406 ;;
9407 linux-inet6)
9408 if test -d /usr/inet6; then
9409 ipv6type=$i
9410 ipv6lib=inet6
9411 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +00009412 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009413 fi
9414 ;;
9415 solaris)
9416 if test -f /etc/netconfig; then
Antoine Pitrou31e85952011-01-03 18:57:14 +00009417 if $GREP -q tcp6 /etc/netconfig; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009418 ipv6type=$i
9419 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009420 fi
9421 fi
9422 ;;
9423 toshiba)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009424 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009425/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009426
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009427#include <sys/param.h>
9428#ifdef _TOSHIBA_INET6
9429yes
9430#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009431_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009432if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009433 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009434 ipv6type=$i;
9435 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00009436 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009437fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00009438rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009439
9440 ;;
9441 v6d)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009442 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009443/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009444
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009445#include </usr/local/v6/include/sys/v6config.h>
9446#ifdef __V6D__
9447yes
9448#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009449_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009450if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009451 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009452 ipv6type=$i;
9453 ipv6lib=v6;
9454 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +00009455 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009456fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00009457rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009458
9459 ;;
9460 zeta)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009461 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009462/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009463
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009464#include <sys/param.h>
9465#ifdef _ZETA_MINAMI_INET6
9466yes
9467#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009468_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009469if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009470 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009471 ipv6type=$i;
9472 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00009473 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009474fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00009475rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009476
9477 ;;
9478 esac
9479 if test "$ipv6type" != "unknown"; then
9480 break
9481 fi
9482 done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009483 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5
9484$as_echo "$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009485fi
9486
9487if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
9488 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
9489 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
9490 echo "using lib$ipv6lib"
9491 else
9492 if test $ipv6trylibc = "yes"; then
9493 echo "using libc"
9494 else
9495 echo 'Fatal: no $ipv6lib library found. cannot continue.'
9496 echo "You need to fetch lib$ipv6lib.a from appropriate"
9497 echo 'ipv6 kit and compile beforehand.'
9498 exit 1
9499 fi
9500 fi
9501fi
9502
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009503{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for OSX 10.5 SDK or later" >&5
9504$as_echo_n "checking for OSX 10.5 SDK or later... " >&6; }
9505cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren0d236eb2008-06-06 21:31:33 +00009506/* end confdefs.h. */
Matthias Klosec511b472010-05-08 11:01:39 +00009507
9508 #include <Carbon/Carbon.h>
Ronald Oussoren0d236eb2008-06-06 21:31:33 +00009509int
9510main ()
9511{
9512FSIORefNum fRef = 0
9513 ;
9514 return 0;
9515}
Mark Dickinson0712b562010-05-08 19:13:21 +00009516
Ronald Oussoren0d236eb2008-06-06 21:31:33 +00009517_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009518if ac_fn_c_try_compile "$LINENO"; then :
Matthias Klosec511b472010-05-08 11:01:39 +00009519
Ronald Oussoren0d236eb2008-06-06 21:31:33 +00009520
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009521$as_echo "#define HAVE_OSX105_SDK 1" >>confdefs.h
Ronald Oussoren0d236eb2008-06-06 21:31:33 +00009522
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009523 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9524$as_echo "yes" >&6; }
Ronald Oussoren0d236eb2008-06-06 21:31:33 +00009525
Mark Dickinson0712b562010-05-08 19:13:21 +00009526else
9527
9528 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9529$as_echo "no" >&6; }
9530
Ronald Oussoren0d236eb2008-06-06 21:31:33 +00009531fi
Ronald Oussoren0d236eb2008-06-06 21:31:33 +00009532rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9533
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009534# Check for --with-doc-strings
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009535{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-doc-strings" >&5
9536$as_echo_n "checking for --with-doc-strings... " >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009537
Martin v. Löwiseba40652007-08-30 20:10:57 +00009538# Check whether --with-doc-strings was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009539if test "${with_doc_strings+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00009540 withval=$with_doc_strings;
9541fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009542
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009543
9544if test -z "$with_doc_strings"
9545then with_doc_strings="yes"
9546fi
9547if test "$with_doc_strings" != "no"
9548then
9549
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009550$as_echo "#define WITH_DOC_STRINGS 1" >>confdefs.h
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009551
9552fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009553{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_doc_strings" >&5
9554$as_echo "$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009555
Neil Schemenauera35c6882001-02-27 04:45:05 +00009556# Check for Python-specific malloc support
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009557{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tsc" >&5
9558$as_echo_n "checking for --with-tsc... " >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009559
Martin v. Löwiseba40652007-08-30 20:10:57 +00009560# Check whether --with-tsc was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009561if test "${with_tsc+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00009562 withval=$with_tsc;
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009563if test "$withval" != no
9564then
9565
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009566$as_echo "#define WITH_TSC 1" >>confdefs.h
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009567
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009568 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9569$as_echo "yes" >&6; }
9570else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9571$as_echo "no" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009572fi
9573else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009574 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9575$as_echo "no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009576fi
9577
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009578
9579# Check for Python-specific malloc support
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009580{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pymalloc" >&5
9581$as_echo_n "checking for --with-pymalloc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009582
Martin v. Löwiseba40652007-08-30 20:10:57 +00009583# Check whether --with-pymalloc was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009584if test "${with_pymalloc+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00009585 withval=$with_pymalloc;
9586fi
Michael W. Hudson54241132001-12-07 15:38:26 +00009587
Neil Schemenauera35c6882001-02-27 04:45:05 +00009588
Neil Schemenauer16c22972002-03-22 15:34:49 +00009589if test -z "$with_pymalloc"
9590then with_pymalloc="yes"
9591fi
9592if test "$with_pymalloc" != "no"
9593then
Martin v. Löwis11437992002-04-12 09:54:03 +00009594
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009595$as_echo "#define WITH_PYMALLOC 1" >>confdefs.h
Neil Schemenauer16c22972002-03-22 15:34:49 +00009596
9597fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009598{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pymalloc" >&5
9599$as_echo "$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +00009600
Benjamin Peterson91c12eb2009-12-03 02:52:39 +00009601# Check for Valgrind support
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009602{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-valgrind" >&5
9603$as_echo_n "checking for --with-valgrind... " >&6; }
Benjamin Peterson91c12eb2009-12-03 02:52:39 +00009604
9605# Check whether --with-valgrind was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009606if test "${with_valgrind+set}" = set; then :
Benjamin Peterson91c12eb2009-12-03 02:52:39 +00009607 withval=$with_valgrind;
9608else
9609 with_valgrind=no
9610fi
9611
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009612{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_valgrind" >&5
9613$as_echo "$with_valgrind" >&6; }
Benjamin Peterson91c12eb2009-12-03 02:52:39 +00009614if test "$with_valgrind" != no; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009615 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 +01009616if test "x$ac_cv_header_valgrind_valgrind_h" = xyes; then :
Benjamin Peterson91c12eb2009-12-03 02:52:39 +00009617
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009618$as_echo "#define WITH_VALGRIND 1" >>confdefs.h
Benjamin Peterson91c12eb2009-12-03 02:52:39 +00009619
9620else
Georg Brandl71f4fbb2011-02-25 11:04:50 +00009621 as_fn_error $? "Valgrind support requested but headers not available" "$LINENO" 5
Benjamin Peterson91c12eb2009-12-03 02:52:39 +00009622
9623fi
9624
9625
9626fi
9627
Barry Warsawef82cd72000-06-30 16:21:01 +00009628# Check for --with-wctype-functions
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009629{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-wctype-functions" >&5
9630$as_echo_n "checking for --with-wctype-functions... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009631
Martin v. Löwiseba40652007-08-30 20:10:57 +00009632# Check whether --with-wctype-functions was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009633if test "${with_wctype_functions+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00009634 withval=$with_wctype_functions;
Barry Warsawef82cd72000-06-30 16:21:01 +00009635if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +00009636then
9637
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009638$as_echo "#define WANT_WCTYPE_FUNCTIONS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009639
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009640 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9641$as_echo "yes" >&6; }
9642else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9643$as_echo "no" >&6; }
Barry Warsawef82cd72000-06-30 16:21:01 +00009644fi
9645else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009646 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9647$as_echo "no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009648fi
9649
Barry Warsawef82cd72000-06-30 16:21:01 +00009650
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009651# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +00009652
Guido van Rossum98935bf2001-09-05 19:13:16 +00009653DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +00009654
Guido van Rossume97ee181999-12-20 21:27:22 +00009655# the dlopen() function means we might want to use dynload_shlib.o. some
9656# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +00009657for ac_func in dlopen
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009658do :
9659 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
Matthias Klose3cef2a92012-03-14 23:39:33 +01009660if test "x$ac_cv_func_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009661 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009662#define HAVE_DLOPEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009663_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +00009664
Guido van Rossume97ee181999-12-20 21:27:22 +00009665fi
Thomas Wouters3a584202000-08-05 23:28:51 +00009666done
Guido van Rossume97ee181999-12-20 21:27:22 +00009667
Michael W. Hudson54241132001-12-07 15:38:26 +00009668
Guido van Rossume97ee181999-12-20 21:27:22 +00009669# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
9670# loading of modules.
9671
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009672{ $as_echo "$as_me:${as_lineno-$LINENO}: checking DYNLOADFILE" >&5
9673$as_echo_n "checking DYNLOADFILE... " >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +00009674if test -z "$DYNLOADFILE"
9675then
9676 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00009677 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
9678 if test "$ac_cv_func_dlopen" = yes
9679 then DYNLOADFILE="dynload_shlib.o"
9680 else DYNLOADFILE="dynload_aix.o"
9681 fi
9682 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +00009683 BeOS*) DYNLOADFILE="dynload_beos.o";;
9684 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Anthony Baxter82201742006-04-09 15:07:40 +00009685 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
9686 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009687 atheos*) DYNLOADFILE="dynload_atheos.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +00009688 *)
9689 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
9690 # out any dynamic loading
9691 if test "$ac_cv_func_dlopen" = yes
9692 then DYNLOADFILE="dynload_shlib.o"
9693 else DYNLOADFILE="dynload_stub.o"
9694 fi
9695 ;;
9696 esac
9697fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009698{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DYNLOADFILE" >&5
9699$as_echo "$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +00009700if test "$DYNLOADFILE" != "dynload_stub.o"
9701then
Martin v. Löwis11437992002-04-12 09:54:03 +00009702
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009703$as_echo "#define HAVE_DYNAMIC_LOADING 1" >>confdefs.h
Guido van Rossume97ee181999-12-20 21:27:22 +00009704
9705fi
9706
Neil Schemenauer4e425612001-06-19 15:44:15 +00009707# MACHDEP_OBJS can be set to platform-specific object files needed by Python
9708
Michael W. Hudson54241132001-12-07 15:38:26 +00009709
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009710{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP_OBJS" >&5
9711$as_echo_n "checking MACHDEP_OBJS... " >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +00009712if test -z "$MACHDEP_OBJS"
9713then
Jack Jansene578a632001-08-15 01:27:14 +00009714 MACHDEP_OBJS=$extra_machdep_objs
9715else
9716 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +00009717fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009718{ $as_echo "$as_me:${as_lineno-$LINENO}: result: MACHDEP_OBJS" >&5
9719$as_echo "MACHDEP_OBJS" >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +00009720
Guido van Rossum627b2d71993-12-24 10:39:16 +00009721# checks for library functions
Martin v. Löwisaef18b12008-03-24 13:31:16 +00009722for ac_func in alarm setitimer getitimer bind_textdomain_codeset chown \
9723 clock confstr ctermid execv fchmod fchown fork fpathconf ftime ftruncate \
Martin v. Löwis438b5342002-12-27 10:16:42 +00009724 gai_strerror getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwis50ea4562009-11-27 13:56:01 +00009725 getpriority getresuid getresgid getpwent getspnam getspent getsid getwd \
Antoine Pitrou30b3b352009-12-02 20:37:54 +00009726 initgroups kill killpg lchmod lchown lstat mkfifo mknod mktime \
Martin v. Löwisa5f09072002-10-11 05:37:59 +00009727 mremap nice pathconf pause plock poll pthread_init \
Guido van Rossum162e38c2003-02-19 15:25:10 +00009728 putenv readlink realpath \
Jesse Noller355b1262009-04-02 00:03:28 +00009729 select sem_open sem_timedwait sem_getvalue sem_unlink setegid seteuid \
9730 setgid \
Martin v. Löwis4daacb12003-03-28 18:37:01 +00009731 setlocale setregid setreuid setsid setpgid setpgrp setuid setvbuf snprintf \
Martin v. Löwis50ea4562009-11-27 13:56:01 +00009732 setlocale setregid setreuid setresuid setresgid \
9733 setsid setpgid setpgrp setuid setvbuf snprintf \
Skip Montanaro7e11a012004-02-07 12:55:46 +00009734 sigaction siginterrupt sigrelse strftime \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +00009735 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Neal Norwitz05a45592006-03-20 06:30:08 +00009736 truncate uname unsetenv utimes waitpid wait3 wait4 wcscoll _getpty
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009737do :
9738 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
9739ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Georg Brandl71f4fbb2011-02-25 11:04:50 +00009740if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009741 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009742#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009743_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +00009744
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009745fi
9746done
9747
Michael W. Hudson54241132001-12-07 15:38:26 +00009748
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009749# For some functions, having a definition is not sufficient, since
9750# we want to take their address.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009751{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chroot" >&5
9752$as_echo_n "checking for chroot... " >&6; }
9753cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009754/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009755#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009756int
9757main ()
9758{
9759void *x=chroot
9760 ;
9761 return 0;
9762}
9763_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009764if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009765
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009766$as_echo "#define HAVE_CHROOT 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009767
Matthias Klosec511b472010-05-08 11:01:39 +00009768 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009769$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009770else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009771 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9772$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009773
9774fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009775rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009776{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for link" >&5
9777$as_echo_n "checking for link... " >&6; }
9778cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009779/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009780#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009781int
9782main ()
9783{
9784void *x=link
9785 ;
9786 return 0;
9787}
9788_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009789if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009790
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009791$as_echo "#define HAVE_LINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009792
Matthias Klosec511b472010-05-08 11:01:39 +00009793 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009794$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009795else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009796 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9797$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009798
9799fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009800rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009801{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for symlink" >&5
9802$as_echo_n "checking for symlink... " >&6; }
9803cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009804/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009805#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009806int
9807main ()
9808{
9809void *x=symlink
9810 ;
9811 return 0;
9812}
9813_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009814if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009815
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009816$as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009817
Matthias Klosec511b472010-05-08 11:01:39 +00009818 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009819$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009820else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009821 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9822$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009823
9824fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009825rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009826{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fchdir" >&5
9827$as_echo_n "checking for fchdir... " >&6; }
9828cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009829/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009830#include <unistd.h>
9831int
9832main ()
9833{
9834void *x=fchdir
9835 ;
9836 return 0;
9837}
9838_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009839if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009840
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009841$as_echo "#define HAVE_FCHDIR 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009842
Matthias Klosec511b472010-05-08 11:01:39 +00009843 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009844$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009845else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009846 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9847$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009848
9849fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009850rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009851{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fsync" >&5
9852$as_echo_n "checking for fsync... " >&6; }
9853cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009854/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009855#include <unistd.h>
9856int
9857main ()
9858{
9859void *x=fsync
9860 ;
9861 return 0;
9862}
9863_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009864if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009865
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009866$as_echo "#define HAVE_FSYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009867
Matthias Klosec511b472010-05-08 11:01:39 +00009868 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009869$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009870else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009871 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9872$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009873
9874fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009875rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009876{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fdatasync" >&5
9877$as_echo_n "checking for fdatasync... " >&6; }
9878cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009879/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009880#include <unistd.h>
9881int
9882main ()
9883{
9884void *x=fdatasync
9885 ;
9886 return 0;
9887}
9888_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009889if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009890
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009891$as_echo "#define HAVE_FDATASYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009892
Matthias Klosec511b472010-05-08 11:01:39 +00009893 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009894$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009895else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009896 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9897$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009898
9899fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009900rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009901{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll" >&5
9902$as_echo_n "checking for epoll... " >&6; }
9903cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes0e9ab5f2008-03-21 23:49:44 +00009904/* end confdefs.h. */
9905#include <sys/epoll.h>
9906int
9907main ()
9908{
9909void *x=epoll_create
9910 ;
9911 return 0;
9912}
9913_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009914if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009915
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009916$as_echo "#define HAVE_EPOLL 1" >>confdefs.h
Christian Heimes0e9ab5f2008-03-21 23:49:44 +00009917
Matthias Klosec511b472010-05-08 11:01:39 +00009918 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009919$as_echo "yes" >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +00009920else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009921 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9922$as_echo "no" >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +00009923
9924fi
Christian Heimes0e9ab5f2008-03-21 23:49:44 +00009925rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009926{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kqueue" >&5
9927$as_echo_n "checking for kqueue... " >&6; }
9928cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes0e9ab5f2008-03-21 23:49:44 +00009929/* end confdefs.h. */
9930
9931#include <sys/types.h>
9932#include <sys/event.h>
9933
9934int
9935main ()
9936{
9937int x=kqueue()
9938 ;
9939 return 0;
9940}
9941_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009942if ac_fn_c_try_compile "$LINENO"; then :
Christian Heimes0e9ab5f2008-03-21 23:49:44 +00009943
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009944$as_echo "#define HAVE_KQUEUE 1" >>confdefs.h
Christian Heimes0e9ab5f2008-03-21 23:49:44 +00009945
Matthias Klosec511b472010-05-08 11:01:39 +00009946 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009947$as_echo "yes" >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +00009948else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009949 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9950$as_echo "no" >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +00009951
9952fi
Christian Heimes0e9ab5f2008-03-21 23:49:44 +00009953rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +00009954# On some systems (eg. FreeBSD 5), we would find a definition of the
9955# functions ctermid_r, setgroups in the library, but no prototype
9956# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
9957# address to avoid compiler warnings and potential miscompilations
9958# because of the missing prototypes.
9959
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009960{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ctermid_r" >&5
9961$as_echo_n "checking for ctermid_r... " >&6; }
9962cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009963/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +00009964
Martin v. Löwisd5843682002-11-21 20:41:28 +00009965#include <stdio.h>
9966
Martin v. Löwisd5843682002-11-21 20:41:28 +00009967int
9968main ()
9969{
9970void* p = ctermid_r
9971 ;
9972 return 0;
9973}
9974_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009975if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +00009976
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009977$as_echo "#define HAVE_CTERMID_R 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +00009978
Matthias Klosec511b472010-05-08 11:01:39 +00009979 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009980$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +00009981else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009982 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9983$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +00009984
9985fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009986rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9987
Antoine Pitroub170f172010-09-10 18:47:36 +00009988{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock declaration" >&5
9989$as_echo_n "checking for flock declaration... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009990if ${ac_cv_flock_decl+:} false; then :
Antoine Pitroub170f172010-09-10 18:47:36 +00009991 $as_echo_n "(cached) " >&6
9992else
9993 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009994/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009995#include <sys/file.h>
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009996int
9997main ()
9998{
9999void* p = flock
Antoine Pitroub170f172010-09-10 18:47:36 +000010000
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010001 ;
10002 return 0;
10003}
10004_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010005if ac_fn_c_try_compile "$LINENO"; then :
Antoine Pitroub170f172010-09-10 18:47:36 +000010006 ac_cv_flock_decl=yes
10007else
10008 ac_cv_flock_decl=no
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010009
10010fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010011rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitrou85729812010-09-07 14:55:24 +000010012
Antoine Pitroub170f172010-09-10 18:47:36 +000010013fi
10014{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_flock_decl" >&5
10015$as_echo "$ac_cv_flock_decl" >&6; }
10016if test "x${ac_cv_flock_decl}" = xyes; then
10017 for ac_func in flock
10018do :
10019 ac_fn_c_check_func "$LINENO" "flock" "ac_cv_func_flock"
Matthias Klose3cef2a92012-03-14 23:39:33 +010010020if test "x$ac_cv_func_flock" = xyes; then :
Antoine Pitroub170f172010-09-10 18:47:36 +000010021 cat >>confdefs.h <<_ACEOF
10022#define HAVE_FLOCK 1
Antoine Pitrou85729812010-09-07 14:55:24 +000010023_ACEOF
Antoine Pitroub170f172010-09-10 18:47:36 +000010024
Antoine Pitrou85729812010-09-07 14:55:24 +000010025else
Antoine Pitroub170f172010-09-10 18:47:36 +000010026 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock in -lbsd" >&5
Antoine Pitrou85729812010-09-07 14:55:24 +000010027$as_echo_n "checking for flock in -lbsd... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010028if ${ac_cv_lib_bsd_flock+:} false; then :
Antoine Pitrou85729812010-09-07 14:55:24 +000010029 $as_echo_n "(cached) " >&6
10030else
10031 ac_check_lib_save_LIBS=$LIBS
10032LIBS="-lbsd $LIBS"
10033cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10034/* end confdefs.h. */
10035
10036/* Override any GCC internal prototype to avoid an error.
10037 Use char because int might match the return type of a GCC
10038 builtin and then its argument prototype would still apply. */
10039#ifdef __cplusplus
10040extern "C"
10041#endif
10042char flock ();
10043int
10044main ()
10045{
10046return flock ();
10047 ;
10048 return 0;
10049}
10050_ACEOF
10051if ac_fn_c_try_link "$LINENO"; then :
10052 ac_cv_lib_bsd_flock=yes
10053else
10054 ac_cv_lib_bsd_flock=no
10055fi
10056rm -f core conftest.err conftest.$ac_objext \
10057 conftest$ac_exeext conftest.$ac_ext
10058LIBS=$ac_check_lib_save_LIBS
10059fi
10060{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_flock" >&5
10061$as_echo "$ac_cv_lib_bsd_flock" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010062if test "x$ac_cv_lib_bsd_flock" = xyes; then :
Antoine Pitroub170f172010-09-10 18:47:36 +000010063 $as_echo "#define HAVE_FLOCK 1" >>confdefs.h
Antoine Pitrou85729812010-09-07 14:55:24 +000010064
10065
10066$as_echo "#define FLOCK_NEEDS_LIBBSD 1" >>confdefs.h
10067
10068
10069fi
10070
10071
10072fi
Antoine Pitroub170f172010-09-10 18:47:36 +000010073done
10074
Antoine Pitrou85729812010-09-07 14:55:24 +000010075fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010076
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010077{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
10078$as_echo_n "checking for getpagesize... " >&6; }
10079cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010080/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010081
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010082#include <unistd.h>
10083
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010084int
10085main ()
10086{
10087void* p = getpagesize
10088 ;
10089 return 0;
10090}
10091_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010092if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010093
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010094$as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010095
Matthias Klosec511b472010-05-08 11:01:39 +000010096 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010097$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010098else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010099 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10100$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010101
10102fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010103rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010104
Charles-François Natali93a11752011-11-27 13:01:35 +010010105{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken unsetenv" >&5
10106$as_echo_n "checking for broken unsetenv... " >&6; }
10107cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10108/* end confdefs.h. */
10109
10110#include <stdlib.h>
10111
10112int
10113main ()
10114{
10115int res = unsetenv("DUMMY")
10116 ;
10117 return 0;
10118}
10119_ACEOF
10120if ac_fn_c_try_compile "$LINENO"; then :
10121 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10122$as_echo "no" >&6; }
10123else
10124
10125$as_echo "#define HAVE_BROKEN_UNSETENV 1" >>confdefs.h
10126
10127 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10128$as_echo "yes" >&6; }
10129
10130fi
10131rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10132
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010133for ac_prog in true
10134do
10135 # Extract the first word of "$ac_prog", so it can be a program name with args.
10136set dummy $ac_prog; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010137{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10138$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010139if ${ac_cv_prog_TRUE+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010140 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010141else
10142 if test -n "$TRUE"; then
10143 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
10144else
10145as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10146for as_dir in $PATH
10147do
10148 IFS=$as_save_IFS
10149 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010150 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +010010151 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010152 ac_cv_prog_TRUE="$ac_prog"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010153 $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 +000010154 break 2
10155 fi
10156done
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010157 done
Martin v. Löwiseba40652007-08-30 20:10:57 +000010158IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010159
10160fi
10161fi
10162TRUE=$ac_cv_prog_TRUE
10163if test -n "$TRUE"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010164 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TRUE" >&5
10165$as_echo "$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010166else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010167 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10168$as_echo "no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010169fi
10170
Martin v. Löwiseba40652007-08-30 20:10:57 +000010171
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010172 test -n "$TRUE" && break
10173done
10174test -n "$TRUE" || TRUE="/bin/true"
10175
10176
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010177{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lc" >&5
10178$as_echo_n "checking for inet_aton in -lc... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010179if ${ac_cv_lib_c_inet_aton+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010180 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010181else
10182 ac_check_lib_save_LIBS=$LIBS
10183LIBS="-lc $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010184cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010185/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010186
Martin v. Löwiseba40652007-08-30 20:10:57 +000010187/* Override any GCC internal prototype to avoid an error.
10188 Use char because int might match the return type of a GCC
10189 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010190#ifdef __cplusplus
10191extern "C"
10192#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010193char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010194int
10195main ()
10196{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010197return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010198 ;
10199 return 0;
10200}
10201_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010202if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010203 ac_cv_lib_c_inet_aton=yes
10204else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010205 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010206fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010207rm -f core conftest.err conftest.$ac_objext \
10208 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010209LIBS=$ac_check_lib_save_LIBS
10210fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010211{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_inet_aton" >&5
10212$as_echo "$ac_cv_lib_c_inet_aton" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010213if test "x$ac_cv_lib_c_inet_aton" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010214 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010215else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010216 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5
10217$as_echo_n "checking for inet_aton in -lresolv... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010218if ${ac_cv_lib_resolv_inet_aton+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010219 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010220else
10221 ac_check_lib_save_LIBS=$LIBS
10222LIBS="-lresolv $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010223cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010224/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010225
Martin v. Löwiseba40652007-08-30 20:10:57 +000010226/* Override any GCC internal prototype to avoid an error.
10227 Use char because int might match the return type of a GCC
10228 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010229#ifdef __cplusplus
10230extern "C"
10231#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010232char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010233int
10234main ()
10235{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010236return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010237 ;
10238 return 0;
10239}
10240_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010241if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010242 ac_cv_lib_resolv_inet_aton=yes
10243else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010244 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010245fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010246rm -f core conftest.err conftest.$ac_objext \
10247 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010248LIBS=$ac_check_lib_save_LIBS
10249fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010250{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5
10251$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010252if test "x$ac_cv_lib_resolv_inet_aton" = xyes; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010253 cat >>confdefs.h <<_ACEOF
10254#define HAVE_LIBRESOLV 1
10255_ACEOF
10256
10257 LIBS="-lresolv $LIBS"
10258
10259fi
10260
10261
10262fi
10263
10264
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010265# On Tru64, chflags seems to be present, but calling it will
10266# exit Python
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010267{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chflags" >&5
10268$as_echo_n "checking for chflags... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010269if ${ac_cv_have_chflags+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010270 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010271else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010272 if test "$cross_compiling" = yes; then :
Gregory P. Smith49437c22009-11-02 01:38:35 +000010273 ac_cv_have_chflags=cross
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010274else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010275 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010276/* end confdefs.h. */
Ned Deily43e10542011-06-27 23:41:53 -070010277
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010278#include <sys/stat.h>
10279#include <unistd.h>
10280int main(int argc, char*argv[])
10281{
10282 if(chflags(argv[0], 0) != 0)
10283 return 1;
10284 return 0;
10285}
Ned Deily43e10542011-06-27 23:41:53 -070010286
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010287_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010288if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010289 ac_cv_have_chflags=yes
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010290else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010291 ac_cv_have_chflags=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010292fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010293rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10294 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +000010295fi
10296
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010297
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010298fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010299{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_chflags" >&5
10300$as_echo "$ac_cv_have_chflags" >&6; }
Gregory P. Smith49437c22009-11-02 01:38:35 +000010301if test "$ac_cv_have_chflags" = cross ; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010302 ac_fn_c_check_func "$LINENO" "chflags" "ac_cv_func_chflags"
Matthias Klose3cef2a92012-03-14 23:39:33 +010010303if test "x$ac_cv_func_chflags" = xyes; then :
Gregory P. Smith49437c22009-11-02 01:38:35 +000010304 ac_cv_have_chflags="yes"
10305else
10306 ac_cv_have_chflags="no"
10307fi
10308
10309fi
10310if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010311
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010312$as_echo "#define HAVE_CHFLAGS 1" >>confdefs.h
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010313
10314fi
10315
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010316{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lchflags" >&5
10317$as_echo_n "checking for lchflags... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010318if ${ac_cv_have_lchflags+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010319 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010320else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010321 if test "$cross_compiling" = yes; then :
Gregory P. Smith49437c22009-11-02 01:38:35 +000010322 ac_cv_have_lchflags=cross
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010323else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010324 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010325/* end confdefs.h. */
Ned Deily43e10542011-06-27 23:41:53 -070010326
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010327#include <sys/stat.h>
10328#include <unistd.h>
10329int main(int argc, char*argv[])
10330{
10331 if(lchflags(argv[0], 0) != 0)
10332 return 1;
10333 return 0;
10334}
Ned Deily43e10542011-06-27 23:41:53 -070010335
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010336_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010337if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010338 ac_cv_have_lchflags=yes
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010339else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010340 ac_cv_have_lchflags=no
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010341fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010342rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10343 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010344fi
10345
10346
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010347fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010348{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lchflags" >&5
10349$as_echo "$ac_cv_have_lchflags" >&6; }
Gregory P. Smith49437c22009-11-02 01:38:35 +000010350if test "$ac_cv_have_lchflags" = cross ; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010351 ac_fn_c_check_func "$LINENO" "lchflags" "ac_cv_func_lchflags"
Matthias Klose3cef2a92012-03-14 23:39:33 +010010352if test "x$ac_cv_func_lchflags" = xyes; then :
Gregory P. Smith49437c22009-11-02 01:38:35 +000010353 ac_cv_have_lchflags="yes"
10354else
10355 ac_cv_have_lchflags="no"
10356fi
10357
10358fi
10359if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010360
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010361$as_echo "#define HAVE_LCHFLAGS 1" >>confdefs.h
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010362
10363fi
10364
Ronald Oussorenf8752642006-07-06 10:13:35 +000010365case $ac_sys_system/$ac_sys_release in
10366Darwin/*)
10367 _CUR_CFLAGS="${CFLAGS}"
10368 _CUR_LDFLAGS="${LDFLAGS}"
10369 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
10370 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
10371 ;;
10372esac
10373
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010374{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5
10375$as_echo_n "checking for inflateCopy in -lz... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010376if ${ac_cv_lib_z_inflateCopy+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010377 $as_echo_n "(cached) " >&6
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000010378else
10379 ac_check_lib_save_LIBS=$LIBS
10380LIBS="-lz $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010381cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000010382/* end confdefs.h. */
10383
Martin v. Löwiseba40652007-08-30 20:10:57 +000010384/* Override any GCC internal prototype to avoid an error.
10385 Use char because int might match the return type of a GCC
10386 builtin and then its argument prototype would still apply. */
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000010387#ifdef __cplusplus
10388extern "C"
10389#endif
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000010390char inflateCopy ();
10391int
10392main ()
10393{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010394return inflateCopy ();
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000010395 ;
10396 return 0;
10397}
10398_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010399if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000010400 ac_cv_lib_z_inflateCopy=yes
10401else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010402 ac_cv_lib_z_inflateCopy=no
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000010403fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010404rm -f core conftest.err conftest.$ac_objext \
10405 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000010406LIBS=$ac_check_lib_save_LIBS
10407fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010408{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5
10409$as_echo "$ac_cv_lib_z_inflateCopy" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010410if test "x$ac_cv_lib_z_inflateCopy" = xyes; then :
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000010411
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010412$as_echo "#define HAVE_ZLIB_COPY 1" >>confdefs.h
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000010413
10414fi
10415
10416
Ronald Oussorenf8752642006-07-06 10:13:35 +000010417case $ac_sys_system/$ac_sys_release in
10418Darwin/*)
10419 CFLAGS="${_CUR_CFLAGS}"
10420 LDFLAGS="${_CUR_LDFLAGS}"
10421 ;;
10422esac
10423
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010424{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hstrerror" >&5
10425$as_echo_n "checking for hstrerror... " >&6; }
10426cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010427/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000010428
Martin v. Löwise9416172003-05-03 10:12:45 +000010429#include <netdb.h>
10430
Martin v. Löwise9416172003-05-03 10:12:45 +000010431int
10432main ()
10433{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010434void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000010435 ;
10436 return 0;
10437}
10438_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010439if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000010440
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010441$as_echo "#define HAVE_HSTRERROR 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000010442
Matthias Klosec511b472010-05-08 11:01:39 +000010443 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010444$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010445else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010446 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10447$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010448
10449fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010450rm -f core conftest.err conftest.$ac_objext \
10451 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010452
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010453{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5
10454$as_echo_n "checking for inet_aton... " >&6; }
10455cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010456/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000010457
Martin v. Löwis86d66262006-02-17 08:40:11 +000010458#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000010459#include <sys/socket.h>
10460#include <netinet/in.h>
10461#include <arpa/inet.h>
10462
Martin v. Löwise9416172003-05-03 10:12:45 +000010463int
10464main ()
10465{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010466void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000010467 ;
10468 return 0;
10469}
10470_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010471if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000010472
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010473$as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000010474
Matthias Klosec511b472010-05-08 11:01:39 +000010475 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010476$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010477else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010478 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10479$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010480
10481fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010482rm -f core conftest.err conftest.$ac_objext \
10483 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010484
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010485{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_pton" >&5
10486$as_echo_n "checking for inet_pton... " >&6; }
10487cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010488/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000010489
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000010490#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000010491#include <sys/socket.h>
10492#include <netinet/in.h>
10493#include <arpa/inet.h>
10494
Martin v. Löwise9416172003-05-03 10:12:45 +000010495int
10496main ()
10497{
10498void* p = inet_pton
10499 ;
10500 return 0;
10501}
10502_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010503if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000010504
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010505$as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000010506
Matthias Klosec511b472010-05-08 11:01:39 +000010507 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010508$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010509else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010510 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10511$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010512
10513fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010514rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000010515
Martin v. Löwisd6640d42003-07-06 09:29:52 +000010516# On some systems, setgroups is in unistd.h, on others, in grp.h
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010517{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for setgroups" >&5
10518$as_echo_n "checking for setgroups... " >&6; }
10519cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010520/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000010521
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000010522#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000010523#ifdef HAVE_GRP_H
10524#include <grp.h>
10525#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000010526
Martin v. Löwisd5843682002-11-21 20:41:28 +000010527int
10528main ()
10529{
10530void* p = setgroups
10531 ;
10532 return 0;
10533}
10534_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010535if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000010536
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010537$as_echo "#define HAVE_SETGROUPS 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000010538
Matthias Klosec511b472010-05-08 11:01:39 +000010539 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010540$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010541else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010542 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10543$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010544
10545fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010546rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000010547
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010548# check for openpty and forkpty
10549
10550for ac_func in openpty
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010551do :
10552 ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty"
Matthias Klose3cef2a92012-03-14 23:39:33 +010010553if test "x$ac_cv_func_openpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010554 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010555#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010556_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010557
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010558else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010559 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5
10560$as_echo_n "checking for openpty in -lutil... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010561if ${ac_cv_lib_util_openpty+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010562 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000010563else
Martin v. Löwis11437992002-04-12 09:54:03 +000010564 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010565LIBS="-lutil $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010566cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010567/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010568
Martin v. Löwiseba40652007-08-30 20:10:57 +000010569/* Override any GCC internal prototype to avoid an error.
10570 Use char because int might match the return type of a GCC
10571 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010572#ifdef __cplusplus
10573extern "C"
10574#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010575char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010576int
10577main ()
10578{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010579return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010580 ;
10581 return 0;
10582}
10583_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010584if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010585 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000010586else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010587 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010588fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010589rm -f core conftest.err conftest.$ac_objext \
10590 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010591LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010592fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010593{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5
10594$as_echo "$ac_cv_lib_util_openpty" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010595if test "x$ac_cv_lib_util_openpty" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010596 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000010597 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010598else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010599 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lbsd" >&5
10600$as_echo_n "checking for openpty in -lbsd... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010601if ${ac_cv_lib_bsd_openpty+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010602 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010603else
10604 ac_check_lib_save_LIBS=$LIBS
10605LIBS="-lbsd $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010606cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010607/* end confdefs.h. */
10608
Martin v. Löwiseba40652007-08-30 20:10:57 +000010609/* Override any GCC internal prototype to avoid an error.
10610 Use char because int might match the return type of a GCC
10611 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010612#ifdef __cplusplus
10613extern "C"
10614#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010615char openpty ();
10616int
10617main ()
10618{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010619return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010620 ;
10621 return 0;
10622}
10623_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010624if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010625 ac_cv_lib_bsd_openpty=yes
10626else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010627 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010628fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010629rm -f core conftest.err conftest.$ac_objext \
10630 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010631LIBS=$ac_check_lib_save_LIBS
10632fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010633{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_openpty" >&5
10634$as_echo "$ac_cv_lib_bsd_openpty" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010635if test "x$ac_cv_lib_bsd_openpty" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010636 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010637 LIBS="$LIBS -lbsd"
10638fi
10639
10640
10641fi
10642
Fred Drake8cef4cf2000-06-28 16:40:38 +000010643
10644fi
10645done
10646
10647for ac_func in forkpty
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010648do :
10649 ac_fn_c_check_func "$LINENO" "forkpty" "ac_cv_func_forkpty"
Matthias Klose3cef2a92012-03-14 23:39:33 +010010650if test "x$ac_cv_func_forkpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010651 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010652#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010653_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000010654
Fred Drake8cef4cf2000-06-28 16:40:38 +000010655else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010656 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5
10657$as_echo_n "checking for forkpty in -lutil... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010658if ${ac_cv_lib_util_forkpty+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010659 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000010660else
Martin v. Löwis11437992002-04-12 09:54:03 +000010661 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010662LIBS="-lutil $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010663cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010664/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010665
Martin v. Löwiseba40652007-08-30 20:10:57 +000010666/* Override any GCC internal prototype to avoid an error.
10667 Use char because int might match the return type of a GCC
10668 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010669#ifdef __cplusplus
10670extern "C"
10671#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010672char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010673int
10674main ()
10675{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010676return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010677 ;
10678 return 0;
10679}
10680_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010681if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010682 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000010683else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010684 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010685fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010686rm -f core conftest.err conftest.$ac_objext \
10687 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010688LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010689fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010690{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5
10691$as_echo "$ac_cv_lib_util_forkpty" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010692if test "x$ac_cv_lib_util_forkpty" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010693 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000010694 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010695else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010696 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lbsd" >&5
10697$as_echo_n "checking for forkpty in -lbsd... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010698if ${ac_cv_lib_bsd_forkpty+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010699 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010700else
10701 ac_check_lib_save_LIBS=$LIBS
10702LIBS="-lbsd $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010703cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010704/* end confdefs.h. */
10705
Martin v. Löwiseba40652007-08-30 20:10:57 +000010706/* Override any GCC internal prototype to avoid an error.
10707 Use char because int might match the return type of a GCC
10708 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010709#ifdef __cplusplus
10710extern "C"
10711#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010712char forkpty ();
10713int
10714main ()
10715{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010716return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010717 ;
10718 return 0;
10719}
10720_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010721if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010722 ac_cv_lib_bsd_forkpty=yes
10723else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010724 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010725fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010726rm -f core conftest.err conftest.$ac_objext \
10727 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010728LIBS=$ac_check_lib_save_LIBS
10729fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010730{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_forkpty" >&5
10731$as_echo "$ac_cv_lib_bsd_forkpty" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010732if test "x$ac_cv_lib_bsd_forkpty" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010733 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010734 LIBS="$LIBS -lbsd"
10735fi
10736
10737
10738fi
10739
Fred Drake8cef4cf2000-06-28 16:40:38 +000010740
10741fi
10742done
10743
Jack Jansendd19cf82001-12-06 22:36:17 +000010744
Brett Cannonaa5778d2008-03-18 04:09:00 +000010745# Stuff for expat.
Brett Cannonaa5778d2008-03-18 04:09:00 +000010746for ac_func in memmove
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010747do :
10748 ac_fn_c_check_func "$LINENO" "memmove" "ac_cv_func_memmove"
Matthias Klose3cef2a92012-03-14 23:39:33 +010010749if test "x$ac_cv_func_memmove" = xyes; then :
Brett Cannonaa5778d2008-03-18 04:09:00 +000010750 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010751#define HAVE_MEMMOVE 1
Brett Cannonaa5778d2008-03-18 04:09:00 +000010752_ACEOF
10753
10754fi
10755done
10756
10757
Michael W. Hudson54241132001-12-07 15:38:26 +000010758# check for long file support functions
Fred Drake8cef4cf2000-06-28 16:40:38 +000010759for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010760do :
10761 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10762ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Georg Brandl71f4fbb2011-02-25 11:04:50 +000010763if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010764 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010765#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010766_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000010767
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010768fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000010769done
10770
Michael W. Hudson54241132001-12-07 15:38:26 +000010771
Georg Brandl71f4fbb2011-02-25 11:04:50 +000010772ac_fn_c_check_func "$LINENO" "dup2" "ac_cv_func_dup2"
Matthias Klose3cef2a92012-03-14 23:39:33 +010010773if test "x$ac_cv_func_dup2" = xyes; then :
Georg Brandl71f4fbb2011-02-25 11:04:50 +000010774 $as_echo "#define HAVE_DUP2 1" >>confdefs.h
Martin v. Löwis1142de32002-03-29 16:28:31 +000010775
Martin v. Löwis1142de32002-03-29 16:28:31 +000010776else
Martin v. Löwiseba40652007-08-30 20:10:57 +000010777 case " $LIBOBJS " in
Georg Brandl71f4fbb2011-02-25 11:04:50 +000010778 *" dup2.$ac_objext "* ) ;;
10779 *) LIBOBJS="$LIBOBJS dup2.$ac_objext"
Martin v. Löwiseba40652007-08-30 20:10:57 +000010780 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000010781esac
10782
Martin v. Löwis1142de32002-03-29 16:28:31 +000010783fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +000010784
10785ac_fn_c_check_func "$LINENO" "getcwd" "ac_cv_func_getcwd"
Matthias Klose3cef2a92012-03-14 23:39:33 +010010786if test "x$ac_cv_func_getcwd" = xyes; then :
Georg Brandl71f4fbb2011-02-25 11:04:50 +000010787 $as_echo "#define HAVE_GETCWD 1" >>confdefs.h
10788
10789else
10790 case " $LIBOBJS " in
10791 *" getcwd.$ac_objext "* ) ;;
10792 *) LIBOBJS="$LIBOBJS getcwd.$ac_objext"
10793 ;;
10794esac
10795
10796fi
10797
10798ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup"
Matthias Klose3cef2a92012-03-14 23:39:33 +010010799if test "x$ac_cv_func_strdup" = xyes; then :
Georg Brandl71f4fbb2011-02-25 11:04:50 +000010800 $as_echo "#define HAVE_STRDUP 1" >>confdefs.h
10801
10802else
10803 case " $LIBOBJS " in
10804 *" strdup.$ac_objext "* ) ;;
10805 *) LIBOBJS="$LIBOBJS strdup.$ac_objext"
10806 ;;
10807esac
10808
10809fi
Martin v. Löwis1142de32002-03-29 16:28:31 +000010810
10811
10812for ac_func in getpgrp
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010813do :
10814 ac_fn_c_check_func "$LINENO" "getpgrp" "ac_cv_func_getpgrp"
Matthias Klose3cef2a92012-03-14 23:39:33 +010010815if test "x$ac_cv_func_getpgrp" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010816 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010817#define HAVE_GETPGRP 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010818_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010819 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010820/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010821#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010822int
10823main ()
10824{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010825getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000010826 ;
10827 return 0;
10828}
10829_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010830if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010831
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010832$as_echo "#define GETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000010833
Guido van Rossum627b2d71993-12-24 10:39:16 +000010834fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010835rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000010836
Guido van Rossum627b2d71993-12-24 10:39:16 +000010837fi
Thomas Wouters3a584202000-08-05 23:28:51 +000010838done
Guido van Rossum627b2d71993-12-24 10:39:16 +000010839
Jack Jansen150753c2003-03-29 22:07:47 +000010840for ac_func in setpgrp
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010841do :
10842 ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp"
Matthias Klose3cef2a92012-03-14 23:39:33 +010010843if test "x$ac_cv_func_setpgrp" = xyes; then :
Jack Jansen150753c2003-03-29 22:07:47 +000010844 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010845#define HAVE_SETPGRP 1
Jack Jansen150753c2003-03-29 22:07:47 +000010846_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010847 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010848/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000010849#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000010850int
10851main ()
10852{
10853setpgrp(0,0);
10854 ;
10855 return 0;
10856}
10857_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010858if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010859
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010860$as_echo "#define SETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000010861
Guido van Rossum8eee56f1994-10-20 22:18:37 +000010862fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010863rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000010864
10865fi
10866done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000010867
Thomas Wouters3a584202000-08-05 23:28:51 +000010868for ac_func in gettimeofday
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010869do :
10870 ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
Matthias Klose3cef2a92012-03-14 23:39:33 +010010871if test "x$ac_cv_func_gettimeofday" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010872 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010873#define HAVE_GETTIMEOFDAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010874_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010875 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010876/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000010877#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010878int
10879main ()
10880{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010881gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000010882 ;
10883 return 0;
10884}
10885_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010886if ac_fn_c_try_compile "$LINENO"; then :
10887
Guido van Rossum627b2d71993-12-24 10:39:16 +000010888else
Skip Montanaro6dead952003-09-25 14:50:04 +000010889
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010890$as_echo "#define GETTIMEOFDAY_NO_TZ 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000010891
Martin v. Löwis11437992002-04-12 09:54:03 +000010892
Guido van Rossum627b2d71993-12-24 10:39:16 +000010893fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010894rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000010895
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010896fi
Thomas Wouters3a584202000-08-05 23:28:51 +000010897done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010898
Michael W. Hudson54241132001-12-07 15:38:26 +000010899
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010900{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for major" >&5
10901$as_echo_n "checking for major... " >&6; }
10902cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010903/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010904
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010905#if defined(MAJOR_IN_MKDEV)
10906#include <sys/mkdev.h>
10907#elif defined(MAJOR_IN_SYSMACROS)
10908#include <sys/sysmacros.h>
10909#else
10910#include <sys/types.h>
10911#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010912
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010913int
10914main ()
10915{
10916
10917 makedev(major(0),minor(0));
10918
10919 ;
10920 return 0;
10921}
10922_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010923if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010924
10925
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010926$as_echo "#define HAVE_DEVICE_MACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010927
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010928 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10929$as_echo "yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010930
10931else
Skip Montanaro6dead952003-09-25 14:50:04 +000010932
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010933 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10934$as_echo "no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010935
10936fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010937rm -f core conftest.err conftest.$ac_objext \
10938 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000010939
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010940# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000010941# for [no]getaddrinfo in netdb.h.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010942{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
10943$as_echo_n "checking for getaddrinfo... " >&6; }
10944cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010945/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010946
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000010947#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010948#include <sys/socket.h>
10949#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000010950#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010951
Martin v. Löwis11437992002-04-12 09:54:03 +000010952int
10953main ()
10954{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010955getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000010956 ;
10957 return 0;
10958}
10959_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010960if ac_fn_c_try_link "$LINENO"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010961 have_getaddrinfo=yes
10962else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010963 have_getaddrinfo=no
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010964fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010965rm -f core conftest.err conftest.$ac_objext \
10966 conftest$ac_exeext conftest.$ac_ext
10967{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getaddrinfo" >&5
10968$as_echo "$have_getaddrinfo" >&6; }
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010969if test $have_getaddrinfo = yes
10970then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010971 { $as_echo "$as_me:${as_lineno-$LINENO}: checking getaddrinfo bug" >&5
10972$as_echo_n "checking getaddrinfo bug... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010973 if ${ac_cv_buggy_getaddrinfo+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010974 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010975else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010976 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010977 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010978else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010979 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010980/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010981
Stefan Krah0afe4e42012-11-22 23:56:51 +010010982#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010983#include <sys/types.h>
10984#include <netdb.h>
10985#include <string.h>
10986#include <sys/socket.h>
10987#include <netinet/in.h>
10988
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010989int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010990{
10991 int passive, gaierr, inet4 = 0, inet6 = 0;
10992 struct addrinfo hints, *ai, *aitop;
10993 char straddr[INET6_ADDRSTRLEN], strport[16];
10994
10995 for (passive = 0; passive <= 1; passive++) {
10996 memset(&hints, 0, sizeof(hints));
10997 hints.ai_family = AF_UNSPEC;
10998 hints.ai_flags = passive ? AI_PASSIVE : 0;
10999 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000011000 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011001 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
11002 (void)gai_strerror(gaierr);
11003 goto bad;
11004 }
11005 for (ai = aitop; ai; ai = ai->ai_next) {
11006 if (ai->ai_addr == NULL ||
11007 ai->ai_addrlen == 0 ||
11008 getnameinfo(ai->ai_addr, ai->ai_addrlen,
11009 straddr, sizeof(straddr), strport, sizeof(strport),
11010 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
11011 goto bad;
11012 }
11013 switch (ai->ai_family) {
11014 case AF_INET:
11015 if (strcmp(strport, "54321") != 0) {
11016 goto bad;
11017 }
11018 if (passive) {
11019 if (strcmp(straddr, "0.0.0.0") != 0) {
11020 goto bad;
11021 }
11022 } else {
11023 if (strcmp(straddr, "127.0.0.1") != 0) {
11024 goto bad;
11025 }
11026 }
11027 inet4++;
11028 break;
11029 case AF_INET6:
11030 if (strcmp(strport, "54321") != 0) {
11031 goto bad;
11032 }
11033 if (passive) {
11034 if (strcmp(straddr, "::") != 0) {
11035 goto bad;
11036 }
11037 } else {
11038 if (strcmp(straddr, "::1") != 0) {
11039 goto bad;
11040 }
11041 }
11042 inet6++;
11043 break;
11044 case AF_UNSPEC:
11045 goto bad;
11046 break;
11047 default:
11048 /* another family support? */
11049 break;
11050 }
11051 }
11052 }
11053
11054 if (!(inet4 == 0 || inet4 == 2))
11055 goto bad;
11056 if (!(inet6 == 0 || inet6 == 2))
11057 goto bad;
11058
11059 if (aitop)
11060 freeaddrinfo(aitop);
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011061 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011062
11063 bad:
11064 if (aitop)
11065 freeaddrinfo(aitop);
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011066 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011067}
11068
Martin v. Löwis11437992002-04-12 09:54:03 +000011069_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011070if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011071 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011072else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011073 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011074fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011075rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11076 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011077fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011078
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011079fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011080
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011081fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011082
Benjamin Peterson75fed812010-11-01 01:47:19 +000011083{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_buggy_getaddrinfo" >&5
11084$as_echo "$ac_cv_buggy_getaddrinfo" >&6; }
11085
Mark Dickinson0ef0b912009-12-31 21:11:48 +000011086if test $have_getaddrinfo = no -o "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011087then
11088 if test $ipv6 = yes
11089 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011090 echo 'Fatal: You must get working getaddrinfo() function.'
11091 echo ' or you can specify "--disable-ipv6"'.
11092 exit 1
11093 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011094else
Martin v. Löwis11437992002-04-12 09:54:03 +000011095
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011096$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011097
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011098fi
Benjamin Peterson75fed812010-11-01 01:47:19 +000011099
Jack Jansen9a66b6d2001-08-08 13:56:14 +000011100for ac_func in getnameinfo
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011101do :
11102 ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011103if test "x$ac_cv_func_getnameinfo" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011104 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011105#define HAVE_GETNAMEINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011106_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011107
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011108fi
11109done
11110
Michael W. Hudson54241132001-12-07 15:38:26 +000011111
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011112# checks for structures
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011113{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
11114$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011115if ${ac_cv_header_time+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011116 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011117else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011118 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011119/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011120#include <sys/types.h>
11121#include <sys/time.h>
11122#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011123
Martin v. Löwis11437992002-04-12 09:54:03 +000011124int
11125main ()
11126{
11127if ((struct tm *) 0)
11128return 0;
11129 ;
11130 return 0;
11131}
11132_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011133if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011134 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000011135else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011136 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011137fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011138rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011139fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011140{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
11141$as_echo "$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000011142if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011143
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011144$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011145
11146fi
11147
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011148{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
11149$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011150if ${ac_cv_struct_tm+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011151 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011152else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011153 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011154/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011155#include <sys/types.h>
11156#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011157
Martin v. Löwis11437992002-04-12 09:54:03 +000011158int
11159main ()
11160{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011161struct tm tm;
11162 int *p = &tm.tm_sec;
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011163 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000011164 ;
11165 return 0;
11166}
11167_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011168if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011169 ac_cv_struct_tm=time.h
11170else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011171 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011172fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011173rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011174fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011175{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
11176$as_echo "$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000011177if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011178
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011179$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011180
11181fi
11182
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011183ac_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 +000011184#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000011185
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011186"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011187if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011188
11189cat >>confdefs.h <<_ACEOF
11190#define HAVE_STRUCT_TM_TM_ZONE 1
11191_ACEOF
11192
11193
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011194fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011195
Martin v. Löwis11437992002-04-12 09:54:03 +000011196if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
11197
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011198$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011199
11200else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011201 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
11202"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011203if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011204 ac_have_decl=1
Martin v. Löwiseba40652007-08-30 20:10:57 +000011205else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011206 ac_have_decl=0
Martin v. Löwiseba40652007-08-30 20:10:57 +000011207fi
11208
Martin v. Löwiseba40652007-08-30 20:10:57 +000011209cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011210#define HAVE_DECL_TZNAME $ac_have_decl
Martin v. Löwiseba40652007-08-30 20:10:57 +000011211_ACEOF
11212
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011213 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
11214$as_echo_n "checking for tzname... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011215if ${ac_cv_var_tzname+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011216 $as_echo_n "(cached) " >&6
Martin v. Löwiseba40652007-08-30 20:10:57 +000011217else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011218 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011219/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000011220#include <time.h>
Martin v. Löwiseba40652007-08-30 20:10:57 +000011221#if !HAVE_DECL_TZNAME
11222extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000011223#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011224
Martin v. Löwis11437992002-04-12 09:54:03 +000011225int
11226main ()
11227{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011228return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000011229 ;
11230 return 0;
11231}
11232_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011233if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011234 ac_cv_var_tzname=yes
11235else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011236 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011237fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011238rm -f core conftest.err conftest.$ac_objext \
11239 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000011240fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011241{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
11242$as_echo "$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000011243 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011244
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011245$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000011246
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011247 fi
11248fi
11249
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011250ac_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 +010011251if test "x$ac_cv_member_struct_stat_st_rdev" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011252
11253cat >>confdefs.h <<_ACEOF
11254#define HAVE_STRUCT_STAT_ST_RDEV 1
11255_ACEOF
11256
11257
Guido van Rossum98bf58f2001-10-18 20:34:25 +000011258fi
11259
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011260ac_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 +010011261if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000011262
Martin v. Löwis11437992002-04-12 09:54:03 +000011263cat >>confdefs.h <<_ACEOF
11264#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
11265_ACEOF
11266
11267
Guido van Rossum98bf58f2001-10-18 20:34:25 +000011268fi
11269
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011270ac_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 +010011271if test "x$ac_cv_member_struct_stat_st_flags" = xyes; then :
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000011272
11273cat >>confdefs.h <<_ACEOF
11274#define HAVE_STRUCT_STAT_ST_FLAGS 1
11275_ACEOF
11276
11277
11278fi
11279
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011280ac_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 +010011281if test "x$ac_cv_member_struct_stat_st_gen" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000011282
11283cat >>confdefs.h <<_ACEOF
11284#define HAVE_STRUCT_STAT_ST_GEN 1
11285_ACEOF
11286
11287
11288fi
11289
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011290ac_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 +010011291if test "x$ac_cv_member_struct_stat_st_birthtime" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000011292
11293cat >>confdefs.h <<_ACEOF
11294#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
11295_ACEOF
11296
11297
11298fi
11299
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011300ac_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 +010011301if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000011302
Martin v. Löwis11437992002-04-12 09:54:03 +000011303cat >>confdefs.h <<_ACEOF
11304#define HAVE_STRUCT_STAT_ST_BLOCKS 1
11305_ACEOF
11306
11307
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011308$as_echo "#define HAVE_ST_BLOCKS 1" >>confdefs.h
Guido van Rossum98bf58f2001-10-18 20:34:25 +000011309
11310else
Martin v. Löwiseba40652007-08-30 20:10:57 +000011311 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000011312 *" fileblocks.$ac_objext "* ) ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000011313 *) LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
11314 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000011315esac
11316
Guido van Rossum98bf58f2001-10-18 20:34:25 +000011317fi
11318
Michael W. Hudson54241132001-12-07 15:38:26 +000011319
Martin v. Löwis11437992002-04-12 09:54:03 +000011320
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011321{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5
11322$as_echo_n "checking for time.h that defines altzone... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011323if ${ac_cv_header_time_altzone+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011324 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011325else
Matthias Klosec511b472010-05-08 11:01:39 +000011326
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011327 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011328/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000011329#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011330int
11331main ()
11332{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011333return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000011334 ;
11335 return 0;
11336}
11337_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011338if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011339 ac_cv_header_time_altzone=yes
11340else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011341 ac_cv_header_time_altzone=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011342fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011343rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosec511b472010-05-08 11:01:39 +000011344
Martin v. Löwiseba40652007-08-30 20:10:57 +000011345fi
11346
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011347{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5
11348$as_echo "$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011349if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011350
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011351$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011352
11353fi
11354
Guido van Rossumda88dad1995-01-26 00:46:29 +000011355was_it_defined=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011356{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
11357$as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
11358cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011359/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000011360
11361#include <sys/types.h>
11362#include <sys/select.h>
11363#include <sys/time.h>
11364
Martin v. Löwis11437992002-04-12 09:54:03 +000011365int
11366main ()
11367{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011368;
Martin v. Löwis11437992002-04-12 09:54:03 +000011369 ;
11370 return 0;
11371}
11372_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011373if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011374
11375
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011376$as_echo "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011377
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011378 was_it_defined=yes
11379
Martin v. Löwiseba40652007-08-30 20:10:57 +000011380fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011381rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011382{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
11383$as_echo "$was_it_defined" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000011384
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011385{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for addrinfo" >&5
11386$as_echo_n "checking for addrinfo... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011387if ${ac_cv_struct_addrinfo+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011388 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011389else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011390 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011391/* end confdefs.h. */
Matthias Klosec511b472010-05-08 11:01:39 +000011392#include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011393int
11394main ()
11395{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011396struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000011397 ;
11398 return 0;
11399}
11400_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011401if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011402 ac_cv_struct_addrinfo=yes
11403else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011404 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011405fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011406rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11407fi
11408
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011409{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5
11410$as_echo "$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011411if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011412
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011413$as_echo "#define HAVE_ADDRINFO 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011414
11415fi
11416
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011417{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5
11418$as_echo_n "checking for sockaddr_storage... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011419if ${ac_cv_struct_sockaddr_storage+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011420 $as_echo_n "(cached) " >&6
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
11425# include <sys/types.h>
11426# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011427int
11428main ()
11429{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011430struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000011431 ;
11432 return 0;
11433}
11434_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011435if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011436 ac_cv_struct_sockaddr_storage=yes
11437else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011438 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011439fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011440rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11441fi
11442
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011443{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5
11444$as_echo "$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011445if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011446
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011447$as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011448
11449fi
11450
Guido van Rossum627b2d71993-12-24 10:39:16 +000011451# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000011452
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011453{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
11454$as_echo_n "checking whether char is unsigned... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011455if ${ac_cv_c_char_unsigned+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011456 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000011457else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011458 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011459/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011460$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000011461int
11462main ()
11463{
11464static int test_array [1 - 2 * !(((char) -1) < 0)];
Charles-François Natalibe2b9072013-01-08 19:47:00 +010011465test_array [0] = 0;
11466return test_array [0];
Martin v. Löwis11437992002-04-12 09:54:03 +000011467
11468 ;
11469 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000011470}
Martin v. Löwis11437992002-04-12 09:54:03 +000011471_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011472if ac_fn_c_try_compile "$LINENO"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000011473 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000011474else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011475 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011476fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011477rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000011478fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011479{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
11480$as_echo "$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011481if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011482 $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011483
11484fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000011485
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011486{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
11487$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011488if ${ac_cv_c_const+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011489 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000011490else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011491 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011492/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011493
Martin v. Löwis11437992002-04-12 09:54:03 +000011494int
11495main ()
11496{
Charles-François Natalibe2b9072013-01-08 19:47:00 +010011497
Martin v. Löwis11437992002-04-12 09:54:03 +000011498#ifndef __cplusplus
Charles-François Natalibe2b9072013-01-08 19:47:00 +010011499 /* Ultrix mips cc rejects this sort of thing. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011500 typedef int charset[2];
Charles-François Natalibe2b9072013-01-08 19:47:00 +010011501 const charset cs = { 0, 0 };
Martin v. Löwis11437992002-04-12 09:54:03 +000011502 /* SunOS 4.1.1 cc rejects this. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000011503 char const *const *pcpcc;
11504 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000011505 /* NEC SVR4.0.2 mips cc rejects this. */
11506 struct point {int x, y;};
11507 static struct point const zero = {0,0};
11508 /* AIX XL C 1.02.0.0 rejects this.
11509 It does not let you subtract one const X* pointer from another in
11510 an arm of an if-expression whose if-part is not a constant
11511 expression */
11512 const char *g = "string";
Martin v. Löwiseba40652007-08-30 20:10:57 +000011513 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000011514 /* HPUX 7.0 cc rejects these. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000011515 ++pcpcc;
11516 ppc = (char**) pcpcc;
11517 pcpcc = (char const *const *) ppc;
Charles-François Natalibe2b9072013-01-08 19:47:00 +010011518 { /* SCO 3.2v4 cc rejects this sort of thing. */
11519 char tx;
11520 char *t = &tx;
Martin v. Löwis11437992002-04-12 09:54:03 +000011521 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011522
Martin v. Löwis11437992002-04-12 09:54:03 +000011523 *t++ = 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +000011524 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011525 }
11526 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
11527 int x[] = {25, 17};
11528 const int *foo = &x[0];
11529 ++foo;
11530 }
11531 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
11532 typedef const int *iptr;
11533 iptr p = 0;
11534 ++p;
11535 }
Charles-François Natalibe2b9072013-01-08 19:47:00 +010011536 { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
Martin v. Löwis11437992002-04-12 09:54:03 +000011537 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
Charles-François Natalibe2b9072013-01-08 19:47:00 +010011538 struct s { int j; const int *ap[3]; } bx;
11539 struct s *b = &bx; b->j = 5;
Martin v. Löwis11437992002-04-12 09:54:03 +000011540 }
11541 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
11542 const int foo = 10;
Martin v. Löwiseba40652007-08-30 20:10:57 +000011543 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011544 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000011545 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000011546#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000011547
Martin v. Löwis11437992002-04-12 09:54:03 +000011548 ;
11549 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000011550}
Martin v. Löwis11437992002-04-12 09:54:03 +000011551_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011552if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011553 ac_cv_c_const=yes
11554else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011555 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011556fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011557rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011558fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011559{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
11560$as_echo "$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011561if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011562
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011563$as_echo "#define const /**/" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011564
11565fi
11566
Michael W. Hudson54241132001-12-07 15:38:26 +000011567
Guido van Rossumda88dad1995-01-26 00:46:29 +000011568works=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011569{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5
11570$as_echo_n "checking for working volatile... " >&6; }
11571cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011572/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000011573
Martin v. Löwis11437992002-04-12 09:54:03 +000011574int
11575main ()
11576{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011577volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011578 ;
11579 return 0;
11580}
11581_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011582if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000011583 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000011584else
Skip Montanaro6dead952003-09-25 14:50:04 +000011585
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011586$as_echo "#define volatile /**/" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000011587
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011588
Guido van Rossum627b2d71993-12-24 10:39:16 +000011589fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011590rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011591{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
11592$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000011593
Guido van Rossumda88dad1995-01-26 00:46:29 +000011594works=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011595{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working signed char" >&5
11596$as_echo_n "checking for working signed char... " >&6; }
11597cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011598/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000011599
Martin v. Löwis11437992002-04-12 09:54:03 +000011600int
11601main ()
11602{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011603signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000011604 ;
11605 return 0;
11606}
11607_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011608if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000011609 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000011610else
Skip Montanaro6dead952003-09-25 14:50:04 +000011611
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011612$as_echo "#define signed /**/" >>confdefs.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000011613
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011614
Guido van Rossum7f43da71994-08-01 12:15:30 +000011615fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011616rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011617{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
11618$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000011619
Guido van Rossumda88dad1995-01-26 00:46:29 +000011620have_prototypes=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011621{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototypes" >&5
11622$as_echo_n "checking for prototypes... " >&6; }
11623cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011624/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000011625int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011626int
11627main ()
11628{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011629return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000011630 ;
11631 return 0;
11632}
11633_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011634if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011635
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011636$as_echo "#define HAVE_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011637
Matthias Klosec511b472010-05-08 11:01:39 +000011638 have_prototypes=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000011639fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011640rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011641{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_prototypes" >&5
11642$as_echo "$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011643
Guido van Rossumda88dad1995-01-26 00:46:29 +000011644works=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011645{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for variable length prototypes and stdarg.h" >&5
11646$as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; }
11647cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011648/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000011649
11650#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000011651int foo(int x, ...) {
11652 va_list va;
11653 va_start(va, x);
11654 va_arg(va, int);
11655 va_arg(va, char *);
11656 va_arg(va, double);
11657 return 0;
11658}
Guido van Rossum7f43da71994-08-01 12:15:30 +000011659
Martin v. Löwis11437992002-04-12 09:54:03 +000011660int
11661main ()
11662{
Guido van Rossum90eea071996-08-30 20:58:57 +000011663return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000011664 ;
11665 return 0;
11666}
11667_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011668if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011669
11670
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011671$as_echo "#define HAVE_STDARG_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011672
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011673 works=yes
11674
Guido van Rossum627b2d71993-12-24 10:39:16 +000011675fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011676rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011677{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
11678$as_echo "$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011679
Martin v. Löwisd6320502004-08-12 13:45:08 +000011680# check for socketpair
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011681{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair" >&5
11682$as_echo_n "checking for socketpair... " >&6; }
11683cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000011684/* end confdefs.h. */
11685
11686#include <sys/types.h>
11687#include <sys/socket.h>
11688
11689int
11690main ()
11691{
11692void *x=socketpair
11693 ;
11694 return 0;
11695}
11696_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011697if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd6320502004-08-12 13:45:08 +000011698
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011699$as_echo "#define HAVE_SOCKETPAIR 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +000011700
Matthias Klosec511b472010-05-08 11:01:39 +000011701 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011702$as_echo "yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000011703else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011704 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11705$as_echo "no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000011706
11707fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011708rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000011709
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011710# check if sockaddr has sa_len member
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011711{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr has sa_len member" >&5
11712$as_echo_n "checking if sockaddr has sa_len member... " >&6; }
11713cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011714/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011715#include <sys/types.h>
11716#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011717int
11718main ()
11719{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011720struct sockaddr x;
11721x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011722 ;
11723 return 0;
11724}
11725_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011726if ac_fn_c_try_compile "$LINENO"; then :
11727 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11728$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011729
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011730$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011731
11732else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011733 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11734$as_echo "no" >&6; }
Matthias Klosec511b472010-05-08 11:01:39 +000011735
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011736fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011737rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011738
Guido van Rossumda88dad1995-01-26 00:46:29 +000011739va_list_is_array=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011740{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether va_list is an array" >&5
11741$as_echo_n "checking whether va_list is an array... " >&6; }
11742cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011743/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011744
11745#ifdef HAVE_STDARG_PROTOTYPES
11746#include <stdarg.h>
11747#else
11748#include <varargs.h>
11749#endif
11750
Martin v. Löwis11437992002-04-12 09:54:03 +000011751int
11752main ()
11753{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011754va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000011755 ;
11756 return 0;
11757}
11758_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011759if ac_fn_c_try_compile "$LINENO"; then :
11760
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011761else
Skip Montanaro6dead952003-09-25 14:50:04 +000011762
Martin v. Löwis11437992002-04-12 09:54:03 +000011763
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011764$as_echo "#define VA_LIST_IS_ARRAY 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011765
Guido van Rossumda88dad1995-01-26 00:46:29 +000011766 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011767
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011768fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011769rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011770{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $va_list_is_array" >&5
11771$as_echo "$va_list_is_array" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011772
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011773# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000011774
11775
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011776ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011777if test "x$ac_cv_func_gethostbyname_r" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011778
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011779 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000011780
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011781 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 6 args" >&5
11782$as_echo_n "checking gethostbyname_r with 6 args... " >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011783 OLD_CFLAGS=$CFLAGS
11784 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011785 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011786/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011787
11788# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011789
Martin v. Löwis11437992002-04-12 09:54:03 +000011790int
11791main ()
11792{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011793
11794 char *name;
11795 struct hostent *he, *res;
11796 char buffer[2048];
11797 int buflen = 2048;
11798 int h_errnop;
11799
11800 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000011801
11802 ;
11803 return 0;
11804}
11805_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011806if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011807
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011808 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000011809
Martin v. Löwis11437992002-04-12 09:54:03 +000011810
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011811$as_echo "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011812
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011813 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11814$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011815
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011816else
Skip Montanaro6dead952003-09-25 14:50:04 +000011817
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011818 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11819$as_echo "no" >&6; }
11820 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 5 args" >&5
11821$as_echo_n "checking gethostbyname_r with 5 args... " >&6; }
11822 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011823/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011824
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011825# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011826
Martin v. Löwis11437992002-04-12 09:54:03 +000011827int
11828main ()
11829{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011830
11831 char *name;
11832 struct hostent *he;
Matthias Klosec511b472010-05-08 11:01:39 +000011833 char buffer[2048];
11834 int buflen = 2048;
11835 int h_errnop;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011836
Matthias Klosec511b472010-05-08 11:01:39 +000011837 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000011838
11839 ;
11840 return 0;
11841}
11842_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011843if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011844
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011845 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000011846
Martin v. Löwis11437992002-04-12 09:54:03 +000011847
Matthias Klosec511b472010-05-08 11:01:39 +000011848$as_echo "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011849
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011850 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11851$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011852
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011853else
Skip Montanaro6dead952003-09-25 14:50:04 +000011854
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011855 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11856$as_echo "no" >&6; }
Matthias Klosec511b472010-05-08 11:01:39 +000011857 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 3 args" >&5
11858$as_echo_n "checking gethostbyname_r with 3 args... " >&6; }
11859 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11860/* end confdefs.h. */
11861
11862# include <netdb.h>
11863
11864int
11865main ()
11866{
11867
11868 char *name;
11869 struct hostent *he;
11870 struct hostent_data data;
11871
11872 (void) gethostbyname_r(name, he, &data);
11873
11874 ;
11875 return 0;
11876}
11877_ACEOF
11878if ac_fn_c_try_compile "$LINENO"; then :
11879
11880 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
11881
11882
11883$as_echo "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h
11884
11885 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11886$as_echo "yes" >&6; }
11887
11888else
11889
11890 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11891$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011892
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011893fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011894rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011895
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011896fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011897rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011898
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011899fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011900rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011901 CFLAGS=$OLD_CFLAGS
11902
11903else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011904
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011905 for ac_func in gethostbyname
11906do :
11907 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011908if test "x$ac_cv_func_gethostbyname" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011909 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011910#define HAVE_GETHOSTBYNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011911_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011912
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011913fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011914done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011915
Michael W. Hudson54241132001-12-07 15:38:26 +000011916
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011917fi
11918
Michael W. Hudson54241132001-12-07 15:38:26 +000011919
11920
11921
11922
11923
11924
Guido van Rossum627b2d71993-12-24 10:39:16 +000011925# checks for system services
11926# (none yet)
11927
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011928# Linux requires this for correct f.p. operations
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011929ac_fn_c_check_func "$LINENO" "__fpu_control" "ac_cv_func___fpu_control"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011930if test "x$ac_cv_func___fpu_control" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011931
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000011932else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011933 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5
11934$as_echo_n "checking for __fpu_control in -lieee... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011935if ${ac_cv_lib_ieee___fpu_control+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011936 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011937else
Martin v. Löwis11437992002-04-12 09:54:03 +000011938 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011939LIBS="-lieee $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011940cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011941/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011942
Martin v. Löwiseba40652007-08-30 20:10:57 +000011943/* Override any GCC internal prototype to avoid an error.
11944 Use char because int might match the return type of a GCC
11945 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011946#ifdef __cplusplus
11947extern "C"
11948#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011949char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011950int
11951main ()
11952{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011953return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011954 ;
11955 return 0;
11956}
11957_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011958if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011959 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000011960else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011961 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011962fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011963rm -f core conftest.err conftest.$ac_objext \
11964 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011965LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011966fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011967{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee___fpu_control" >&5
11968$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011969if test "x$ac_cv_lib_ieee___fpu_control" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011970 cat >>confdefs.h <<_ACEOF
11971#define HAVE_LIBIEEE 1
11972_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011973
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011974 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011975
Guido van Rossum627b2d71993-12-24 10:39:16 +000011976fi
11977
Michael W. Hudson54241132001-12-07 15:38:26 +000011978
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000011979fi
11980
Michael W. Hudson54241132001-12-07 15:38:26 +000011981
Guido van Rossum7f253911997-05-09 02:42:48 +000011982# Check for --with-fpectl
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011983{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-fpectl" >&5
11984$as_echo_n "checking for --with-fpectl... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011985
Martin v. Löwiseba40652007-08-30 20:10:57 +000011986# Check whether --with-fpectl was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011987if test "${with_fpectl+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +000011988 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000011989if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000011990then
11991
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011992$as_echo "#define WANT_SIGFPE_HANDLER 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011993
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011994 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11995$as_echo "yes" >&6; }
11996else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11997$as_echo "no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000011998fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000011999else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012000 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12001$as_echo "no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012002fi
12003
Guido van Rossum7f253911997-05-09 02:42:48 +000012004
Guido van Rossum7f43da71994-08-01 12:15:30 +000012005# check for --with-libm=...
12006
Guido van Rossum563e7081996-09-10 18:20:48 +000012007case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000012008Darwin) ;;
Guido van Rossumec95c7b1998-08-04 17:59:56 +000012009BeOS) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000012010*) LIBM=-lm
12011esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012012{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libm=STRING" >&5
12013$as_echo_n "checking for --with-libm=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012014
Martin v. Löwiseba40652007-08-30 20:10:57 +000012015# Check whether --with-libm was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012016if test "${with_libm+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +000012017 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000012018if test "$withval" = no
12019then LIBM=
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012020 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBM empty" >&5
12021$as_echo "force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000012022elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000012023then LIBM=$withval
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012024 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBM=\"$withval\"" >&5
12025$as_echo "set LIBM=\"$withval\"" >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +000012026else as_fn_error $? "proper usage is --with-libm=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000012027fi
Guido van Rossum7f253911997-05-09 02:42:48 +000012028else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012029 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBM=\"$LIBM\"" >&5
12030$as_echo "default LIBM=\"$LIBM\"" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012031fi
12032
Guido van Rossum7f43da71994-08-01 12:15:30 +000012033
12034# check for --with-libc=...
12035
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012036{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libc=STRING" >&5
12037$as_echo_n "checking for --with-libc=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012038
Martin v. Löwiseba40652007-08-30 20:10:57 +000012039# Check whether --with-libc was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012040if test "${with_libc+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +000012041 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000012042if test "$withval" = no
12043then LIBC=
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012044 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBC empty" >&5
12045$as_echo "force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000012046elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000012047then LIBC=$withval
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012048 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBC=\"$withval\"" >&5
12049$as_echo "set LIBC=\"$withval\"" >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +000012050else as_fn_error $? "proper usage is --with-libc=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000012051fi
Guido van Rossum7f253911997-05-09 02:42:48 +000012052else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012053 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBC=\"$LIBC\"" >&5
12054$as_echo "default LIBC=\"$LIBC\"" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012055fi
12056
Guido van Rossum7f43da71994-08-01 12:15:30 +000012057
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012058# **************************************************
12059# * Check for various properties of floating point *
12060# **************************************************
Mark Dickinson265d7382008-04-21 22:32:24 +000012061
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012062{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are little-endian IEEE 754 binary64" >&5
12063$as_echo_n "checking whether C doubles are little-endian IEEE 754 binary64... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012064if ${ac_cv_little_endian_double+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012065 $as_echo_n "(cached) " >&6
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012066else
12067
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012068if test "$cross_compiling" = yes; then :
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012069 ac_cv_little_endian_double=no
12070else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012071 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012072/* end confdefs.h. */
12073
12074#include <string.h>
12075int main() {
12076 double x = 9006104071832581.0;
12077 if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
12078 return 0;
12079 else
12080 return 1;
12081}
12082
12083_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012084if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012085 ac_cv_little_endian_double=yes
12086else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012087 ac_cv_little_endian_double=no
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012088fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012089rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12090 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012091fi
12092
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012093fi
12094
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012095{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_little_endian_double" >&5
12096$as_echo "$ac_cv_little_endian_double" >&6; }
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012097if test "$ac_cv_little_endian_double" = yes
12098then
12099
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012100$as_echo "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012101
12102fi
12103
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012104{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are big-endian IEEE 754 binary64" >&5
12105$as_echo_n "checking whether C doubles are big-endian IEEE 754 binary64... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012106if ${ac_cv_big_endian_double+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012107 $as_echo_n "(cached) " >&6
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012108else
12109
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012110if test "$cross_compiling" = yes; then :
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012111 ac_cv_big_endian_double=no
12112else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012113 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012114/* end confdefs.h. */
12115
12116#include <string.h>
12117int main() {
12118 double x = 9006104071832581.0;
12119 if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
12120 return 0;
12121 else
12122 return 1;
12123}
12124
12125_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012126if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012127 ac_cv_big_endian_double=yes
12128else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012129 ac_cv_big_endian_double=no
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012130fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012131rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12132 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012133fi
12134
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012135fi
12136
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012137{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_big_endian_double" >&5
12138$as_echo "$ac_cv_big_endian_double" >&6; }
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012139if test "$ac_cv_big_endian_double" = yes
12140then
12141
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012142$as_echo "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012143
12144fi
12145
12146# Some ARM platforms use a mixed-endian representation for doubles.
12147# While Python doesn't currently have full support for these platforms
12148# (see e.g., issue 1762561), we can at least make sure that float <-> string
12149# conversions work.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012150{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5
12151$as_echo_n "checking whether C doubles are ARM mixed-endian IEEE 754 binary64... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012152if ${ac_cv_mixed_endian_double+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012153 $as_echo_n "(cached) " >&6
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012154else
12155
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012156if test "$cross_compiling" = yes; then :
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012157 ac_cv_mixed_endian_double=no
12158else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012159 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012160/* end confdefs.h. */
12161
12162#include <string.h>
12163int main() {
12164 double x = 9006104071832581.0;
12165 if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
12166 return 0;
12167 else
12168 return 1;
12169}
12170
12171_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012172if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012173 ac_cv_mixed_endian_double=yes
12174else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012175 ac_cv_mixed_endian_double=no
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012176fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012177rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12178 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012179fi
12180
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012181fi
12182
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012183{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mixed_endian_double" >&5
12184$as_echo "$ac_cv_mixed_endian_double" >&6; }
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012185if test "$ac_cv_mixed_endian_double" = yes
12186then
12187
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012188$as_echo "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012189
12190fi
12191
12192# The short float repr introduced in Python 3.1 requires the
12193# correctly-rounded string <-> double conversion functions from
12194# Python/dtoa.c, which in turn require that the FPU uses 53-bit
12195# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsona548dee2009-11-15 13:12:43 +000012196# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012197# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsona548dee2009-11-15 13:12:43 +000012198
12199# This inline assembler syntax may also work for suncc and icc,
12200# so we try it on all platforms.
12201
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012202{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
12203$as_echo_n "checking whether we can use gcc inline assembler to get and set x87 control word... " >&6; }
12204cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012205/* end confdefs.h. */
12206
12207int
12208main ()
12209{
12210
Mark Dickinsona548dee2009-11-15 13:12:43 +000012211 unsigned short cw;
12212 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
12213 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012214
12215 ;
12216 return 0;
12217}
12218_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012219if ac_fn_c_try_compile "$LINENO"; then :
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012220 have_gcc_asm_for_x87=yes
12221else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012222 have_gcc_asm_for_x87=no
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012223fi
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012224rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012225{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x87" >&5
12226$as_echo "$have_gcc_asm_for_x87" >&6; }
Mark Dickinsona548dee2009-11-15 13:12:43 +000012227if test "$have_gcc_asm_for_x87" = yes
12228then
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012229
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012230$as_echo "#define HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012231
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012232fi
Mark Dickinson7a3d8642008-04-22 00:54:27 +000012233
Mark Dickinson04b27232009-01-04 12:29:36 +000012234# Detect whether system arithmetic is subject to x87-style double
12235# rounding issues. The result of this test has little meaning on non
12236# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
12237# mode is round-to-nearest and double rounding issues are present, and
12238# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012239{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x87-style double rounding" >&5
12240$as_echo_n "checking for x87-style double rounding... " >&6; }
Mark Dickinson99abd142009-10-24 13:44:16 +000012241# $BASECFLAGS may affect the result
12242ac_save_cc="$CC"
12243CC="$CC $BASECFLAGS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012244if test "$cross_compiling" = yes; then :
Mark Dickinson04b27232009-01-04 12:29:36 +000012245 ac_cv_x87_double_rounding=no
12246else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012247 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson04b27232009-01-04 12:29:36 +000012248/* end confdefs.h. */
12249
12250#include <stdlib.h>
12251#include <math.h>
12252int main() {
12253 volatile double x, y, z;
12254 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
12255 x = 0.99999999999999989; /* 1-2**-53 */
12256 y = 1./x;
12257 if (y != 1.)
12258 exit(0);
12259 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
12260 x = 1e16;
12261 y = 2.99999;
12262 z = x + y;
12263 if (z != 1e16+4.)
12264 exit(0);
12265 /* both tests show evidence of double rounding */
12266 exit(1);
12267}
12268
12269_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012270if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson04b27232009-01-04 12:29:36 +000012271 ac_cv_x87_double_rounding=no
12272else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012273 ac_cv_x87_double_rounding=yes
Mark Dickinson04b27232009-01-04 12:29:36 +000012274fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012275rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12276 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson04b27232009-01-04 12:29:36 +000012277fi
12278
Mark Dickinson99abd142009-10-24 13:44:16 +000012279CC="$ac_save_cc"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012280{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5
12281$as_echo "$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson04b27232009-01-04 12:29:36 +000012282if test "$ac_cv_x87_double_rounding" = yes
12283then
12284
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012285$as_echo "#define X87_DOUBLE_ROUNDING 1" >>confdefs.h
Mark Dickinson04b27232009-01-04 12:29:36 +000012286
12287fi
12288
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012289# ************************************
12290# * Check for mathematical functions *
12291# ************************************
12292
12293LIBS_SAVE=$LIBS
12294LIBS="$LIBS $LIBM"
12295
Mark Dickinson265d7382008-04-21 22:32:24 +000012296# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
12297# -0. on some architectures.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012298{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether tanh preserves the sign of zero" >&5
12299$as_echo_n "checking whether tanh preserves the sign of zero... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012300if ${ac_cv_tanh_preserves_zero_sign+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012301 $as_echo_n "(cached) " >&6
Mark Dickinson265d7382008-04-21 22:32:24 +000012302else
12303
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012304if test "$cross_compiling" = yes; then :
Mark Dickinson265d7382008-04-21 22:32:24 +000012305 ac_cv_tanh_preserves_zero_sign=no
12306else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012307 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson265d7382008-04-21 22:32:24 +000012308/* end confdefs.h. */
12309
12310#include <math.h>
Mark Dickinson7a3d8642008-04-22 00:54:27 +000012311#include <stdlib.h>
Mark Dickinson265d7382008-04-21 22:32:24 +000012312int main() {
12313 /* return 0 if either negative zeros don't exist
12314 on this platform or if negative zeros exist
12315 and tanh(-0.) == -0. */
12316 if (atan2(0., -1.) == atan2(-0., -1.) ||
12317 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
12318 else exit(1);
12319}
12320
12321_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012322if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson265d7382008-04-21 22:32:24 +000012323 ac_cv_tanh_preserves_zero_sign=yes
12324else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012325 ac_cv_tanh_preserves_zero_sign=no
Mark Dickinson265d7382008-04-21 22:32:24 +000012326fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012327rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12328 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson265d7382008-04-21 22:32:24 +000012329fi
12330
Mark Dickinson265d7382008-04-21 22:32:24 +000012331fi
12332
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012333{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_tanh_preserves_zero_sign" >&5
12334$as_echo "$ac_cv_tanh_preserves_zero_sign" >&6; }
Mark Dickinson265d7382008-04-21 22:32:24 +000012335if test "$ac_cv_tanh_preserves_zero_sign" = yes
12336then
12337
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012338$as_echo "#define TANH_PRESERVES_ZERO_SIGN 1" >>confdefs.h
Mark Dickinson265d7382008-04-21 22:32:24 +000012339
12340fi
12341
Mark Dickinson65898e02009-09-05 10:27:00 +000012342for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012343do :
12344 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12345ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Georg Brandl71f4fbb2011-02-25 11:04:50 +000012346if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinson65898e02009-09-05 10:27:00 +000012347 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012348#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Mark Dickinson65898e02009-09-05 10:27:00 +000012349_ACEOF
12350
12351fi
12352done
12353
Mark Dickinson65898e02009-09-05 10:27:00 +000012354for ac_func in hypot lgamma log1p round tgamma
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012355do :
12356 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12357ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Georg Brandl71f4fbb2011-02-25 11:04:50 +000012358if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Christian Heimes0a8143f2007-12-18 23:22:54 +000012359 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012360#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Christian Heimes0a8143f2007-12-18 23:22:54 +000012361_ACEOF
12362
12363fi
12364done
12365
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012366ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
12367"
Matthias Klose3cef2a92012-03-14 23:39:33 +010012368if test "x$ac_cv_have_decl_isinf" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012369 ac_have_decl=1
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012370else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012371 ac_have_decl=0
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012372fi
12373
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012374cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012375#define HAVE_DECL_ISINF $ac_have_decl
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012376_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012377ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h>
12378"
Matthias Klose3cef2a92012-03-14 23:39:33 +010012379if test "x$ac_cv_have_decl_isnan" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012380 ac_have_decl=1
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012381else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012382 ac_have_decl=0
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012383fi
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012384
12385cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012386#define HAVE_DECL_ISNAN $ac_have_decl
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012387_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012388ac_fn_c_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include <math.h>
12389"
Matthias Klose3cef2a92012-03-14 23:39:33 +010012390if test "x$ac_cv_have_decl_isfinite" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012391 ac_have_decl=1
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012392else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012393 ac_have_decl=0
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012394fi
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012395
12396cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012397#define HAVE_DECL_ISFINITE $ac_have_decl
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012398_ACEOF
12399
12400
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000012401LIBS=$LIBS_SAVE
12402
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012403# For multiprocessing module, check that sem_open
12404# actually works. For FreeBSD versions <= 7.2,
12405# the kernel module that provides POSIX semaphores
12406# isn't loaded by default, so an attempt to call
12407# sem_open results in a 'Signal 12' error.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012408{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX semaphores are enabled" >&5
12409$as_echo_n "checking whether POSIX semaphores are enabled... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012410if ${ac_cv_posix_semaphores_enabled+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012411 $as_echo_n "(cached) " >&6
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012412else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012413 if test "$cross_compiling" = yes; then :
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012414 ac_cv_posix_semaphores_enabled=yes
12415else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012416 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012417/* end confdefs.h. */
12418
12419#include <unistd.h>
12420#include <fcntl.h>
12421#include <stdio.h>
12422#include <semaphore.h>
12423#include <sys/stat.h>
12424
12425int main(void) {
12426 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
12427 if (a == SEM_FAILED) {
12428 perror("sem_open");
12429 return 1;
12430 }
12431 sem_close(a);
Mark Dickinson59dc89e2009-12-13 21:06:06 +000012432 sem_unlink("/autoconf");
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012433 return 0;
12434}
12435
12436_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012437if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012438 ac_cv_posix_semaphores_enabled=yes
12439else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012440 ac_cv_posix_semaphores_enabled=no
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012441fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012442rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12443 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012444fi
12445
12446
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012447fi
12448
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012449{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_semaphores_enabled" >&5
12450$as_echo "$ac_cv_posix_semaphores_enabled" >&6; }
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012451if test $ac_cv_posix_semaphores_enabled = no
12452then
12453
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012454$as_echo "#define POSIX_SEMAPHORES_NOT_ENABLED 1" >>confdefs.h
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012455
12456fi
12457
12458# Multiprocessing check for broken sem_getvalue
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012459{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken sem_getvalue" >&5
12460$as_echo_n "checking for broken sem_getvalue... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012461if ${ac_cv_broken_sem_getvalue+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012462 $as_echo_n "(cached) " >&6
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012463else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012464 if test "$cross_compiling" = yes; then :
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012465 ac_cv_broken_sem_getvalue=yes
12466else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012467 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012468/* end confdefs.h. */
12469
12470#include <unistd.h>
12471#include <fcntl.h>
12472#include <stdio.h>
12473#include <semaphore.h>
12474#include <sys/stat.h>
12475
12476int main(void){
Mark Dickinson59dc89e2009-12-13 21:06:06 +000012477 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012478 int count;
12479 int res;
12480 if(a==SEM_FAILED){
12481 perror("sem_open");
12482 return 1;
12483
12484 }
12485 res = sem_getvalue(a, &count);
12486 sem_close(a);
Mark Dickinson59dc89e2009-12-13 21:06:06 +000012487 sem_unlink("/autocftw");
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012488 return res==-1 ? 1 : 0;
12489}
12490
12491_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012492if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012493 ac_cv_broken_sem_getvalue=no
12494else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012495 ac_cv_broken_sem_getvalue=yes
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012496fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012497rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12498 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012499fi
12500
12501
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012502fi
12503
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012504{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_sem_getvalue" >&5
12505$as_echo "$ac_cv_broken_sem_getvalue" >&6; }
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012506if test $ac_cv_broken_sem_getvalue = yes
12507then
12508
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012509$as_echo "#define HAVE_BROKEN_SEM_GETVALUE 1" >>confdefs.h
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012510
12511fi
12512
Mark Dickinsonefc82f72009-03-20 15:51:55 +000012513# determine what size digit to use for Python's longs
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012514{ $as_echo "$as_me:${as_lineno-$LINENO}: checking digit size for Python's longs" >&5
12515$as_echo_n "checking digit size for Python's longs... " >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +000012516# Check whether --enable-big-digits was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012517if test "${enable_big_digits+set}" = set; then :
Mark Dickinsonefc82f72009-03-20 15:51:55 +000012518 enableval=$enable_big_digits; case $enable_big_digits in
12519yes)
12520 enable_big_digits=30 ;;
12521no)
12522 enable_big_digits=15 ;;
1252315|30)
12524 ;;
12525*)
Matthias Klose3cef2a92012-03-14 23:39:33 +010012526 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 +000012527esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012528{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_big_digits" >&5
12529$as_echo "$enable_big_digits" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +000012530
12531cat >>confdefs.h <<_ACEOF
12532#define PYLONG_BITS_IN_DIGIT $enable_big_digits
12533_ACEOF
12534
12535
12536else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012537 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
12538$as_echo "no value specified" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +000012539fi
12540
12541
Guido van Rossumef2255b2000-03-10 22:30:29 +000012542# check for wchar.h
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012543ac_fn_c_check_header_mongrel "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
Matthias Klose3cef2a92012-03-14 23:39:33 +010012544if test "x$ac_cv_header_wchar_h" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012545
12546
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012547$as_echo "#define HAVE_WCHAR_H 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012548
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012549 wchar_h="yes"
12550
Guido van Rossumef2255b2000-03-10 22:30:29 +000012551else
Martin v. Löwis11437992002-04-12 09:54:03 +000012552 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000012553
12554fi
12555
Michael W. Hudson54241132001-12-07 15:38:26 +000012556
Martin v. Löwis11437992002-04-12 09:54:03 +000012557
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012558# determine wchar_t size
12559if test "$wchar_h" = yes
12560then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012561 # The cast to long int works around a bug in the HP C Compiler
Martin v. Löwiseba40652007-08-30 20:10:57 +000012562# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
12563# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
12564# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012565{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
12566$as_echo_n "checking size of wchar_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012567if ${ac_cv_sizeof_wchar_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012568 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000012569else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012570 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "#include <wchar.h>
12571"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012572
Martin v. Löwis11437992002-04-12 09:54:03 +000012573else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012574 if test "$ac_cv_type_wchar_t" = yes; then
12575 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
12576$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +000012577as_fn_error 77 "cannot compute sizeof (wchar_t)
Matthias Klose3cef2a92012-03-14 23:39:33 +010012578See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012579 else
12580 ac_cv_sizeof_wchar_t=0
12581 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012582fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012583
Martin v. Löwis11437992002-04-12 09:54:03 +000012584fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012585{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
12586$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012587
12588
12589
Martin v. Löwis11437992002-04-12 09:54:03 +000012590cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012591#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000012592_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012593
Michael W. Hudson54241132001-12-07 15:38:26 +000012594
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012595fi
12596
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012597{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UCS-4 tcl" >&5
12598$as_echo_n "checking for UCS-4 tcl... " >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012599have_ucs4_tcl=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012600cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012601/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012602
12603#include <tcl.h>
12604#if TCL_UTF_MAX != 6
12605# error "NOT UCS4_TCL"
12606#endif
12607int
12608main ()
12609{
12610
12611 ;
12612 return 0;
12613}
12614_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012615if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012616
12617
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012618$as_echo "#define HAVE_UCS4_TCL 1" >>confdefs.h
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012619
12620 have_ucs4_tcl=yes
12621
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012622fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012623rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012624{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ucs4_tcl" >&5
12625$as_echo "$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012626
Skip Montanaro6dead952003-09-25 14:50:04 +000012627# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012628if test "$wchar_h" = yes
12629then
12630 # check whether wchar_t is signed or not
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012631 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is signed" >&5
12632$as_echo_n "checking whether wchar_t is signed... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012633 if ${ac_cv_wchar_t_signed+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012634 $as_echo_n "(cached) " >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012635else
12636
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012637 if test "$cross_compiling" = yes; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012638 ac_cv_wchar_t_signed=yes
12639else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012640 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012641/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012642
12643 #include <wchar.h>
12644 int main()
12645 {
Martin v. Löwis44fe0e42006-04-11 07:15:30 +000012646 /* Success: exit code 0 */
12647 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012648 }
12649
12650_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012651if ac_fn_c_try_run "$LINENO"; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012652 ac_cv_wchar_t_signed=yes
12653else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012654 ac_cv_wchar_t_signed=no
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012655fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012656rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12657 conftest.$ac_objext conftest.beam conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012658fi
12659
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012660fi
12661
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012662 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wchar_t_signed" >&5
12663$as_echo "$ac_cv_wchar_t_signed" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012664fi
12665
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012666{ $as_echo "$as_me:${as_lineno-$LINENO}: checking what type to use for unicode" >&5
12667$as_echo_n "checking what type to use for unicode... " >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012668# Check whether --enable-unicode was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012669if test "${enable_unicode+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +000012670 enableval=$enable_unicode;
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012671else
12672 enable_unicode=yes
Martin v. Löwiseba40652007-08-30 20:10:57 +000012673fi
12674
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012675
12676if test $enable_unicode = yes
12677then
Martin v. Löwisfd917792001-06-27 20:22:04 +000012678 # Without any arguments, Py_UNICODE defaults to two-byte mode
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012679 case "$have_ucs4_tcl" in
12680 yes) enable_unicode="ucs4"
12681 ;;
12682 *) enable_unicode="ucs2"
12683 ;;
12684 esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012685fi
12686
Martin v. Löwis0036cba2002-04-12 09:58:45 +000012687
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012688case "$enable_unicode" in
12689ucs2) unicode_size="2"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012690 $as_echo "#define Py_UNICODE_SIZE 2" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012691
12692 ;;
12693ucs4) unicode_size="4"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012694 $as_echo "#define Py_UNICODE_SIZE 4" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012695
12696 ;;
Martin v. Löwised11a5d2012-05-20 10:42:17 +020012697no) ;; # To allow --disable-unicode
Matthias Klose3cef2a92012-03-14 23:39:33 +010012698*) 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 +000012699esac
12700
Michael W. Hudson54241132001-12-07 15:38:26 +000012701
Martin v. Löwis11437992002-04-12 09:54:03 +000012702
12703
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012704if test "$enable_unicode" = "no"
12705then
Martin v. Löwis339d0f72001-08-17 18:39:25 +000012706 UNICODE_OBJS=""
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012707 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not used" >&5
12708$as_echo "not used" >&6; }
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012709else
Martin v. Löwis339d0f72001-08-17 18:39:25 +000012710 UNICODE_OBJS="Objects/unicodeobject.o Objects/unicodectype.o"
Martin v. Löwis11437992002-04-12 09:54:03 +000012711
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012712$as_echo "#define Py_USING_UNICODE 1" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012713
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012714
12715 # wchar_t is only usable if it maps to an unsigned type
12716 if test "$unicode_size" = "$ac_cv_sizeof_wchar_t" \
Matthias Klose7dbeed72004-12-24 08:22:17 +000012717 -a "$ac_cv_wchar_t_signed" = "no"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012718 then
12719 PY_UNICODE_TYPE="wchar_t"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012720
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012721$as_echo "#define HAVE_USABLE_WCHAR_T 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012722
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012723 $as_echo "#define PY_UNICODE_TYPE wchar_t" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012724
12725 elif test "$ac_cv_sizeof_short" = "$unicode_size"
12726 then
12727 PY_UNICODE_TYPE="unsigned short"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012728 $as_echo "#define PY_UNICODE_TYPE unsigned short" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012729
12730 elif test "$ac_cv_sizeof_long" = "$unicode_size"
12731 then
12732 PY_UNICODE_TYPE="unsigned long"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012733 $as_echo "#define PY_UNICODE_TYPE unsigned long" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012734
12735 else
12736 PY_UNICODE_TYPE="no type found"
12737 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012738 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PY_UNICODE_TYPE" >&5
12739$as_echo "$PY_UNICODE_TYPE" >&6; }
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012740fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000012741
12742# check for endianness
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012743 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
12744$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012745if ${ac_cv_c_bigendian+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012746 $as_echo_n "(cached) " >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000012747else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012748 ac_cv_c_bigendian=unknown
12749 # See if we're dealing with a universal compiler.
12750 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12751/* end confdefs.h. */
12752#ifndef __APPLE_CC__
12753 not a universal capable compiler
12754 #endif
12755 typedef int dummy;
12756
Skip Montanaro6dead952003-09-25 14:50:04 +000012757_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012758if ac_fn_c_try_compile "$LINENO"; then :
12759
12760 # Check for potential -arch flags. It is not universal unless
12761 # there are at least two -arch flags with different values.
12762 ac_arch=
12763 ac_prev=
12764 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
12765 if test -n "$ac_prev"; then
12766 case $ac_word in
12767 i?86 | x86_64 | ppc | ppc64)
12768 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
12769 ac_arch=$ac_word
12770 else
12771 ac_cv_c_bigendian=universal
12772 break
12773 fi
12774 ;;
12775 esac
12776 ac_prev=
12777 elif test "x$ac_word" = "x-arch"; then
12778 ac_prev=arch
12779 fi
12780 done
12781fi
12782rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12783 if test $ac_cv_c_bigendian = unknown; then
12784 # See if sys/param.h defines the BYTE_ORDER macro.
12785 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012786/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000012787#include <sys/types.h>
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012788 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000012789
Martin v. Löwis11437992002-04-12 09:54:03 +000012790int
12791main ()
12792{
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012793#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
12794 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
12795 && LITTLE_ENDIAN)
12796 bogus endian macros
12797 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012798
12799 ;
12800 return 0;
12801}
12802_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012803if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000012804 # It does; now see whether it defined to BIG_ENDIAN or not.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012805 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012806/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000012807#include <sys/types.h>
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012808 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000012809
Martin v. Löwis11437992002-04-12 09:54:03 +000012810int
12811main ()
12812{
Guido van Rossumef2255b2000-03-10 22:30:29 +000012813#if BYTE_ORDER != BIG_ENDIAN
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012814 not big endian
12815 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012816
12817 ;
12818 return 0;
12819}
12820_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012821if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000012822 ac_cv_c_bigendian=yes
12823else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012824 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000012825fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012826rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012827fi
12828rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12829 fi
12830 if test $ac_cv_c_bigendian = unknown; then
12831 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
12832 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012833/* end confdefs.h. */
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012834#include <limits.h>
12835
Martin v. Löwis11437992002-04-12 09:54:03 +000012836int
12837main ()
12838{
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012839#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
12840 bogus endian macros
12841 #endif
12842
Martin v. Löwis11437992002-04-12 09:54:03 +000012843 ;
12844 return 0;
12845}
12846_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012847if ac_fn_c_try_compile "$LINENO"; then :
12848 # It does; now see whether it defined to _BIG_ENDIAN or not.
12849 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12850/* end confdefs.h. */
12851#include <limits.h>
12852
12853int
12854main ()
12855{
12856#ifndef _BIG_ENDIAN
12857 not big endian
12858 #endif
12859
12860 ;
12861 return 0;
12862}
12863_ACEOF
12864if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012865 ac_cv_c_bigendian=yes
Alexandre Vassalottia2db6872009-07-17 07:46:46 +000012866else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012867 ac_cv_c_bigendian=no
Martin v. Löwis11437992002-04-12 09:54:03 +000012868fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012869rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12870fi
12871rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12872 fi
12873 if test $ac_cv_c_bigendian = unknown; then
12874 # Compile a test program.
12875 if test "$cross_compiling" = yes; then :
12876 # Try to guess by grepping values from an object file.
12877 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12878/* end confdefs.h. */
12879short int ascii_mm[] =
12880 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
12881 short int ascii_ii[] =
12882 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
12883 int use_ascii (int i) {
12884 return ascii_mm[i] + ascii_ii[i];
12885 }
12886 short int ebcdic_ii[] =
12887 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
12888 short int ebcdic_mm[] =
12889 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
12890 int use_ebcdic (int i) {
12891 return ebcdic_mm[i] + ebcdic_ii[i];
12892 }
12893 extern int foo;
Martin v. Löwiseba40652007-08-30 20:10:57 +000012894
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012895int
12896main ()
12897{
12898return use_ascii (foo) == use_ebcdic (foo);
12899 ;
12900 return 0;
12901}
12902_ACEOF
12903if ac_fn_c_try_compile "$LINENO"; then :
12904 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
12905 ac_cv_c_bigendian=yes
12906 fi
12907 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
12908 if test "$ac_cv_c_bigendian" = unknown; then
12909 ac_cv_c_bigendian=no
12910 else
12911 # finding both strings is unlikely to happen, but who knows?
12912 ac_cv_c_bigendian=unknown
12913 fi
12914 fi
12915fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012916rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012917else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012918 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012919/* end confdefs.h. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000012920$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000012921int
12922main ()
12923{
Martin v. Löwiseba40652007-08-30 20:10:57 +000012924
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012925 /* Are we little or big endian? From Harbison&Steele. */
12926 union
12927 {
12928 long int l;
12929 char c[sizeof (long int)];
12930 } u;
12931 u.l = 1;
12932 return u.c[sizeof (long int) - 1] == 1;
Martin v. Löwiseba40652007-08-30 20:10:57 +000012933
12934 ;
12935 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000012936}
Martin v. Löwis11437992002-04-12 09:54:03 +000012937_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012938if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000012939 ac_cv_c_bigendian=no
12940else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012941 ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000012942fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012943rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12944 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000012945fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012946
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012947 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012948fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012949{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
12950$as_echo "$ac_cv_c_bigendian" >&6; }
12951 case $ac_cv_c_bigendian in #(
12952 yes)
12953 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
12954;; #(
12955 no)
12956 ;; #(
12957 universal)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012958
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012959$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Alexandre Vassalottia2db6872009-07-17 07:46:46 +000012960
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012961 ;; #(
12962 *)
Georg Brandl71f4fbb2011-02-25 11:04:50 +000012963 as_fn_error $? "unknown endianness
Matthias Klose3cef2a92012-03-14 23:39:33 +010012964 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012965 esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000012966
Michael W. Hudson54241132001-12-07 15:38:26 +000012967
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012968# Check whether right shifting a negative integer extends the sign bit
12969# or fills with zeros (like the Cray J90, according to Tim Peters).
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012970{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether right shift extends the sign bit" >&5
12971$as_echo_n "checking whether right shift extends the sign bit... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012972if ${ac_cv_rshift_extends_sign+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012973 $as_echo_n "(cached) " >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000012974else
Martin v. Löwis11437992002-04-12 09:54:03 +000012975
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012976if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000012977 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012978else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012979 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012980/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012981
12982int main()
12983{
Vladimir Marangozova6180282000-07-12 05:05:06 +000012984 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012985}
12986
Martin v. Löwis11437992002-04-12 09:54:03 +000012987_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012988if ac_fn_c_try_run "$LINENO"; then :
Vladimir Marangozova6180282000-07-12 05:05:06 +000012989 ac_cv_rshift_extends_sign=yes
12990else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012991 ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000012992fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012993rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12994 conftest.$ac_objext conftest.beam conftest.$ac_ext
Vladimir Marangozova6180282000-07-12 05:05:06 +000012995fi
12996
Martin v. Löwiseba40652007-08-30 20:10:57 +000012997fi
12998
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012999{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rshift_extends_sign" >&5
13000$as_echo "$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000013001if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013002then
Martin v. Löwis11437992002-04-12 09:54:03 +000013003
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013004$as_echo "#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1" >>confdefs.h
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013005
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013006fi
13007
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013008# check for getc_unlocked and related locking functions
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013009{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getc_unlocked() and friends" >&5
13010$as_echo_n "checking for getc_unlocked() and friends... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013011if ${ac_cv_have_getc_unlocked+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013012 $as_echo_n "(cached) " >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013013else
Martin v. Löwis11437992002-04-12 09:54:03 +000013014
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013015cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013016/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013017#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013018int
13019main ()
13020{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013021
13022 FILE *f = fopen("/dev/null", "r");
13023 flockfile(f);
13024 getc_unlocked(f);
13025 funlockfile(f);
13026
Martin v. Löwis11437992002-04-12 09:54:03 +000013027 ;
13028 return 0;
13029}
13030_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013031if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013032 ac_cv_have_getc_unlocked=yes
13033else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013034 ac_cv_have_getc_unlocked=no
13035fi
13036rm -f core conftest.err conftest.$ac_objext \
13037 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013038fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013039
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013040{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getc_unlocked" >&5
13041$as_echo "$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013042if test "$ac_cv_have_getc_unlocked" = yes
13043then
Martin v. Löwis11437992002-04-12 09:54:03 +000013044
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013045$as_echo "#define HAVE_GETC_UNLOCKED 1" >>confdefs.h
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013046
13047fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013048
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013049# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000013050# save the value of LIBS so we don't actually link Python with readline
13051LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013052
Gregory P. Smithcc023f12008-09-07 05:15:58 +000013053# On some systems we need to link readline to a termcap compatible
13054# library. NOTE: Keep the precedence of listed libraries synchronised
13055# with setup.py.
13056py_cv_lib_readline=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013057{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link readline libs" >&5
13058$as_echo_n "checking how to link readline libs... " >&6; }
Gregory P. Smithcc023f12008-09-07 05:15:58 +000013059for py_libtermcap in "" ncursesw ncurses curses termcap; do
13060 if test -z "$py_libtermcap"; then
13061 READLINE_LIBS="-lreadline"
13062 else
13063 READLINE_LIBS="-lreadline -l$py_libtermcap"
13064 fi
13065 LIBS="$READLINE_LIBS $LIBS_no_readline"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013066 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013067/* end confdefs.h. */
13068
Martin v. Löwiseba40652007-08-30 20:10:57 +000013069/* Override any GCC internal prototype to avoid an error.
13070 Use char because int might match the return type of a GCC
13071 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013072#ifdef __cplusplus
13073extern "C"
13074#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013075char readline ();
13076int
13077main ()
13078{
Martin v. Löwiseba40652007-08-30 20:10:57 +000013079return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013080 ;
13081 return 0;
13082}
13083_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013084if ac_fn_c_try_link "$LINENO"; then :
Gregory P. Smithcc023f12008-09-07 05:15:58 +000013085 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013086fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013087rm -f core conftest.err conftest.$ac_objext \
13088 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smithcc023f12008-09-07 05:15:58 +000013089 if test $py_cv_lib_readline = yes; then
13090 break
13091 fi
13092done
13093# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
13094#AC_SUBST([READLINE_LIBS])
Gregory P. Smithe080cdf2008-09-07 19:19:04 +000013095if test $py_cv_lib_readline = no; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013096 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
13097$as_echo "none" >&6; }
Gregory P. Smithcc023f12008-09-07 05:15:58 +000013098else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013099 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_LIBS" >&5
13100$as_echo "$READLINE_LIBS" >&6; }
Gregory P. Smithcc023f12008-09-07 05:15:58 +000013101
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013102$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013103
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013104fi
13105
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013106# check for readline 2.1
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013107{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_callback_handler_install in -lreadline" >&5
13108$as_echo_n "checking for rl_callback_handler_install in -lreadline... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013109if ${ac_cv_lib_readline_rl_callback_handler_install+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013110 $as_echo_n "(cached) " >&6
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013111else
13112 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000013113LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013114cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013115/* end confdefs.h. */
13116
Martin v. Löwiseba40652007-08-30 20:10:57 +000013117/* Override any GCC internal prototype to avoid an error.
13118 Use char because int might match the return type of a GCC
13119 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013120#ifdef __cplusplus
13121extern "C"
13122#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013123char rl_callback_handler_install ();
13124int
13125main ()
13126{
Martin v. Löwiseba40652007-08-30 20:10:57 +000013127return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013128 ;
13129 return 0;
13130}
13131_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013132if ac_fn_c_try_link "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013133 ac_cv_lib_readline_rl_callback_handler_install=yes
13134else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013135 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013136fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013137rm -f core conftest.err conftest.$ac_objext \
13138 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013139LIBS=$ac_check_lib_save_LIBS
13140fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013141{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
13142$as_echo "$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013143if test "x$ac_cv_lib_readline_rl_callback_handler_install" = xyes; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013144
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013145$as_echo "#define HAVE_RL_CALLBACK 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013146
13147fi
13148
13149
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013150# check for readline 2.2
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013151cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013152/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013153#include <readline/readline.h>
13154_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013155if ac_fn_c_try_cpp "$LINENO"; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013156 have_readline=yes
13157else
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013158 have_readline=no
Matthias Klosec511b472010-05-08 11:01:39 +000013159
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013160fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +000013161rm -f conftest.err conftest.i conftest.$ac_ext
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013162if test $have_readline = yes
13163then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013164 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013165/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013166#include <readline/readline.h>
13167
13168_ACEOF
13169if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013170 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013171
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013172$as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013173
13174fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +000013175rm -f conftest*
Antoine Pitroud9ff74e2009-10-26 19:16:46 +000013176
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013177 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroud9ff74e2009-10-26 19:16:46 +000013178/* end confdefs.h. */
13179#include <readline/readline.h>
13180
13181_ACEOF
13182if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013183 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then :
Antoine Pitroud9ff74e2009-10-26 19:16:46 +000013184
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013185$as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h
Antoine Pitroud9ff74e2009-10-26 19:16:46 +000013186
13187fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +000013188rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013189
13190fi
13191
Martin v. Löwis0daad592001-09-30 21:09:59 +000013192# check for readline 4.0
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013193{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -lreadline" >&5
13194$as_echo_n "checking for rl_pre_input_hook in -lreadline... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013195if ${ac_cv_lib_readline_rl_pre_input_hook+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013196 $as_echo_n "(cached) " >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000013197else
Martin v. Löwis11437992002-04-12 09:54:03 +000013198 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000013199LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013200cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013201/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013202
Martin v. Löwiseba40652007-08-30 20:10:57 +000013203/* Override any GCC internal prototype to avoid an error.
13204 Use char because int might match the return type of a GCC
13205 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013206#ifdef __cplusplus
13207extern "C"
13208#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013209char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013210int
13211main ()
13212{
Martin v. Löwiseba40652007-08-30 20:10:57 +000013213return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013214 ;
13215 return 0;
13216}
13217_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013218if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013219 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000013220else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013221 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000013222fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013223rm -f core conftest.err conftest.$ac_objext \
13224 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013225LIBS=$ac_check_lib_save_LIBS
13226fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013227{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
13228$as_echo "$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013229if test "x$ac_cv_lib_readline_rl_pre_input_hook" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000013230
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013231$as_echo "#define HAVE_RL_PRE_INPUT_HOOK 1" >>confdefs.h
Martin v. Löwis0daad592001-09-30 21:09:59 +000013232
Martin v. Löwis0daad592001-09-30 21:09:59 +000013233fi
13234
Michael W. Hudson54241132001-12-07 15:38:26 +000013235
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000013236# also in 4.0
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013237{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -lreadline" >&5
13238$as_echo_n "checking for rl_completion_display_matches_hook in -lreadline... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013239if ${ac_cv_lib_readline_rl_completion_display_matches_hook+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013240 $as_echo_n "(cached) " >&6
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000013241else
13242 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000013243LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013244cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000013245/* end confdefs.h. */
13246
13247/* Override any GCC internal prototype to avoid an error.
13248 Use char because int might match the return type of a GCC
13249 builtin and then its argument prototype would still apply. */
13250#ifdef __cplusplus
13251extern "C"
13252#endif
13253char rl_completion_display_matches_hook ();
13254int
13255main ()
13256{
13257return rl_completion_display_matches_hook ();
13258 ;
13259 return 0;
13260}
13261_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013262if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000013263 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
13264else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013265 ac_cv_lib_readline_rl_completion_display_matches_hook=no
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000013266fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013267rm -f core conftest.err conftest.$ac_objext \
13268 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000013269LIBS=$ac_check_lib_save_LIBS
13270fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013271{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
13272$as_echo "$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013273if test "x$ac_cv_lib_readline_rl_completion_display_matches_hook" = xyes; then :
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000013274
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013275$as_echo "#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000013276
13277fi
13278
13279
Martin v. Löwis0daad592001-09-30 21:09:59 +000013280# check for readline 4.2
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013281{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5
13282$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013283if ${ac_cv_lib_readline_rl_completion_matches+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013284 $as_echo_n "(cached) " >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000013285else
Martin v. Löwis11437992002-04-12 09:54:03 +000013286 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000013287LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013288cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013289/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013290
Martin v. Löwiseba40652007-08-30 20:10:57 +000013291/* Override any GCC internal prototype to avoid an error.
13292 Use char because int might match the return type of a GCC
13293 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013294#ifdef __cplusplus
13295extern "C"
13296#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013297char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013298int
13299main ()
13300{
Martin v. Löwiseba40652007-08-30 20:10:57 +000013301return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013302 ;
13303 return 0;
13304}
13305_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013306if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013307 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000013308else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013309 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000013310fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013311rm -f core conftest.err conftest.$ac_objext \
13312 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013313LIBS=$ac_check_lib_save_LIBS
13314fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013315{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_matches" >&5
13316$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013317if test "x$ac_cv_lib_readline_rl_completion_matches" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000013318
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013319$as_echo "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h
Guido van Rossum353ae582001-07-10 16:45:32 +000013320
Guido van Rossum353ae582001-07-10 16:45:32 +000013321fi
13322
Jack Jansendd19cf82001-12-06 22:36:17 +000013323
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013324# also in readline 4.2
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013325cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013326/* end confdefs.h. */
13327#include <readline/readline.h>
13328_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013329if ac_fn_c_try_cpp "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013330 have_readline=yes
13331else
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013332 have_readline=no
Matthias Klosec511b472010-05-08 11:01:39 +000013333
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013334fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +000013335rm -f conftest.err conftest.i conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013336if test $have_readline = yes
13337then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013338 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013339/* end confdefs.h. */
13340#include <readline/readline.h>
13341
13342_ACEOF
13343if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013344 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013345
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013346$as_echo "#define HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013347
13348fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +000013349rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013350
13351fi
13352
Martin v. Löwis82bca632006-02-10 20:49:30 +000013353# End of readline checks: restore LIBS
13354LIBS=$LIBS_no_readline
13355
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013356{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken nice()" >&5
13357$as_echo_n "checking for broken nice()... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013358if ${ac_cv_broken_nice+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013359 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000013360else
Martin v. Löwis11437992002-04-12 09:54:03 +000013361
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013362if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000013363 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013364else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013365 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013366/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013367
13368int main()
13369{
13370 int val1 = nice(1);
13371 if (val1 != -1 && val1 == nice(2))
13372 exit(0);
13373 exit(1);
13374}
13375
Martin v. Löwis11437992002-04-12 09:54:03 +000013376_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013377if ac_fn_c_try_run "$LINENO"; then :
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013378 ac_cv_broken_nice=yes
13379else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013380 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013381fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013382rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13383 conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013384fi
13385
Martin v. Löwiseba40652007-08-30 20:10:57 +000013386fi
13387
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013388{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_nice" >&5
13389$as_echo "$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013390if test "$ac_cv_broken_nice" = yes
13391then
Martin v. Löwis11437992002-04-12 09:54:03 +000013392
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013393$as_echo "#define HAVE_BROKEN_NICE 1" >>confdefs.h
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013394
13395fi
13396
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013397{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken poll()" >&5
13398$as_echo_n "checking for broken poll()... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013399if ${ac_cv_broken_poll+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013400 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013401else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013402 if test "$cross_compiling" = yes; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013403 ac_cv_broken_poll=no
13404else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013405 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013406/* end confdefs.h. */
13407
13408#include <poll.h>
13409
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013410int main()
13411{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013412 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013413 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013414
13415 close (42);
13416
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013417 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013418 if (poll_test < 0)
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013419 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013420 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013421 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013422 else
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013423 return 1;
13424}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013425
13426_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013427if ac_fn_c_try_run "$LINENO"; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013428 ac_cv_broken_poll=yes
13429else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013430 ac_cv_broken_poll=no
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013431fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013432rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13433 conftest.$ac_objext conftest.beam conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013434fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013435
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013436fi
13437
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013438{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_poll" >&5
13439$as_echo "$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013440if test "$ac_cv_broken_poll" = yes
13441then
13442
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013443$as_echo "#define HAVE_BROKEN_POLL 1" >>confdefs.h
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013444
13445fi
13446
Brett Cannon43802422005-02-10 20:48:03 +000013447# 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 +000013448# (which is not required by ISO C or UNIX spec) and/or if we support
13449# tzname[]
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013450ac_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 +000013451#include <$ac_cv_struct_tm>
13452
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013453"
Matthias Klose3cef2a92012-03-14 23:39:33 +010013454if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Brett Cannon43802422005-02-10 20:48:03 +000013455
13456cat >>confdefs.h <<_ACEOF
13457#define HAVE_STRUCT_TM_TM_ZONE 1
13458_ACEOF
13459
13460
13461fi
13462
13463if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
13464
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013465$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000013466
13467else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013468 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
13469"
Matthias Klose3cef2a92012-03-14 23:39:33 +010013470if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013471 ac_have_decl=1
Martin v. Löwiseba40652007-08-30 20:10:57 +000013472else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013473 ac_have_decl=0
Martin v. Löwiseba40652007-08-30 20:10:57 +000013474fi
13475
Martin v. Löwiseba40652007-08-30 20:10:57 +000013476cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013477#define HAVE_DECL_TZNAME $ac_have_decl
Martin v. Löwiseba40652007-08-30 20:10:57 +000013478_ACEOF
13479
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013480 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
13481$as_echo_n "checking for tzname... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013482if ${ac_cv_var_tzname+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013483 $as_echo_n "(cached) " >&6
Martin v. Löwiseba40652007-08-30 20:10:57 +000013484else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013485 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000013486/* end confdefs.h. */
13487#include <time.h>
Martin v. Löwiseba40652007-08-30 20:10:57 +000013488#if !HAVE_DECL_TZNAME
13489extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000013490#endif
13491
13492int
13493main ()
13494{
Martin v. Löwiseba40652007-08-30 20:10:57 +000013495return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000013496 ;
13497 return 0;
13498}
13499_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013500if ac_fn_c_try_link "$LINENO"; then :
Brett Cannon43802422005-02-10 20:48:03 +000013501 ac_cv_var_tzname=yes
13502else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013503 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000013504fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013505rm -f core conftest.err conftest.$ac_objext \
13506 conftest$ac_exeext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000013507fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013508{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
13509$as_echo "$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000013510 if test $ac_cv_var_tzname = yes; then
13511
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013512$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000013513
13514 fi
13515fi
13516
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013517
Martin v. Löwis1d459062005-03-14 21:23:33 +000013518# check tzset(3) exists and works like we expect it to
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013519{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working tzset()" >&5
13520$as_echo_n "checking for working tzset()... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013521if ${ac_cv_working_tzset+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013522 $as_echo_n "(cached) " >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013523else
13524
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013525if test "$cross_compiling" = yes; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013526 ac_cv_working_tzset=no
13527else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013528 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013529/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013530
13531#include <stdlib.h>
13532#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000013533#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000013534
13535#if HAVE_TZNAME
13536extern char *tzname[];
13537#endif
13538
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013539int main()
13540{
Brett Cannon18367812003-09-19 00:59:16 +000013541 /* Note that we need to ensure that not only does tzset(3)
13542 do 'something' with localtime, but it works as documented
13543 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000013544 This includes making sure that tzname is set properly if
13545 tm->tm_zone does not exist since it is the alternative way
13546 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000013547
13548 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000013549 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000013550 */
13551
Martin v. Löwis1d459062005-03-14 21:23:33 +000013552 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000013553 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
13554
Neal Norwitz7f2588c2003-04-11 15:35:53 +000013555 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013556 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000013557 if (localtime(&groundhogday)->tm_hour != 0)
13558 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013559#if HAVE_TZNAME
13560 /* For UTC, tzname[1] is sometimes "", sometimes " " */
13561 if (strcmp(tzname[0], "UTC") ||
13562 (tzname[1][0] != 0 && tzname[1][0] != ' '))
13563 exit(1);
13564#endif
Brett Cannon18367812003-09-19 00:59:16 +000013565
Neal Norwitz7f2588c2003-04-11 15:35:53 +000013566 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013567 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000013568 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013569 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013570#if HAVE_TZNAME
13571 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
13572 exit(1);
13573#endif
Brett Cannon18367812003-09-19 00:59:16 +000013574
13575 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
13576 tzset();
13577 if (localtime(&groundhogday)->tm_hour != 11)
13578 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013579#if HAVE_TZNAME
13580 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
13581 exit(1);
13582#endif
13583
13584#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000013585 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
13586 exit(1);
13587 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
13588 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013589#endif
Brett Cannon18367812003-09-19 00:59:16 +000013590
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013591 exit(0);
13592}
13593
13594_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013595if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013596 ac_cv_working_tzset=yes
13597else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013598 ac_cv_working_tzset=no
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013599fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013600rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13601 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013602fi
13603
Martin v. Löwiseba40652007-08-30 20:10:57 +000013604fi
13605
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013606{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_tzset" >&5
13607$as_echo "$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013608if test "$ac_cv_working_tzset" = yes
13609then
13610
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013611$as_echo "#define HAVE_WORKING_TZSET 1" >>confdefs.h
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013612
13613fi
13614
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013615# Look for subsecond timestamps in struct stat
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013616{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec in struct stat" >&5
13617$as_echo_n "checking for tv_nsec in struct stat... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013618if ${ac_cv_stat_tv_nsec+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013619 $as_echo_n "(cached) " >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013620else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013621 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013622/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013623#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013624int
13625main ()
13626{
13627
13628struct stat st;
13629st.st_mtim.tv_nsec = 1;
13630
13631 ;
13632 return 0;
13633}
13634_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013635if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa32c9942002-09-09 16:17:47 +000013636 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013637else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013638 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013639fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013640rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13641fi
13642
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013643{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec" >&5
13644$as_echo "$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013645if test "$ac_cv_stat_tv_nsec" = yes
13646then
13647
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013648$as_echo "#define HAVE_STAT_TV_NSEC 1" >>confdefs.h
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013649
13650fi
13651
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013652# Look for BSD style subsecond timestamps in struct stat
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013653{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec2 in struct stat" >&5
13654$as_echo_n "checking for tv_nsec2 in struct stat... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013655if ${ac_cv_stat_tv_nsec2+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013656 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013657else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013658 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013659/* end confdefs.h. */
13660#include <sys/stat.h>
13661int
13662main ()
13663{
13664
13665struct stat st;
13666st.st_mtimespec.tv_nsec = 1;
13667
13668 ;
13669 return 0;
13670}
13671_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013672if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013673 ac_cv_stat_tv_nsec2=yes
13674else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013675 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013676fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013677rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13678fi
13679
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013680{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec2" >&5
13681$as_echo "$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013682if test "$ac_cv_stat_tv_nsec2" = yes
13683then
13684
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013685$as_echo "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013686
13687fi
13688
Jack Jansen666b1e72001-10-31 12:11:48 +000013689# On HP/UX 11.0, mvwdelch is a block with a return statement
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013690{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mvwdelch is an expression" >&5
13691$as_echo_n "checking whether mvwdelch is an expression... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013692if ${ac_cv_mvwdelch_is_expression+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013693 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000013694else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013695 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013696/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000013697#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013698int
13699main ()
13700{
Jack Jansen666b1e72001-10-31 12:11:48 +000013701
13702 int rtn;
13703 rtn = mvwdelch(0,0,0);
13704
Martin v. Löwis11437992002-04-12 09:54:03 +000013705 ;
13706 return 0;
13707}
13708_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013709if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000013710 ac_cv_mvwdelch_is_expression=yes
13711else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013712 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000013713fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013714rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13715fi
13716
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013717{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mvwdelch_is_expression" >&5
13718$as_echo "$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000013719
13720if test "$ac_cv_mvwdelch_is_expression" = yes
13721then
Martin v. Löwis11437992002-04-12 09:54:03 +000013722
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013723$as_echo "#define MVWDELCH_IS_EXPRESSION 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000013724
13725fi
13726
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013727{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WINDOW has _flags" >&5
13728$as_echo_n "checking whether WINDOW has _flags... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013729if ${ac_cv_window_has_flags+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013730 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000013731else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013732 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013733/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000013734#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013735int
13736main ()
13737{
Jack Jansen666b1e72001-10-31 12:11:48 +000013738
13739 WINDOW *w;
13740 w->_flags = 0;
13741
Martin v. Löwis11437992002-04-12 09:54:03 +000013742 ;
13743 return 0;
13744}
13745_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013746if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000013747 ac_cv_window_has_flags=yes
13748else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013749 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000013750fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013751rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13752fi
13753
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013754{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_window_has_flags" >&5
13755$as_echo "$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013756
Jack Jansen666b1e72001-10-31 12:11:48 +000013757
13758if test "$ac_cv_window_has_flags" = yes
13759then
Martin v. Löwis11437992002-04-12 09:54:03 +000013760
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013761$as_echo "#define WINDOW_HAS_FLAGS 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000013762
13763fi
13764
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013765{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_term_resized" >&5
13766$as_echo_n "checking for is_term_resized... " >&6; }
13767cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Walter Dörwald4994d952006-06-19 08:07:50 +000013768/* end confdefs.h. */
13769#include <curses.h>
13770int
13771main ()
13772{
13773void *x=is_term_resized
13774 ;
13775 return 0;
13776}
13777_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013778if ac_fn_c_try_compile "$LINENO"; then :
Walter Dörwald4994d952006-06-19 08:07:50 +000013779
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013780$as_echo "#define HAVE_CURSES_IS_TERM_RESIZED 1" >>confdefs.h
Walter Dörwald4994d952006-06-19 08:07:50 +000013781
Matthias Klosec511b472010-05-08 11:01:39 +000013782 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013783$as_echo "yes" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000013784else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013785 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13786$as_echo "no" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000013787
13788fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013789rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13790
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013791{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resize_term" >&5
13792$as_echo_n "checking for resize_term... " >&6; }
13793cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Walter Dörwald4994d952006-06-19 08:07:50 +000013794/* end confdefs.h. */
13795#include <curses.h>
13796int
13797main ()
13798{
13799void *x=resize_term
13800 ;
13801 return 0;
13802}
13803_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013804if ac_fn_c_try_compile "$LINENO"; then :
Walter Dörwald4994d952006-06-19 08:07:50 +000013805
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013806$as_echo "#define HAVE_CURSES_RESIZE_TERM 1" >>confdefs.h
Walter Dörwald4994d952006-06-19 08:07:50 +000013807
Matthias Klosec511b472010-05-08 11:01:39 +000013808 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013809$as_echo "yes" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000013810else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013811 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13812$as_echo "no" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000013813
13814fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013815rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13816
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013817{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resizeterm" >&5
13818$as_echo_n "checking for resizeterm... " >&6; }
13819cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Walter Dörwald4994d952006-06-19 08:07:50 +000013820/* end confdefs.h. */
13821#include <curses.h>
13822int
13823main ()
13824{
13825void *x=resizeterm
13826 ;
13827 return 0;
13828}
13829_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013830if ac_fn_c_try_compile "$LINENO"; then :
Walter Dörwald4994d952006-06-19 08:07:50 +000013831
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013832$as_echo "#define HAVE_CURSES_RESIZETERM 1" >>confdefs.h
Walter Dörwald4994d952006-06-19 08:07:50 +000013833
Matthias Klosec511b472010-05-08 11:01:39 +000013834 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013835$as_echo "yes" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000013836else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013837 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13838$as_echo "no" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000013839
13840fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013841rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13842
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013843{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
13844$as_echo_n "checking for /dev/ptmx... " >&6; }
Martin v. Löwisfefbc202006-10-17 18:59:23 +000013845
13846if test -r /dev/ptmx
13847then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013848 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13849$as_echo "yes" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013850
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013851$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013852
Martin v. Löwisfefbc202006-10-17 18:59:23 +000013853else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013854 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13855$as_echo "no" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013856fi
13857
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013858{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
13859$as_echo_n "checking for /dev/ptc... " >&6; }
Martin v. Löwisfefbc202006-10-17 18:59:23 +000013860
13861if test -r /dev/ptc
13862then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013863 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13864$as_echo "yes" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000013865
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013866$as_echo "#define HAVE_DEV_PTC 1" >>confdefs.h
Neal Norwitz865400f2003-03-21 01:42:58 +000013867
Martin v. Löwisfefbc202006-10-17 18:59:23 +000013868else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013869 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13870$as_echo "no" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000013871fi
13872
Mark Dickinson82864d12009-11-15 16:18:58 +000013873if test "$have_long_long" = yes
13874then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013875 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for %lld and %llu printf() format support" >&5
13876$as_echo_n "checking for %lld and %llu printf() format support... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013877 if ${ac_cv_have_long_long_format+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013878 $as_echo_n "(cached) " >&6
Mark Dickinson82864d12009-11-15 16:18:58 +000013879else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013880 if test "$cross_compiling" = yes; then :
Mark Dickinson82864d12009-11-15 16:18:58 +000013881 ac_cv_have_long_long_format=no
13882else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013883 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson82864d12009-11-15 16:18:58 +000013884/* end confdefs.h. */
13885
13886 #include <stdio.h>
13887 #include <stddef.h>
13888 #include <string.h>
13889
13890 #ifdef HAVE_SYS_TYPES_H
13891 #include <sys/types.h>
13892 #endif
13893
13894 int main()
13895 {
13896 char buffer[256];
13897
13898 if (sprintf(buffer, "%lld", (long long)123) < 0)
13899 return 1;
13900 if (strcmp(buffer, "123"))
13901 return 1;
13902
13903 if (sprintf(buffer, "%lld", (long long)-123) < 0)
13904 return 1;
13905 if (strcmp(buffer, "-123"))
13906 return 1;
13907
13908 if (sprintf(buffer, "%llu", (unsigned long long)123) < 0)
13909 return 1;
13910 if (strcmp(buffer, "123"))
13911 return 1;
13912
13913 return 0;
13914 }
13915
13916_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013917if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson82864d12009-11-15 16:18:58 +000013918 ac_cv_have_long_long_format=yes
13919else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013920 ac_cv_have_long_long_format=no
Mark Dickinson82864d12009-11-15 16:18:58 +000013921fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013922rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13923 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson82864d12009-11-15 16:18:58 +000013924fi
13925
13926
Mark Dickinson82864d12009-11-15 16:18:58 +000013927fi
13928
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013929 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_long_long_format" >&5
13930$as_echo "$ac_cv_have_long_long_format" >&6; }
Mark Dickinson82864d12009-11-15 16:18:58 +000013931fi
13932
Mark Dickinson5ce84742009-12-31 20:48:04 +000013933if test "$ac_cv_have_long_long_format" = yes
Mark Dickinson82864d12009-11-15 16:18:58 +000013934then
13935
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013936$as_echo "#define PY_FORMAT_LONG_LONG \"ll\"" >>confdefs.h
Mark Dickinson82864d12009-11-15 16:18:58 +000013937
13938fi
13939
Ronald Oussoren315cd0c2009-11-19 16:25:21 +000013940if test $ac_sys_system = Darwin
13941then
13942 LIBS="$LIBS -framework CoreFoundation"
13943fi
13944
Mark Dickinson82864d12009-11-15 16:18:58 +000013945
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013946{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for %zd printf() format support" >&5
13947$as_echo_n "checking for %zd printf() format support... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013948if ${ac_cv_have_size_t_format+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013949 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013950else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013951 if test "$cross_compiling" = yes; then :
Gregory P. Smithc9ff3a72009-11-02 02:03:16 +000013952 ac_cv_have_size_t_format="cross -- assuming yes"
13953
Brett Cannon09d12362006-05-11 05:11:33 +000013954else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013955 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Brett Cannon09d12362006-05-11 05:11:33 +000013956/* end confdefs.h. */
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013957
Brett Cannon09d12362006-05-11 05:11:33 +000013958#include <stdio.h>
13959#include <stddef.h>
13960#include <string.h>
13961
Christian Heimesdb3d6cb2007-12-16 21:39:43 +000013962#ifdef HAVE_SYS_TYPES_H
13963#include <sys/types.h>
13964#endif
Neal Norwitz4a8fbdb2006-09-22 08:16:26 +000013965
13966#ifdef HAVE_SSIZE_T
13967typedef ssize_t Py_ssize_t;
13968#elif SIZEOF_VOID_P == SIZEOF_LONG
13969typedef long Py_ssize_t;
13970#else
13971typedef int Py_ssize_t;
13972#endif
Brett Cannon09d12362006-05-11 05:11:33 +000013973
Christian Heimesdb3d6cb2007-12-16 21:39:43 +000013974int main()
13975{
13976 char buffer[256];
13977
Brett Cannon09d12362006-05-11 05:11:33 +000013978 if(sprintf(buffer, "%zd", (size_t)123) < 0)
13979 return 1;
13980
Neal Norwitz4a8fbdb2006-09-22 08:16:26 +000013981 if (strcmp(buffer, "123"))
13982 return 1;
13983
13984 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
13985 return 1;
13986
13987 if (strcmp(buffer, "-123"))
Brett Cannon09d12362006-05-11 05:11:33 +000013988 return 1;
13989
13990 return 0;
13991}
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013992
Brett Cannon09d12362006-05-11 05:11:33 +000013993_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013994if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013995 ac_cv_have_size_t_format=yes
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013996else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013997 ac_cv_have_size_t_format=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013998fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013999rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14000 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +000014001fi
14002
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014003fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014004{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t_format" >&5
14005$as_echo "$ac_cv_have_size_t_format" >&6; }
Gregory P. Smithc9ff3a72009-11-02 02:03:16 +000014006if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014007
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014008$as_echo "#define PY_FORMAT_SIZE_T \"z\"" >>confdefs.h
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014009
14010fi
14011
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014012ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
Martin v. Löwis01c04012002-11-11 14:58:44 +000014013#ifdef HAVE_SYS_TYPES_H
14014#include <sys/types.h>
14015#endif
14016#ifdef HAVE_SYS_SOCKET_H
14017#include <sys/socket.h>
14018#endif
14019
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014020"
Matthias Klose3cef2a92012-03-14 23:39:33 +010014021if test "x$ac_cv_type_socklen_t" = xyes; then :
Martin v. Löwis01c04012002-11-11 14:58:44 +000014022
Martin v. Löwis11437992002-04-12 09:54:03 +000014023else
Guido van Rossum95713eb2000-05-18 20:53:31 +000014024
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014025$as_echo "#define socklen_t int" >>confdefs.h
Guido van Rossum95713eb2000-05-18 20:53:31 +000014026
14027fi
14028
Michael W. Hudson54241132001-12-07 15:38:26 +000014029
Benjamin Peterson7497e912010-10-16 00:53:39 +000014030case $ac_sys_system in
14031AIX*)
14032
14033$as_echo "#define HAVE_BROKEN_PIPE_BUF 1" >>confdefs.h
14034 ;;
14035esac
14036
14037
Michael W. Hudson54241132001-12-07 15:38:26 +000014038
14039
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000014040for h in `(cd $srcdir;echo Python/thread_*.h)`
14041do
14042 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
14043done
14044
Michael W. Hudson54241132001-12-07 15:38:26 +000014045
Neal Norwitzd24499d2005-12-18 21:36:39 +000014046SRCDIRS="Parser Grammar Objects Python Modules Mac"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014047{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5
14048$as_echo_n "checking for build directories... " >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000014049for dir in $SRCDIRS; do
14050 if test ! -d $dir; then
14051 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000014052 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000014053done
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014054{ $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
14055$as_echo "done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000014056
Guido van Rossum627b2d71993-12-24 10:39:16 +000014057# generate output files
Antoine Pitrouf2caeed2009-05-24 20:23:57 +000014058ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config Misc/python.pc"
Martin v. Löwis88afe662002-10-26 13:47:44 +000014059
Antoine Pitrouaabdceb2010-09-10 20:03:17 +000014060ac_config_files="$ac_config_files Modules/ld_so_aix"
14061
Martin v. Löwis11437992002-04-12 09:54:03 +000014062cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014063# This file is a shell script that caches the results of configure
14064# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000014065# scripts and configure runs, see configure's option --config-cache.
14066# It is not useful on other systems. If it contains results you don't
14067# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014068#
Martin v. Löwis11437992002-04-12 09:54:03 +000014069# config.status only pays attention to the cache file if you give it
14070# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014071#
Skip Montanaro6dead952003-09-25 14:50:04 +000014072# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000014073# loading this file, other *unset* `ac_cv_foo' will be assigned the
14074# following values.
14075
14076_ACEOF
14077
Guido van Rossumf78abae1997-01-21 22:02:36 +000014078# The following way of writing the cache mishandles newlines in values,
14079# but we know of no workaround that is simple, portable, and efficient.
Martin v. Löwiseba40652007-08-30 20:10:57 +000014080# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014081# Ultrix sh set writes to stderr and can't be redirected directly,
14082# and sets the high bit in the cache file unless we assign to the vars.
Martin v. Löwiseba40652007-08-30 20:10:57 +000014083(
14084 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
14085 eval ac_val=\$$ac_var
14086 case $ac_val in #(
14087 *${as_nl}*)
14088 case $ac_var in #(
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014089 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
14090$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000014091 esac
14092 case $ac_var in #(
14093 _ | IFS | as_nl) ;; #(
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014094 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
14095 *) { eval $ac_var=; unset $ac_var;} ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000014096 esac ;;
14097 esac
14098 done
14099
Martin v. Löwis11437992002-04-12 09:54:03 +000014100 (set) 2>&1 |
Martin v. Löwiseba40652007-08-30 20:10:57 +000014101 case $as_nl`(ac_space=' '; set) 2>&1` in #(
14102 *${as_nl}ac_space=\ *)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014103 # `set' does not quote correctly, so add quotes: double-quote
14104 # substitution turns \\\\ into \\, and sed turns \\ into \.
Martin v. Löwis11437992002-04-12 09:54:03 +000014105 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014106 "s/'/'\\\\''/g;
14107 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Martin v. Löwiseba40652007-08-30 20:10:57 +000014108 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000014109 *)
14110 # `set' quotes correctly as required by POSIX, so do not add quotes.
Martin v. Löwiseba40652007-08-30 20:10:57 +000014111 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000014112 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000014113 esac |
14114 sort
14115) |
Martin v. Löwis11437992002-04-12 09:54:03 +000014116 sed '
Martin v. Löwiseba40652007-08-30 20:10:57 +000014117 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000014118 t clear
Martin v. Löwiseba40652007-08-30 20:10:57 +000014119 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000014120 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
14121 t end
Martin v. Löwiseba40652007-08-30 20:10:57 +000014122 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
14123 :end' >>confcache
14124if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
14125 if test -w "$cache_file"; then
Matthias Klose3cef2a92012-03-14 23:39:33 +010014126 if test "x$cache_file" != "x/dev/null"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014127 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
14128$as_echo "$as_me: updating cache $cache_file" >&6;}
Matthias Klose3cef2a92012-03-14 23:39:33 +010014129 if test ! -f "$cache_file" || test -h "$cache_file"; then
14130 cat confcache >"$cache_file"
14131 else
14132 case $cache_file in #(
14133 */* | ?:*)
14134 mv -f confcache "$cache_file"$$ &&
14135 mv -f "$cache_file"$$ "$cache_file" ;; #(
14136 *)
14137 mv -f confcache "$cache_file" ;;
14138 esac
14139 fi
14140 fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014141 else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014142 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
14143$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014144 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014145fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014146rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000014147
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014148test "x$prefix" = xNONE && prefix=$ac_default_prefix
14149# Let make expand exec_prefix.
14150test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000014151
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014152DEFS=-DHAVE_CONFIG_H
14153
Skip Montanaro6dead952003-09-25 14:50:04 +000014154ac_libobjs=
14155ac_ltlibobjs=
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014156U=
Skip Montanaro6dead952003-09-25 14:50:04 +000014157for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
14158 # 1. Remove the extension, and $U if already installed.
Martin v. Löwiseba40652007-08-30 20:10:57 +000014159 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014160 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
Martin v. Löwiseba40652007-08-30 20:10:57 +000014161 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
14162 # will be set to the directory where LIBOBJS objects are built.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014163 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
14164 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000014165done
14166LIBOBJS=$ac_libobjs
14167
14168LTLIBOBJS=$ac_ltlibobjs
14169
14170
Martin v. Löwis11437992002-04-12 09:54:03 +000014171
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014172
Matthias Klose3cef2a92012-03-14 23:39:33 +010014173: "${CONFIG_STATUS=./config.status}"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014174ac_write_fail=0
Martin v. Löwis11437992002-04-12 09:54:03 +000014175ac_clean_files_save=$ac_clean_files
14176ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014177{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
14178$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
14179as_write_fail=0
14180cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014181#! $SHELL
14182# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000014183# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014184# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000014185# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000014186
Martin v. Löwis11437992002-04-12 09:54:03 +000014187debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000014188ac_cs_recheck=false
14189ac_cs_silent=false
Jack Jansendd19cf82001-12-06 22:36:17 +000014190
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014191SHELL=\${CONFIG_SHELL-$SHELL}
14192export SHELL
14193_ASEOF
14194cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
14195## -------------------- ##
14196## M4sh Initialization. ##
14197## -------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000014198
Martin v. Löwiseba40652007-08-30 20:10:57 +000014199# Be more Bourne compatible
14200DUALCASE=1; export DUALCASE # for MKS sh
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014201if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014202 emulate sh
14203 NULLCMD=:
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014204 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000014205 # is contrary to our usage. Disable this feature.
14206 alias -g '${1+"$@"}'='"$@"'
Martin v. Löwiseba40652007-08-30 20:10:57 +000014207 setopt NO_GLOB_SUBST
Skip Montanaro89e975f2007-08-22 19:05:21 +000014208else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014209 case `(set -o) 2>/dev/null` in #(
14210 *posix*) :
14211 set -o posix ;; #(
14212 *) :
14213 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000014214esac
Martin v. Löwis11437992002-04-12 09:54:03 +000014215fi
Michael W. Hudson54241132001-12-07 15:38:26 +000014216
Skip Montanaro6dead952003-09-25 14:50:04 +000014217
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014218as_nl='
14219'
14220export as_nl
14221# Printing a long string crashes Solaris 7 /usr/bin/printf.
14222as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
14223as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
14224as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
14225# Prefer a ksh shell builtin over an external printf program on Solaris,
14226# but without wasting forks for bash or zsh.
14227if test -z "$BASH_VERSION$ZSH_VERSION" \
14228 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
14229 as_echo='print -r --'
14230 as_echo_n='print -rn --'
14231elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
14232 as_echo='printf %s\n'
14233 as_echo_n='printf %s'
14234else
14235 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
14236 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
14237 as_echo_n='/usr/ucb/echo -n'
14238 else
14239 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
14240 as_echo_n_body='eval
14241 arg=$1;
14242 case $arg in #(
14243 *"$as_nl"*)
14244 expr "X$arg" : "X\\(.*\\)$as_nl";
14245 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
14246 esac;
14247 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
14248 '
14249 export as_echo_n_body
14250 as_echo_n='sh -c $as_echo_n_body as_echo'
14251 fi
14252 export as_echo_body
14253 as_echo='sh -c $as_echo_body as_echo'
14254fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014255
14256# The user is always right.
14257if test "${PATH_SEPARATOR+set}" != set; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014258 PATH_SEPARATOR=:
14259 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
14260 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
14261 PATH_SEPARATOR=';'
14262 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000014263fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014264
Martin v. Löwiseba40652007-08-30 20:10:57 +000014265
14266# IFS
14267# We need space, tab and new line, in precisely that order. Quoting is
14268# there to prevent editors from complaining about space-tab.
14269# (If _AS_PATH_WALK were called with IFS unset, it would disable word
14270# splitting by setting IFS to empty value.)
Martin v. Löwiseba40652007-08-30 20:10:57 +000014271IFS=" "" $as_nl"
14272
14273# Find who we are. Look in the path if we contain no directory separator.
Matthias Klose3cef2a92012-03-14 23:39:33 +010014274as_myself=
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014275case $0 in #((
Martin v. Löwiseba40652007-08-30 20:10:57 +000014276 *[\\/]* ) as_myself=$0 ;;
14277 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000014278for as_dir in $PATH
14279do
14280 IFS=$as_save_IFS
14281 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014282 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
14283 done
Martin v. Löwiseba40652007-08-30 20:10:57 +000014284IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000014285
Martin v. Löwiseba40652007-08-30 20:10:57 +000014286 ;;
14287esac
14288# We did not find ourselves, most probably we were run as `sh COMMAND'
14289# in which case we are not to be found in the path.
14290if test "x$as_myself" = x; then
14291 as_myself=$0
14292fi
14293if test ! -f "$as_myself"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014294 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
14295 exit 1
Martin v. Löwiseba40652007-08-30 20:10:57 +000014296fi
14297
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014298# Unset variables that we do not need and which cause bugs (e.g. in
14299# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
14300# suppresses any "Segmentation fault" message there. '((' could
14301# trigger a bug in pdksh 5.2.14.
14302for as_var in BASH_ENV ENV MAIL MAILPATH
14303do eval test x\${$as_var+set} = xset \
14304 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Martin v. Löwiseba40652007-08-30 20:10:57 +000014305done
14306PS1='$ '
14307PS2='> '
14308PS4='+ '
14309
14310# NLS nuisances.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014311LC_ALL=C
14312export LC_ALL
14313LANGUAGE=C
14314export LANGUAGE
Martin v. Löwiseba40652007-08-30 20:10:57 +000014315
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014316# CDPATH.
14317(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
14318
14319
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014320# as_fn_error STATUS ERROR [LINENO LOG_FD]
14321# ----------------------------------------
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014322# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
14323# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014324# script with STATUS, using 1 if that was 0.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014325as_fn_error ()
14326{
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014327 as_status=$1; test $as_status -eq 0 && as_status=1
14328 if test "$4"; then
14329 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
14330 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014331 fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014332 $as_echo "$as_me: error: $2" >&2
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014333 as_fn_exit $as_status
14334} # as_fn_error
14335
14336
14337# as_fn_set_status STATUS
14338# -----------------------
14339# Set $? to STATUS, without forking.
14340as_fn_set_status ()
14341{
14342 return $1
14343} # as_fn_set_status
14344
14345# as_fn_exit STATUS
14346# -----------------
14347# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
14348as_fn_exit ()
14349{
14350 set +e
14351 as_fn_set_status $1
14352 exit $1
14353} # as_fn_exit
14354
14355# as_fn_unset VAR
14356# ---------------
14357# Portably unset VAR.
14358as_fn_unset ()
14359{
14360 { eval $1=; unset $1;}
14361}
14362as_unset=as_fn_unset
14363# as_fn_append VAR VALUE
14364# ----------------------
14365# Append the text in VALUE to the end of the definition contained in VAR. Take
14366# advantage of any shell optimizations that allow amortized linear growth over
14367# repeated appends, instead of the typical quadratic growth present in naive
14368# implementations.
14369if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
14370 eval 'as_fn_append ()
14371 {
14372 eval $1+=\$2
14373 }'
14374else
14375 as_fn_append ()
14376 {
14377 eval $1=\$$1\$2
14378 }
14379fi # as_fn_append
14380
14381# as_fn_arith ARG...
14382# ------------------
14383# Perform arithmetic evaluation on the ARGs, and store the result in the
14384# global $as_val. Take advantage of shells that can avoid forks. The arguments
14385# must be portable across $(()) and expr.
14386if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
14387 eval 'as_fn_arith ()
14388 {
14389 as_val=$(( $* ))
14390 }'
14391else
14392 as_fn_arith ()
14393 {
14394 as_val=`expr "$@" || test $? -eq 1`
14395 }
14396fi # as_fn_arith
14397
14398
Martin v. Löwiseba40652007-08-30 20:10:57 +000014399if expr a : '\(a\)' >/dev/null 2>&1 &&
14400 test "X`expr 00001 : '.*\(...\)'`" = X001; then
14401 as_expr=expr
14402else
14403 as_expr=false
14404fi
14405
14406if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
14407 as_basename=basename
14408else
14409 as_basename=false
14410fi
14411
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014412if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
14413 as_dirname=dirname
14414else
14415 as_dirname=false
14416fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014417
Martin v. Löwiseba40652007-08-30 20:10:57 +000014418as_me=`$as_basename -- "$0" ||
14419$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
14420 X"$0" : 'X\(//\)$' \| \
14421 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014422$as_echo X/"$0" |
Martin v. Löwiseba40652007-08-30 20:10:57 +000014423 sed '/^.*\/\([^/][^/]*\)\/*$/{
14424 s//\1/
14425 q
14426 }
14427 /^X\/\(\/\/\)$/{
14428 s//\1/
14429 q
14430 }
14431 /^X\/\(\/\).*/{
14432 s//\1/
14433 q
14434 }
14435 s/.*/./; q'`
14436
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014437# Avoid depending upon Character Ranges.
14438as_cr_letters='abcdefghijklmnopqrstuvwxyz'
14439as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
14440as_cr_Letters=$as_cr_letters$as_cr_LETTERS
14441as_cr_digits='0123456789'
14442as_cr_alnum=$as_cr_Letters$as_cr_digits
Martin v. Löwiseba40652007-08-30 20:10:57 +000014443
14444ECHO_C= ECHO_N= ECHO_T=
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014445case `echo -n x` in #(((((
Martin v. Löwiseba40652007-08-30 20:10:57 +000014446-n*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014447 case `echo 'xy\c'` in
Martin v. Löwiseba40652007-08-30 20:10:57 +000014448 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014449 xy) ECHO_C='\c';;
14450 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
14451 ECHO_T=' ';;
Martin v. Löwiseba40652007-08-30 20:10:57 +000014452 esac;;
14453*)
14454 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000014455esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014456
Martin v. Löwis11437992002-04-12 09:54:03 +000014457rm -f conf$$ conf$$.exe conf$$.file
Martin v. Löwiseba40652007-08-30 20:10:57 +000014458if test -d conf$$.dir; then
14459 rm -f conf$$.dir/conf$$.file
14460else
14461 rm -f conf$$.dir
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014462 mkdir conf$$.dir 2>/dev/null
Martin v. Löwiseba40652007-08-30 20:10:57 +000014463fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014464if (echo >conf$$.file) 2>/dev/null; then
14465 if ln -s conf$$.file conf$$ 2>/dev/null; then
14466 as_ln_s='ln -s'
14467 # ... but there are two gotchas:
14468 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
14469 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
Charles-François Natalibe2b9072013-01-08 19:47:00 +010014470 # In both cases, we have to default to `cp -pR'.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014471 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Charles-François Natalibe2b9072013-01-08 19:47:00 +010014472 as_ln_s='cp -pR'
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014473 elif ln conf$$.file conf$$ 2>/dev/null; then
14474 as_ln_s=ln
14475 else
Charles-François Natalibe2b9072013-01-08 19:47:00 +010014476 as_ln_s='cp -pR'
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014477 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014478else
Charles-François Natalibe2b9072013-01-08 19:47:00 +010014479 as_ln_s='cp -pR'
Martin v. Löwis11437992002-04-12 09:54:03 +000014480fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014481rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
14482rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000014483
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014484
14485# as_fn_mkdir_p
14486# -------------
14487# Create "$as_dir" as a directory, including parents if necessary.
14488as_fn_mkdir_p ()
14489{
14490
14491 case $as_dir in #(
14492 -*) as_dir=./$as_dir;;
14493 esac
14494 test -d "$as_dir" || eval $as_mkdir_p || {
14495 as_dirs=
14496 while :; do
14497 case $as_dir in #(
14498 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
14499 *) as_qdir=$as_dir;;
14500 esac
14501 as_dirs="'$as_qdir' $as_dirs"
14502 as_dir=`$as_dirname -- "$as_dir" ||
14503$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
14504 X"$as_dir" : 'X\(//\)[^/]' \| \
14505 X"$as_dir" : 'X\(//\)$' \| \
14506 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
14507$as_echo X"$as_dir" |
14508 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
14509 s//\1/
14510 q
14511 }
14512 /^X\(\/\/\)[^/].*/{
14513 s//\1/
14514 q
14515 }
14516 /^X\(\/\/\)$/{
14517 s//\1/
14518 q
14519 }
14520 /^X\(\/\).*/{
14521 s//\1/
14522 q
14523 }
14524 s/.*/./; q'`
14525 test -d "$as_dir" && break
14526 done
14527 test -z "$as_dirs" || eval "mkdir $as_dirs"
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014528 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014529
14530
14531} # as_fn_mkdir_p
Skip Montanaro6dead952003-09-25 14:50:04 +000014532if mkdir -p . 2>/dev/null; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014533 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +000014534else
Skip Montanarof0d5f792004-08-15 14:08:23 +000014535 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000014536 as_mkdir_p=false
14537fi
14538
Charles-François Natalibe2b9072013-01-08 19:47:00 +010014539
14540# as_fn_executable_p FILE
14541# -----------------------
14542# Test if FILE is an executable regular file.
14543as_fn_executable_p ()
14544{
14545 test -f "$1" && test -x "$1"
14546} # as_fn_executable_p
14547as_test_x='test -x'
14548as_executable_p=as_fn_executable_p
Martin v. Löwis11437992002-04-12 09:54:03 +000014549
14550# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000014551as_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 +000014552
14553# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000014554as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000014555
14556
Martin v. Löwis11437992002-04-12 09:54:03 +000014557exec 6>&1
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014558## ----------------------------------- ##
14559## Main body of $CONFIG_STATUS script. ##
14560## ----------------------------------- ##
14561_ASEOF
14562test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014563
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014564cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14565# Save the log message, to keep $0 and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000014566# report actual input values of CONFIG_FILES etc. instead of their
Martin v. Löwiseba40652007-08-30 20:10:57 +000014567# values after options handling.
14568ac_log="
Martin v. Löwis174440b2008-10-03 08:59:41 +000014569This file was extended by python $as_me 2.7, which was
Charles-François Natalibe2b9072013-01-08 19:47:00 +010014570generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000014571
14572 CONFIG_FILES = $CONFIG_FILES
14573 CONFIG_HEADERS = $CONFIG_HEADERS
14574 CONFIG_LINKS = $CONFIG_LINKS
14575 CONFIG_COMMANDS = $CONFIG_COMMANDS
14576 $ $0 $@
14577
Martin v. Löwiseba40652007-08-30 20:10:57 +000014578on `(hostname || uname -n) 2>/dev/null | sed 1q`
14579"
14580
Martin v. Löwis11437992002-04-12 09:54:03 +000014581_ACEOF
14582
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014583case $ac_config_files in *"
14584"*) set x $ac_config_files; shift; ac_config_files=$*;;
14585esac
14586
14587case $ac_config_headers in *"
14588"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
14589esac
14590
14591
14592cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014593# Files that config.status was made for.
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014594config_files="$ac_config_files"
14595config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000014596
Martin v. Löwiseba40652007-08-30 20:10:57 +000014597_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000014598
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014599cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014600ac_cs_usage="\
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014601\`$as_me' instantiates files and other configuration actions
14602from templates according to the current configuration. Unless the files
14603and actions are specified as TAGs, all are instantiated by default.
Martin v. Löwis11437992002-04-12 09:54:03 +000014604
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014605Usage: $0 [OPTION]... [TAG]...
Martin v. Löwis11437992002-04-12 09:54:03 +000014606
14607 -h, --help print this help, then exit
Martin v. Löwiseba40652007-08-30 20:10:57 +000014608 -V, --version print version number and configuration settings, then exit
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014609 --config print configuration, then exit
14610 -q, --quiet, --silent
14611 do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000014612 -d, --debug don't remove temporary files
14613 --recheck update $as_me by reconfiguring in the same conditions
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014614 --file=FILE[:TEMPLATE]
14615 instantiate the configuration file FILE
14616 --header=FILE[:TEMPLATE]
14617 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000014618
14619Configuration files:
14620$config_files
14621
14622Configuration headers:
14623$config_headers
14624
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014625Report bugs to <http://bugs.python.org/>."
Skip Montanaro89e975f2007-08-22 19:05:21 +000014626
Martin v. Löwiseba40652007-08-30 20:10:57 +000014627_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014628cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14629ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
Martin v. Löwis11437992002-04-12 09:54:03 +000014630ac_cs_version="\\
Martin v. Löwis174440b2008-10-03 08:59:41 +000014631python config.status 2.7
Charles-François Natalibe2b9072013-01-08 19:47:00 +010014632configured by $0, generated by GNU Autoconf 2.69,
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014633 with options \\"\$ac_cs_config\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000014634
Charles-François Natalibe2b9072013-01-08 19:47:00 +010014635Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000014636This config.status script is free software; the Free Software Foundation
14637gives unlimited permission to copy, distribute and modify it."
Martin v. Löwiseba40652007-08-30 20:10:57 +000014638
14639ac_pwd='$ac_pwd'
14640srcdir='$srcdir'
14641INSTALL='$INSTALL'
Trent Nelsonf6407a12012-08-30 14:56:13 +000014642MKDIR_P='$MKDIR_P'
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014643test -n "\$AWK" || AWK=awk
Martin v. Löwis11437992002-04-12 09:54:03 +000014644_ACEOF
14645
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014646cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14647# The default lists apply if the user does not specify any file.
Martin v. Löwis11437992002-04-12 09:54:03 +000014648ac_need_defaults=:
14649while test $# != 0
14650do
14651 case $1 in
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014652 --*=?*)
Martin v. Löwiseba40652007-08-30 20:10:57 +000014653 ac_option=`expr "X$1" : 'X\([^=]*\)='`
14654 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000014655 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000014656 ;;
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014657 --*=)
14658 ac_option=`expr "X$1" : 'X\([^=]*\)='`
14659 ac_optarg=
14660 ac_shift=:
14661 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000014662 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000014663 ac_option=$1
14664 ac_optarg=$2
14665 ac_shift=shift
14666 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014667 esac
14668
Skip Montanaro6dead952003-09-25 14:50:04 +000014669 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000014670 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000014671 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
14672 ac_cs_recheck=: ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000014673 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014674 $as_echo "$ac_cs_version"; exit ;;
14675 --config | --confi | --conf | --con | --co | --c )
14676 $as_echo "$ac_cs_config"; exit ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000014677 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000014678 debug=: ;;
14679 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000014680 $ac_shift
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014681 case $ac_optarg in
14682 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014683 '') as_fn_error $? "missing file argument" ;;
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014684 esac
14685 as_fn_append CONFIG_FILES " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000014686 ac_need_defaults=false;;
14687 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000014688 $ac_shift
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014689 case $ac_optarg in
14690 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
14691 esac
14692 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000014693 ac_need_defaults=false;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000014694 --he | --h)
14695 # Conflict between --help and --header
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014696 as_fn_error $? "ambiguous option: \`$1'
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014697Try \`$0 --help' for more information.";;
Martin v. Löwiseba40652007-08-30 20:10:57 +000014698 --help | --hel | -h )
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014699 $as_echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000014700 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
14701 | -silent | --silent | --silen | --sile | --sil | --si | --s)
14702 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014703
14704 # This is an error.
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014705 -*) as_fn_error $? "unrecognized option: \`$1'
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014706Try \`$0 --help' for more information." ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014707
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014708 *) as_fn_append ac_config_targets " $1"
Martin v. Löwiseba40652007-08-30 20:10:57 +000014709 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014710
14711 esac
14712 shift
14713done
14714
Skip Montanaro6dead952003-09-25 14:50:04 +000014715ac_configure_extra_args=
14716
14717if $ac_cs_silent; then
14718 exec 6>/dev/null
14719 ac_configure_extra_args="$ac_configure_extra_args --silent"
14720fi
14721
14722_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014723cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Skip Montanaro6dead952003-09-25 14:50:04 +000014724if \$ac_cs_recheck; then
Charles-François Natalibe2b9072013-01-08 19:47:00 +010014725 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014726 shift
14727 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
14728 CONFIG_SHELL='$SHELL'
Martin v. Löwiseba40652007-08-30 20:10:57 +000014729 export CONFIG_SHELL
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014730 exec "\$@"
Skip Montanaro6dead952003-09-25 14:50:04 +000014731fi
14732
Martin v. Löwis11437992002-04-12 09:54:03 +000014733_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014734cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwiseba40652007-08-30 20:10:57 +000014735exec 5>>config.log
14736{
14737 echo
14738 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
14739## Running $as_me. ##
14740_ASBOX
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014741 $as_echo "$ac_log"
Martin v. Löwiseba40652007-08-30 20:10:57 +000014742} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014743
Martin v. Löwiseba40652007-08-30 20:10:57 +000014744_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014745cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwiseba40652007-08-30 20:10:57 +000014746_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000014747
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014748cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwiseba40652007-08-30 20:10:57 +000014749
14750# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000014751for ac_config_target in $ac_config_targets
14752do
Martin v. Löwiseba40652007-08-30 20:10:57 +000014753 case $ac_config_target in
14754 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
14755 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
14756 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
14757 "Mac/IDLE/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/IDLE/Makefile" ;;
Ronald Oussoren580c7fe2008-05-02 19:45:11 +000014758 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
14759 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000014760 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
14761 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
Antoine Pitrouf2caeed2009-05-24 20:23:57 +000014762 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
Antoine Pitrouaabdceb2010-09-10 20:03:17 +000014763 "Modules/ld_so_aix") CONFIG_FILES="$CONFIG_FILES Modules/ld_so_aix" ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000014764
Matthias Klose3cef2a92012-03-14 23:39:33 +010014765 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014766 esac
14767done
14768
Martin v. Löwiseba40652007-08-30 20:10:57 +000014769
Martin v. Löwis11437992002-04-12 09:54:03 +000014770# If the user did not use the arguments to specify the items to instantiate,
14771# then the envvar interface is used. Set only those that are not.
14772# We use the long form for the default assignment because of an extremely
14773# bizarre bug on SunOS 4.1.3.
14774if $ac_need_defaults; then
14775 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
14776 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
14777fi
14778
Skip Montanaro6dead952003-09-25 14:50:04 +000014779# Have a temporary directory for convenience. Make it in the build tree
Martin v. Löwiseba40652007-08-30 20:10:57 +000014780# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000014781# creating and moving files from /tmp can sometimes cause problems.
Martin v. Löwiseba40652007-08-30 20:10:57 +000014782# Hook for its removal unless debugging.
14783# Note that there is a small window in which the directory will not be cleaned:
14784# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000014785$debug ||
14786{
Matthias Klose3cef2a92012-03-14 23:39:33 +010014787 tmp= ac_tmp=
Martin v. Löwiseba40652007-08-30 20:10:57 +000014788 trap 'exit_status=$?
Matthias Klose3cef2a92012-03-14 23:39:33 +010014789 : "${ac_tmp:=$tmp}"
14790 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
Martin v. Löwiseba40652007-08-30 20:10:57 +000014791' 0
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014792 trap 'as_fn_exit 1' 1 2 13 15
Martin v. Löwis11437992002-04-12 09:54:03 +000014793}
Martin v. Löwis11437992002-04-12 09:54:03 +000014794# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000014795
Martin v. Löwis11437992002-04-12 09:54:03 +000014796{
Martin v. Löwiseba40652007-08-30 20:10:57 +000014797 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Matthias Klose3cef2a92012-03-14 23:39:33 +010014798 test -d "$tmp"
Martin v. Löwis11437992002-04-12 09:54:03 +000014799} ||
14800{
Martin v. Löwiseba40652007-08-30 20:10:57 +000014801 tmp=./conf$$-$RANDOM
14802 (umask 077 && mkdir "$tmp")
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014803} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
Matthias Klose3cef2a92012-03-14 23:39:33 +010014804ac_tmp=$tmp
Martin v. Löwis11437992002-04-12 09:54:03 +000014805
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014806# Set up the scripts for CONFIG_FILES section.
14807# No need to generate them if there are no CONFIG_FILES.
14808# This happens for instance with `./config.status config.h'.
Martin v. Löwiseba40652007-08-30 20:10:57 +000014809if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014810
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014811
14812ac_cr=`echo X | tr X '\015'`
14813# On cygwin, bash can eat \r inside `` if the user requested igncr.
14814# But we know of no other shell where ac_cr would be empty at this
14815# point, so we can use a bashism as a fallback.
14816if test "x$ac_cr" = x; then
14817 eval ac_cr=\$\'\\r\'
14818fi
14819ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
14820if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014821 ac_cs_awk_cr='\\r'
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014822else
14823 ac_cs_awk_cr=$ac_cr
14824fi
14825
Matthias Klose3cef2a92012-03-14 23:39:33 +010014826echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
Martin v. Löwis11437992002-04-12 09:54:03 +000014827_ACEOF
14828
Martin v. Löwiseba40652007-08-30 20:10:57 +000014829
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014830{
14831 echo "cat >conf$$subs.awk <<_ACEOF" &&
14832 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
14833 echo "_ACEOF"
14834} >conf$$subs.sh ||
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014835 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
14836ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
Martin v. Löwiseba40652007-08-30 20:10:57 +000014837ac_delim='%!_!# '
14838for ac_last_try in false false false false false :; do
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014839 . ./conf$$subs.sh ||
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014840 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014841
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014842 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
14843 if test $ac_delim_n = $ac_delim_num; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000014844 break
14845 elif $ac_last_try; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014846 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014847 else
14848 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000014849 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014850done
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014851rm -f conf$$subs.sh
Martin v. Löwiseba40652007-08-30 20:10:57 +000014852
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014853cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Matthias Klose3cef2a92012-03-14 23:39:33 +010014854cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
Martin v. Löwiseba40652007-08-30 20:10:57 +000014855_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014856sed -n '
14857h
14858s/^/S["/; s/!.*/"]=/
14859p
14860g
14861s/^[^!]*!//
14862:repl
14863t repl
14864s/'"$ac_delim"'$//
14865t delim
14866:nl
14867h
14868s/\(.\{148\}\)..*/\1/
14869t more1
14870s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
14871p
14872n
14873b repl
14874:more1
14875s/["\\]/\\&/g; s/^/"/; s/$/"\\/
14876p
14877g
14878s/.\{148\}//
14879t nl
14880:delim
14881h
14882s/\(.\{148\}\)..*/\1/
14883t more2
14884s/["\\]/\\&/g; s/^/"/; s/$/"/
14885p
14886b
14887:more2
14888s/["\\]/\\&/g; s/^/"/; s/$/"\\/
14889p
14890g
14891s/.\{148\}//
14892t delim
14893' <conf$$subs.awk | sed '
14894/^[^""]/{
14895 N
14896 s/\n//
14897}
14898' >>$CONFIG_STATUS || ac_write_fail=1
14899rm -f conf$$subs.awk
14900cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14901_ACAWK
Matthias Klose3cef2a92012-03-14 23:39:33 +010014902cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014903 for (key in S) S_is_set[key] = 1
14904 FS = ""
14905
14906}
14907{
14908 line = $ 0
14909 nfields = split(line, field, "@")
14910 substed = 0
14911 len = length(field[1])
14912 for (i = 2; i < nfields; i++) {
14913 key = field[i]
14914 keylen = length(key)
14915 if (S_is_set[key]) {
14916 value = S[key]
14917 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
14918 len += length(value) + length(field[++i])
14919 substed = 1
14920 } else
14921 len += 1 + keylen
14922 }
14923
14924 print line
14925}
14926
14927_ACAWK
Martin v. Löwiseba40652007-08-30 20:10:57 +000014928_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014929cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14930if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
14931 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
14932else
14933 cat
Matthias Klose3cef2a92012-03-14 23:39:33 +010014934fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014935 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014936_ACEOF
14937
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014938# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
14939# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
Martin v. Löwiseba40652007-08-30 20:10:57 +000014940# trailing colons and then remove the whole line if VPATH becomes empty
14941# (actually we leave an empty line to preserve line numbers).
14942if test "x$srcdir" = x.; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014943 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
14944h
14945s///
14946s/^/:/
14947s/[ ]*$/:/
14948s/:\$(srcdir):/:/g
14949s/:\${srcdir}:/:/g
14950s/:@srcdir@:/:/g
14951s/^:*//
Martin v. Löwiseba40652007-08-30 20:10:57 +000014952s/:*$//
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014953x
14954s/\(=[ ]*\).*/\1/
14955G
14956s/\n//
Martin v. Löwiseba40652007-08-30 20:10:57 +000014957s/^[^=]*=[ ]*$//
14958}'
14959fi
14960
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014961cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014962fi # test -n "$CONFIG_FILES"
14963
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014964# Set up the scripts for CONFIG_HEADERS section.
14965# No need to generate them if there are no CONFIG_HEADERS.
14966# This happens for instance with `./config.status Makefile'.
14967if test -n "$CONFIG_HEADERS"; then
Matthias Klose3cef2a92012-03-14 23:39:33 +010014968cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014969BEGIN {
14970_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000014971
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014972# Transform confdefs.h into an awk script `defines.awk', embedded as
14973# here-document in config.status, that substitutes the proper values into
14974# config.h.in to produce config.h.
14975
14976# Create a delimiter string that does not exist in confdefs.h, to ease
14977# handling of long lines.
14978ac_delim='%!_!# '
14979for ac_last_try in false false :; do
Matthias Klose3cef2a92012-03-14 23:39:33 +010014980 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
14981 if test -z "$ac_tt"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014982 break
14983 elif $ac_last_try; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014984 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014985 else
14986 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
14987 fi
14988done
14989
14990# For the awk script, D is an array of macro values keyed by name,
14991# likewise P contains macro parameters if any. Preserve backslash
14992# newline sequences.
14993
14994ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
14995sed -n '
14996s/.\{148\}/&'"$ac_delim"'/g
14997t rset
14998:rset
14999s/^[ ]*#[ ]*define[ ][ ]*/ /
15000t def
15001d
15002:def
15003s/\\$//
15004t bsnl
15005s/["\\]/\\&/g
15006s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
15007D["\1"]=" \3"/p
15008s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
15009d
15010:bsnl
15011s/["\\]/\\&/g
15012s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
15013D["\1"]=" \3\\\\\\n"\\/p
15014t cont
15015s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
15016t cont
15017d
15018:cont
15019n
15020s/.\{148\}/&'"$ac_delim"'/g
15021t clear
15022:clear
15023s/\\$//
15024t bsnlc
15025s/["\\]/\\&/g; s/^/"/; s/$/"/p
15026d
15027:bsnlc
15028s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
15029b cont
15030' <confdefs.h | sed '
15031s/'"$ac_delim"'/"\\\
15032"/g' >>$CONFIG_STATUS || ac_write_fail=1
15033
15034cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15035 for (key in D) D_is_set[key] = 1
15036 FS = ""
15037}
15038/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
15039 line = \$ 0
15040 split(line, arg, " ")
15041 if (arg[1] == "#") {
15042 defundef = arg[2]
15043 mac1 = arg[3]
15044 } else {
15045 defundef = substr(arg[1], 2)
15046 mac1 = arg[2]
15047 }
15048 split(mac1, mac2, "(") #)
15049 macro = mac2[1]
15050 prefix = substr(line, 1, index(line, defundef) - 1)
15051 if (D_is_set[macro]) {
15052 # Preserve the white space surrounding the "#".
15053 print prefix "define", macro P[macro] D[macro]
15054 next
15055 } else {
15056 # Replace #undef with comments. This is necessary, for example,
15057 # in the case of _POSIX_SOURCE, which is predefined and required
15058 # on some systems where configure will not decide to define it.
15059 if (defundef == "undef") {
15060 print "/*", prefix defundef, macro, "*/"
15061 next
15062 }
15063 }
15064}
15065{ print }
15066_ACAWK
15067_ACEOF
15068cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015069 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015070fi # test -n "$CONFIG_HEADERS"
15071
15072
15073eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
15074shift
15075for ac_tag
Martin v. Löwiseba40652007-08-30 20:10:57 +000015076do
15077 case $ac_tag in
15078 :[FHLC]) ac_mode=$ac_tag; continue;;
15079 esac
15080 case $ac_mode$ac_tag in
15081 :[FHL]*:*);;
Matthias Klose3cef2a92012-03-14 23:39:33 +010015082 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015083 :[FH]-) ac_tag=-:-;;
15084 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
15085 esac
15086 ac_save_IFS=$IFS
15087 IFS=:
15088 set x $ac_tag
15089 IFS=$ac_save_IFS
15090 shift
15091 ac_file=$1
15092 shift
15093
15094 case $ac_mode in
15095 :L) ac_source=$1;;
15096 :[FH])
15097 ac_file_inputs=
15098 for ac_f
15099 do
15100 case $ac_f in
Matthias Klose3cef2a92012-03-14 23:39:33 +010015101 -) ac_f="$ac_tmp/stdin";;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015102 *) # Look for the file first in the build tree, then in the source tree
15103 # (if the path is not absolute). The absolute path cannot be DOS-style,
15104 # because $ac_f cannot contain `:'.
15105 test -f "$ac_f" ||
15106 case $ac_f in
15107 [\\/$]*) false;;
15108 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
15109 esac ||
Matthias Klose3cef2a92012-03-14 23:39:33 +010015110 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015111 esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015112 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
15113 as_fn_append ac_file_inputs " '$ac_f'"
Martin v. Löwiseba40652007-08-30 20:10:57 +000015114 done
15115
15116 # Let's still pretend it is `configure' which instantiates (i.e., don't
15117 # use $as_me), people would be surprised to read:
15118 # /* config.h. Generated by config.status. */
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015119 configure_input='Generated from '`
15120 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
15121 `' by configure.'
Martin v. Löwiseba40652007-08-30 20:10:57 +000015122 if test x"$ac_file" != x-; then
15123 configure_input="$ac_file. $configure_input"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015124 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
15125$as_echo "$as_me: creating $ac_file" >&6;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000015126 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015127 # Neutralize special characters interpreted by sed in replacement strings.
15128 case $configure_input in #(
15129 *\&* | *\|* | *\\* )
15130 ac_sed_conf_input=`$as_echo "$configure_input" |
15131 sed 's/[\\\\&|]/\\\\&/g'`;; #(
15132 *) ac_sed_conf_input=$configure_input;;
15133 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000015134
15135 case $ac_tag in
Matthias Klose3cef2a92012-03-14 23:39:33 +010015136 *:-:* | *:-) cat >"$ac_tmp/stdin" \
15137 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015138 esac
15139 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015140 esac
15141
Martin v. Löwiseba40652007-08-30 20:10:57 +000015142 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000015143$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015144 X"$ac_file" : 'X\(//\)[^/]' \| \
15145 X"$ac_file" : 'X\(//\)$' \| \
Martin v. Löwiseba40652007-08-30 20:10:57 +000015146 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015147$as_echo X"$ac_file" |
Martin v. Löwiseba40652007-08-30 20:10:57 +000015148 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
15149 s//\1/
15150 q
15151 }
15152 /^X\(\/\/\)[^/].*/{
15153 s//\1/
15154 q
15155 }
15156 /^X\(\/\/\)$/{
15157 s//\1/
15158 q
15159 }
15160 /^X\(\/\).*/{
15161 s//\1/
15162 q
15163 }
15164 s/.*/./; q'`
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015165 as_dir="$ac_dir"; as_fn_mkdir_p
Martin v. Löwis11437992002-04-12 09:54:03 +000015166 ac_builddir=.
15167
Martin v. Löwiseba40652007-08-30 20:10:57 +000015168case "$ac_dir" in
15169.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
15170*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015171 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Martin v. Löwiseba40652007-08-30 20:10:57 +000015172 # A ".." for each directory in $ac_dir_suffix.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015173 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Martin v. Löwiseba40652007-08-30 20:10:57 +000015174 case $ac_top_builddir_sub in
15175 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
15176 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
15177 esac ;;
15178esac
15179ac_abs_top_builddir=$ac_pwd
15180ac_abs_builddir=$ac_pwd$ac_dir_suffix
15181# for backward compatibility:
15182ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000015183
15184case $srcdir in
Martin v. Löwiseba40652007-08-30 20:10:57 +000015185 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000015186 ac_srcdir=.
Martin v. Löwiseba40652007-08-30 20:10:57 +000015187 ac_top_srcdir=$ac_top_builddir_sub
15188 ac_abs_top_srcdir=$ac_pwd ;;
15189 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000015190 ac_srcdir=$srcdir$ac_dir_suffix;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015191 ac_top_srcdir=$srcdir
15192 ac_abs_top_srcdir=$srcdir ;;
15193 *) # Relative name.
15194 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
15195 ac_top_srcdir=$ac_top_build_prefix$srcdir
15196 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015197esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000015198ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000015199
Martin v. Löwis11437992002-04-12 09:54:03 +000015200
Martin v. Löwiseba40652007-08-30 20:10:57 +000015201 case $ac_mode in
15202 :F)
15203 #
15204 # CONFIG_FILE
15205 #
Martin v. Löwis11437992002-04-12 09:54:03 +000015206
15207 case $INSTALL in
15208 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015209 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015210 esac
Trent Nelsonf6407a12012-08-30 14:56:13 +000015211 ac_MKDIR_P=$MKDIR_P
15212 case $MKDIR_P in
15213 [\\/$]* | ?:[\\/]* ) ;;
15214 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
15215 esac
Brett Cannon19fab762007-06-02 03:02:29 +000015216_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000015217
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015218cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwiseba40652007-08-30 20:10:57 +000015219# If the template does not know about datarootdir, expand it.
15220# FIXME: This hack should be removed a few years after 2.60.
15221ac_datarootdir_hack=; ac_datarootdir_seen=
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015222ac_sed_dataroot='
15223/datarootdir/ {
Martin v. Löwiseba40652007-08-30 20:10:57 +000015224 p
15225 q
15226}
15227/@datadir@/p
15228/@docdir@/p
15229/@infodir@/p
15230/@localedir@/p
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015231/@mandir@/p'
15232case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
Martin v. Löwiseba40652007-08-30 20:10:57 +000015233*datarootdir*) ac_datarootdir_seen=yes;;
15234*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015235 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
15236$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000015237_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015238cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwiseba40652007-08-30 20:10:57 +000015239 ac_datarootdir_hack='
15240 s&@datadir@&$datadir&g
15241 s&@docdir@&$docdir&g
15242 s&@infodir@&$infodir&g
15243 s&@localedir@&$localedir&g
15244 s&@mandir@&$mandir&g
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015245 s&\\\${datarootdir}&$datarootdir&g' ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015246esac
15247_ACEOF
15248
15249# Neutralize VPATH when `$srcdir' = `.'.
15250# Shell code in configure.ac might set extrasub.
15251# FIXME: do we really want to maintain this feature?
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015252cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15253ac_sed_extra="$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000015254$extrasub
15255_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015256cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015257:t
15258/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015259s|@configure_input@|$ac_sed_conf_input|;t t
Martin v. Löwiseba40652007-08-30 20:10:57 +000015260s&@top_builddir@&$ac_top_builddir_sub&;t t
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015261s&@top_build_prefix@&$ac_top_build_prefix&;t t
Martin v. Löwiseba40652007-08-30 20:10:57 +000015262s&@srcdir@&$ac_srcdir&;t t
15263s&@abs_srcdir@&$ac_abs_srcdir&;t t
15264s&@top_srcdir@&$ac_top_srcdir&;t t
15265s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
15266s&@builddir@&$ac_builddir&;t t
15267s&@abs_builddir@&$ac_abs_builddir&;t t
15268s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
15269s&@INSTALL@&$ac_INSTALL&;t t
Trent Nelsonf6407a12012-08-30 14:56:13 +000015270s&@MKDIR_P@&$ac_MKDIR_P&;t t
Martin v. Löwiseba40652007-08-30 20:10:57 +000015271$ac_datarootdir_hack
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015272"
Matthias Klose3cef2a92012-03-14 23:39:33 +010015273eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
15274 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015275
Martin v. Löwiseba40652007-08-30 20:10:57 +000015276test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
Matthias Klose3cef2a92012-03-14 23:39:33 +010015277 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
15278 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
15279 "$ac_tmp/out"`; test -z "$ac_out"; } &&
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015280 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015281which seems to be undefined. Please make sure it is defined" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015282$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015283which seems to be undefined. Please make sure it is defined" >&2;}
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015284
Matthias Klose3cef2a92012-03-14 23:39:33 +010015285 rm -f "$ac_tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000015286 case $ac_file in
Matthias Klose3cef2a92012-03-14 23:39:33 +010015287 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
15288 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015289 esac \
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015290 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015291 ;;
15292 :H)
15293 #
15294 # CONFIG_HEADER
15295 #
Martin v. Löwis11437992002-04-12 09:54:03 +000015296 if test x"$ac_file" != x-; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015297 {
15298 $as_echo "/* $configure_input */" \
Matthias Klose3cef2a92012-03-14 23:39:33 +010015299 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
15300 } >"$ac_tmp/config.h" \
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015301 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Matthias Klose3cef2a92012-03-14 23:39:33 +010015302 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015303 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
15304$as_echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000015305 else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015306 rm -f "$ac_file"
Matthias Klose3cef2a92012-03-14 23:39:33 +010015307 mv "$ac_tmp/config.h" "$ac_file" \
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015308 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000015309 fi
15310 else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015311 $as_echo "/* $configure_input */" \
Matthias Klose3cef2a92012-03-14 23:39:33 +010015312 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015313 || as_fn_error $? "could not create -" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000015314 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015315 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000015316
Martin v. Löwiseba40652007-08-30 20:10:57 +000015317
15318 esac
15319
Antoine Pitrouaabdceb2010-09-10 20:03:17 +000015320
15321 case $ac_file$ac_mode in
15322 "Modules/ld_so_aix":F) chmod +x Modules/ld_so_aix ;;
15323
15324 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000015325done # for ac_tag
15326
Guido van Rossum627b2d71993-12-24 10:39:16 +000015327
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015328as_fn_exit 0
Martin v. Löwis11437992002-04-12 09:54:03 +000015329_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000015330ac_clean_files=$ac_clean_files_save
15331
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015332test $ac_write_fail = 0 ||
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015333 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015334
Martin v. Löwis11437992002-04-12 09:54:03 +000015335
15336# configure is writing to config.log, and then calls config.status.
15337# config.status does its own redirection, appending to config.log.
15338# Unfortunately, on DOS this fails, as config.log is still kept open
15339# by configure, so config.status won't be able to write to it; its
15340# output is simply discarded. So we exec the FD to /dev/null,
15341# effectively closing config.log, so it can be properly (re)opened and
15342# appended to by config.status. When coming back to configure, we
15343# need to make the FD available again.
15344if test "$no_create" != yes; then
15345 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000015346 ac_config_status_args=
15347 test "$silent" = yes &&
15348 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000015349 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000015350 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000015351 exec 5>>config.log
15352 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
15353 # would make configure fail if this is the last instruction.
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015354 $ac_cs_success || as_fn_exit 1
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015355fi
15356if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
15357 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
15358$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000015359fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000015360
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000015361
Martin v. Löwisf7afe952006-04-14 15:16:15 +000015362echo "creating Modules/Setup"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000015363if test ! -f Modules/Setup
15364then
15365 cp $srcdir/Modules/Setup.dist Modules/Setup
15366fi
15367
Martin v. Löwisf7afe952006-04-14 15:16:15 +000015368echo "creating Modules/Setup.local"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000015369if test ! -f Modules/Setup.local
15370then
15371 echo "# Edit this file for local setup changes" >Modules/Setup.local
15372fi
15373
15374echo "creating Makefile"
15375$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
15376 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000015377 Modules/Setup.local Modules/Setup
Skip Montanaro89e975f2007-08-22 19:05:21 +000015378
15379case $ac_sys_system in
15380BeOS)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015381 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
Skip Montanaro89e975f2007-08-22 19:05:21 +000015382
15383 Support for BeOS is deprecated as of Python 2.6.
15384 See PEP 11 for the gory details.
15385 " >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015386$as_echo "$as_me: WARNING:
Skip Montanaro89e975f2007-08-22 19:05:21 +000015387
15388 Support for BeOS is deprecated as of Python 2.6.
15389 See PEP 11 for the gory details.
15390 " >&2;}
15391 ;;
15392*) ;;
15393esac
15394
Neil Schemenauerc761fc82001-02-19 04:50:49 +000015395mv config.c Modules