blob: 33092525ba541dd89faffff46bbf7fddaa27f818 [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Matthias Klose3cef2a92012-03-14 23:39:33 +01002# From configure.ac Revision.
Guido van Rossum627b2d71993-12-24 10:39:16 +00003# Guess values for system-dependent variables and create Makefiles.
Charles-François Natalibe2b9072013-01-08 19:47:00 +01004# Generated by GNU Autoconf 2.69 for python 2.7.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005#
Georg Brandl464432d2009-05-20 18:24:08 +00006# Report bugs to <http://bugs.python.org/>.
Martin v. Löwis1d459062005-03-14 21:23:33 +00007#
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008#
Charles-François Natalibe2b9072013-01-08 19:47:00 +01009# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010#
11#
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012# This configure script is free software; the Free Software Foundation
13# gives unlimited permission to copy, distribute and modify it.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014## -------------------- ##
15## M4sh Initialization. ##
16## -------------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +000017
Martin v. Löwiseba40652007-08-30 20:10:57 +000018# Be more Bourne compatible
19DUALCASE=1; export DUALCASE # for MKS sh
Matthias Klosea0bea5d2010-05-08 10:00:28 +000020if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000021 emulate sh
22 NULLCMD=:
Matthias Klosea0bea5d2010-05-08 10:00:28 +000023 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000024 # is contrary to our usage. Disable this feature.
25 alias -g '${1+"$@"}'='"$@"'
Martin v. Löwiseba40652007-08-30 20:10:57 +000026 setopt NO_GLOB_SUBST
Skip Montanaro89e975f2007-08-22 19:05:21 +000027else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000028 case `(set -o) 2>/dev/null` in #(
29 *posix*) :
30 set -o posix ;; #(
31 *) :
32 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000033esac
Martin v. Löwis11437992002-04-12 09:54:03 +000034fi
35
Skip Montanaro6dead952003-09-25 14:50:04 +000036
Matthias Klosea0bea5d2010-05-08 10:00:28 +000037as_nl='
38'
39export as_nl
40# Printing a long string crashes Solaris 7 /usr/bin/printf.
41as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
42as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
43as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
44# Prefer a ksh shell builtin over an external printf program on Solaris,
45# but without wasting forks for bash or zsh.
46if test -z "$BASH_VERSION$ZSH_VERSION" \
47 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
48 as_echo='print -r --'
49 as_echo_n='print -rn --'
50elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
51 as_echo='printf %s\n'
52 as_echo_n='printf %s'
53else
54 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
55 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
56 as_echo_n='/usr/ucb/echo -n'
57 else
58 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
59 as_echo_n_body='eval
60 arg=$1;
61 case $arg in #(
62 *"$as_nl"*)
63 expr "X$arg" : "X\\(.*\\)$as_nl";
64 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
65 esac;
66 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
67 '
68 export as_echo_n_body
69 as_echo_n='sh -c $as_echo_n_body as_echo'
70 fi
71 export as_echo_body
72 as_echo='sh -c $as_echo_body as_echo'
73fi
Martin v. Löwis11437992002-04-12 09:54:03 +000074
75# The user is always right.
76if test "${PATH_SEPARATOR+set}" != set; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000077 PATH_SEPARATOR=:
78 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
79 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
80 PATH_SEPARATOR=';'
81 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000082fi
Martin v. Löwis11437992002-04-12 09:54:03 +000083
Martin v. Löwiseba40652007-08-30 20:10:57 +000084
85# IFS
86# We need space, tab and new line, in precisely that order. Quoting is
87# there to prevent editors from complaining about space-tab.
88# (If _AS_PATH_WALK were called with IFS unset, it would disable word
89# splitting by setting IFS to empty value.)
Martin v. Löwiseba40652007-08-30 20:10:57 +000090IFS=" "" $as_nl"
91
92# Find who we are. Look in the path if we contain no directory separator.
Matthias Klose3cef2a92012-03-14 23:39:33 +010093as_myself=
Matthias Klosea0bea5d2010-05-08 10:00:28 +000094case $0 in #((
Martin v. Löwiseba40652007-08-30 20:10:57 +000095 *[\\/]* ) as_myself=$0 ;;
96 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000097for as_dir in $PATH
98do
99 IFS=$as_save_IFS
100 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000101 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
102 done
Martin v. Löwiseba40652007-08-30 20:10:57 +0000103IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +0000104
Martin v. Löwiseba40652007-08-30 20:10:57 +0000105 ;;
106esac
107# We did not find ourselves, most probably we were run as `sh COMMAND'
108# in which case we are not to be found in the path.
109if test "x$as_myself" = x; then
110 as_myself=$0
111fi
112if test ! -f "$as_myself"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000113 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
114 exit 1
Martin v. Löwiseba40652007-08-30 20:10:57 +0000115fi
116
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000117# Unset variables that we do not need and which cause bugs (e.g. in
118# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
119# suppresses any "Segmentation fault" message there. '((' could
120# trigger a bug in pdksh 5.2.14.
121for as_var in BASH_ENV ENV MAIL MAILPATH
122do eval test x\${$as_var+set} = xset \
123 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Martin v. Löwiseba40652007-08-30 20:10:57 +0000124done
125PS1='$ '
126PS2='> '
127PS4='+ '
128
129# NLS nuisances.
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000130LC_ALL=C
131export LC_ALL
132LANGUAGE=C
133export LANGUAGE
Martin v. Löwiseba40652007-08-30 20:10:57 +0000134
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000135# CDPATH.
136(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
137
Charles-François Natalibe2b9072013-01-08 19:47:00 +0100138# Use a proper internal environment variable to ensure we don't fall
139 # into an infinite loop, continuously re-executing ourselves.
140 if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
141 _as_can_reexec=no; export _as_can_reexec;
142 # We cannot yet assume a decent shell, so we have to provide a
143# neutralization value for shells without unset; and this also
144# works around shells that cannot unset nonexistent variables.
145# Preserve -v and -x to the replacement shell.
146BASH_ENV=/dev/null
147ENV=/dev/null
148(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
149case $- in # ((((
150 *v*x* | *x*v* ) as_opts=-vx ;;
151 *v* ) as_opts=-v ;;
152 *x* ) as_opts=-x ;;
153 * ) as_opts= ;;
154esac
155exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
156# Admittedly, this is quite paranoid, since all the known shells bail
157# out after a failed `exec'.
158$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
159as_fn_exit 255
160 fi
161 # We don't want this to propagate to other subprocesses.
162 { _as_can_reexec=; unset _as_can_reexec;}
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000163if test "x$CONFIG_SHELL" = x; then
164 as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
165 emulate sh
166 NULLCMD=:
167 # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
168 # is contrary to our usage. Disable this feature.
169 alias -g '\${1+\"\$@\"}'='\"\$@\"'
170 setopt NO_GLOB_SUBST
171else
172 case \`(set -o) 2>/dev/null\` in #(
173 *posix*) :
174 set -o posix ;; #(
175 *) :
176 ;;
177esac
178fi
179"
180 as_required="as_fn_return () { (exit \$1); }
181as_fn_success () { as_fn_return 0; }
182as_fn_failure () { as_fn_return 1; }
183as_fn_ret_success () { return 0; }
184as_fn_ret_failure () { return 1; }
185
186exitcode=0
187as_fn_success || { exitcode=1; echo as_fn_success failed.; }
188as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
189as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
190as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
191if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
192
193else
194 exitcode=1; echo positional parameters were not saved.
195fi
Charles-François Natalibe2b9072013-01-08 19:47:00 +0100196test x\$exitcode = x0 || exit 1
197test -x / || exit 1"
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000198 as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
199 as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
200 eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
201 test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
202test \$(( 1 + 1 )) = 2 || exit 1"
203 if (eval "$as_required") 2>/dev/null; then :
204 as_have_required=yes
205else
206 as_have_required=no
207fi
208 if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
209
210else
211 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
212as_found=false
213for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
214do
215 IFS=$as_save_IFS
216 test -z "$as_dir" && as_dir=.
217 as_found=:
218 case $as_dir in #(
219 /*)
220 for as_base in sh bash ksh sh5; do
221 # Try only shells that exist, to save several forks.
222 as_shell=$as_dir/$as_base
223 if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
224 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
225 CONFIG_SHELL=$as_shell as_have_required=yes
226 if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
227 break 2
228fi
229fi
230 done;;
231 esac
232 as_found=false
233done
234$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
235 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
236 CONFIG_SHELL=$SHELL as_have_required=yes
237fi; }
238IFS=$as_save_IFS
239
240
241 if test "x$CONFIG_SHELL" != x; then :
Charles-François Natalibe2b9072013-01-08 19:47:00 +0100242 export CONFIG_SHELL
243 # We cannot yet assume a decent shell, so we have to provide a
244# neutralization value for shells without unset; and this also
245# works around shells that cannot unset nonexistent variables.
246# Preserve -v and -x to the replacement shell.
247BASH_ENV=/dev/null
248ENV=/dev/null
249(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
250case $- in # ((((
251 *v*x* | *x*v* ) as_opts=-vx ;;
252 *v* ) as_opts=-v ;;
253 *x* ) as_opts=-x ;;
254 * ) as_opts= ;;
255esac
256exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
257# Admittedly, this is quite paranoid, since all the known shells bail
258# out after a failed `exec'.
259$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
260exit 255
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000261fi
262
263 if test x$as_have_required = xno; then :
264 $as_echo "$0: This script requires a shell more modern than all"
265 $as_echo "$0: the shells that I found on your system."
266 if test x${ZSH_VERSION+set} = xset ; then
267 $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
268 $as_echo "$0: be upgraded to zsh 4.3.4 or later."
269 else
270 $as_echo "$0: Please tell bug-autoconf@gnu.org and
271$0: http://bugs.python.org/ about your system, including
272$0: any error possibly output before this message. Then
273$0: install a modern shell, or manually run the script
274$0: under such a shell if you do have one."
275 fi
276 exit 1
277fi
278fi
279fi
280SHELL=${CONFIG_SHELL-/bin/sh}
281export SHELL
282# Unset more variables known to interfere with behavior of common tools.
283CLICOLOR_FORCE= GREP_OPTIONS=
284unset CLICOLOR_FORCE GREP_OPTIONS
285
286## --------------------- ##
287## M4sh Shell Functions. ##
288## --------------------- ##
289# as_fn_unset VAR
290# ---------------
291# Portably unset VAR.
292as_fn_unset ()
293{
294 { eval $1=; unset $1;}
295}
296as_unset=as_fn_unset
297
298# as_fn_set_status STATUS
299# -----------------------
300# Set $? to STATUS, without forking.
301as_fn_set_status ()
302{
303 return $1
304} # as_fn_set_status
305
306# as_fn_exit STATUS
307# -----------------
308# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
309as_fn_exit ()
310{
311 set +e
312 as_fn_set_status $1
313 exit $1
314} # as_fn_exit
315
316# as_fn_mkdir_p
317# -------------
318# Create "$as_dir" as a directory, including parents if necessary.
319as_fn_mkdir_p ()
320{
321
322 case $as_dir in #(
323 -*) as_dir=./$as_dir;;
324 esac
325 test -d "$as_dir" || eval $as_mkdir_p || {
326 as_dirs=
327 while :; do
328 case $as_dir in #(
329 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
330 *) as_qdir=$as_dir;;
331 esac
332 as_dirs="'$as_qdir' $as_dirs"
333 as_dir=`$as_dirname -- "$as_dir" ||
334$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
335 X"$as_dir" : 'X\(//\)[^/]' \| \
336 X"$as_dir" : 'X\(//\)$' \| \
337 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
338$as_echo X"$as_dir" |
339 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
340 s//\1/
341 q
342 }
343 /^X\(\/\/\)[^/].*/{
344 s//\1/
345 q
346 }
347 /^X\(\/\/\)$/{
348 s//\1/
349 q
350 }
351 /^X\(\/\).*/{
352 s//\1/
353 q
354 }
355 s/.*/./; q'`
356 test -d "$as_dir" && break
357 done
358 test -z "$as_dirs" || eval "mkdir $as_dirs"
Georg Brandl71f4fbb2011-02-25 11:04:50 +0000359 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000360
361
362} # as_fn_mkdir_p
Charles-François Natalibe2b9072013-01-08 19:47:00 +0100363
364# as_fn_executable_p FILE
365# -----------------------
366# Test if FILE is an executable regular file.
367as_fn_executable_p ()
368{
369 test -f "$1" && test -x "$1"
370} # as_fn_executable_p
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000371# as_fn_append VAR VALUE
372# ----------------------
373# Append the text in VALUE to the end of the definition contained in VAR. Take
374# advantage of any shell optimizations that allow amortized linear growth over
375# repeated appends, instead of the typical quadratic growth present in naive
376# implementations.
377if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
378 eval 'as_fn_append ()
379 {
380 eval $1+=\$2
381 }'
382else
383 as_fn_append ()
384 {
385 eval $1=\$$1\$2
386 }
387fi # as_fn_append
388
389# as_fn_arith ARG...
390# ------------------
391# Perform arithmetic evaluation on the ARGs, and store the result in the
392# global $as_val. Take advantage of shells that can avoid forks. The arguments
393# must be portable across $(()) and expr.
394if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
395 eval 'as_fn_arith ()
396 {
397 as_val=$(( $* ))
398 }'
399else
400 as_fn_arith ()
401 {
402 as_val=`expr "$@" || test $? -eq 1`
403 }
404fi # as_fn_arith
405
406
Georg Brandl71f4fbb2011-02-25 11:04:50 +0000407# as_fn_error STATUS ERROR [LINENO LOG_FD]
408# ----------------------------------------
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000409# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
410# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Georg Brandl71f4fbb2011-02-25 11:04:50 +0000411# script with STATUS, using 1 if that was 0.
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000412as_fn_error ()
413{
Georg Brandl71f4fbb2011-02-25 11:04:50 +0000414 as_status=$1; test $as_status -eq 0 && as_status=1
415 if test "$4"; then
416 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
417 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000418 fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +0000419 $as_echo "$as_me: error: $2" >&2
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000420 as_fn_exit $as_status
421} # as_fn_error
422
Martin v. Löwiseba40652007-08-30 20:10:57 +0000423if expr a : '\(a\)' >/dev/null 2>&1 &&
424 test "X`expr 00001 : '.*\(...\)'`" = X001; then
425 as_expr=expr
426else
427 as_expr=false
428fi
429
430if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
431 as_basename=basename
432else
433 as_basename=false
434fi
435
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000436if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
437 as_dirname=dirname
438else
439 as_dirname=false
440fi
Martin v. Löwiseba40652007-08-30 20:10:57 +0000441
Martin v. Löwiseba40652007-08-30 20:10:57 +0000442as_me=`$as_basename -- "$0" ||
443$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
444 X"$0" : 'X\(//\)$' \| \
445 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000446$as_echo X/"$0" |
Martin v. Löwiseba40652007-08-30 20:10:57 +0000447 sed '/^.*\/\([^/][^/]*\)\/*$/{
448 s//\1/
449 q
450 }
451 /^X\/\(\/\/\)$/{
452 s//\1/
453 q
454 }
455 /^X\/\(\/\).*/{
456 s//\1/
457 q
458 }
459 s/.*/./; q'`
460
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000461# Avoid depending upon Character Ranges.
462as_cr_letters='abcdefghijklmnopqrstuvwxyz'
463as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
464as_cr_Letters=$as_cr_letters$as_cr_LETTERS
465as_cr_digits='0123456789'
466as_cr_alnum=$as_cr_Letters$as_cr_digits
Martin v. Löwiseba40652007-08-30 20:10:57 +0000467
468
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000469 as_lineno_1=$LINENO as_lineno_1a=$LINENO
470 as_lineno_2=$LINENO as_lineno_2a=$LINENO
471 eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
472 test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
473 # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
Martin v. Löwiseba40652007-08-30 20:10:57 +0000474 sed -n '
475 p
476 /[$]LINENO/=
477 ' <$as_myself |
Martin v. Löwis11437992002-04-12 09:54:03 +0000478 sed '
Martin v. Löwiseba40652007-08-30 20:10:57 +0000479 s/[$]LINENO.*/&-/
480 t lineno
481 b
482 :lineno
Martin v. Löwis11437992002-04-12 09:54:03 +0000483 N
Martin v. Löwiseba40652007-08-30 20:10:57 +0000484 :loop
485 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
Martin v. Löwis11437992002-04-12 09:54:03 +0000486 t loop
Martin v. Löwiseba40652007-08-30 20:10:57 +0000487 s/-\n.*//
Martin v. Löwis11437992002-04-12 09:54:03 +0000488 ' >$as_me.lineno &&
Martin v. Löwiseba40652007-08-30 20:10:57 +0000489 chmod +x "$as_me.lineno" ||
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000490 { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
Martin v. Löwis11437992002-04-12 09:54:03 +0000491
Charles-François Natalibe2b9072013-01-08 19:47:00 +0100492 # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
493 # already done that, so ensure we don't try to do so again and fall
494 # in an infinite loop. This has already happened in practice.
495 _as_can_reexec=no; export _as_can_reexec
Martin v. Löwis11437992002-04-12 09:54:03 +0000496 # Don't try to exec as it changes $[0], causing all sort of problems
497 # (the dirname of $[0] is not the place where we might find the
Martin v. Löwiseba40652007-08-30 20:10:57 +0000498 # original and so on. Autoconf is especially sensitive to this).
499 . "./$as_me.lineno"
Martin v. Löwis11437992002-04-12 09:54:03 +0000500 # Exit status is that of the last command.
501 exit
502}
503
Martin v. Löwiseba40652007-08-30 20:10:57 +0000504ECHO_C= ECHO_N= ECHO_T=
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000505case `echo -n x` in #(((((
Martin v. Löwiseba40652007-08-30 20:10:57 +0000506-n*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000507 case `echo 'xy\c'` in
Martin v. Löwiseba40652007-08-30 20:10:57 +0000508 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000509 xy) ECHO_C='\c';;
510 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
511 ECHO_T=' ';;
Martin v. Löwiseba40652007-08-30 20:10:57 +0000512 esac;;
513*)
514 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +0000515esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +0000516
Martin v. Löwis11437992002-04-12 09:54:03 +0000517rm -f conf$$ conf$$.exe conf$$.file
Martin v. Löwiseba40652007-08-30 20:10:57 +0000518if test -d conf$$.dir; then
519 rm -f conf$$.dir/conf$$.file
520else
521 rm -f conf$$.dir
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000522 mkdir conf$$.dir 2>/dev/null
Martin v. Löwiseba40652007-08-30 20:10:57 +0000523fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000524if (echo >conf$$.file) 2>/dev/null; then
525 if ln -s conf$$.file conf$$ 2>/dev/null; then
526 as_ln_s='ln -s'
527 # ... but there are two gotchas:
528 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
529 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
Charles-François Natalibe2b9072013-01-08 19:47:00 +0100530 # In both cases, we have to default to `cp -pR'.
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000531 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Charles-François Natalibe2b9072013-01-08 19:47:00 +0100532 as_ln_s='cp -pR'
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000533 elif ln conf$$.file conf$$ 2>/dev/null; then
534 as_ln_s=ln
535 else
Charles-François Natalibe2b9072013-01-08 19:47:00 +0100536 as_ln_s='cp -pR'
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000537 fi
Martin v. Löwis11437992002-04-12 09:54:03 +0000538else
Charles-François Natalibe2b9072013-01-08 19:47:00 +0100539 as_ln_s='cp -pR'
Martin v. Löwis11437992002-04-12 09:54:03 +0000540fi
Martin v. Löwiseba40652007-08-30 20:10:57 +0000541rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
542rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +0000543
Skip Montanaro6dead952003-09-25 14:50:04 +0000544if mkdir -p . 2>/dev/null; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000545 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +0000546else
Skip Montanarof0d5f792004-08-15 14:08:23 +0000547 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +0000548 as_mkdir_p=false
549fi
550
Charles-François Natalibe2b9072013-01-08 19:47:00 +0100551as_test_x='test -x'
552as_executable_p=as_fn_executable_p
Martin v. Löwis11437992002-04-12 09:54:03 +0000553
554# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +0000555as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +0000556
557# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +0000558as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +0000559
560
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000561test -n "$DJDIR" || exec 7<&0 </dev/null
562exec 6>&1
Martin v. Löwis11437992002-04-12 09:54:03 +0000563
564# Name of the host.
Georg Brandl71f4fbb2011-02-25 11:04:50 +0000565# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
Martin v. Löwis11437992002-04-12 09:54:03 +0000566# so uname gets run too.
567ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
568
Martin v. Löwis11437992002-04-12 09:54:03 +0000569#
570# Initializations.
571#
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000572ac_default_prefix=/usr/local
Martin v. Löwiseba40652007-08-30 20:10:57 +0000573ac_clean_files=
Skip Montanaro6dead952003-09-25 14:50:04 +0000574ac_config_libobj_dir=.
Martin v. Löwiseba40652007-08-30 20:10:57 +0000575LIBOBJS=
Martin v. Löwis11437992002-04-12 09:54:03 +0000576cross_compiling=no
577subdirs=
578MFLAGS=
579MAKEFLAGS=
Martin v. Löwis11437992002-04-12 09:54:03 +0000580
Martin v. Löwis11437992002-04-12 09:54:03 +0000581# Identity of this package.
Martin v. Löwis88afe662002-10-26 13:47:44 +0000582PACKAGE_NAME='python'
583PACKAGE_TARNAME='python'
Martin v. Löwis174440b2008-10-03 08:59:41 +0000584PACKAGE_VERSION='2.7'
585PACKAGE_STRING='python 2.7'
Georg Brandl464432d2009-05-20 18:24:08 +0000586PACKAGE_BUGREPORT='http://bugs.python.org/'
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000587PACKAGE_URL=''
Martin v. Löwis11437992002-04-12 09:54:03 +0000588
589ac_unique_file="Include/object.h"
590# Factoring default headers for most tests.
591ac_includes_default="\
592#include <stdio.h>
Martin v. Löwiseba40652007-08-30 20:10:57 +0000593#ifdef HAVE_SYS_TYPES_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000594# include <sys/types.h>
595#endif
Martin v. Löwiseba40652007-08-30 20:10:57 +0000596#ifdef HAVE_SYS_STAT_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000597# include <sys/stat.h>
598#endif
Martin v. Löwiseba40652007-08-30 20:10:57 +0000599#ifdef STDC_HEADERS
Martin v. Löwis11437992002-04-12 09:54:03 +0000600# include <stdlib.h>
601# include <stddef.h>
602#else
Martin v. Löwiseba40652007-08-30 20:10:57 +0000603# ifdef HAVE_STDLIB_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000604# include <stdlib.h>
605# endif
606#endif
Martin v. Löwiseba40652007-08-30 20:10:57 +0000607#ifdef HAVE_STRING_H
608# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000609# include <memory.h>
610# endif
611# include <string.h>
612#endif
Martin v. Löwiseba40652007-08-30 20:10:57 +0000613#ifdef HAVE_STRINGS_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000614# include <strings.h>
615#endif
Martin v. Löwiseba40652007-08-30 20:10:57 +0000616#ifdef HAVE_INTTYPES_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000617# include <inttypes.h>
Martin v. Löwis11437992002-04-12 09:54:03 +0000618#endif
Martin v. Löwiseba40652007-08-30 20:10:57 +0000619#ifdef HAVE_STDINT_H
620# include <stdint.h>
621#endif
622#ifdef HAVE_UNISTD_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000623# include <unistd.h>
624#endif"
625
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000626ac_subst_vars='LTLIBOBJS
Ned Deily3f1d0b32014-11-20 02:11:03 -0800627ENSUREPIP
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +0000628SRCDIRS
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000629THREADHEADERS
630UNICODE_OBJS
631LIBC
632LIBM
633HAVE_GETHOSTBYNAME
634HAVE_GETHOSTBYNAME_R
635HAVE_GETHOSTBYNAME_R_3_ARG
636HAVE_GETHOSTBYNAME_R_5_ARG
637HAVE_GETHOSTBYNAME_R_6_ARG
638LIBOBJS
639TRUE
640MACHDEP_OBJS
641DYNLOADFILE
642DLINCLDIR
643THREADOBJ
644LDLAST
645USE_THREAD_MODULE
646SIGNAL_OBJS
647USE_SIGNAL_MODULE
Ned Deilya2a9f572013-10-25 00:30:10 -0700648TCLTK_LIBS
649TCLTK_INCLUDES
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000650LIBFFI_INCLUDEDIR
Benjamin Peterson64e8f6e2014-12-15 00:00:23 -0500651PKG_CONFIG_LIBDIR
652PKG_CONFIG_PATH
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000653PKG_CONFIG
654SHLIBS
655CFLAGSFORSHARED
656LINKFORSHARED
657CCSHARED
658BLDSHARED
659LDCXXSHARED
660LDSHARED
661SO
662LIBTOOL_CRUFT
663OTHER_LIBTOOL_OPT
Brett Cannon4ff151a2015-09-18 15:09:42 -0700664LLVM_PROF_FOUND
665LLVM_PROF_ERR
666LLVM_PROF_FILE
667LLVM_PROF_MERGER
668PGO_PROF_USE_FLAG
669PGO_PROF_GEN_FLAG
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000670UNIVERSAL_ARCH_FLAGS
671BASECFLAGS
672OPT
673LN
Trent Nelsonf6407a12012-08-30 14:56:13 +0000674MKDIR_P
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000675INSTALL_DATA
676INSTALL_SCRIPT
677INSTALL_PROGRAM
Georg Brandl3a5508e2011-03-06 10:42:21 +0100678HAS_HG
679HGBRANCH
680HGTAG
681HGVERSION
Trent Nelsond86ceec2012-10-16 09:42:45 -0400682BASECPPFLAGS
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000683SVNVERSION
684ARFLAGS
doko@python.orgd65e2ba2013-01-31 23:52:03 +0100685ac_ct_AR
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000686AR
687RANLIB
688GNULD
689LINKCC
690RUNSHARED
691INSTSONAME
692LDLIBRARYDIR
693BLDLIBRARY
694DLLLIBRARY
695LDLIBRARY
696LIBRARY
697BUILDEXEEXT
698EGREP
699GREP
700CPP
doko@python.org4e63fbe2013-01-25 13:08:27 +0100701MULTIARCH
doko@python.orgd65e2ba2013-01-31 23:52:03 +0100702ac_ct_CXX
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000703MAINCC
704CXX
705OBJEXT
706EXEEXT
707ac_ct_CC
708CPPFLAGS
709LDFLAGS
710CFLAGS
711CC
712EXPORT_MACOSX_DEPLOYMENT_TARGET
713CONFIGURE_MACOSX_DEPLOYMENT_TARGET
714EXTRAMACHDEPPATH
715EXTRAPLATDIR
doko@ubuntu.coma50b0de2015-04-13 21:55:59 +0200716PLATDIR
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000717SGI_ABI
doko@python.orgd65e2ba2013-01-31 23:52:03 +0100718_PYTHON_HOST_PLATFORM
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000719MACHDEP
720FRAMEWORKINSTALLAPPSPREFIX
721FRAMEWORKUNIXTOOLSPREFIX
722FRAMEWORKALTINSTALLLAST
723FRAMEWORKALTINSTALLFIRST
724FRAMEWORKINSTALLLAST
725FRAMEWORKINSTALLFIRST
726PYTHONFRAMEWORKINSTALLDIR
727PYTHONFRAMEWORKPREFIX
728PYTHONFRAMEWORKDIR
729PYTHONFRAMEWORKIDENTIFIER
730PYTHONFRAMEWORK
731LIPO_32BIT_FLAGS
732ARCH_RUN_32BIT
733UNIVERSALSDK
734CONFIG_ARGS
735SOVERSION
736VERSION
doko@python.orgd65e2ba2013-01-31 23:52:03 +0100737PYTHON_FOR_BUILD
738host_os
739host_vendor
740host_cpu
741host
742build_os
743build_vendor
744build_cpu
745build
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000746target_alias
747host_alias
748build_alias
749LIBS
750ECHO_T
751ECHO_N
752ECHO_C
753DEFS
754mandir
755localedir
756libdir
757psdir
758pdfdir
759dvidir
760htmldir
761infodir
762docdir
763oldincludedir
764includedir
765localstatedir
766sharedstatedir
767sysconfdir
768datadir
769datarootdir
770libexecdir
771sbindir
772bindir
773program_transform_name
774prefix
775exec_prefix
776PACKAGE_URL
777PACKAGE_BUGREPORT
778PACKAGE_STRING
779PACKAGE_VERSION
780PACKAGE_TARNAME
781PACKAGE_NAME
782PATH_SEPARATOR
783SHELL'
Skip Montanaro6dead952003-09-25 14:50:04 +0000784ac_subst_files=''
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000785ac_user_opts='
786enable_option_checking
787enable_universalsdk
788with_universal_archs
789with_framework_name
790enable_framework
791with_gcc
Zachary Ware6ed42ea2015-12-21 11:43:03 -0600792with_icc
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000793with_cxx_main
794with_suffix
795enable_shared
796enable_profiling
797with_pydebug
798enable_toolbox_glue
799with_libs
800with_system_expat
801with_system_ffi
Ned Deilya2a9f572013-10-25 00:30:10 -0700802with_tcltk_includes
803with_tcltk_libs
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000804with_dbmliborder
805with_signal_module
806with_dec_threads
807with_threads
808with_thread
809with_pth
810enable_ipv6
811with_doc_strings
812with_tsc
813with_pymalloc
814with_valgrind
815with_wctype_functions
816with_fpectl
817with_libm
818with_libc
819enable_big_digits
820enable_unicode
Benjamin Peterson2c992a02015-05-28 12:45:31 -0500821with_computed_gotos
Ned Deily3f1d0b32014-11-20 02:11:03 -0800822with_ensurepip
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000823'
Martin v. Löwiseba40652007-08-30 20:10:57 +0000824 ac_precious_vars='build_alias
825host_alias
826target_alias
827CC
828CFLAGS
829LDFLAGS
830LIBS
831CPPFLAGS
Benjamin Peterson64e8f6e2014-12-15 00:00:23 -0500832CPP
833PKG_CONFIG
834PKG_CONFIG_PATH
835PKG_CONFIG_LIBDIR'
Martin v. Löwiseba40652007-08-30 20:10:57 +0000836
Guido van Rossum627b2d71993-12-24 10:39:16 +0000837
Guido van Rossum7f43da71994-08-01 12:15:30 +0000838# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000839ac_init_help=
840ac_init_version=false
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000841ac_unrecognized_opts=
842ac_unrecognized_sep=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000843# The variables have the same names as the options, with
844# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000845cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000846exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000847no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000848no_recursion=
849prefix=NONE
850program_prefix=NONE
851program_suffix=NONE
852program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000853silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000854site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000855srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000856verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000857x_includes=NONE
858x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000859
860# Installation directory options.
861# These are left unexpanded so users can "make install exec_prefix=/foo"
862# and all the variables that are supposed to be based on exec_prefix
863# by default will actually change.
864# Use braces instead of parens because sh, perl, etc. also accept them.
Martin v. Löwiseba40652007-08-30 20:10:57 +0000865# (The list follows the same order as the GNU Coding Standards.)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000866bindir='${exec_prefix}/bin'
867sbindir='${exec_prefix}/sbin'
868libexecdir='${exec_prefix}/libexec'
Martin v. Löwiseba40652007-08-30 20:10:57 +0000869datarootdir='${prefix}/share'
870datadir='${datarootdir}'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000871sysconfdir='${prefix}/etc'
872sharedstatedir='${prefix}/com'
873localstatedir='${prefix}/var'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000874includedir='${prefix}/include'
875oldincludedir='/usr/include'
Martin v. Löwiseba40652007-08-30 20:10:57 +0000876docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
877infodir='${datarootdir}/info'
878htmldir='${docdir}'
879dvidir='${docdir}'
880pdfdir='${docdir}'
881psdir='${docdir}'
882libdir='${exec_prefix}/lib'
883localedir='${datarootdir}/locale'
884mandir='${datarootdir}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000885
Guido van Rossum7f43da71994-08-01 12:15:30 +0000886ac_prev=
Martin v. Löwiseba40652007-08-30 20:10:57 +0000887ac_dashdash=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000888for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000889do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000890 # If the previous option needs an argument, assign it.
891 if test -n "$ac_prev"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +0000892 eval $ac_prev=\$ac_option
Guido van Rossum7f43da71994-08-01 12:15:30 +0000893 ac_prev=
894 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000895 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000896
Martin v. Löwiseba40652007-08-30 20:10:57 +0000897 case $ac_option in
Georg Brandl71f4fbb2011-02-25 11:04:50 +0000898 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
899 *=) ac_optarg= ;;
900 *) ac_optarg=yes ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +0000901 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000902
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000903 # Accept the important Cygnus configure options, so we can diagnose typos.
904
Martin v. Löwiseba40652007-08-30 20:10:57 +0000905 case $ac_dashdash$ac_option in
906 --)
907 ac_dashdash=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000908
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000909 -bindir | --bindir | --bindi | --bind | --bin | --bi)
910 ac_prev=bindir ;;
911 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000912 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000913
914 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000915 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000916 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000917 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000918
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000919 -cache-file | --cache-file | --cache-fil | --cache-fi \
920 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
921 ac_prev=cache_file ;;
922 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
923 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000924 cache_file=$ac_optarg ;;
925
926 --config-cache | -C)
927 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000928
Martin v. Löwiseba40652007-08-30 20:10:57 +0000929 -datadir | --datadir | --datadi | --datad)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000930 ac_prev=datadir ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +0000931 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000932 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000933
Martin v. Löwiseba40652007-08-30 20:10:57 +0000934 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
935 | --dataroo | --dataro | --datar)
936 ac_prev=datarootdir ;;
937 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
938 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
939 datarootdir=$ac_optarg ;;
940
Guido van Rossum7f43da71994-08-01 12:15:30 +0000941 -disable-* | --disable-*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000942 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000943 # Reject names that are not valid shell variable names.
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000944 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Georg Brandl71f4fbb2011-02-25 11:04:50 +0000945 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000946 ac_useropt_orig=$ac_useropt
947 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
948 case $ac_user_opts in
949 *"
950"enable_$ac_useropt"
951"*) ;;
952 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
953 ac_unrecognized_sep=', ';;
954 esac
955 eval enable_$ac_useropt=no ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +0000956
957 -docdir | --docdir | --docdi | --doc | --do)
958 ac_prev=docdir ;;
959 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
960 docdir=$ac_optarg ;;
961
962 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
963 ac_prev=dvidir ;;
964 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
965 dvidir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000966
967 -enable-* | --enable-*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000968 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000969 # Reject names that are not valid shell variable names.
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000970 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Georg Brandl71f4fbb2011-02-25 11:04:50 +0000971 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000972 ac_useropt_orig=$ac_useropt
973 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
974 case $ac_user_opts in
975 *"
976"enable_$ac_useropt"
977"*) ;;
978 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
979 ac_unrecognized_sep=', ';;
980 esac
981 eval enable_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000982
Guido van Rossum7f43da71994-08-01 12:15:30 +0000983 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
984 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
985 | --exec | --exe | --ex)
986 ac_prev=exec_prefix ;;
987 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
988 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
989 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000990 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000991
992 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000993 # Obsolete; use --with-gas.
994 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000995
Martin v. Löwis11437992002-04-12 09:54:03 +0000996 -help | --help | --hel | --he | -h)
997 ac_init_help=long ;;
998 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
999 ac_init_help=recursive ;;
1000 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1001 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001002
1003 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +00001004 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001005 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001006 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001007
Martin v. Löwiseba40652007-08-30 20:10:57 +00001008 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1009 ac_prev=htmldir ;;
1010 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1011 | --ht=*)
1012 htmldir=$ac_optarg ;;
1013
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001014 -includedir | --includedir | --includedi | --included | --include \
1015 | --includ | --inclu | --incl | --inc)
1016 ac_prev=includedir ;;
1017 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1018 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001019 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001020
1021 -infodir | --infodir | --infodi | --infod | --info | --inf)
1022 ac_prev=infodir ;;
1023 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001024 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001025
1026 -libdir | --libdir | --libdi | --libd)
1027 ac_prev=libdir ;;
1028 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001029 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001030
1031 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1032 | --libexe | --libex | --libe)
1033 ac_prev=libexecdir ;;
1034 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1035 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001036 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001037
Martin v. Löwiseba40652007-08-30 20:10:57 +00001038 -localedir | --localedir | --localedi | --localed | --locale)
1039 ac_prev=localedir ;;
1040 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1041 localedir=$ac_optarg ;;
1042
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001043 -localstatedir | --localstatedir | --localstatedi | --localstated \
Martin v. Löwiseba40652007-08-30 20:10:57 +00001044 | --localstate | --localstat | --localsta | --localst | --locals)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001045 ac_prev=localstatedir ;;
1046 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Martin v. Löwiseba40652007-08-30 20:10:57 +00001047 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001048 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001049
1050 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1051 ac_prev=mandir ;;
1052 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001053 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001054
Guido van Rossum7f43da71994-08-01 12:15:30 +00001055 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001056 # Obsolete; use --without-fp.
1057 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001058
1059 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +00001060 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +00001061 no_create=yes ;;
1062
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001063 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1064 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1065 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001066
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001067 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1068 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1069 | --oldin | --oldi | --old | --ol | --o)
1070 ac_prev=oldincludedir ;;
1071 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1072 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1073 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001074 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001075
Guido van Rossum7f43da71994-08-01 12:15:30 +00001076 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1077 ac_prev=prefix ;;
1078 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001079 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001080
1081 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1082 | --program-pre | --program-pr | --program-p)
1083 ac_prev=program_prefix ;;
1084 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1085 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001086 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001087
1088 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1089 | --program-suf | --program-su | --program-s)
1090 ac_prev=program_suffix ;;
1091 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1092 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001093 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001094
1095 -program-transform-name | --program-transform-name \
1096 | --program-transform-nam | --program-transform-na \
1097 | --program-transform-n | --program-transform- \
1098 | --program-transform | --program-transfor \
1099 | --program-transfo | --program-transf \
1100 | --program-trans | --program-tran \
1101 | --progr-tra | --program-tr | --program-t)
1102 ac_prev=program_transform_name ;;
1103 -program-transform-name=* | --program-transform-name=* \
1104 | --program-transform-nam=* | --program-transform-na=* \
1105 | --program-transform-n=* | --program-transform-=* \
1106 | --program-transform=* | --program-transfor=* \
1107 | --program-transfo=* | --program-transf=* \
1108 | --program-trans=* | --program-tran=* \
1109 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001110 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001111
Martin v. Löwiseba40652007-08-30 20:10:57 +00001112 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1113 ac_prev=pdfdir ;;
1114 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1115 pdfdir=$ac_optarg ;;
1116
1117 -psdir | --psdir | --psdi | --psd | --ps)
1118 ac_prev=psdir ;;
1119 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1120 psdir=$ac_optarg ;;
1121
Guido van Rossum7f43da71994-08-01 12:15:30 +00001122 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1123 | -silent | --silent | --silen | --sile | --sil)
1124 silent=yes ;;
1125
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001126 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1127 ac_prev=sbindir ;;
1128 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1129 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001130 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001131
1132 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1133 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1134 | --sharedst | --shareds | --shared | --share | --shar \
1135 | --sha | --sh)
1136 ac_prev=sharedstatedir ;;
1137 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1138 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1139 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1140 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001141 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001142
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001143 -site | --site | --sit)
1144 ac_prev=site ;;
1145 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001146 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001147
Guido van Rossum7f43da71994-08-01 12:15:30 +00001148 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1149 ac_prev=srcdir ;;
1150 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001151 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001152
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001153 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1154 | --syscon | --sysco | --sysc | --sys | --sy)
1155 ac_prev=sysconfdir ;;
1156 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1157 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001158 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001159
Guido van Rossum7f43da71994-08-01 12:15:30 +00001160 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +00001161 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001162 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001163 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001164
1165 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1166 verbose=yes ;;
1167
Martin v. Löwis11437992002-04-12 09:54:03 +00001168 -version | --version | --versio | --versi | --vers | -V)
1169 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001170
1171 -with-* | --with-*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001172 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001173 # Reject names that are not valid shell variable names.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001174 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001175 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001176 ac_useropt_orig=$ac_useropt
1177 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1178 case $ac_user_opts in
1179 *"
1180"with_$ac_useropt"
1181"*) ;;
1182 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1183 ac_unrecognized_sep=', ';;
1184 esac
1185 eval with_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001186
1187 -without-* | --without-*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001188 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001189 # Reject names that are not valid shell variable names.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001190 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001191 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001192 ac_useropt_orig=$ac_useropt
1193 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1194 case $ac_user_opts in
1195 *"
1196"with_$ac_useropt"
1197"*) ;;
1198 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1199 ac_unrecognized_sep=', ';;
1200 esac
1201 eval with_$ac_useropt=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001202
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001203 --x)
1204 # Obsolete; use --with-x.
1205 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001206
1207 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1208 | --x-incl | --x-inc | --x-in | --x-i)
1209 ac_prev=x_includes ;;
1210 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1211 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001212 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001213
1214 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1215 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1216 ac_prev=x_libraries ;;
1217 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1218 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001219 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001220
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001221 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1222Try \`$0 --help' for more information"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001223 ;;
1224
Martin v. Löwis11437992002-04-12 09:54:03 +00001225 *=*)
1226 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1227 # Reject names that are not valid shell variable names.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001228 case $ac_envvar in #(
1229 '' | [0-9]* | *[!_$as_cr_alnum]* )
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001230 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001231 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00001232 eval $ac_envvar=\$ac_optarg
Martin v. Löwis11437992002-04-12 09:54:03 +00001233 export $ac_envvar ;;
1234
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001235 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001236 # FIXME: should be removed in autoconf 3.0.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001237 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001238 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001239 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
Matthias Klose3cef2a92012-03-14 23:39:33 +01001240 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001241 ;;
1242
1243 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00001244done
1245
Guido van Rossum7f43da71994-08-01 12:15:30 +00001246if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001247 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001248 as_fn_error $? "missing argument to $ac_option"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001249fi
1250
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001251if test -n "$ac_unrecognized_opts"; then
1252 case $enable_option_checking in
1253 no) ;;
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001254 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001255 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1256 esac
1257fi
1258
1259# Check all directory arguments for consistency.
Martin v. Löwiseba40652007-08-30 20:10:57 +00001260for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1261 datadir sysconfdir sharedstatedir localstatedir includedir \
1262 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1263 libdir localedir mandir
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001264do
Martin v. Löwiseba40652007-08-30 20:10:57 +00001265 eval ac_val=\$$ac_var
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001266 # Remove trailing slashes.
1267 case $ac_val in
1268 */ )
1269 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1270 eval $ac_var=\$ac_val;;
1271 esac
1272 # Be sure to have absolute directory names.
Martin v. Löwis11437992002-04-12 09:54:03 +00001273 case $ac_val in
Martin v. Löwiseba40652007-08-30 20:10:57 +00001274 [\\/$]* | ?:[\\/]* ) continue;;
1275 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001276 esac
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001277 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
Martin v. Löwis11437992002-04-12 09:54:03 +00001278done
Guido van Rossum627b2d71993-12-24 10:39:16 +00001279
Martin v. Löwis11437992002-04-12 09:54:03 +00001280# There might be people who depend on the old broken behavior: `$host'
1281# used to hold the argument of --host etc.
1282# FIXME: To remove some day.
1283build=$build_alias
1284host=$host_alias
1285target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +00001286
Martin v. Löwis11437992002-04-12 09:54:03 +00001287# FIXME: To remove some day.
1288if test "x$host_alias" != x; then
1289 if test "x$build_alias" = x; then
1290 cross_compiling=maybe
Martin v. Löwis11437992002-04-12 09:54:03 +00001291 elif test "x$build_alias" != "x$host_alias"; then
1292 cross_compiling=yes
1293 fi
1294fi
1295
1296ac_tool_prefix=
1297test -n "$host_alias" && ac_tool_prefix=$host_alias-
1298
1299test "$silent" = yes && exec 6>/dev/null
1300
Guido van Rossum627b2d71993-12-24 10:39:16 +00001301
Martin v. Löwiseba40652007-08-30 20:10:57 +00001302ac_pwd=`pwd` && test -n "$ac_pwd" &&
1303ac_ls_di=`ls -di .` &&
1304ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001305 as_fn_error $? "working directory cannot be determined"
Martin v. Löwiseba40652007-08-30 20:10:57 +00001306test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001307 as_fn_error $? "pwd does not report name of working directory"
Martin v. Löwiseba40652007-08-30 20:10:57 +00001308
1309
Guido van Rossum627b2d71993-12-24 10:39:16 +00001310# Find the source files, if location was not specified.
1311if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001312 ac_srcdir_defaulted=yes
Martin v. Löwiseba40652007-08-30 20:10:57 +00001313 # Try the directory containing this script, then the parent directory.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001314 ac_confdir=`$as_dirname -- "$as_myself" ||
1315$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1316 X"$as_myself" : 'X\(//\)[^/]' \| \
1317 X"$as_myself" : 'X\(//\)$' \| \
1318 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1319$as_echo X"$as_myself" |
Martin v. Löwiseba40652007-08-30 20:10:57 +00001320 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1321 s//\1/
1322 q
1323 }
1324 /^X\(\/\/\)[^/].*/{
1325 s//\1/
1326 q
1327 }
1328 /^X\(\/\/\)$/{
1329 s//\1/
1330 q
1331 }
1332 /^X\(\/\).*/{
1333 s//\1/
1334 q
1335 }
1336 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001337 srcdir=$ac_confdir
Martin v. Löwiseba40652007-08-30 20:10:57 +00001338 if test ! -r "$srcdir/$ac_unique_file"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001339 srcdir=..
1340 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001341else
1342 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001343fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00001344if test ! -r "$srcdir/$ac_unique_file"; then
1345 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001346 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
Brett Cannon19fab762007-06-02 03:02:29 +00001347fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00001348ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1349ac_abs_confdir=`(
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001350 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
Martin v. Löwiseba40652007-08-30 20:10:57 +00001351 pwd)`
1352# When building in place, set srcdir=.
1353if test "$ac_abs_confdir" = "$ac_pwd"; then
1354 srcdir=.
1355fi
1356# Remove unnecessary trailing slashes from srcdir.
1357# Double slashes in file names in object file debugging info
1358# mess up M-x gdb in Emacs.
1359case $srcdir in
1360*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1361esac
1362for ac_var in $ac_precious_vars; do
1363 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1364 eval ac_env_${ac_var}_value=\$${ac_var}
1365 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1366 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1367done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001368
Martin v. Löwis11437992002-04-12 09:54:03 +00001369#
1370# Report the --help message.
1371#
1372if test "$ac_init_help" = "long"; then
1373 # Omit some internal or obsolete options to make the list less imposing.
1374 # This message is too long to be a string in the A/UX 3.1 sh.
1375 cat <<_ACEOF
Martin v. Löwis174440b2008-10-03 08:59:41 +00001376\`configure' configures python 2.7 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +00001377
1378Usage: $0 [OPTION]... [VAR=VALUE]...
1379
1380To assign environment variables (e.g., CC, CFLAGS...), specify them as
1381VAR=VALUE. See below for descriptions of some of the useful variables.
1382
1383Defaults for the options are specified in brackets.
1384
1385Configuration:
1386 -h, --help display this help and exit
1387 --help=short display options specific to this package
1388 --help=recursive display the short help of all the included packages
1389 -V, --version display version information and exit
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001390 -q, --quiet, --silent do not print \`checking ...' messages
Martin v. Löwis11437992002-04-12 09:54:03 +00001391 --cache-file=FILE cache test results in FILE [disabled]
1392 -C, --config-cache alias for \`--cache-file=config.cache'
1393 -n, --no-create do not create output files
1394 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1395
Martin v. Löwis11437992002-04-12 09:54:03 +00001396Installation directories:
1397 --prefix=PREFIX install architecture-independent files in PREFIX
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001398 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001399 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001400 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +00001401
1402By default, \`make install' will install all the files in
1403\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1404an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1405for instance \`--prefix=\$HOME'.
1406
1407For better control, use the options below.
1408
1409Fine tuning of the installation directories:
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001410 --bindir=DIR user executables [EPREFIX/bin]
1411 --sbindir=DIR system admin executables [EPREFIX/sbin]
1412 --libexecdir=DIR program executables [EPREFIX/libexec]
1413 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1414 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1415 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1416 --libdir=DIR object code libraries [EPREFIX/lib]
1417 --includedir=DIR C header files [PREFIX/include]
1418 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1419 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1420 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1421 --infodir=DIR info documentation [DATAROOTDIR/info]
1422 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1423 --mandir=DIR man documentation [DATAROOTDIR/man]
1424 --docdir=DIR documentation root [DATAROOTDIR/doc/python]
1425 --htmldir=DIR html documentation [DOCDIR]
1426 --dvidir=DIR dvi documentation [DOCDIR]
1427 --pdfdir=DIR pdf documentation [DOCDIR]
1428 --psdir=DIR ps documentation [DOCDIR]
Martin v. Löwis11437992002-04-12 09:54:03 +00001429_ACEOF
1430
1431 cat <<\_ACEOF
doko@python.orgd65e2ba2013-01-31 23:52:03 +01001432
1433System types:
1434 --build=BUILD configure for building on BUILD [guessed]
1435 --host=HOST cross-compile to build programs to run on HOST [BUILD]
Martin v. Löwis11437992002-04-12 09:54:03 +00001436_ACEOF
1437fi
1438
1439if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +00001440 case $ac_init_help in
Martin v. Löwis174440b2008-10-03 08:59:41 +00001441 short | recursive ) echo "Configuration of python 2.7:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +00001442 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001443 cat <<\_ACEOF
1444
1445Optional Features:
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001446 --disable-option-checking ignore unrecognized --enable/--with options
Martin v. Löwis11437992002-04-12 09:54:03 +00001447 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1448 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Brett Cannon91a1dec2008-02-13 19:15:44 +00001449 --enable-universalsdk[=SDKDIR]
Brett Cannon9a8bb0e2008-02-03 02:07:55 +00001450 Build against Mac OS X 10.4u SDK (ppc/i386)
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001451 --enable-framework[=INSTALLDIR]
1452 Build (MacOSX|Darwin) framework
1453 --enable-shared disable/enable building shared python library
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00001454 --enable-profiling enable C-level code profiling
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001455 --enable-toolbox-glue disable/enable MacOSX glue code for extensions
1456 --enable-ipv6 Enable ipv6 (with ipv4) support
1457 --disable-ipv6 Disable ipv6 support
Mark Dickinsonefc82f72009-03-20 15:51:55 +00001458 --enable-big-digits[=BITS]
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001459 use big digits for Python longs [[BITS=30]]
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001460 --enable-unicode[=ucs[24]]
Benjamin Peterson66556b02010-05-25 02:23:32 +00001461 Enable Unicode strings (default is ucs2)
Martin v. Löwis11437992002-04-12 09:54:03 +00001462
1463Optional Packages:
1464 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1465 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Ronald Oussoren5640ce22008-06-05 12:58:24 +00001466 --with-universal-archs=ARCH
1467 select architectures for universal build ("32-bit",
Ronald Oussoren23d92532009-09-07 06:12:00 +00001468 "64-bit", "3-way", "intel" or "all")
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00001469 --with-framework-name=FRAMEWORK
1470 specify an alternate name of the framework built
1471 with --enable-framework
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001472 --without-gcc never use gcc
Zachary Ware6ed42ea2015-12-21 11:43:03 -06001473 --with-icc build with icc
Martin v. Löwis0f48d982006-04-14 14:34:26 +00001474 --with-cxx-main=<compiler>
1475 compile main() and link python executable with C++
1476 compiler
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001477 --with-suffix=.exe set executable suffix
1478 --with-pydebug build with Py_DEBUG defined
1479 --with-libs='lib1 ...' link against additional libs
Benjamin Peterson2c196742009-12-31 03:17:18 +00001480 --with-system-expat build pyexpat module using an installed expat
1481 library
Martin v. Löwis9176fc12006-04-11 11:12:43 +00001482 --with-system-ffi build _ctypes module using an installed ffi library
Ned Deilya2a9f572013-10-25 00:30:10 -07001483 --with-tcltk-includes='-I...'
1484 override search for Tcl and Tk include files
1485 --with-tcltk-libs='-L...'
1486 override search for Tcl and Tk libs
Benjamin Peterson867475c2009-04-29 20:36:25 +00001487 --with-dbmliborder=db1:db2:...
1488 order to check db backends for dbm. Valid value is a
1489 colon separated string with the backend names
1490 `ndbm', `gdbm' and `bdb'.
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001491 --with-signal-module disable/enable signal module
1492 --with-dec-threads use DEC Alpha/OSF1 thread-safe libraries
1493 --with(out)-threads[=DIRECTORY]
1494 disable/enable thread support
1495 --with(out)-thread[=DIRECTORY]
1496 deprecated; use --with(out)-threads
1497 --with-pth use GNU pth threading libraries
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001498 --with(out)-doc-strings disable/enable documentation strings
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00001499 --with(out)-tsc enable/disable timestamp counter profile
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001500 --with(out)-pymalloc disable/enable specialized mallocs
Benjamin Peterson91c12eb2009-12-03 02:52:39 +00001501 --with-valgrind Enable Valgrind support
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001502 --with-wctype-functions use wctype.h functions
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001503 --with-fpectl enable SIGFPE catching
1504 --with-libm=STRING math library
1505 --with-libc=STRING C library
Benjamin Peterson2c992a02015-05-28 12:45:31 -05001506 --with(out)-computed-gotos
1507 Use computed gotos in evaluation loop (enabled by
1508 default on supported compilers)
Ned Deily3f1d0b32014-11-20 02:11:03 -08001509 --with(out)-ensurepip=[=OPTION]
1510 "install" or "upgrade" using bundled pip, default is
1511 "no"
Martin v. Löwis11437992002-04-12 09:54:03 +00001512
1513Some influential environment variables:
1514 CC C compiler command
1515 CFLAGS C compiler flags
1516 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1517 nonstandard directory <lib dir>
Martin v. Löwiseba40652007-08-30 20:10:57 +00001518 LIBS libraries to pass to the linker, e.g. -l<library>
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001519 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
Martin v. Löwiseba40652007-08-30 20:10:57 +00001520 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001521 CPP C preprocessor
Benjamin Peterson64e8f6e2014-12-15 00:00:23 -05001522 PKG_CONFIG path to pkg-config utility
1523 PKG_CONFIG_PATH
1524 directories to add to pkg-config's search path
1525 PKG_CONFIG_LIBDIR
1526 path overriding pkg-config's built-in search path
Martin v. Löwis11437992002-04-12 09:54:03 +00001527
1528Use these variables to override the choices made by `configure' or to help
1529it to find libraries and programs with nonstandard names/locations.
1530
Georg Brandl464432d2009-05-20 18:24:08 +00001531Report bugs to <http://bugs.python.org/>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001532_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00001533ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001534fi
1535
1536if test "$ac_init_help" = "recursive"; then
1537 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001538 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001539 test -d "$ac_dir" ||
1540 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1541 continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001542 ac_builddir=.
1543
Martin v. Löwiseba40652007-08-30 20:10:57 +00001544case "$ac_dir" in
1545.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1546*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001547 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Martin v. Löwiseba40652007-08-30 20:10:57 +00001548 # A ".." for each directory in $ac_dir_suffix.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001549 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Martin v. Löwiseba40652007-08-30 20:10:57 +00001550 case $ac_top_builddir_sub in
1551 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1552 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1553 esac ;;
1554esac
1555ac_abs_top_builddir=$ac_pwd
1556ac_abs_builddir=$ac_pwd$ac_dir_suffix
1557# for backward compatibility:
1558ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001559
1560case $srcdir in
Martin v. Löwiseba40652007-08-30 20:10:57 +00001561 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001562 ac_srcdir=.
Martin v. Löwiseba40652007-08-30 20:10:57 +00001563 ac_top_srcdir=$ac_top_builddir_sub
1564 ac_abs_top_srcdir=$ac_pwd ;;
1565 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001566 ac_srcdir=$srcdir$ac_dir_suffix;
Martin v. Löwiseba40652007-08-30 20:10:57 +00001567 ac_top_srcdir=$srcdir
1568 ac_abs_top_srcdir=$srcdir ;;
1569 *) # Relative name.
1570 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1571 ac_top_srcdir=$ac_top_build_prefix$srcdir
1572 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001573esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00001574ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001575
Martin v. Löwiseba40652007-08-30 20:10:57 +00001576 cd "$ac_dir" || { ac_status=$?; continue; }
1577 # Check for guested configure.
1578 if test -f "$ac_srcdir/configure.gnu"; then
1579 echo &&
1580 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1581 elif test -f "$ac_srcdir/configure"; then
1582 echo &&
1583 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001584 else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001585 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Martin v. Löwiseba40652007-08-30 20:10:57 +00001586 fi || ac_status=$?
1587 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001588 done
1589fi
1590
Martin v. Löwiseba40652007-08-30 20:10:57 +00001591test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001592if $ac_init_version; then
1593 cat <<\_ACEOF
Martin v. Löwis174440b2008-10-03 08:59:41 +00001594python configure 2.7
Charles-François Natalibe2b9072013-01-08 19:47:00 +01001595generated by GNU Autoconf 2.69
Martin v. Löwis11437992002-04-12 09:54:03 +00001596
Charles-François Natalibe2b9072013-01-08 19:47:00 +01001597Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001598This configure script is free software; the Free Software Foundation
1599gives unlimited permission to copy, distribute and modify it.
1600_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00001601 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001602fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001603
1604## ------------------------ ##
1605## Autoconf initialization. ##
1606## ------------------------ ##
1607
1608# ac_fn_c_try_compile LINENO
1609# --------------------------
1610# Try to compile conftest.$ac_ext, and return whether this succeeded.
1611ac_fn_c_try_compile ()
1612{
1613 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1614 rm -f conftest.$ac_objext
1615 if { { ac_try="$ac_compile"
1616case "(($ac_try" in
1617 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1618 *) ac_try_echo=$ac_try;;
1619esac
1620eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1621$as_echo "$ac_try_echo"; } >&5
1622 (eval "$ac_compile") 2>conftest.err
1623 ac_status=$?
1624 if test -s conftest.err; then
1625 grep -v '^ *+' conftest.err >conftest.er1
1626 cat conftest.er1 >&5
1627 mv -f conftest.er1 conftest.err
1628 fi
1629 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1630 test $ac_status = 0; } && {
1631 test -z "$ac_c_werror_flag" ||
1632 test ! -s conftest.err
1633 } && test -s conftest.$ac_objext; then :
1634 ac_retval=0
1635else
1636 $as_echo "$as_me: failed program was:" >&5
1637sed 's/^/| /' conftest.$ac_ext >&5
1638
1639 ac_retval=1
1640fi
Matthias Klose3cef2a92012-03-14 23:39:33 +01001641 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001642 as_fn_set_status $ac_retval
1643
1644} # ac_fn_c_try_compile
1645
1646# ac_fn_c_try_cpp LINENO
1647# ----------------------
1648# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1649ac_fn_c_try_cpp ()
1650{
1651 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1652 if { { ac_try="$ac_cpp conftest.$ac_ext"
1653case "(($ac_try" in
1654 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1655 *) ac_try_echo=$ac_try;;
1656esac
1657eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1658$as_echo "$ac_try_echo"; } >&5
1659 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1660 ac_status=$?
1661 if test -s conftest.err; then
1662 grep -v '^ *+' conftest.err >conftest.er1
1663 cat conftest.er1 >&5
1664 mv -f conftest.er1 conftest.err
1665 fi
1666 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001667 test $ac_status = 0; } > conftest.i && {
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001668 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1669 test ! -s conftest.err
1670 }; then :
1671 ac_retval=0
1672else
1673 $as_echo "$as_me: failed program was:" >&5
1674sed 's/^/| /' conftest.$ac_ext >&5
1675
1676 ac_retval=1
1677fi
Matthias Klose3cef2a92012-03-14 23:39:33 +01001678 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001679 as_fn_set_status $ac_retval
1680
1681} # ac_fn_c_try_cpp
1682
1683# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1684# -------------------------------------------------------
1685# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1686# the include files in INCLUDES and setting the cache variable VAR
1687# accordingly.
1688ac_fn_c_check_header_mongrel ()
1689{
1690 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Matthias Klose3cef2a92012-03-14 23:39:33 +01001691 if eval \${$3+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001692 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1693$as_echo_n "checking for $2... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01001694if eval \${$3+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001695 $as_echo_n "(cached) " >&6
1696fi
1697eval ac_res=\$$3
1698 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1699$as_echo "$ac_res" >&6; }
1700else
1701 # Is the header compilable?
1702{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1703$as_echo_n "checking $2 usability... " >&6; }
1704cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1705/* end confdefs.h. */
1706$4
1707#include <$2>
1708_ACEOF
1709if ac_fn_c_try_compile "$LINENO"; then :
1710 ac_header_compiler=yes
1711else
1712 ac_header_compiler=no
1713fi
1714rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1715{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1716$as_echo "$ac_header_compiler" >&6; }
1717
1718# Is the header present?
1719{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1720$as_echo_n "checking $2 presence... " >&6; }
1721cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1722/* end confdefs.h. */
1723#include <$2>
1724_ACEOF
1725if ac_fn_c_try_cpp "$LINENO"; then :
1726 ac_header_preproc=yes
1727else
1728 ac_header_preproc=no
1729fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001730rm -f conftest.err conftest.i conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001731{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1732$as_echo "$ac_header_preproc" >&6; }
1733
1734# So? What about this header?
1735case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1736 yes:no: )
1737 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1738$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1739 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1740$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1741 ;;
1742 no:yes:* )
1743 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1744$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1745 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1746$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1747 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1748$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1749 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1750$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1751 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1752$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001753( $as_echo "## -------------------------------------- ##
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001754## Report this to http://bugs.python.org/ ##
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001755## -------------------------------------- ##"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001756 ) | sed "s/^/$as_me: WARNING: /" >&2
1757 ;;
1758esac
1759 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1760$as_echo_n "checking for $2... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01001761if eval \${$3+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001762 $as_echo_n "(cached) " >&6
1763else
1764 eval "$3=\$ac_header_compiler"
1765fi
1766eval ac_res=\$$3
1767 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1768$as_echo "$ac_res" >&6; }
1769fi
Matthias Klose3cef2a92012-03-14 23:39:33 +01001770 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001771
1772} # ac_fn_c_check_header_mongrel
1773
1774# ac_fn_c_try_run LINENO
1775# ----------------------
1776# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1777# that executables *can* be run.
1778ac_fn_c_try_run ()
1779{
1780 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1781 if { { ac_try="$ac_link"
1782case "(($ac_try" in
1783 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1784 *) ac_try_echo=$ac_try;;
1785esac
1786eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1787$as_echo "$ac_try_echo"; } >&5
1788 (eval "$ac_link") 2>&5
1789 ac_status=$?
1790 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1791 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1792 { { case "(($ac_try" in
1793 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1794 *) ac_try_echo=$ac_try;;
1795esac
1796eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1797$as_echo "$ac_try_echo"; } >&5
1798 (eval "$ac_try") 2>&5
1799 ac_status=$?
1800 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1801 test $ac_status = 0; }; }; then :
1802 ac_retval=0
1803else
1804 $as_echo "$as_me: program exited with status $ac_status" >&5
1805 $as_echo "$as_me: failed program was:" >&5
1806sed 's/^/| /' conftest.$ac_ext >&5
1807
1808 ac_retval=$ac_status
1809fi
1810 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Matthias Klose3cef2a92012-03-14 23:39:33 +01001811 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001812 as_fn_set_status $ac_retval
1813
1814} # ac_fn_c_try_run
1815
1816# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1817# -------------------------------------------------------
1818# Tests whether HEADER exists and can be compiled using the include files in
1819# INCLUDES, setting the cache variable VAR accordingly.
1820ac_fn_c_check_header_compile ()
1821{
1822 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1823 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1824$as_echo_n "checking for $2... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01001825if eval \${$3+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001826 $as_echo_n "(cached) " >&6
1827else
1828 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1829/* end confdefs.h. */
1830$4
1831#include <$2>
1832_ACEOF
1833if ac_fn_c_try_compile "$LINENO"; then :
1834 eval "$3=yes"
1835else
1836 eval "$3=no"
1837fi
1838rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1839fi
1840eval ac_res=\$$3
1841 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1842$as_echo "$ac_res" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01001843 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001844
1845} # ac_fn_c_check_header_compile
1846
1847# ac_fn_c_try_link LINENO
1848# -----------------------
1849# Try to link conftest.$ac_ext, and return whether this succeeded.
1850ac_fn_c_try_link ()
1851{
1852 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1853 rm -f conftest.$ac_objext conftest$ac_exeext
1854 if { { ac_try="$ac_link"
1855case "(($ac_try" in
1856 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1857 *) ac_try_echo=$ac_try;;
1858esac
1859eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1860$as_echo "$ac_try_echo"; } >&5
1861 (eval "$ac_link") 2>conftest.err
1862 ac_status=$?
1863 if test -s conftest.err; then
1864 grep -v '^ *+' conftest.err >conftest.er1
1865 cat conftest.er1 >&5
1866 mv -f conftest.er1 conftest.err
1867 fi
1868 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1869 test $ac_status = 0; } && {
1870 test -z "$ac_c_werror_flag" ||
1871 test ! -s conftest.err
1872 } && test -s conftest$ac_exeext && {
1873 test "$cross_compiling" = yes ||
Charles-François Natalibe2b9072013-01-08 19:47:00 +01001874 test -x conftest$ac_exeext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001875 }; then :
1876 ac_retval=0
1877else
1878 $as_echo "$as_me: failed program was:" >&5
1879sed 's/^/| /' conftest.$ac_ext >&5
1880
1881 ac_retval=1
1882fi
1883 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1884 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1885 # interfere with the next link command; also delete a directory that is
1886 # left behind by Apple's compiler. We do this before executing the actions.
1887 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Matthias Klose3cef2a92012-03-14 23:39:33 +01001888 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001889 as_fn_set_status $ac_retval
1890
1891} # ac_fn_c_try_link
1892
1893# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
1894# -------------------------------------------
1895# Tests whether TYPE exists after having included INCLUDES, setting cache
1896# variable VAR accordingly.
1897ac_fn_c_check_type ()
1898{
1899 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1900 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1901$as_echo_n "checking for $2... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01001902if eval \${$3+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001903 $as_echo_n "(cached) " >&6
1904else
1905 eval "$3=no"
1906 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1907/* end confdefs.h. */
1908$4
1909int
1910main ()
1911{
1912if (sizeof ($2))
1913 return 0;
1914 ;
1915 return 0;
1916}
1917_ACEOF
1918if ac_fn_c_try_compile "$LINENO"; then :
1919 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1920/* end confdefs.h. */
1921$4
1922int
1923main ()
1924{
1925if (sizeof (($2)))
1926 return 0;
1927 ;
1928 return 0;
1929}
1930_ACEOF
1931if ac_fn_c_try_compile "$LINENO"; then :
1932
1933else
1934 eval "$3=yes"
1935fi
1936rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1937fi
1938rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1939fi
1940eval ac_res=\$$3
1941 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1942$as_echo "$ac_res" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01001943 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001944
1945} # ac_fn_c_check_type
1946
1947# ac_fn_c_find_uintX_t LINENO BITS VAR
1948# ------------------------------------
1949# Finds an unsigned integer type with width BITS, setting cache variable VAR
1950# accordingly.
1951ac_fn_c_find_uintX_t ()
1952{
1953 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1954 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uint$2_t" >&5
1955$as_echo_n "checking for uint$2_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01001956if eval \${$3+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001957 $as_echo_n "(cached) " >&6
1958else
1959 eval "$3=no"
1960 # Order is important - never check a type that is potentially smaller
1961 # than half of the expected target width.
1962 for ac_type in uint$2_t 'unsigned int' 'unsigned long int' \
1963 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
1964 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1965/* end confdefs.h. */
1966$ac_includes_default
1967int
1968main ()
1969{
1970static int test_array [1 - 2 * !((($ac_type) -1 >> ($2 / 2 - 1)) >> ($2 / 2 - 1) == 3)];
Charles-François Natalibe2b9072013-01-08 19:47:00 +01001971test_array [0] = 0;
1972return test_array [0];
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001973
1974 ;
1975 return 0;
1976}
1977_ACEOF
1978if ac_fn_c_try_compile "$LINENO"; then :
1979 case $ac_type in #(
1980 uint$2_t) :
1981 eval "$3=yes" ;; #(
1982 *) :
1983 eval "$3=\$ac_type" ;;
1984esac
1985fi
1986rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001987 if eval test \"x\$"$3"\" = x"no"; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001988
1989else
1990 break
1991fi
1992 done
1993fi
1994eval ac_res=\$$3
1995 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1996$as_echo "$ac_res" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01001997 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001998
1999} # ac_fn_c_find_uintX_t
2000
2001# ac_fn_c_find_intX_t LINENO BITS VAR
2002# -----------------------------------
2003# Finds a signed integer type with width BITS, setting cache variable VAR
2004# accordingly.
2005ac_fn_c_find_intX_t ()
2006{
2007 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2008 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for int$2_t" >&5
2009$as_echo_n "checking for int$2_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01002010if eval \${$3+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002011 $as_echo_n "(cached) " >&6
2012else
2013 eval "$3=no"
2014 # Order is important - never check a type that is potentially smaller
2015 # than half of the expected target width.
2016 for ac_type in int$2_t 'int' 'long int' \
2017 'long long int' 'short int' 'signed char'; do
2018 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2019/* end confdefs.h. */
2020$ac_includes_default
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002021 enum { N = $2 / 2 - 1 };
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002022int
2023main ()
2024{
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002025static 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 +01002026test_array [0] = 0;
2027return test_array [0];
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002028
2029 ;
2030 return 0;
2031}
2032_ACEOF
2033if ac_fn_c_try_compile "$LINENO"; then :
2034 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2035/* end confdefs.h. */
2036$ac_includes_default
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002037 enum { N = $2 / 2 - 1 };
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002038int
2039main ()
2040{
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002041static int test_array [1 - 2 * !(($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002042 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 2))];
Charles-François Natalibe2b9072013-01-08 19:47:00 +01002043test_array [0] = 0;
2044return test_array [0];
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002045
2046 ;
2047 return 0;
2048}
2049_ACEOF
2050if ac_fn_c_try_compile "$LINENO"; then :
2051
2052else
2053 case $ac_type in #(
2054 int$2_t) :
2055 eval "$3=yes" ;; #(
2056 *) :
2057 eval "$3=\$ac_type" ;;
2058esac
2059fi
2060rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2061fi
2062rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002063 if eval test \"x\$"$3"\" = x"no"; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002064
2065else
2066 break
2067fi
2068 done
2069fi
2070eval ac_res=\$$3
2071 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2072$as_echo "$ac_res" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01002073 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002074
2075} # ac_fn_c_find_intX_t
2076
2077# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2078# --------------------------------------------
2079# Tries to find the compile-time value of EXPR in a program that includes
2080# INCLUDES, setting VAR accordingly. Returns whether the value could be
2081# computed
2082ac_fn_c_compute_int ()
2083{
2084 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2085 if test "$cross_compiling" = yes; then
2086 # Depending upon the size, compute the lo and hi bounds.
2087cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2088/* end confdefs.h. */
2089$4
2090int
2091main ()
2092{
2093static int test_array [1 - 2 * !(($2) >= 0)];
Charles-François Natalibe2b9072013-01-08 19:47:00 +01002094test_array [0] = 0;
2095return test_array [0];
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002096
2097 ;
2098 return 0;
2099}
2100_ACEOF
2101if ac_fn_c_try_compile "$LINENO"; then :
2102 ac_lo=0 ac_mid=0
2103 while :; do
2104 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2105/* end confdefs.h. */
2106$4
2107int
2108main ()
2109{
2110static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Charles-François Natalibe2b9072013-01-08 19:47:00 +01002111test_array [0] = 0;
2112return test_array [0];
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002113
2114 ;
2115 return 0;
2116}
2117_ACEOF
2118if ac_fn_c_try_compile "$LINENO"; then :
2119 ac_hi=$ac_mid; break
2120else
2121 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2122 if test $ac_lo -le $ac_mid; then
2123 ac_lo= ac_hi=
2124 break
2125 fi
2126 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2127fi
2128rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2129 done
2130else
2131 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2132/* end confdefs.h. */
2133$4
2134int
2135main ()
2136{
2137static int test_array [1 - 2 * !(($2) < 0)];
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=-1 ac_mid=-1
2147 while :; do
2148 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2149/* end confdefs.h. */
2150$4
2151int
2152main ()
2153{
2154static int test_array [1 - 2 * !(($2) >= $ac_mid)];
Charles-François Natalibe2b9072013-01-08 19:47:00 +01002155test_array [0] = 0;
2156return test_array [0];
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002157
2158 ;
2159 return 0;
2160}
2161_ACEOF
2162if ac_fn_c_try_compile "$LINENO"; then :
2163 ac_lo=$ac_mid; break
2164else
2165 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2166 if test $ac_mid -le $ac_hi; then
2167 ac_lo= ac_hi=
2168 break
2169 fi
2170 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2171fi
2172rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2173 done
2174else
2175 ac_lo= ac_hi=
2176fi
2177rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2178fi
2179rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2180# Binary search between lo and hi bounds.
2181while test "x$ac_lo" != "x$ac_hi"; do
2182 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2183 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2184/* end confdefs.h. */
2185$4
2186int
2187main ()
2188{
2189static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Charles-François Natalibe2b9072013-01-08 19:47:00 +01002190test_array [0] = 0;
2191return test_array [0];
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002192
2193 ;
2194 return 0;
2195}
2196_ACEOF
2197if ac_fn_c_try_compile "$LINENO"; then :
2198 ac_hi=$ac_mid
2199else
2200 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2201fi
2202rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2203done
2204case $ac_lo in #((
2205?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2206'') ac_retval=1 ;;
2207esac
2208 else
2209 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2210/* end confdefs.h. */
2211$4
2212static long int longval () { return $2; }
2213static unsigned long int ulongval () { return $2; }
2214#include <stdio.h>
2215#include <stdlib.h>
2216int
2217main ()
2218{
2219
2220 FILE *f = fopen ("conftest.val", "w");
2221 if (! f)
2222 return 1;
2223 if (($2) < 0)
2224 {
2225 long int i = longval ();
2226 if (i != ($2))
2227 return 1;
2228 fprintf (f, "%ld", i);
2229 }
2230 else
2231 {
2232 unsigned long int i = ulongval ();
2233 if (i != ($2))
2234 return 1;
2235 fprintf (f, "%lu", i);
2236 }
2237 /* Do not output a trailing newline, as this causes \r\n confusion
2238 on some platforms. */
2239 return ferror (f) || fclose (f) != 0;
2240
2241 ;
2242 return 0;
2243}
2244_ACEOF
2245if ac_fn_c_try_run "$LINENO"; then :
2246 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2247else
2248 ac_retval=1
2249fi
2250rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2251 conftest.$ac_objext conftest.beam conftest.$ac_ext
2252rm -f conftest.val
2253
2254 fi
Matthias Klose3cef2a92012-03-14 23:39:33 +01002255 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002256 as_fn_set_status $ac_retval
2257
2258} # ac_fn_c_compute_int
2259
2260# ac_fn_c_check_func LINENO FUNC VAR
2261# ----------------------------------
2262# Tests whether FUNC exists, setting the cache variable VAR accordingly
2263ac_fn_c_check_func ()
2264{
2265 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2266 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2267$as_echo_n "checking for $2... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01002268if eval \${$3+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002269 $as_echo_n "(cached) " >&6
2270else
2271 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2272/* end confdefs.h. */
2273/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2274 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2275#define $2 innocuous_$2
2276
2277/* System header to define __stub macros and hopefully few prototypes,
2278 which can conflict with char $2 (); below.
2279 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2280 <limits.h> exists even on freestanding compilers. */
2281
2282#ifdef __STDC__
2283# include <limits.h>
2284#else
2285# include <assert.h>
2286#endif
2287
2288#undef $2
2289
2290/* Override any GCC internal prototype to avoid an error.
2291 Use char because int might match the return type of a GCC
2292 builtin and then its argument prototype would still apply. */
2293#ifdef __cplusplus
2294extern "C"
2295#endif
2296char $2 ();
2297/* The GNU C library defines this for functions which it implements
2298 to always fail with ENOSYS. Some functions are actually named
2299 something starting with __ and the normal name is an alias. */
2300#if defined __stub_$2 || defined __stub___$2
2301choke me
2302#endif
2303
2304int
2305main ()
2306{
2307return $2 ();
2308 ;
2309 return 0;
2310}
2311_ACEOF
2312if ac_fn_c_try_link "$LINENO"; then :
2313 eval "$3=yes"
2314else
2315 eval "$3=no"
2316fi
2317rm -f core conftest.err conftest.$ac_objext \
2318 conftest$ac_exeext conftest.$ac_ext
2319fi
2320eval ac_res=\$$3
2321 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2322$as_echo "$ac_res" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01002323 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002324
2325} # ac_fn_c_check_func
2326
2327# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2328# ----------------------------------------------------
2329# Tries to find if the field MEMBER exists in type AGGR, after including
2330# INCLUDES, setting cache variable VAR accordingly.
2331ac_fn_c_check_member ()
2332{
2333 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2334 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2335$as_echo_n "checking for $2.$3... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01002336if eval \${$4+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002337 $as_echo_n "(cached) " >&6
2338else
2339 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2340/* end confdefs.h. */
2341$5
2342int
2343main ()
2344{
2345static $2 ac_aggr;
2346if (ac_aggr.$3)
2347return 0;
2348 ;
2349 return 0;
2350}
2351_ACEOF
2352if ac_fn_c_try_compile "$LINENO"; then :
2353 eval "$4=yes"
2354else
2355 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2356/* end confdefs.h. */
2357$5
2358int
2359main ()
2360{
2361static $2 ac_aggr;
2362if (sizeof ac_aggr.$3)
2363return 0;
2364 ;
2365 return 0;
2366}
2367_ACEOF
2368if ac_fn_c_try_compile "$LINENO"; then :
2369 eval "$4=yes"
2370else
2371 eval "$4=no"
2372fi
2373rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2374fi
2375rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2376fi
2377eval ac_res=\$$4
2378 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2379$as_echo "$ac_res" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01002380 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002381
2382} # ac_fn_c_check_member
2383
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002384# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2385# ---------------------------------------------
2386# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2387# accordingly.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002388ac_fn_c_check_decl ()
2389{
2390 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002391 as_decl_name=`echo $2|sed 's/ *(.*//'`
2392 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2393 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2394$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01002395if eval \${$3+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002396 $as_echo_n "(cached) " >&6
2397else
2398 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2399/* end confdefs.h. */
2400$4
2401int
2402main ()
2403{
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002404#ifndef $as_decl_name
2405#ifdef __cplusplus
2406 (void) $as_decl_use;
2407#else
2408 (void) $as_decl_name;
2409#endif
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002410#endif
2411
2412 ;
2413 return 0;
2414}
2415_ACEOF
2416if ac_fn_c_try_compile "$LINENO"; then :
2417 eval "$3=yes"
2418else
2419 eval "$3=no"
2420fi
2421rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2422fi
2423eval ac_res=\$$3
2424 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2425$as_echo "$ac_res" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01002426 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002427
2428} # ac_fn_c_check_decl
Martin v. Löwiseba40652007-08-30 20:10:57 +00002429cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00002430This file contains any messages produced by compilers while
2431running configure, to aid debugging if configure makes a mistake.
2432
Martin v. Löwis174440b2008-10-03 08:59:41 +00002433It was created by python $as_me 2.7, which was
Charles-François Natalibe2b9072013-01-08 19:47:00 +01002434generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00002435
2436 $ $0 $@
2437
2438_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00002439exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00002440{
2441cat <<_ASUNAME
2442## --------- ##
2443## Platform. ##
2444## --------- ##
2445
2446hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2447uname -m = `(uname -m) 2>/dev/null || echo unknown`
2448uname -r = `(uname -r) 2>/dev/null || echo unknown`
2449uname -s = `(uname -s) 2>/dev/null || echo unknown`
2450uname -v = `(uname -v) 2>/dev/null || echo unknown`
2451
2452/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2453/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2454
2455/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2456/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2457/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Martin v. Löwiseba40652007-08-30 20:10:57 +00002458/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00002459/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2460/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2461/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2462
2463_ASUNAME
2464
2465as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2466for as_dir in $PATH
2467do
2468 IFS=$as_save_IFS
2469 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002470 $as_echo "PATH: $as_dir"
2471 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002472IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002473
2474} >&5
2475
2476cat >&5 <<_ACEOF
2477
2478
2479## ----------- ##
2480## Core tests. ##
2481## ----------- ##
2482
2483_ACEOF
2484
2485
2486# Keep a trace of the command line.
2487# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00002488# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00002489# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00002490# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00002491ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00002492ac_configure_args0=
2493ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00002494ac_must_keep_next=false
2495for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00002496do
Skip Montanaro6dead952003-09-25 14:50:04 +00002497 for ac_arg
2498 do
2499 case $ac_arg in
2500 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2501 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2502 | -silent | --silent | --silen | --sile | --sil)
2503 continue ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00002504 *\'*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002505 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002506 esac
2507 case $ac_pass in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002508 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002509 2)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002510 as_fn_append ac_configure_args1 " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002511 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002512 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00002513 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00002514 case $ac_arg in
2515 *=* | --config-cache | -C | -disable-* | --disable-* \
2516 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2517 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2518 | -with-* | --with-* | -without-* | --without-* | --x)
2519 case "$ac_configure_args0 " in
2520 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2521 esac
2522 ;;
2523 -* ) ac_must_keep_next=true ;;
2524 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00002525 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002526 as_fn_append ac_configure_args " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002527 ;;
2528 esac
2529 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002530done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002531{ ac_configure_args0=; unset ac_configure_args0;}
2532{ ac_configure_args1=; unset ac_configure_args1;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002533
2534# When interrupted or exit'd, cleanup temporary files, and complete
2535# config.log. We remove comments because anyway the quotes in there
2536# would cause problems or look ugly.
Martin v. Löwiseba40652007-08-30 20:10:57 +00002537# WARNING: Use '\'' to represent an apostrophe within the trap.
2538# 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 +00002539trap 'exit_status=$?
2540 # Save into config.log some information that might help in debugging.
2541 {
2542 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002543
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002544 $as_echo "## ---------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002545## Cache variables. ##
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002546## ---------------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002547 echo
2548 # The following way of writing the cache mishandles newlines in values,
Martin v. Löwiseba40652007-08-30 20:10:57 +00002549(
2550 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2551 eval ac_val=\$$ac_var
2552 case $ac_val in #(
2553 *${as_nl}*)
2554 case $ac_var in #(
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002555 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2556$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00002557 esac
2558 case $ac_var in #(
2559 _ | IFS | as_nl) ;; #(
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002560 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2561 *) { eval $ac_var=; unset $ac_var;} ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00002562 esac ;;
2563 esac
2564 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002565 (set) 2>&1 |
Martin v. Löwiseba40652007-08-30 20:10:57 +00002566 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2567 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00002568 sed -n \
Martin v. Löwiseba40652007-08-30 20:10:57 +00002569 "s/'\''/'\''\\\\'\'''\''/g;
2570 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2571 ;; #(
Skip Montanaro89e975f2007-08-22 19:05:21 +00002572 *)
Martin v. Löwiseba40652007-08-30 20:10:57 +00002573 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaro89e975f2007-08-22 19:05:21 +00002574 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00002575 esac |
2576 sort
2577)
Martin v. Löwis11437992002-04-12 09:54:03 +00002578 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002579
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002580 $as_echo "## ----------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00002581## Output variables. ##
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002582## ----------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002583 echo
2584 for ac_var in $ac_subst_vars
2585 do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002586 eval ac_val=\$$ac_var
2587 case $ac_val in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002588 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00002589 esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002590 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002591 done | sort
2592 echo
2593
2594 if test -n "$ac_subst_files"; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002595 $as_echo "## ------------------- ##
Martin v. Löwiseba40652007-08-30 20:10:57 +00002596## File substitutions. ##
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002597## ------------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002598 echo
2599 for ac_var in $ac_subst_files
2600 do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002601 eval ac_val=\$$ac_var
2602 case $ac_val in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002603 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00002604 esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002605 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002606 done | sort
2607 echo
2608 fi
2609
Martin v. Löwis11437992002-04-12 09:54:03 +00002610 if test -s confdefs.h; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002611 $as_echo "## ----------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002612## confdefs.h. ##
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002613## ----------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002614 echo
Martin v. Löwiseba40652007-08-30 20:10:57 +00002615 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002616 echo
2617 fi
2618 test "$ac_signal" != 0 &&
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002619 $as_echo "$as_me: caught signal $ac_signal"
2620 $as_echo "$as_me: exit $exit_status"
Martin v. Löwis11437992002-04-12 09:54:03 +00002621 } >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00002622 rm -f core *.core core.conftest.* &&
2623 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00002624 exit $exit_status
Martin v. Löwiseba40652007-08-30 20:10:57 +00002625' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00002626for ac_signal in 1 2 13 15; do
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002627 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00002628done
2629ac_signal=0
2630
2631# confdefs.h avoids OS command line length limits that DEFS can exceed.
Martin v. Löwiseba40652007-08-30 20:10:57 +00002632rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002633
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002634$as_echo "/* confdefs.h */" > confdefs.h
2635
Martin v. Löwis11437992002-04-12 09:54:03 +00002636# Predefined preprocessor variables.
2637
2638cat >>confdefs.h <<_ACEOF
2639#define PACKAGE_NAME "$PACKAGE_NAME"
2640_ACEOF
2641
Martin v. Löwis11437992002-04-12 09:54:03 +00002642cat >>confdefs.h <<_ACEOF
2643#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2644_ACEOF
2645
Martin v. Löwis11437992002-04-12 09:54:03 +00002646cat >>confdefs.h <<_ACEOF
2647#define PACKAGE_VERSION "$PACKAGE_VERSION"
2648_ACEOF
2649
Martin v. Löwis11437992002-04-12 09:54:03 +00002650cat >>confdefs.h <<_ACEOF
2651#define PACKAGE_STRING "$PACKAGE_STRING"
2652_ACEOF
2653
Martin v. Löwis11437992002-04-12 09:54:03 +00002654cat >>confdefs.h <<_ACEOF
2655#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2656_ACEOF
2657
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002658cat >>confdefs.h <<_ACEOF
2659#define PACKAGE_URL "$PACKAGE_URL"
2660_ACEOF
2661
Martin v. Löwis11437992002-04-12 09:54:03 +00002662
2663# Let the site file select an alternate cache file if it wants to.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002664# Prefer an explicitly selected file to automatically selected ones.
2665ac_site_file1=NONE
2666ac_site_file2=NONE
Martin v. Löwiseba40652007-08-30 20:10:57 +00002667if test -n "$CONFIG_SITE"; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002668 # We do not want a PATH search for config.site.
2669 case $CONFIG_SITE in #((
2670 -*) ac_site_file1=./$CONFIG_SITE;;
2671 */*) ac_site_file1=$CONFIG_SITE;;
2672 *) ac_site_file1=./$CONFIG_SITE;;
2673 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00002674elif test "x$prefix" != xNONE; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002675 ac_site_file1=$prefix/share/config.site
2676 ac_site_file2=$prefix/etc/config.site
Martin v. Löwiseba40652007-08-30 20:10:57 +00002677else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002678 ac_site_file1=$ac_default_prefix/share/config.site
2679 ac_site_file2=$ac_default_prefix/etc/config.site
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002680fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002681for ac_site_file in "$ac_site_file1" "$ac_site_file2"
Martin v. Löwiseba40652007-08-30 20:10:57 +00002682do
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002683 test "x$ac_site_file" = xNONE && continue
2684 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2685 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2686$as_echo "$as_me: loading site script $ac_site_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002687 sed 's/^/| /' "$ac_site_file" >&5
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002688 . "$ac_site_file" \
2689 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2690$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2691as_fn_error $? "failed to load site script $ac_site_file
Matthias Klose3cef2a92012-03-14 23:39:33 +01002692See \`config.log' for more details" "$LINENO" 5; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002693 fi
2694done
2695
2696if test -r "$cache_file"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002697 # Some versions of bash will fail to source /dev/null (special files
2698 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2699 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2700 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2701$as_echo "$as_me: loading cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002702 case $cache_file in
Martin v. Löwiseba40652007-08-30 20:10:57 +00002703 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2704 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00002705 esac
2706 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002707else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002708 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2709$as_echo "$as_me: creating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002710 >$cache_file
2711fi
2712
2713# Check that the precious variables saved in the cache have kept the same
2714# value.
2715ac_cache_corrupted=false
Martin v. Löwiseba40652007-08-30 20:10:57 +00002716for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00002717 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2718 eval ac_new_set=\$ac_env_${ac_var}_set
Martin v. Löwiseba40652007-08-30 20:10:57 +00002719 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2720 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00002721 case $ac_old_set,$ac_new_set in
2722 set,)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002723 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2724$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 +00002725 ac_cache_corrupted=: ;;
2726 ,set)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002727 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2728$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002729 ac_cache_corrupted=: ;;
2730 ,);;
2731 *)
2732 if test "x$ac_old_val" != "x$ac_new_val"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002733 # differences in whitespace do not lead to failure.
2734 ac_old_val_w=`echo x $ac_old_val`
2735 ac_new_val_w=`echo x $ac_new_val`
2736 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2737 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2738$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2739 ac_cache_corrupted=:
2740 else
2741 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2742$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2743 eval $ac_var=\$ac_old_val
2744 fi
2745 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2746$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2747 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2748$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002749 fi;;
2750 esac
2751 # Pass precious variables to config.status.
2752 if test "$ac_new_set" = set; then
2753 case $ac_new_val in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002754 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002755 *) ac_arg=$ac_var=$ac_new_val ;;
2756 esac
2757 case " $ac_configure_args " in
2758 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002759 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002760 esac
2761 fi
2762done
2763if $ac_cache_corrupted; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002764 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2765$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2766 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2767$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002768 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002769fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002770## -------------------- ##
2771## Main body of script. ##
2772## -------------------- ##
Martin v. Löwiseba40652007-08-30 20:10:57 +00002773
Guido van Rossum7f43da71994-08-01 12:15:30 +00002774ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002775ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00002776ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2777ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2778ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002779
Guido van Rossum627b2d71993-12-24 10:39:16 +00002780
Michael W. Hudson54241132001-12-07 15:38:26 +00002781
Martin v. Löwiseba40652007-08-30 20:10:57 +00002782ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00002783
2784
doko@python.orgd65e2ba2013-01-31 23:52:03 +01002785ac_aux_dir=
2786for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
2787 if test -f "$ac_dir/install-sh"; then
2788 ac_aux_dir=$ac_dir
2789 ac_install_sh="$ac_aux_dir/install-sh -c"
2790 break
2791 elif test -f "$ac_dir/install.sh"; then
2792 ac_aux_dir=$ac_dir
2793 ac_install_sh="$ac_aux_dir/install.sh -c"
2794 break
2795 elif test -f "$ac_dir/shtool"; then
2796 ac_aux_dir=$ac_dir
2797 ac_install_sh="$ac_aux_dir/shtool install -c"
2798 break
2799 fi
2800done
2801if test -z "$ac_aux_dir"; then
2802 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
2803fi
2804
2805# These three variables are undocumented and unsupported,
2806# and are intended to be withdrawn in a future Autoconf release.
2807# They can cause serious problems if a builder's source tree is in a directory
2808# whose full name contains unusual characters.
2809ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
2810ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
2811ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
2812
2813
2814# Make sure we can run config.sub.
2815$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2816 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
2817
2818{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
2819$as_echo_n "checking build system type... " >&6; }
2820if ${ac_cv_build+:} false; then :
2821 $as_echo_n "(cached) " >&6
2822else
2823 ac_build_alias=$build_alias
2824test "x$ac_build_alias" = x &&
2825 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2826test "x$ac_build_alias" = x &&
2827 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
2828ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2829 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
2830
2831fi
2832{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
2833$as_echo "$ac_cv_build" >&6; }
2834case $ac_cv_build in
2835*-*-*) ;;
2836*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
2837esac
2838build=$ac_cv_build
2839ac_save_IFS=$IFS; IFS='-'
2840set x $ac_cv_build
2841shift
2842build_cpu=$1
2843build_vendor=$2
2844shift; shift
2845# Remember, the first character of IFS is used to create $*,
2846# except with old shells:
2847build_os=$*
2848IFS=$ac_save_IFS
2849case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2850
2851
2852{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
2853$as_echo_n "checking host system type... " >&6; }
2854if ${ac_cv_host+:} false; then :
2855 $as_echo_n "(cached) " >&6
2856else
2857 if test "x$host_alias" = x; then
2858 ac_cv_host=$ac_cv_build
2859else
2860 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2861 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
2862fi
2863
2864fi
2865{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
2866$as_echo "$ac_cv_host" >&6; }
2867case $ac_cv_host in
2868*-*-*) ;;
2869*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
2870esac
2871host=$ac_cv_host
2872ac_save_IFS=$IFS; IFS='-'
2873set x $ac_cv_host
2874shift
2875host_cpu=$1
2876host_vendor=$2
2877shift; shift
2878# Remember, the first character of IFS is used to create $*,
2879# except with old shells:
2880host_os=$*
2881IFS=$ac_save_IFS
2882case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
2883
2884
2885
2886
2887
Ned Deily983df862014-08-22 13:30:59 -07002888# pybuilddir.txt will be created by --generate-posix-vars in the Makefile
2889rm -f pybuilddir.txt
2890
doko@python.orgd65e2ba2013-01-31 23:52:03 +01002891if test "$cross_compiling" = yes; then
2892 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for python interpreter for cross build" >&5
2893$as_echo_n "checking for python interpreter for cross build... " >&6; }
2894 if test -z "$PYTHON_FOR_BUILD"; then
2895 for interp in python$PACKAGE_VERSION python2 python; do
2896 which $interp >/dev/null 2>&1 || continue
2897 if $interp -c 'import sys;sys.exit(not (sys.version_info[:2] >= (2,7) and sys.version_info[0] < 3))'; then
2898 break
2899 fi
2900 interp=
2901 done
2902 if test x$interp = x; then
2903 as_fn_error $? "python$PACKAGE_VERSION interpreter not found" "$LINENO" 5
2904 fi
2905 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $interp" >&5
2906$as_echo "$interp" >&6; }
doko@ubuntu.coma50b0de2015-04-13 21:55:59 +02002907 PYTHON_FOR_BUILD='_PYTHON_PROJECT_BASE=$(abs_builddir) _PYTHON_HOST_PLATFORM=$(_PYTHON_HOST_PLATFORM) PYTHONPATH=$(shell test -f pybuilddir.txt && echo $(abs_builddir)/`cat pybuilddir.txt`:)$(srcdir)/Lib:$(srcdir)/Lib/$(PLATDIR) '$interp
doko@python.orgd65e2ba2013-01-31 23:52:03 +01002908 fi
2909elif test "$cross_compiling" = maybe; then
2910 as_fn_error $? "Cross compiling required --host=HOST-TUPLE and --build=ARCH" "$LINENO" 5
2911else
2912 PYTHON_FOR_BUILD='./$(BUILDPYTHON) -E'
2913fi
2914
2915
Martin v. Löwis11437992002-04-12 09:54:03 +00002916
Georg Brandlbcd64a32009-03-31 21:45:18 +00002917if test "$prefix" != "/"; then
2918 prefix=`echo "$prefix" | sed -e 's/\/$//g'`
2919fi
2920
2921
Martin v. Löwis11437992002-04-12 09:54:03 +00002922
2923
Martin v. Löwis8316feb2003-06-14 07:48:07 +00002924# We don't use PACKAGE_ variables, and they cause conflicts
2925# with other autoconf-based packages that include Python.h
2926grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
2927rm confdefs.h
2928mv confdefs.h.new confdefs.h
2929
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00002930
Martin v. Löwis174440b2008-10-03 08:59:41 +00002931VERSION=2.7
Guido van Rossum1fd74a71997-07-19 19:36:02 +00002932
Martin v. Löwis1142de32002-03-29 16:28:31 +00002933
2934SOVERSION=1.0
2935
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002936# The later defininition of _XOPEN_SOURCE disables certain features
2937# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
2938
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002939$as_echo "#define _GNU_SOURCE 1" >>confdefs.h
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002940
2941
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002942# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2943# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
2944# them.
2945
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002946$as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002947
2948
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002949# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2950# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
2951# them.
2952
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002953$as_echo "#define __BSD_VISIBLE 1" >>confdefs.h
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002954
2955
Martin v. Löwisd6320502004-08-12 13:45:08 +00002956# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2957# u_int on Irix 5.3. Defining _BSD_TYPES brings it back.
2958
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002959$as_echo "#define _BSD_TYPES 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +00002960
2961
Ronald Oussoren5640ce22008-06-05 12:58:24 +00002962# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2963# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
2964# them.
2965
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002966$as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
Ronald Oussoren5640ce22008-06-05 12:58:24 +00002967
2968
2969
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002970define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002971
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00002972# Arguments passed to configure.
2973
2974CONFIG_ARGS="$ac_configure_args"
2975
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002976{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-universalsdk" >&5
2977$as_echo_n "checking for --enable-universalsdk... " >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00002978# Check whether --enable-universalsdk was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002979if test "${enable_universalsdk+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00002980 enableval=$enable_universalsdk;
Ronald Oussoren988117f2006-04-29 11:31:35 +00002981 case $enableval in
2982 yes)
2983 enableval=/Developer/SDKs/MacOSX10.4u.sdk
Ronald Oussoren3c0a1262010-01-17 19:27:57 +00002984 if test ! -d "${enableval}"
2985 then
2986 enableval=/
2987 fi
Ronald Oussoren988117f2006-04-29 11:31:35 +00002988 ;;
2989 esac
2990 case $enableval in
2991 no)
2992 UNIVERSALSDK=
2993 enable_universalsdk=
2994 ;;
2995 *)
2996 UNIVERSALSDK=$enableval
Ronald Oussoren3c0a1262010-01-17 19:27:57 +00002997 if test ! -d "${UNIVERSALSDK}"
2998 then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002999 as_fn_error $? "--enable-universalsdk specifies non-existing SDK: ${UNIVERSALSDK}" "$LINENO" 5
Ronald Oussoren3c0a1262010-01-17 19:27:57 +00003000 fi
Ronald Oussoren988117f2006-04-29 11:31:35 +00003001 ;;
3002 esac
3003
Ronald Oussoren3c0a1262010-01-17 19:27:57 +00003004
Ronald Oussoren988117f2006-04-29 11:31:35 +00003005else
3006
3007 UNIVERSALSDK=
3008 enable_universalsdk=
3009
Martin v. Löwiseba40652007-08-30 20:10:57 +00003010fi
Ronald Oussoren988117f2006-04-29 11:31:35 +00003011
Ronald Oussoren3c0a1262010-01-17 19:27:57 +00003012if test -n "${UNIVERSALSDK}"
3013then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003014 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSALSDK}" >&5
3015$as_echo "${UNIVERSALSDK}" >&6; }
Ronald Oussoren3c0a1262010-01-17 19:27:57 +00003016else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003017 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3018$as_echo "no" >&6; }
Ronald Oussoren3c0a1262010-01-17 19:27:57 +00003019fi
Ronald Oussoren988117f2006-04-29 11:31:35 +00003020
Martin v. Löwiseba40652007-08-30 20:10:57 +00003021
Benjamin Peterson0e6ea5d2008-07-16 20:17:04 +00003022
Ned Deily8e60f6e2013-05-30 00:14:29 -07003023ARCH_RUN_32BIT=""
Benjamin Peterson0e6ea5d2008-07-16 20:17:04 +00003024
Ronald Oussoren5640ce22008-06-05 12:58:24 +00003025UNIVERSAL_ARCHS="32-bit"
Ronald Oussoren92919a62009-12-24 13:30:58 +00003026
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003027{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-universal-archs" >&5
3028$as_echo_n "checking for --with-universal-archs... " >&6; }
Ronald Oussoren5640ce22008-06-05 12:58:24 +00003029
3030# Check whether --with-universal-archs was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003031if test "${with_universal_archs+set}" = set; then :
Ronald Oussoren5640ce22008-06-05 12:58:24 +00003032 withval=$with_universal_archs;
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003033 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
3034$as_echo "$withval" >&6; }
Ronald Oussoren5640ce22008-06-05 12:58:24 +00003035 UNIVERSAL_ARCHS="$withval"
Ronald Oussoren9ebd2422009-09-29 13:00:44 +00003036 if test "${enable_universalsdk}" ; then
3037 :
3038 else
Georg Brandl71f4fbb2011-02-25 11:04:50 +00003039 as_fn_error $? "--with-universal-archs without --enable-universalsdk. See Mac/README" "$LINENO" 5
Ronald Oussoren9ebd2422009-09-29 13:00:44 +00003040 fi
Ronald Oussoren5640ce22008-06-05 12:58:24 +00003041
3042else
3043
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003044 { $as_echo "$as_me:${as_lineno-$LINENO}: result: 32-bit" >&5
3045$as_echo "32-bit" >&6; }
Ronald Oussoren5640ce22008-06-05 12:58:24 +00003046
3047fi
3048
3049
3050
3051
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00003052
3053# Check whether --with-framework-name was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003054if test "${with_framework_name+set}" = set; then :
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00003055 withval=$with_framework_name;
Ronald Oussoren9ebd2422009-09-29 13:00:44 +00003056 if test "${enable_framework}"; then
3057 :
3058 else
Georg Brandl71f4fbb2011-02-25 11:04:50 +00003059 as_fn_error $? "--with-framework-name without --enable-framework. See Mac/README" "$LINENO" 5
Ronald Oussoren9ebd2422009-09-29 13:00:44 +00003060 fi
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00003061 PYTHONFRAMEWORK=${withval}
3062 PYTHONFRAMEWORKDIR=${withval}.framework
3063 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
3064
3065else
3066
3067 PYTHONFRAMEWORK=Python
3068 PYTHONFRAMEWORKDIR=Python.framework
3069 PYTHONFRAMEWORKIDENTIFIER=org.python.python
3070
3071fi
3072
Martin v. Löwiseba40652007-08-30 20:10:57 +00003073# Check whether --enable-framework was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003074if test "${enable_framework+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00003075 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00003076 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00003077 yes)
Jack Jansene578a632001-08-15 01:27:14 +00003078 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00003079 esac
3080 case $enableval in
3081 no)
3082 PYTHONFRAMEWORK=
3083 PYTHONFRAMEWORKDIR=no-framework
3084 PYTHONFRAMEWORKPREFIX=
3085 PYTHONFRAMEWORKINSTALLDIR=
Ronald Oussoren567a8ff2006-05-26 11:43:26 +00003086 FRAMEWORKINSTALLFIRST=
3087 FRAMEWORKINSTALLLAST=
Ronald Oussoren5b787322006-06-06 19:50:24 +00003088 FRAMEWORKALTINSTALLFIRST=
3089 FRAMEWORKALTINSTALLLAST=
Ronald Oussoren2db3a8f2006-06-07 19:06:01 +00003090 if test "x${prefix}" = "xNONE"; then
3091 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3092 else
3093 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3094 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00003095 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00003096 ;;
3097 *)
Ronald Oussoren01d149f2010-04-30 11:20:14 +00003098 PYTHONFRAMEWORKPREFIX="${enableval}"
Jack Jansen127e56e2001-09-11 14:41:54 +00003099 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Ronald Oussoren567a8ff2006-05-26 11:43:26 +00003100 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussoren5640ce22008-06-05 12:58:24 +00003101 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure bininstall maninstall"
Ronald Oussoren92919a62009-12-24 13:30:58 +00003102 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
3103 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
Ronald Oussoren01d149f2010-04-30 11:20:14 +00003104 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
Ronald Oussoren5640ce22008-06-05 12:58:24 +00003105
Ronald Oussoren2db3a8f2006-06-07 19:06:01 +00003106 if test "x${prefix}" = "xNONE" ; then
3107 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
Ronald Oussoren01d149f2010-04-30 11:20:14 +00003108
Ronald Oussoren2db3a8f2006-06-07 19:06:01 +00003109 else
3110 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3111 fi
Ronald Oussoren01d149f2010-04-30 11:20:14 +00003112
3113 case "${enableval}" in
3114 /System*)
3115 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3116 if test "${prefix}" = "NONE" ; then
3117 # See below
3118 FRAMEWORKUNIXTOOLSPREFIX="/usr"
3119 fi
3120 ;;
3121
3122 /Library*)
3123 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3124 ;;
3125
3126 */Library/Frameworks)
3127 MDIR="`dirname "${enableval}"`"
3128 MDIR="`dirname "${MDIR}"`"
3129 FRAMEWORKINSTALLAPPSPREFIX="${MDIR}/Applications"
3130
3131 if test "${prefix}" = "NONE"; then
3132 # User hasn't specified the
3133 # --prefix option, but wants to install
3134 # the framework in a non-default location,
3135 # ensure that the compatibility links get
3136 # installed relative to that prefix as well
3137 # instead of in /usr/local.
3138 FRAMEWORKUNIXTOOLSPREFIX="${MDIR}"
3139 fi
3140 ;;
3141
3142 *)
3143 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3144 ;;
3145 esac
3146
Jack Jansen127e56e2001-09-11 14:41:54 +00003147 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Ronald Oussoren836b0392006-05-14 19:56:34 +00003148
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00003149 # Add files for Mac specific code to the list of output
Ronald Oussoren836b0392006-05-14 19:56:34 +00003150 # files:
Martin v. Löwiseba40652007-08-30 20:10:57 +00003151 ac_config_files="$ac_config_files Mac/Makefile"
Ronald Oussoren836b0392006-05-14 19:56:34 +00003152
Martin v. Löwiseba40652007-08-30 20:10:57 +00003153 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Ronald Oussoren836b0392006-05-14 19:56:34 +00003154
Martin v. Löwiseba40652007-08-30 20:10:57 +00003155 ac_config_files="$ac_config_files Mac/IDLE/Makefile"
Ronald Oussoren836b0392006-05-14 19:56:34 +00003156
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00003157 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
3158
3159 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
3160
Jack Jansene578a632001-08-15 01:27:14 +00003161 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003162
Guido van Rossum563e7081996-09-10 18:20:48 +00003163else
Martin v. Löwis11437992002-04-12 09:54:03 +00003164
Jack Jansene578a632001-08-15 01:27:14 +00003165 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00003166 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00003167 PYTHONFRAMEWORKPREFIX=
3168 PYTHONFRAMEWORKINSTALLDIR=
Ronald Oussoren567a8ff2006-05-26 11:43:26 +00003169 FRAMEWORKINSTALLFIRST=
3170 FRAMEWORKINSTALLLAST=
Ronald Oussoren5b787322006-06-06 19:50:24 +00003171 FRAMEWORKALTINSTALLFIRST=
3172 FRAMEWORKALTINSTALLLAST=
Ronald Oussoren2db3a8f2006-06-07 19:06:01 +00003173 if test "x${prefix}" = "xNONE" ; then
3174 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3175 else
3176 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3177 fi
Jack Jansene578a632001-08-15 01:27:14 +00003178 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003179
Ronald Oussoren5640ce22008-06-05 12:58:24 +00003180
Martin v. Löwiseba40652007-08-30 20:10:57 +00003181fi
3182
Michael W. Hudson54241132001-12-07 15:38:26 +00003183
3184
3185
3186
Jack Jansene578a632001-08-15 01:27:14 +00003187
Ronald Oussoren567a8ff2006-05-26 11:43:26 +00003188
3189
Ronald Oussoren5b787322006-06-06 19:50:24 +00003190
3191
3192
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00003193
Ronald Oussoren01d149f2010-04-30 11:20:14 +00003194
Jack Jansene578a632001-08-15 01:27:14 +00003195##AC_ARG_WITH(dyld,
Matthias Klose22520ea2010-05-08 10:14:46 +00003196## AS_HELP_STRING([--with-dyld],
3197## [Use (OpenStep|Rhapsody) dynamic linker]))
Jack Jansene578a632001-08-15 01:27:14 +00003198##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003199# Set name for machine-dependent library files
3200
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003201{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP" >&5
3202$as_echo_n "checking MACHDEP... " >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003203if test -z "$MACHDEP"
3204then
doko@python.orgd65e2ba2013-01-31 23:52:03 +01003205 # avoid using uname for cross builds
3206 if test "$cross_compiling" = yes; then
3207 # ac_sys_system and ac_sys_release are only used for setting
3208 # `define_xopen_source' in the case statement below. For the
3209 # current supported cross builds, this macro is not adjusted.
3210 case "$host" in
3211 *-*-linux*)
3212 ac_sys_system=Linux
3213 ;;
3214 *-*-cygwin*)
3215 ac_sys_system=Cygwin
3216 ;;
3217 *)
3218 # for now, limit cross builds to known configurations
3219 MACHDEP="unknown"
3220 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3221 esac
3222 ac_sys_release=
3223 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003224 ac_sys_system=`uname -s`
Georg Brandlfe18a112009-09-04 07:55:14 +00003225 if test "$ac_sys_system" = "AIX" \
Martin v. Löwis21ee4092002-09-30 16:19:48 +00003226 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00003227 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003228 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003229 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003230 fi
doko@python.orgd65e2ba2013-01-31 23:52:03 +01003231 fi
3232 ac_md_system=`echo $ac_sys_system |
3233 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
3234 ac_md_release=`echo $ac_sys_release |
3235 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
3236 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00003237
doko@python.orgd65e2ba2013-01-31 23:52:03 +01003238 case $MACHDEP in
Victor Stinneracacbaa2011-08-20 14:02:38 +02003239 linux*) MACHDEP="linux2";;
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00003240 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00003241 darwin*) MACHDEP="darwin";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00003242 atheos*) MACHDEP="atheos";;
Martin v. Löwisf3322282003-07-13 09:46:13 +00003243 irix646) MACHDEP="irix6";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00003244 '') MACHDEP="unknown";;
doko@python.orgd65e2ba2013-01-31 23:52:03 +01003245 esac
3246fi
3247
3248
3249if test "$cross_compiling" = yes; then
3250 case "$host" in
3251 *-*-linux*)
3252 case "$host_cpu" in
3253 arm*)
3254 _host_cpu=arm
3255 ;;
3256 *)
3257 _host_cpu=$host_cpu
3258 esac
3259 ;;
3260 *-*-cygwin*)
3261 _host_cpu=
3262 ;;
3263 *)
3264 # for now, limit cross builds to known configurations
3265 MACHDEP="unknown"
3266 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003267 esac
doko@python.orgd65e2ba2013-01-31 23:52:03 +01003268 _PYTHON_HOST_PLATFORM="$MACHDEP${_host_cpu:+-$_host_cpu}"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003269fi
Guido van Rossum91922671997-10-09 20:24:13 +00003270
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003271# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
3272# disable features if it is defined, without any means to access these
3273# features as extensions. For these systems, we skip the definition of
3274# _XOPEN_SOURCE. Before adding a system to the list to gain access to
3275# some feature, make sure there is no alternative way to access this
3276# feature. Also, when using wildcards, make sure you have verified the
3277# need for not defining _XOPEN_SOURCE on all systems matching the
3278# wildcard, and that the wildcard does not include future systems
3279# (which may remove their limitations).
3280case $ac_sys_system/$ac_sys_release in
3281 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
3282 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00003283 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Martin v. Löwis7875ef62010-02-15 21:41:12 +00003284 # In addition, Stefan Krah confirms that issue #1244610 exists through
3285 # OpenBSD 4.6, but is fixed in 4.7.
Charles-François Natali97781b02011-07-22 23:43:42 +02003286 OpenBSD/2.* | OpenBSD/3.* | OpenBSD/4.[0123456])
Martin v. Löwiscb78de62007-12-29 18:49:21 +00003287 define_xopen_source=no
3288 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3289 # also defined. This can be overridden by defining _BSD_SOURCE
3290 # As this has a different meaning on Linux, only define it on OpenBSD
3291
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003292$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Martin v. Löwiscb78de62007-12-29 18:49:21 +00003293
3294 ;;
Charles-François Natali97781b02011-07-22 23:43:42 +02003295 OpenBSD/*)
Martin v. Löwis5e2dd862010-02-15 08:32:00 +00003296 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3297 # also defined. This can be overridden by defining _BSD_SOURCE
3298 # As this has a different meaning on Linux, only define it on OpenBSD
3299
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003300$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Martin v. Löwis5e2dd862010-02-15 08:32:00 +00003301
3302 ;;
Martin v. Löwis4d542ec2006-11-25 15:39:19 +00003303 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
3304 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
3305 # Marc Recht
Benjamin Petersoneac68f42008-11-16 17:54:55 +00003306 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 +00003307 define_xopen_source=no;;
Martin v. Löwisb41afb52010-05-28 15:28:47 +00003308 # From the perspective of Solaris, _XOPEN_SOURCE is not so much a
3309 # request to enable features supported by the standard as a request
3310 # to disable features not supported by the standard. The best way
3311 # for Python to use Solaris is simply to leave _XOPEN_SOURCE out
3312 # entirely and define __EXTENSIONS__ instead.
3313 SunOS/*)
Martin v. Löwisa9d71422003-03-28 18:43:31 +00003314 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003315 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
3316 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00003317 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00003318 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003319 define_xopen_source=no;;
3320 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003321 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003322 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003323 define_xopen_source=no;;
Martin v. Löwisbb86d832008-11-04 20:40:09 +00003324 # On FreeBSD 4, the math functions C89 does not cover are never defined
3325 # with _XOPEN_SOURCE and __BSD_VISIBLE does not re-enable them.
3326 FreeBSD/4.*)
3327 define_xopen_source=no;;
3328 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
3329 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
3330 # identifies itself as Darwin/7.*
3331 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3332 # disables platform specific features beyond repair.
3333 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3334 # has no effect, don't bother defining them
3335 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00003336 define_xopen_source=no;;
Ronald Oussorena55af9a2010-01-17 16:25:57 +00003337 Darwin/1[0-9].*)
3338 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003339 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
3340 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
3341 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00003342 AIX/4)
3343 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003344 AIX/5)
3345 if test `uname -r` -eq 1; then
3346 define_xopen_source=no
3347 fi
3348 ;;
Martin v. Löwis8c255e42008-05-23 15:06:50 +00003349 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
3350 # defining NI_NUMERICHOST.
3351 QNX/6.3.2)
3352 define_xopen_source=no
3353 ;;
Martin v. Löwisa0588362006-04-04 06:03:50 +00003354
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003355esac
3356
3357if test $define_xopen_source = yes
3358then
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003359
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003360$as_echo "#define _XOPEN_SOURCE 600" >>confdefs.h
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003361
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003362
3363 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
3364 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
3365 # several APIs are not declared. Since this is also needed in some
3366 # cases for HP-UX, we define it globally.
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003367
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003368$as_echo "#define _XOPEN_SOURCE_EXTENDED 1" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003369
3370
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003371
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003372$as_echo "#define _POSIX_C_SOURCE 200112L" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003373
3374
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003375fi
3376
Guido van Rossum91922671997-10-09 20:24:13 +00003377#
3378# SGI compilers allow the specification of the both the ABI and the
3379# ISA on the command line. Depending on the values of these switches,
3380# different and often incompatable code will be generated.
3381#
3382# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
3383# thus supply support for various ABI/ISA combinations. The MACHDEP
3384# variable is also adjusted.
3385#
3386
3387if test ! -z "$SGI_ABI"
3388then
3389 CC="cc $SGI_ABI"
3390 LDFLAGS="$SGI_ABI $LDFLAGS"
3391 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
3392fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003393{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP" >&5
3394$as_echo "$MACHDEP" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003395
doko@ubuntu.coma50b0de2015-04-13 21:55:59 +02003396
3397PLATDIR=plat-$MACHDEP
3398
Jack Jansen83f898c2002-12-30 22:23:40 +00003399# And add extra plat-mac for darwin
3400
Jack Jansen7b59b422003-03-17 15:44:10 +00003401
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003402{ $as_echo "$as_me:${as_lineno-$LINENO}: checking EXTRAPLATDIR" >&5
3403$as_echo_n "checking EXTRAPLATDIR... " >&6; }
Jack Jansen83f898c2002-12-30 22:23:40 +00003404if test -z "$EXTRAPLATDIR"
3405then
3406 case $MACHDEP in
Jack Jansen7b59b422003-03-17 15:44:10 +00003407 darwin)
3408 EXTRAPLATDIR="\$(PLATMACDIRS)"
3409 EXTRAMACHDEPPATH="\$(PLATMACPATH)"
3410 ;;
3411 *)
3412 EXTRAPLATDIR=""
3413 EXTRAMACHDEPPATH=""
3414 ;;
Jack Jansen83f898c2002-12-30 22:23:40 +00003415 esac
3416fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003417{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXTRAPLATDIR" >&5
3418$as_echo "$EXTRAPLATDIR" >&6; }
Jack Jansen83f898c2002-12-30 22:23:40 +00003419
Jack Jansen6b08a402004-06-03 12:41:45 +00003420# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
3421# it may influence the way we can build extensions, so distutils
3422# needs to check it
3423
Ronald Oussoren988117f2006-04-29 11:31:35 +00003424
Jack Jansen6b08a402004-06-03 12:41:45 +00003425CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Ronald Oussoren988117f2006-04-29 11:31:35 +00003426EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00003427
Guido van Rossum627b2d71993-12-24 10:39:16 +00003428# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00003429
3430# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
3431# for debug/optimization stuff. BASECFLAGS is for flags that are required
3432# just to get things to compile and link. Users are free to override OPT
3433# when running configure or make. The build should not break if they do.
3434# BASECFLAGS should generally not be messed with, however.
3435
3436# XXX shouldn't some/most/all of this code be merged with the stuff later
3437# on that fiddles with OPT and BASECFLAGS?
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003438{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --without-gcc" >&5
3439$as_echo_n "checking for --without-gcc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003440
Martin v. Löwiseba40652007-08-30 20:10:57 +00003441# Check whether --with-gcc was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003442if test "${with_gcc+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00003443 withval=$with_gcc;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003444 case $withval in
Mark Dickinson04b27232009-01-04 12:29:36 +00003445 no) CC=${CC:-cc}
Guido van Rossumda88dad1995-01-26 00:46:29 +00003446 without_gcc=yes;;
3447 yes) CC=gcc
3448 without_gcc=no;;
3449 *) CC=$withval
3450 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003451 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00003452else
Martin v. Löwis11437992002-04-12 09:54:03 +00003453
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003454 case $ac_sys_system in
Antoine Pitrou285cd162010-09-21 15:23:17 +00003455 AIX*) CC=${CC:-xlc_r}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003456 without_gcc=;;
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003457 BeOS*)
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003458 case $BE_HOST_CPU in
3459 ppc)
Fred Drake5790be12000-10-09 17:06:13 +00003460 CC=mwcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003461 without_gcc=yes
Skip Montanarodecc6a42003-01-01 20:07:49 +00003462 BASECFLAGS="$BASECFLAGS -export pragma"
3463 OPT="$OPT -O"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003464 LDFLAGS="$LDFLAGS -nodup"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003465 ;;
3466 x86)
Fred Drake5790be12000-10-09 17:06:13 +00003467 CC=gcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003468 without_gcc=no
Skip Montanarodecc6a42003-01-01 20:07:49 +00003469 OPT="$OPT -O"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003470 ;;
3471 *)
Georg Brandl71f4fbb2011-02-25 11:04:50 +00003472 as_fn_error $? "Unknown BeOS platform \"$BE_HOST_CPU\"" "$LINENO" 5
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003473 ;;
3474 esac
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003475 AR="\$(srcdir)/Modules/ar_beos"
3476 RANLIB=:
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003477 ;;
Martin v. Löwis130fb172001-07-19 11:00:41 +00003478 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00003479 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00003480fi
3481
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003482{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $without_gcc" >&5
3483$as_echo "$without_gcc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003484
Zachary Ware6ed42ea2015-12-21 11:43:03 -06003485{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-icc" >&5
3486$as_echo_n "checking for --with-icc... " >&6; }
3487
3488# Check whether --with-icc was given.
3489if test "${with_icc+set}" = set; then :
3490 withval=$with_icc;
3491 case $withval in
3492 no) CC=${CC:-cc}
3493 with_icc=no;;
3494 yes) CC=icc
3495 CXX=icpc
3496 with_icc=yes;;
3497 *) CC=$withval
3498 with_icc=$withval;;
3499 esac
3500else
3501
3502 with_icc=no
3503fi
3504
3505{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_icc" >&5
3506$as_echo "$with_icc" >&6; }
3507
Guido van Rossum8b131c51995-03-09 14:10:13 +00003508# If the user switches compilers, we can't believe the cache
3509if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
3510then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00003511 as_fn_error $? "cached CC is different -- throw away $cache_file
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003512(it is also a good idea to do 'make clean' before compiling)" "$LINENO" 5
Guido van Rossum8b131c51995-03-09 14:10:13 +00003513fi
3514
Trent Nelson15daa352012-12-13 06:46:39 +00003515if test "$MACHDEP" = "irix6" && test "$CC" != "gcc"; then
3516 # Normally, MIPSpro CC treats #error directives as warnings, which means
3517 # a successful exit code is returned (0). This is a problem because IRIX
3518 # has a bunch of system headers with this guard at the top:
3519 #
3520 # #ifndef __c99
3521 # #error This header file is to be used only for c99 mode compilations
3522 # #else
3523 #
3524 # When autoconf tests for such a header, like stdint.h, this happens:
3525 #
3526 # configure:4619: cc -c conftest.c >&5
3527 # cc-1035 cc: WARNING File = /usr/include/stdint.h, Line = 5
3528 # #error directive: This header file is to be used only for c99 mode
3529 # compilations
3530 #
3531 # #error This header file is to be used only for c99 mode compilations
3532 # ^
3533 #
3534 # configure:4619: $? = 0
3535 # configure:4619: result: yes
3536 #
3537 # Therefore, we use `-diag_error 1035` to have the compiler treat the
3538 # warning as an error, which causes cc to return a non-zero result,
3539 # which autoconf can interpret correctly.
3540 CFLAGS="$CFLAGS -diag_error 1035"
3541 # Whilst we're here, we might as well make sure CXX defaults to something
3542 # sensible if we're not using gcc.
3543 if test -z "$CXX"; then
3544 CXX="CC"
3545 fi
3546fi
3547
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00003548# If the user set CFLAGS, use this instead of the automatically
3549# determined setting
3550preset_cflags="$CFLAGS"
Martin v. Löwis11437992002-04-12 09:54:03 +00003551ac_ext=c
3552ac_cpp='$CPP $CPPFLAGS'
3553ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3554ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3555ac_compiler_gnu=$ac_cv_c_compiler_gnu
3556if test -n "$ac_tool_prefix"; then
3557 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3558set dummy ${ac_tool_prefix}gcc; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003559{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3560$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01003561if ${ac_cv_prog_CC+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003562 $as_echo_n "(cached) " >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003563else
3564 if test -n "$CC"; then
3565 ac_cv_prog_CC="$CC" # Let the user override the test.
3566else
Martin v. Löwis11437992002-04-12 09:54:03 +00003567as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3568for as_dir in $PATH
3569do
3570 IFS=$as_save_IFS
3571 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003572 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01003573 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003574 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003575 $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 +00003576 break 2
3577 fi
3578done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003579 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003580IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003581
Jack Jansendd19cf82001-12-06 22:36:17 +00003582fi
3583fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003584CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00003585if test -n "$CC"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003586 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3587$as_echo "$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003588else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003589 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3590$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003591fi
3592
Martin v. Löwiseba40652007-08-30 20:10:57 +00003593
Martin v. Löwis11437992002-04-12 09:54:03 +00003594fi
3595if test -z "$ac_cv_prog_CC"; then
3596 ac_ct_CC=$CC
3597 # Extract the first word of "gcc", so it can be a program name with args.
3598set dummy gcc; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003599{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3600$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01003601if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003602 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003603else
3604 if test -n "$ac_ct_CC"; then
3605 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3606else
3607as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3608for as_dir in $PATH
3609do
3610 IFS=$as_save_IFS
3611 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003612 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01003613 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003614 ac_cv_prog_ac_ct_CC="gcc"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003615 $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 +00003616 break 2
3617 fi
3618done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003619 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003620IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003621
3622fi
3623fi
3624ac_ct_CC=$ac_cv_prog_ac_ct_CC
3625if test -n "$ac_ct_CC"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003626 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3627$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003628else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003629 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3630$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003631fi
3632
Martin v. Löwiseba40652007-08-30 20:10:57 +00003633 if test "x$ac_ct_CC" = x; then
3634 CC=""
3635 else
3636 case $cross_compiling:$ac_tool_warned in
3637yes:)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003638{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3639$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00003640ac_tool_warned=yes ;;
3641esac
3642 CC=$ac_ct_CC
3643 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003644else
3645 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00003646fi
3647
Jack Jansendd19cf82001-12-06 22:36:17 +00003648if test -z "$CC"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00003649 if test -n "$ac_tool_prefix"; then
3650 # 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 +00003651set dummy ${ac_tool_prefix}cc; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003652{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3653$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01003654if ${ac_cv_prog_CC+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003655 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00003656else
3657 if test -n "$CC"; then
3658 ac_cv_prog_CC="$CC" # Let the user override the test.
3659else
Martin v. Löwis11437992002-04-12 09:54:03 +00003660as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3661for as_dir in $PATH
3662do
3663 IFS=$as_save_IFS
3664 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003665 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01003666 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003667 ac_cv_prog_CC="${ac_tool_prefix}cc"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003668 $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 +00003669 break 2
3670 fi
3671done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003672 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003673IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003674
3675fi
3676fi
3677CC=$ac_cv_prog_CC
3678if test -n "$CC"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003679 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3680$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003681else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003682 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3683$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003684fi
3685
Martin v. Löwiseba40652007-08-30 20:10:57 +00003686
Martin v. Löwis11437992002-04-12 09:54:03 +00003687 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003688fi
3689if test -z "$CC"; then
3690 # Extract the first word of "cc", so it can be a program name with args.
3691set dummy cc; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003692{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3693$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01003694if ${ac_cv_prog_CC+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003695 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003696else
3697 if test -n "$CC"; then
3698 ac_cv_prog_CC="$CC" # Let the user override the test.
3699else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003700 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003701as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3702for as_dir in $PATH
3703do
3704 IFS=$as_save_IFS
3705 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003706 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01003707 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003708 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3709 ac_prog_rejected=yes
3710 continue
3711 fi
3712 ac_cv_prog_CC="cc"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003713 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003714 break 2
3715 fi
3716done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003717 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003718IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003719
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003720if test $ac_prog_rejected = yes; then
3721 # We found a bogon in the path, so make sure we never use it.
3722 set dummy $ac_cv_prog_CC
3723 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00003724 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003725 # We chose a different compiler from the bogus one.
3726 # However, it has the same basename, so the bogon will be chosen
3727 # first if we set CC to just the basename; use the full file name.
3728 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00003729 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003730 fi
3731fi
3732fi
3733fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003734CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003735if test -n "$CC"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003736 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3737$as_echo "$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003738else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003739 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3740$as_echo "no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003741fi
3742
Martin v. Löwiseba40652007-08-30 20:10:57 +00003743
Martin v. Löwis11437992002-04-12 09:54:03 +00003744fi
3745if test -z "$CC"; then
3746 if test -n "$ac_tool_prefix"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00003747 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003748 do
3749 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3750set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003751{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3752$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01003753if ${ac_cv_prog_CC+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003754 $as_echo_n "(cached) " >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003755else
3756 if test -n "$CC"; then
3757 ac_cv_prog_CC="$CC" # Let the user override the test.
3758else
Martin v. Löwis11437992002-04-12 09:54:03 +00003759as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3760for as_dir in $PATH
3761do
3762 IFS=$as_save_IFS
3763 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003764 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01003765 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003766 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003767 $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 +00003768 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00003769 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003770done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003771 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003772IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003773
3774fi
3775fi
3776CC=$ac_cv_prog_CC
3777if test -n "$CC"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003778 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3779$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003780else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003781 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3782$as_echo "no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003783fi
3784
Martin v. Löwiseba40652007-08-30 20:10:57 +00003785
Martin v. Löwis11437992002-04-12 09:54:03 +00003786 test -n "$CC" && break
3787 done
3788fi
3789if test -z "$CC"; then
3790 ac_ct_CC=$CC
Martin v. Löwiseba40652007-08-30 20:10:57 +00003791 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003792do
3793 # Extract the first word of "$ac_prog", so it can be a program name with args.
3794set dummy $ac_prog; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003795{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3796$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01003797if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003798 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003799else
3800 if test -n "$ac_ct_CC"; then
3801 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3802else
3803as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3804for as_dir in $PATH
3805do
3806 IFS=$as_save_IFS
3807 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003808 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01003809 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003810 ac_cv_prog_ac_ct_CC="$ac_prog"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003811 $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 +00003812 break 2
3813 fi
3814done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003815 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003816IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00003817
Martin v. Löwis11437992002-04-12 09:54:03 +00003818fi
3819fi
3820ac_ct_CC=$ac_cv_prog_ac_ct_CC
3821if test -n "$ac_ct_CC"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003822 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3823$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003824else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003825 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3826$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003827fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003828
Martin v. Löwiseba40652007-08-30 20:10:57 +00003829
Martin v. Löwis11437992002-04-12 09:54:03 +00003830 test -n "$ac_ct_CC" && break
3831done
Michael W. Hudson54241132001-12-07 15:38:26 +00003832
Martin v. Löwiseba40652007-08-30 20:10:57 +00003833 if test "x$ac_ct_CC" = x; then
3834 CC=""
3835 else
3836 case $cross_compiling:$ac_tool_warned in
3837yes:)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003838{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3839$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00003840ac_tool_warned=yes ;;
3841esac
3842 CC=$ac_ct_CC
3843 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003844fi
3845
3846fi
3847
3848
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003849test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3850$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00003851as_fn_error $? "no acceptable C compiler found in \$PATH
Matthias Klose3cef2a92012-03-14 23:39:33 +01003852See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003853
3854# Provide some information about the compiler.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003855$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3856set X $ac_compile
3857ac_compiler=$2
3858for ac_option in --version -v -V -qversion; do
3859 { { ac_try="$ac_compiler $ac_option >&5"
Martin v. Löwiseba40652007-08-30 20:10:57 +00003860case "(($ac_try" in
3861 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3862 *) ac_try_echo=$ac_try;;
3863esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003864eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3865$as_echo "$ac_try_echo"; } >&5
3866 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003867 ac_status=$?
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003868 if test -s conftest.err; then
3869 sed '10a\
3870... rest of stderr output deleted ...
3871 10q' conftest.err >conftest.er1
3872 cat conftest.er1 >&5
3873 fi
3874 rm -f conftest.er1 conftest.err
3875 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3876 test $ac_status = 0; }
3877done
Martin v. Löwis11437992002-04-12 09:54:03 +00003878
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003879cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003880/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00003881
Martin v. Löwis11437992002-04-12 09:54:03 +00003882int
3883main ()
3884{
3885
3886 ;
3887 return 0;
3888}
3889_ACEOF
3890ac_clean_files_save=$ac_clean_files
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003891ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00003892# Try to create an executable without -o first, disregard a.out.
3893# It will help us diagnose broken compilers, and finding out an intuition
3894# of exeext.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003895{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3896$as_echo_n "checking whether the C compiler works... " >&6; }
3897ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3898
3899# The possible output files:
3900ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3901
Martin v. Löwiseba40652007-08-30 20:10:57 +00003902ac_rmfiles=
3903for ac_file in $ac_files
3904do
3905 case $ac_file in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003906 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00003907 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3908 esac
3909done
3910rm -f $ac_rmfiles
3911
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003912if { { ac_try="$ac_link_default"
Martin v. Löwiseba40652007-08-30 20:10:57 +00003913case "(($ac_try" in
3914 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3915 *) ac_try_echo=$ac_try;;
3916esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003917eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3918$as_echo "$ac_try_echo"; } >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003919 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003920 ac_status=$?
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003921 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3922 test $ac_status = 0; }; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00003923 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3924# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3925# in a Makefile. We should not override ac_cv_exeext if it was cached,
3926# so that the user can short-circuit this test for compilers unknown to
3927# Autoconf.
3928for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00003929do
3930 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00003931 case $ac_file in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003932 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
Skip Montanarof0d5f792004-08-15 14:08:23 +00003933 ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003934 [ab].out )
Skip Montanarof0d5f792004-08-15 14:08:23 +00003935 # We found the default executable, but exeext='' is most
3936 # certainly right.
3937 break;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003938 *.* )
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003939 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
Martin v. Löwiseba40652007-08-30 20:10:57 +00003940 then :; else
3941 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3942 fi
3943 # We set ac_cv_exeext here because the later test for it is not
3944 # safe: cross compilers may not add the suffix if given an `-o'
3945 # argument, so we may need to know it at that point already.
3946 # Even if this section looks crufty: it has the advantage of
3947 # actually working.
Skip Montanarof0d5f792004-08-15 14:08:23 +00003948 break;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003949 * )
Skip Montanarof0d5f792004-08-15 14:08:23 +00003950 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003951 esac
3952done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003953test "$ac_cv_exeext" = no && ac_cv_exeext=
3954
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003955else
Martin v. Löwiseba40652007-08-30 20:10:57 +00003956 ac_file=''
3957fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003958if test -z "$ac_file"; then :
3959 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3960$as_echo "no" >&6; }
3961$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003962sed 's/^/| /' conftest.$ac_ext >&5
3963
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003964{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3965$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00003966as_fn_error 77 "C compiler cannot create executables
Matthias Klose3cef2a92012-03-14 23:39:33 +01003967See \`config.log' for more details" "$LINENO" 5; }
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003968else
3969 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3970$as_echo "yes" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003971fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003972{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3973$as_echo_n "checking for C compiler default output file name... " >&6; }
3974{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3975$as_echo "$ac_file" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003976ac_exeext=$ac_cv_exeext
Michael W. Hudson54241132001-12-07 15:38:26 +00003977
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003978rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
Martin v. Löwis11437992002-04-12 09:54:03 +00003979ac_clean_files=$ac_clean_files_save
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003980{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3981$as_echo_n "checking for suffix of executables... " >&6; }
3982if { { ac_try="$ac_link"
Martin v. Löwiseba40652007-08-30 20:10:57 +00003983case "(($ac_try" in
3984 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3985 *) ac_try_echo=$ac_try;;
3986esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003987eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3988$as_echo "$ac_try_echo"; } >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003989 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003990 ac_status=$?
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003991 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3992 test $ac_status = 0; }; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00003993 # If both `conftest.exe' and `conftest' are `present' (well, observable)
3994# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
3995# work properly (i.e., refer to `conftest.exe'), while it won't with
3996# `rm'.
Skip Montanaro6dead952003-09-25 14:50:04 +00003997for ac_file in conftest.exe conftest conftest.*; do
3998 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00003999 case $ac_file in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004000 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004001 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
Skip Montanarof0d5f792004-08-15 14:08:23 +00004002 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004003 * ) break;;
4004 esac
4005done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004006else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004007 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4008$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004009as_fn_error $? "cannot compute suffix of executables: cannot compile and link
Matthias Klose3cef2a92012-03-14 23:39:33 +01004010See \`config.log' for more details" "$LINENO" 5; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004011fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004012rm -f conftest conftest$ac_cv_exeext
4013{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
4014$as_echo "$ac_cv_exeext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004015
4016rm -f conftest.$ac_ext
4017EXEEXT=$ac_cv_exeext
4018ac_exeext=$EXEEXT
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004019cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4020/* end confdefs.h. */
4021#include <stdio.h>
4022int
4023main ()
4024{
4025FILE *f = fopen ("conftest.out", "w");
4026 return ferror (f) || fclose (f) != 0;
4027
4028 ;
4029 return 0;
4030}
Skip Montanaro6dead952003-09-25 14:50:04 +00004031_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004032ac_clean_files="$ac_clean_files conftest.out"
4033# Check that the compiler produces executables we can run. If not, either
4034# the compiler is broken, or we cross compile.
4035{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
4036$as_echo_n "checking whether we are cross compiling... " >&6; }
4037if test "$cross_compiling" != yes; then
4038 { { ac_try="$ac_link"
4039case "(($ac_try" in
4040 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4041 *) ac_try_echo=$ac_try;;
4042esac
4043eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4044$as_echo "$ac_try_echo"; } >&5
4045 (eval "$ac_link") 2>&5
4046 ac_status=$?
4047 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4048 test $ac_status = 0; }
4049 if { ac_try='./conftest$ac_cv_exeext'
4050 { { case "(($ac_try" in
4051 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4052 *) ac_try_echo=$ac_try;;
4053esac
4054eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4055$as_echo "$ac_try_echo"; } >&5
4056 (eval "$ac_try") 2>&5
4057 ac_status=$?
4058 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4059 test $ac_status = 0; }; }; then
4060 cross_compiling=no
4061 else
4062 if test "$cross_compiling" = maybe; then
4063 cross_compiling=yes
4064 else
4065 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4066$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004067as_fn_error $? "cannot run C compiled programs.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004068If you meant to cross compile, use \`--host'.
Matthias Klose3cef2a92012-03-14 23:39:33 +01004069See \`config.log' for more details" "$LINENO" 5; }
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004070 fi
4071 fi
4072fi
4073{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
4074$as_echo "$cross_compiling" >&6; }
4075
4076rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
4077ac_clean_files=$ac_clean_files_save
4078{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
4079$as_echo_n "checking for suffix of object files... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01004080if ${ac_cv_objext+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004081 $as_echo_n "(cached) " >&6
4082else
4083 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004084/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004085
Martin v. Löwis11437992002-04-12 09:54:03 +00004086int
4087main ()
4088{
4089
4090 ;
4091 return 0;
4092}
4093_ACEOF
4094rm -f conftest.o conftest.obj
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004095if { { ac_try="$ac_compile"
Martin v. Löwiseba40652007-08-30 20:10:57 +00004096case "(($ac_try" in
4097 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4098 *) ac_try_echo=$ac_try;;
4099esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004100eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4101$as_echo "$ac_try_echo"; } >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00004102 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004103 ac_status=$?
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004104 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4105 test $ac_status = 0; }; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00004106 for ac_file in conftest.o conftest.obj conftest.*; do
4107 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00004108 case $ac_file in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004109 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004110 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4111 break;;
4112 esac
4113done
4114else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004115 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004116sed 's/^/| /' conftest.$ac_ext >&5
4117
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004118{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4119$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004120as_fn_error $? "cannot compute suffix of object files: cannot compile
Matthias Klose3cef2a92012-03-14 23:39:33 +01004121See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004122fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004123rm -f conftest.$ac_cv_objext conftest.$ac_ext
4124fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004125{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4126$as_echo "$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004127OBJEXT=$ac_cv_objext
4128ac_objext=$OBJEXT
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004129{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4130$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01004131if ${ac_cv_c_compiler_gnu+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004132 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004133else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004134 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004135/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004136
Martin v. Löwis11437992002-04-12 09:54:03 +00004137int
4138main ()
4139{
4140#ifndef __GNUC__
4141 choke me
4142#endif
4143
4144 ;
4145 return 0;
4146}
4147_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004148if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004149 ac_compiler_gnu=yes
4150else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004151 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00004152fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004153rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004154ac_cv_c_compiler_gnu=$ac_compiler_gnu
4155
4156fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004157{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4158$as_echo "$ac_cv_c_compiler_gnu" >&6; }
4159if test $ac_compiler_gnu = yes; then
4160 GCC=yes
4161else
4162 GCC=
4163fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004164ac_test_CFLAGS=${CFLAGS+set}
4165ac_save_CFLAGS=$CFLAGS
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004166{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4167$as_echo_n "checking whether $CC accepts -g... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01004168if ${ac_cv_prog_cc_g+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004169 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004170else
Martin v. Löwiseba40652007-08-30 20:10:57 +00004171 ac_save_c_werror_flag=$ac_c_werror_flag
4172 ac_c_werror_flag=yes
4173 ac_cv_prog_cc_g=no
4174 CFLAGS="-g"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004175 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004176/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004177
Martin v. Löwis11437992002-04-12 09:54:03 +00004178int
4179main ()
4180{
4181
4182 ;
4183 return 0;
4184}
4185_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004186if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumf78abae1997-01-21 22:02:36 +00004187 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004188else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004189 CFLAGS=""
4190 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +00004191/* end confdefs.h. */
4192
4193int
4194main ()
4195{
4196
4197 ;
4198 return 0;
4199}
4200_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004201if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00004202
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004203else
4204 ac_c_werror_flag=$ac_save_c_werror_flag
Martin v. Löwiseba40652007-08-30 20:10:57 +00004205 CFLAGS="-g"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004206 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +00004207/* end confdefs.h. */
4208
4209int
4210main ()
4211{
4212
4213 ;
4214 return 0;
4215}
4216_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004217if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00004218 ac_cv_prog_cc_g=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004219fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004220rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004221fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004222rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4223fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004224rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4225 ac_c_werror_flag=$ac_save_c_werror_flag
4226fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004227{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4228$as_echo "$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004229if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004230 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004231elif test $ac_cv_prog_cc_g = yes; then
4232 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00004233 CFLAGS="-g -O2"
4234 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004235 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004236 fi
4237else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004238 if test "$GCC" = yes; then
4239 CFLAGS="-O2"
4240 else
4241 CFLAGS=
4242 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004243fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004244{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4245$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01004246if ${ac_cv_prog_cc_c89+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004247 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004248else
Martin v. Löwiseba40652007-08-30 20:10:57 +00004249 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00004250ac_save_CC=$CC
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004251cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004252/* end confdefs.h. */
4253#include <stdarg.h>
4254#include <stdio.h>
Charles-François Natalibe2b9072013-01-08 19:47:00 +01004255struct stat;
Skip Montanaro6dead952003-09-25 14:50:04 +00004256/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4257struct buf { int x; };
4258FILE * (*rcsopen) (struct buf *, struct stat *, int);
4259static char *e (p, i)
4260 char **p;
4261 int i;
4262{
4263 return p[i];
4264}
4265static char *f (char * (*g) (char **, int), char **p, ...)
4266{
4267 char *s;
4268 va_list v;
4269 va_start (v,p);
4270 s = g (p, va_arg (v,int));
4271 va_end (v);
4272 return s;
4273}
Skip Montanarof0d5f792004-08-15 14:08:23 +00004274
4275/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
4276 function prototypes and stuff, but not '\xHH' hex character constants.
4277 These don't provoke an error unfortunately, instead are silently treated
Martin v. Löwiseba40652007-08-30 20:10:57 +00004278 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00004279 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
4280 array size at least. It's necessary to write '\x00'==0 to get something
Martin v. Löwiseba40652007-08-30 20:10:57 +00004281 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00004282int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4283
Martin v. Löwiseba40652007-08-30 20:10:57 +00004284/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4285 inside strings and character constants. */
4286#define FOO(x) 'x'
4287int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4288
Skip Montanaro6dead952003-09-25 14:50:04 +00004289int test (int i, double x);
4290struct s1 {int (*f) (int a);};
4291struct s2 {int (*f) (double a);};
4292int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4293int argc;
4294char **argv;
4295int
4296main ()
4297{
4298return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4299 ;
4300 return 0;
4301}
4302_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00004303for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4304 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00004305do
4306 CC="$ac_save_CC $ac_arg"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004307 if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00004308 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00004309fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004310rm -f core conftest.err conftest.$ac_objext
4311 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00004312done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004313rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004314CC=$ac_save_CC
4315
4316fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004317# AC_CACHE_VAL
4318case "x$ac_cv_prog_cc_c89" in
4319 x)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004320 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4321$as_echo "none needed" >&6; } ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00004322 xno)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004323 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4324$as_echo "unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004325 *)
Martin v. Löwiseba40652007-08-30 20:10:57 +00004326 CC="$CC $ac_cv_prog_cc_c89"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004327 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4328$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004329esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004330if test "x$ac_cv_prog_cc_c89" != xno; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004331
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004332fi
Skip Montanaro6dead952003-09-25 14:50:04 +00004333
Martin v. Löwis11437992002-04-12 09:54:03 +00004334ac_ext=c
4335ac_cpp='$CPP $CPPFLAGS'
4336ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4337ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4338ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004339
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00004340if test ! -z "$preset_cflags"
4341then
4342 CFLAGS=$preset_cflags
4343fi
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004344
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004345
4346
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004347{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-cxx-main=<compiler>" >&5
4348$as_echo_n "checking for --with-cxx-main=<compiler>... " >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004349
Martin v. Löwiseba40652007-08-30 20:10:57 +00004350# Check whether --with-cxx_main was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004351if test "${with_cxx_main+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00004352 withval=$with_cxx_main;
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004353
4354 case $withval in
4355 no) with_cxx_main=no
4356 MAINCC='$(CC)';;
4357 yes) with_cxx_main=yes
4358 MAINCC='$(CXX)';;
4359 *) with_cxx_main=yes
4360 MAINCC=$withval
4361 if test -z "$CXX"
4362 then
4363 CXX=$withval
4364 fi;;
4365 esac
4366else
4367
4368 with_cxx_main=no
4369 MAINCC='$(CC)'
4370
Martin v. Löwiseba40652007-08-30 20:10:57 +00004371fi
4372
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004373{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_cxx_main" >&5
4374$as_echo "$with_cxx_main" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004375
4376preset_cxx="$CXX"
4377if test -z "$CXX"
4378then
4379 case "$CC" in
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004380 gcc) if test -n "$ac_tool_prefix"; then
4381 # Extract the first word of "${ac_tool_prefix}g++", so it can be a program name with args.
4382set dummy ${ac_tool_prefix}g++; ac_word=$2
4383{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4384$as_echo_n "checking for $ac_word... " >&6; }
4385if ${ac_cv_path_CXX+:} false; then :
4386 $as_echo_n "(cached) " >&6
4387else
4388 case $CXX in
4389 [\\/]* | ?:[\\/]*)
4390 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4391 ;;
4392 *)
4393 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4394for as_dir in notfound
4395do
4396 IFS=$as_save_IFS
4397 test -z "$as_dir" && as_dir=.
4398 for ac_exec_ext in '' $ac_executable_extensions; do
4399 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4400 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4401 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4402 break 2
4403 fi
4404done
4405 done
4406IFS=$as_save_IFS
4407
4408 ;;
4409esac
4410fi
4411CXX=$ac_cv_path_CXX
4412if test -n "$CXX"; then
4413 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4414$as_echo "$CXX" >&6; }
4415else
4416 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4417$as_echo "no" >&6; }
4418fi
4419
4420
4421fi
4422if test -z "$ac_cv_path_CXX"; then
4423 ac_pt_CXX=$CXX
4424 # Extract the first word of "g++", so it can be a program name with args.
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004425set dummy g++; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004426{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4427$as_echo_n "checking for $ac_word... " >&6; }
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004428if ${ac_cv_path_ac_pt_CXX+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004429 $as_echo_n "(cached) " >&6
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004430else
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004431 case $ac_pt_CXX in
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004432 [\\/]* | ?:[\\/]*)
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004433 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004434 ;;
4435 *)
4436 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4437for as_dir in notfound
4438do
4439 IFS=$as_save_IFS
4440 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004441 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01004442 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004443 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004444 $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 +00004445 break 2
4446 fi
4447done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004448 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004449IFS=$as_save_IFS
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004450
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004451 ;;
4452esac
4453fi
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004454ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4455if test -n "$ac_pt_CXX"; then
4456 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4457$as_echo "$ac_pt_CXX" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00004458else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004459 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4460$as_echo "no" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00004461fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004462
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004463 if test "x$ac_pt_CXX" = x; then
4464 CXX="g++"
4465 else
4466 case $cross_compiling:$ac_tool_warned in
4467yes:)
4468{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4469$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4470ac_tool_warned=yes ;;
4471esac
4472 CXX=$ac_pt_CXX
4473 fi
4474else
4475 CXX="$ac_cv_path_CXX"
4476fi
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004477 ;;
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004478 cc) if test -n "$ac_tool_prefix"; then
4479 # Extract the first word of "${ac_tool_prefix}c++", so it can be a program name with args.
4480set dummy ${ac_tool_prefix}c++; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004481{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4482$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01004483if ${ac_cv_path_CXX+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004484 $as_echo_n "(cached) " >&6
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004485else
4486 case $CXX in
4487 [\\/]* | ?:[\\/]*)
4488 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4489 ;;
4490 *)
4491 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4492for as_dir in notfound
4493do
4494 IFS=$as_save_IFS
4495 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004496 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01004497 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004498 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004499 $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 +00004500 break 2
4501 fi
4502done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004503 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004504IFS=$as_save_IFS
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004505
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004506 ;;
4507esac
4508fi
4509CXX=$ac_cv_path_CXX
Skip Montanaro89e975f2007-08-22 19:05:21 +00004510if test -n "$CXX"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004511 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4512$as_echo "$CXX" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00004513else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004514 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4515$as_echo "no" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00004516fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004517
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004518
4519fi
4520if test -z "$ac_cv_path_CXX"; then
4521 ac_pt_CXX=$CXX
4522 # Extract the first word of "c++", so it can be a program name with args.
4523set dummy c++; ac_word=$2
4524{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4525$as_echo_n "checking for $ac_word... " >&6; }
4526if ${ac_cv_path_ac_pt_CXX+:} false; then :
4527 $as_echo_n "(cached) " >&6
4528else
4529 case $ac_pt_CXX in
4530 [\\/]* | ?:[\\/]*)
4531 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4532 ;;
4533 *)
4534 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4535for as_dir in notfound
4536do
4537 IFS=$as_save_IFS
4538 test -z "$as_dir" && as_dir=.
4539 for ac_exec_ext in '' $ac_executable_extensions; do
4540 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4541 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4542 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4543 break 2
4544 fi
4545done
4546 done
4547IFS=$as_save_IFS
4548
4549 ;;
4550esac
4551fi
4552ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4553if test -n "$ac_pt_CXX"; then
4554 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4555$as_echo "$ac_pt_CXX" >&6; }
4556else
4557 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4558$as_echo "no" >&6; }
4559fi
4560
4561 if test "x$ac_pt_CXX" = x; then
4562 CXX="c++"
4563 else
4564 case $cross_compiling:$ac_tool_warned in
4565yes:)
4566{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4567$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4568ac_tool_warned=yes ;;
4569esac
4570 CXX=$ac_pt_CXX
4571 fi
4572else
4573 CXX="$ac_cv_path_CXX"
4574fi
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004575 ;;
4576 esac
4577 if test "$CXX" = "notfound"
4578 then
4579 CXX=""
4580 fi
4581fi
4582if test -z "$CXX"
4583then
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004584 if test -n "$ac_tool_prefix"; then
4585 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
4586 do
4587 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4588set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004589{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4590$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01004591if ${ac_cv_prog_CXX+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004592 $as_echo_n "(cached) " >&6
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004593else
4594 if test -n "$CXX"; then
4595 ac_cv_prog_CXX="$CXX" # Let the user override the test.
4596else
4597as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4598for as_dir in $PATH
4599do
4600 IFS=$as_save_IFS
4601 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004602 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01004603 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004604 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004605 $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 +00004606 break 2
4607 fi
4608done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004609 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004610IFS=$as_save_IFS
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004611
4612fi
4613fi
4614CXX=$ac_cv_prog_CXX
4615if test -n "$CXX"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004616 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4617$as_echo "$CXX" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004618else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004619 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4620$as_echo "no" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004621fi
4622
Martin v. Löwiseba40652007-08-30 20:10:57 +00004623
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004624 test -n "$CXX" && break
4625 done
4626fi
4627if test -z "$CXX"; then
4628 ac_ct_CXX=$CXX
4629 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
4630do
4631 # Extract the first word of "$ac_prog", so it can be a program name with args.
4632set dummy $ac_prog; ac_word=$2
4633{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4634$as_echo_n "checking for $ac_word... " >&6; }
4635if ${ac_cv_prog_ac_ct_CXX+:} false; then :
4636 $as_echo_n "(cached) " >&6
4637else
4638 if test -n "$ac_ct_CXX"; then
4639 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
4640else
4641as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4642for as_dir in $PATH
4643do
4644 IFS=$as_save_IFS
4645 test -z "$as_dir" && as_dir=.
4646 for ac_exec_ext in '' $ac_executable_extensions; do
4647 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4648 ac_cv_prog_ac_ct_CXX="$ac_prog"
4649 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4650 break 2
4651 fi
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004652done
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004653 done
4654IFS=$as_save_IFS
4655
4656fi
4657fi
4658ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
4659if test -n "$ac_ct_CXX"; then
4660 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
4661$as_echo "$ac_ct_CXX" >&6; }
4662else
4663 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4664$as_echo "no" >&6; }
4665fi
4666
4667
4668 test -n "$ac_ct_CXX" && break
4669done
4670
4671 if test "x$ac_ct_CXX" = x; then
4672 CXX="notfound"
4673 else
4674 case $cross_compiling:$ac_tool_warned in
4675yes:)
4676{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4677$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4678ac_tool_warned=yes ;;
4679esac
4680 CXX=$ac_ct_CXX
4681 fi
4682fi
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004683
4684 if test "$CXX" = "notfound"
4685 then
4686 CXX=""
4687 fi
4688fi
4689if test "$preset_cxx" != "$CXX"
4690then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004691 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004692
4693 By default, distutils will build C++ extension modules with \"$CXX\".
4694 If this is not intended, then set CXX on the configure command line.
4695 " >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004696$as_echo "$as_me: WARNING:
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004697
4698 By default, distutils will build C++ extension modules with \"$CXX\".
4699 If this is not intended, then set CXX on the configure command line.
4700 " >&2;}
4701fi
4702
doko@python.org4e63fbe2013-01-25 13:08:27 +01004703MULTIARCH=$($CC --print-multiarch 2>/dev/null)
4704
4705
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004706
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004707# checks for UNIX variants that set C preprocessor variables
Martin v. Löwis11437992002-04-12 09:54:03 +00004708
4709ac_ext=c
4710ac_cpp='$CPP $CPPFLAGS'
4711ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4712ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4713ac_compiler_gnu=$ac_cv_c_compiler_gnu
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004714{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4715$as_echo_n "checking how to run the C preprocessor... " >&6; }
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004716# On Suns, sometimes $CPP names a directory.
4717if test -n "$CPP" && test -d "$CPP"; then
4718 CPP=
4719fi
4720if test -z "$CPP"; then
Matthias Klose3cef2a92012-03-14 23:39:33 +01004721 if ${ac_cv_prog_CPP+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004722 $as_echo_n "(cached) " >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004723else
Martin v. Löwis11437992002-04-12 09:54:03 +00004724 # Double quotes because CPP needs to be expanded
4725 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4726 do
4727 ac_preproc_ok=false
4728for ac_c_preproc_warn_flag in '' yes
4729do
4730 # Use a header file that comes with gcc, so configuring glibc
4731 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00004732 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4733 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004734 # On the NeXT, cc -E runs the code through the compiler's parser,
Martin v. Löwis11437992002-04-12 09:54:03 +00004735 # not just through cpp. "Syntax error" is here to catch this case.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004736 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004737/* end confdefs.h. */
4738#ifdef __STDC__
4739# include <limits.h>
4740#else
4741# include <assert.h>
4742#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00004743 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00004744_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004745if ac_fn_c_try_cpp "$LINENO"; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004746
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004747else
Martin v. Löwis11437992002-04-12 09:54:03 +00004748 # Broken: fails on valid input.
4749continue
Jack Jansendd19cf82001-12-06 22:36:17 +00004750fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004751rm -f conftest.err conftest.i conftest.$ac_ext
Jack Jansendd19cf82001-12-06 22:36:17 +00004752
Martin v. Löwiseba40652007-08-30 20:10:57 +00004753 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00004754 # can be detected and how.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004755 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004756/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004757#include <ac_nonexistent.h>
4758_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004759if ac_fn_c_try_cpp "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004760 # Broken: success on invalid input.
4761continue
4762else
Martin v. Löwis11437992002-04-12 09:54:03 +00004763 # Passes both tests.
4764ac_preproc_ok=:
4765break
4766fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004767rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004768
4769done
4770# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004771rm -f conftest.i conftest.err conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004772if $ac_preproc_ok; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004773 break
4774fi
4775
4776 done
4777 ac_cv_prog_CPP=$CPP
4778
4779fi
4780 CPP=$ac_cv_prog_CPP
4781else
4782 ac_cv_prog_CPP=$CPP
4783fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004784{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4785$as_echo "$CPP" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004786ac_preproc_ok=false
4787for ac_c_preproc_warn_flag in '' yes
4788do
4789 # Use a header file that comes with gcc, so configuring glibc
4790 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00004791 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4792 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis11437992002-04-12 09:54:03 +00004793 # On the NeXT, cc -E runs the code through the compiler's parser,
4794 # not just through cpp. "Syntax error" is here to catch this case.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004795 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004796/* end confdefs.h. */
4797#ifdef __STDC__
4798# include <limits.h>
4799#else
4800# include <assert.h>
4801#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00004802 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00004803_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004804if ac_fn_c_try_cpp "$LINENO"; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004805
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004806else
Martin v. Löwis11437992002-04-12 09:54:03 +00004807 # Broken: fails on valid input.
4808continue
4809fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004810rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004811
Martin v. Löwiseba40652007-08-30 20:10:57 +00004812 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00004813 # can be detected and how.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004814 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004815/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004816#include <ac_nonexistent.h>
4817_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004818if ac_fn_c_try_cpp "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004819 # Broken: success on invalid input.
4820continue
4821else
Martin v. Löwis11437992002-04-12 09:54:03 +00004822 # Passes both tests.
4823ac_preproc_ok=:
4824break
4825fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004826rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004827
4828done
4829# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004830rm -f conftest.i conftest.err conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004831if $ac_preproc_ok; then :
4832
Martin v. Löwis11437992002-04-12 09:54:03 +00004833else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004834 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4835$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004836as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
Matthias Klose3cef2a92012-03-14 23:39:33 +01004837See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004838fi
4839
4840ac_ext=c
4841ac_cpp='$CPP $CPPFLAGS'
4842ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4843ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4844ac_compiler_gnu=$ac_cv_c_compiler_gnu
4845
4846
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004847{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4848$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01004849if ${ac_cv_path_GREP+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004850 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004851else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004852 if test -z "$GREP"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00004853 ac_path_GREP_found=false
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004854 # Loop through the user's path and test for each of PROGNAME-LIST
4855 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwiseba40652007-08-30 20:10:57 +00004856for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4857do
4858 IFS=$as_save_IFS
4859 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004860 for ac_prog in grep ggrep; do
4861 for ac_exec_ext in '' $ac_executable_extensions; do
4862 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
Charles-François Natalibe2b9072013-01-08 19:47:00 +01004863 as_fn_executable_p "$ac_path_GREP" || continue
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004864# Check for GNU ac_path_GREP and select it if it is found.
Martin v. Löwiseba40652007-08-30 20:10:57 +00004865 # Check for GNU $ac_path_GREP
4866case `"$ac_path_GREP" --version 2>&1` in
4867*GNU*)
4868 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4869*)
4870 ac_count=0
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004871 $as_echo_n 0123456789 >"conftest.in"
Martin v. Löwiseba40652007-08-30 20:10:57 +00004872 while :
4873 do
4874 cat "conftest.in" "conftest.in" >"conftest.tmp"
4875 mv "conftest.tmp" "conftest.in"
4876 cp "conftest.in" "conftest.nl"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004877 $as_echo 'GREP' >> "conftest.nl"
Martin v. Löwiseba40652007-08-30 20:10:57 +00004878 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4879 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004880 as_fn_arith $ac_count + 1 && ac_count=$as_val
Martin v. Löwiseba40652007-08-30 20:10:57 +00004881 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4882 # Best one so far, save it but keep looking for a better one
4883 ac_cv_path_GREP="$ac_path_GREP"
4884 ac_path_GREP_max=$ac_count
Skip Montanaro6dead952003-09-25 14:50:04 +00004885 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004886 # 10*(2^10) chars as input seems more than enough
4887 test $ac_count -gt 10 && break
4888 done
4889 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4890esac
4891
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004892 $ac_path_GREP_found && break 3
4893 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004894 done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004895 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004896IFS=$as_save_IFS
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004897 if test -z "$ac_cv_path_GREP"; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004898 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 +00004899 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004900else
4901 ac_cv_path_GREP=$GREP
4902fi
4903
Martin v. Löwiseba40652007-08-30 20:10:57 +00004904fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004905{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4906$as_echo "$ac_cv_path_GREP" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00004907 GREP="$ac_cv_path_GREP"
4908
4909
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004910{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
4911$as_echo_n "checking for egrep... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01004912if ${ac_cv_path_EGREP+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004913 $as_echo_n "(cached) " >&6
Martin v. Löwiseba40652007-08-30 20:10:57 +00004914else
4915 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
4916 then ac_cv_path_EGREP="$GREP -E"
4917 else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004918 if test -z "$EGREP"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00004919 ac_path_EGREP_found=false
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004920 # Loop through the user's path and test for each of PROGNAME-LIST
4921 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwiseba40652007-08-30 20:10:57 +00004922for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4923do
4924 IFS=$as_save_IFS
4925 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004926 for ac_prog in egrep; do
4927 for ac_exec_ext in '' $ac_executable_extensions; do
4928 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
Charles-François Natalibe2b9072013-01-08 19:47:00 +01004929 as_fn_executable_p "$ac_path_EGREP" || continue
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004930# Check for GNU ac_path_EGREP and select it if it is found.
Martin v. Löwiseba40652007-08-30 20:10:57 +00004931 # Check for GNU $ac_path_EGREP
4932case `"$ac_path_EGREP" --version 2>&1` in
4933*GNU*)
4934 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
4935*)
4936 ac_count=0
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004937 $as_echo_n 0123456789 >"conftest.in"
Martin v. Löwiseba40652007-08-30 20:10:57 +00004938 while :
4939 do
4940 cat "conftest.in" "conftest.in" >"conftest.tmp"
4941 mv "conftest.tmp" "conftest.in"
4942 cp "conftest.in" "conftest.nl"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004943 $as_echo 'EGREP' >> "conftest.nl"
Martin v. Löwiseba40652007-08-30 20:10:57 +00004944 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4945 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004946 as_fn_arith $ac_count + 1 && ac_count=$as_val
Martin v. Löwiseba40652007-08-30 20:10:57 +00004947 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
4948 # Best one so far, save it but keep looking for a better one
4949 ac_cv_path_EGREP="$ac_path_EGREP"
4950 ac_path_EGREP_max=$ac_count
4951 fi
4952 # 10*(2^10) chars as input seems more than enough
4953 test $ac_count -gt 10 && break
4954 done
4955 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4956esac
4957
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004958 $ac_path_EGREP_found && break 3
4959 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004960 done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004961 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004962IFS=$as_save_IFS
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004963 if test -z "$ac_cv_path_EGREP"; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004964 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 +00004965 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004966else
4967 ac_cv_path_EGREP=$EGREP
4968fi
4969
Martin v. Löwiseba40652007-08-30 20:10:57 +00004970 fi
4971fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004972{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
4973$as_echo "$ac_cv_path_EGREP" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00004974 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00004975
4976
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004977{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
4978$as_echo_n "checking for ANSI C header files... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01004979if ${ac_cv_header_stdc+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004980 $as_echo_n "(cached) " >&6
4981else
4982 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitrouf2caeed2009-05-24 20:23:57 +00004983/* end confdefs.h. */
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004984#include <stdlib.h>
4985#include <stdarg.h>
4986#include <string.h>
4987#include <float.h>
4988
4989int
4990main ()
4991{
4992
4993 ;
4994 return 0;
4995}
4996_ACEOF
4997if ac_fn_c_try_compile "$LINENO"; then :
4998 ac_cv_header_stdc=yes
4999else
5000 ac_cv_header_stdc=no
5001fi
5002rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5003
5004if test $ac_cv_header_stdc = yes; then
5005 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5006 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5007/* end confdefs.h. */
5008#include <string.h>
Antoine Pitrouf2caeed2009-05-24 20:23:57 +00005009
Antoine Pitrouf2caeed2009-05-24 20:23:57 +00005010_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005011if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005012 $EGREP "memchr" >/dev/null 2>&1; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005013
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005014else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005015 ac_cv_header_stdc=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005016fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00005017rm -f conftest*
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005018
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005019fi
5020
5021if test $ac_cv_header_stdc = yes; then
5022 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5023 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5024/* end confdefs.h. */
5025#include <stdlib.h>
5026
5027_ACEOF
5028if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5029 $EGREP "free" >/dev/null 2>&1; then :
5030
5031else
5032 ac_cv_header_stdc=no
5033fi
5034rm -f conftest*
5035
5036fi
5037
5038if test $ac_cv_header_stdc = yes; then
5039 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5040 if test "$cross_compiling" = yes; then :
5041 :
5042else
5043 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5044/* end confdefs.h. */
5045#include <ctype.h>
5046#include <stdlib.h>
5047#if ((' ' & 0x0FF) == 0x020)
5048# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5049# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5050#else
5051# define ISLOWER(c) \
5052 (('a' <= (c) && (c) <= 'i') \
5053 || ('j' <= (c) && (c) <= 'r') \
5054 || ('s' <= (c) && (c) <= 'z'))
5055# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5056#endif
5057
5058#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5059int
5060main ()
5061{
5062 int i;
5063 for (i = 0; i < 256; i++)
5064 if (XOR (islower (i), ISLOWER (i))
5065 || toupper (i) != TOUPPER (i))
5066 return 2;
5067 return 0;
5068}
5069_ACEOF
5070if ac_fn_c_try_run "$LINENO"; then :
5071
5072else
5073 ac_cv_header_stdc=no
5074fi
5075rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5076 conftest.$ac_objext conftest.beam conftest.$ac_ext
5077fi
5078
5079fi
5080fi
5081{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
5082$as_echo "$ac_cv_header_stdc" >&6; }
5083if test $ac_cv_header_stdc = yes; then
5084
5085$as_echo "#define STDC_HEADERS 1" >>confdefs.h
5086
5087fi
5088
5089# On IRIX 5.3, sys/types and inttypes.h are conflicting.
5090for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
5091 inttypes.h stdint.h unistd.h
5092do :
5093 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
5094ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
5095"
Georg Brandl71f4fbb2011-02-25 11:04:50 +00005096if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005097 cat >>confdefs.h <<_ACEOF
5098#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
5099_ACEOF
5100
5101fi
5102
5103done
5104
5105
5106
5107 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 +01005108if test "x$ac_cv_header_minix_config_h" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005109 MINIX=yes
5110else
5111 MINIX=
5112fi
5113
5114
5115 if test "$MINIX" = yes; then
5116
5117$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
5118
5119
5120$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
5121
5122
5123$as_echo "#define _MINIX 1" >>confdefs.h
5124
5125 fi
5126
5127
5128 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
5129$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01005130if ${ac_cv_safe_to_define___extensions__+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005131 $as_echo_n "(cached) " >&6
5132else
5133 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5134/* end confdefs.h. */
5135
Charles-François Natalibe2b9072013-01-08 19:47:00 +01005136# define __EXTENSIONS__ 1
5137 $ac_includes_default
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005138int
5139main ()
5140{
5141
5142 ;
5143 return 0;
5144}
5145_ACEOF
5146if ac_fn_c_try_compile "$LINENO"; then :
5147 ac_cv_safe_to_define___extensions__=yes
5148else
5149 ac_cv_safe_to_define___extensions__=no
5150fi
5151rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5152fi
5153{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
5154$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
5155 test $ac_cv_safe_to_define___extensions__ = yes &&
5156 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
5157
5158 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
5159
5160 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
5161
5162 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
5163
5164 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
5165
5166
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005167
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005168# Check for unsupported systems
5169case $ac_sys_system/$ac_sys_release in
5170atheos*|Linux*/1*)
5171 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
5172 echo See README for details.
5173 exit 1;;
5174esac
5175
5176
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005177{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-suffix" >&5
5178$as_echo_n "checking for --with-suffix... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005179
5180# Check whether --with-suffix was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005181if test "${with_suffix+set}" = set; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005182 withval=$with_suffix;
5183 case $withval in
5184 no) EXEEXT=;;
5185 yes) EXEEXT=.exe;;
5186 *) EXEEXT=$withval;;
5187 esac
5188fi
5189
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005190{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXEEXT" >&5
5191$as_echo "$EXEEXT" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005192
5193# Test whether we're running on a non-case-sensitive system, in which
5194# case we give a warning if no ext is given
5195
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005196{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for case-insensitive build directory" >&5
5197$as_echo_n "checking for case-insensitive build directory... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005198if test ! -d CaseSensitiveTestDir; then
5199mkdir CaseSensitiveTestDir
5200fi
5201
5202if test -d casesensitivetestdir
5203then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005204 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5205$as_echo "yes" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005206 BUILDEXEEXT=.exe
5207else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005208 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5209$as_echo "no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005210 BUILDEXEEXT=$EXEEXT
5211fi
5212rmdir CaseSensitiveTestDir
5213
5214case $MACHDEP in
5215bsdos*)
5216 case $CC in
5217 gcc) CC="$CC -D_HAVE_BSDI";;
5218 esac;;
5219esac
5220
5221case $ac_sys_system in
5222hp*|HP*)
5223 case $CC in
5224 cc|*/cc) CC="$CC -Ae";;
5225 esac;;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005226SunOS*)
5227 # Some functions have a prototype only with that define, e.g. confstr
5228
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005229$as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005230
5231 ;;
5232esac
5233
5234
5235
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005236{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBRARY" >&5
5237$as_echo_n "checking LIBRARY... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005238if test -z "$LIBRARY"
5239then
5240 LIBRARY='libpython$(VERSION).a'
5241fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005242{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBRARY" >&5
5243$as_echo "$LIBRARY" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005244
5245# LDLIBRARY is the name of the library to link against (as opposed to the
5246# name of the library into which to insert object files). BLDLIBRARY is also
5247# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
5248# is blank as the main program is not linked directly against LDLIBRARY.
5249# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
5250# systems without shared libraries, LDLIBRARY is the same as LIBRARY
5251# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
5252# DLLLIBRARY is the shared (i.e., DLL) library.
5253#
5254# RUNSHARED is used to run shared python without installed libraries
5255#
5256# INSTSONAME is the name of the shared library that will be use to install
5257# on the system - some systems like version suffix, others don't
5258
5259
5260
5261
5262
5263
5264LDLIBRARY="$LIBRARY"
5265BLDLIBRARY='$(LDLIBRARY)'
5266INSTSONAME='$(LDLIBRARY)'
5267DLLLIBRARY=''
5268LDLIBRARYDIR=''
5269RUNSHARED=''
5270
5271# LINKCC is the command that links the python executable -- default is $(CC).
5272# If CXX is set, and if it is needed to link a main function that was
5273# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
5274# python might then depend on the C++ runtime
5275# This is altered for AIX in order to build the export list before
5276# linking.
5277
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005278{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKCC" >&5
5279$as_echo_n "checking LINKCC... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005280if test -z "$LINKCC"
5281then
5282 LINKCC='$(PURIFY) $(MAINCC)'
5283 case $ac_sys_system in
5284 AIX*)
5285 exp_extra="\"\""
5286 if test $ac_sys_release -ge 5 -o \
5287 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
5288 exp_extra="."
5289 fi
5290 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005291 QNX*)
5292 # qcc must be used because the other compilers do not
5293 # support -N.
5294 LINKCC=qcc;;
5295 esac
5296fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005297{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKCC" >&5
5298$as_echo "$LINKCC" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005299
5300# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
5301# make sure we default having it set to "no": this is used by
5302# distutils.unixccompiler to know if it should add --enable-new-dtags
5303# to linker command lines, and failing to detect GNU ld simply results
5304# in the same bahaviour as before.
5305
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005306{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
5307$as_echo_n "checking for GNU ld... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005308ac_prog=ld
5309if test "$GCC" = yes; then
5310 ac_prog=`$CC -print-prog-name=ld`
5311fi
5312case `"$ac_prog" -V 2>&1 < /dev/null` in
5313 *GNU*)
5314 GNULD=yes;;
5315 *)
5316 GNULD=no;;
5317esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005318{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNULD" >&5
5319$as_echo "$GNULD" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005320
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005321{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-shared" >&5
5322$as_echo_n "checking for --enable-shared... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005323# Check whether --enable-shared was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005324if test "${enable_shared+set}" = set; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005325 enableval=$enable_shared;
5326fi
5327
5328
5329if test -z "$enable_shared"
5330then
5331 case $ac_sys_system in
5332 CYGWIN* | atheos*)
5333 enable_shared="yes";;
5334 *)
5335 enable_shared="no";;
5336 esac
5337fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005338{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
5339$as_echo "$enable_shared" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005340
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005341{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-profiling" >&5
5342$as_echo_n "checking for --enable-profiling... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005343# Check whether --enable-profiling was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005344if test "${enable_profiling+set}" = set; then :
doko@python.orgd65e2ba2013-01-31 23:52:03 +01005345 enableval=$enable_profiling;
5346fi
5347
5348if test "x$enable_profiling" = xyes; then
5349 ac_save_cc="$CC"
Benjamin Petersonb9be7bb2013-03-26 08:55:37 -04005350 CC="$CC -pg"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005351 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005352/* end confdefs.h. */
5353int main() { return 0; }
5354_ACEOF
doko@python.orgd65e2ba2013-01-31 23:52:03 +01005355if ac_fn_c_try_link "$LINENO"; then :
5356
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005357else
doko@python.orgd65e2ba2013-01-31 23:52:03 +01005358 enable_profiling=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005359fi
doko@python.orgd65e2ba2013-01-31 23:52:03 +01005360rm -f core conftest.err conftest.$ac_objext \
5361 conftest$ac_exeext conftest.$ac_ext
5362 CC="$ac_save_cc"
5363else
5364 enable_profiling=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005365fi
doko@python.orgd65e2ba2013-01-31 23:52:03 +01005366{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_profiling" >&5
5367$as_echo "$enable_profiling" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005368
doko@python.orgd65e2ba2013-01-31 23:52:03 +01005369if test "x$enable_profiling" = xyes; then
5370 BASECFLAGS="-pg $BASECFLAGS"
5371 LDFLAGS="-pg $LDFLAGS"
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005372fi
5373
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005374{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDLIBRARY" >&5
5375$as_echo_n "checking LDLIBRARY... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005376
5377# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
5378# library that we build, but we do not want to link against it (we
5379# will find it with a -framework option). For this reason there is an
5380# extra variable BLDLIBRARY against which Python and the extension
5381# modules are linked, BLDLIBRARY. This is normally the same as
5382# LDLIBRARY, but empty for MacOSX framework builds.
5383if test "$enable_framework"
5384then
5385 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
doko@ubuntu.com9ba90c92014-05-07 04:41:26 +02005386 RUNSHARED=DYLD_FRAMEWORK_PATH=`pwd`${DYLD_FRAMEWORK_PATH:+:${DYLD_FRAMEWORK_PATH}}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005387 BLDLIBRARY=''
5388else
5389 BLDLIBRARY='$(LDLIBRARY)'
5390fi
5391
5392# Other platforms follow
5393if test $enable_shared = "yes"; then
5394
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005395$as_echo "#define Py_ENABLE_SHARED 1" >>confdefs.h
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005396
5397 case $ac_sys_system in
5398 BeOS*)
5399 LDLIBRARY='libpython$(VERSION).so'
5400 ;;
5401 CYGWIN*)
5402 LDLIBRARY='libpython$(VERSION).dll.a'
5403 DLLLIBRARY='libpython$(VERSION).dll'
5404 ;;
5405 SunOS*)
5406 LDLIBRARY='libpython$(VERSION).so'
5407 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(VERSION)'
doko@ubuntu.com9ba90c92014-05-07 04:41:26 +02005408 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005409 INSTSONAME="$LDLIBRARY".$SOVERSION
5410 ;;
Charles-François Natali3de8c732011-07-24 22:33:35 +02005411 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*|OpenBSD*)
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005412 LDLIBRARY='libpython$(VERSION).so'
5413 BLDLIBRARY='-L. -lpython$(VERSION)'
doko@ubuntu.com9ba90c92014-05-07 04:41:26 +02005414 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005415 case $ac_sys_system in
5416 FreeBSD*)
5417 SOVERSION=`echo $SOVERSION|cut -d "." -f 1`
5418 ;;
5419 esac
5420 INSTSONAME="$LDLIBRARY".$SOVERSION
5421 ;;
5422 hp*|HP*)
5423 case `uname -m` in
5424 ia64)
5425 LDLIBRARY='libpython$(VERSION).so'
5426 ;;
5427 *)
5428 LDLIBRARY='libpython$(VERSION).sl'
5429 ;;
5430 esac
5431 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(VERSION)'
doko@ubuntu.com9ba90c92014-05-07 04:41:26 +02005432 RUNSHARED=SHLIB_PATH=`pwd`${SHLIB_PATH:+:${SHLIB_PATH}}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005433 ;;
5434 OSF*)
5435 LDLIBRARY='libpython$(VERSION).so'
5436 BLDLIBRARY='-rpath $(LIBDIR) -L. -lpython$(VERSION)'
doko@ubuntu.com9ba90c92014-05-07 04:41:26 +02005437 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005438 ;;
5439 atheos*)
5440 LDLIBRARY='libpython$(VERSION).so'
5441 BLDLIBRARY='-L. -lpython$(VERSION)'
5442 RUNSHARED=DLL_PATH=`pwd`:${DLL_PATH:-/atheos/sys/libs:/atheos/autolnk/lib}
5443 ;;
5444 Darwin*)
5445 LDLIBRARY='libpython$(VERSION).dylib'
5446 BLDLIBRARY='-L. -lpython$(VERSION)'
doko@ubuntu.com9ba90c92014-05-07 04:41:26 +02005447 RUNSHARED=DYLD_LIBRARY_PATH=`pwd`${DYLD_LIBRARY_PATH:+:${DYLD_LIBRARY_PATH}}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005448 ;;
Antoine Pitrouaabdceb2010-09-10 20:03:17 +00005449 AIX*)
5450 LDLIBRARY='libpython$(VERSION).so'
doko@ubuntu.com9ba90c92014-05-07 04:41:26 +02005451 RUNSHARED=LIBPATH=`pwd`${LIBPATH:+:${LIBPATH}}
Antoine Pitrouaabdceb2010-09-10 20:03:17 +00005452 ;;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005453
5454 esac
5455else # shared is disabled
5456 case $ac_sys_system in
5457 CYGWIN*)
5458 BLDLIBRARY='$(LIBRARY)'
5459 LDLIBRARY='libpython$(VERSION).dll.a'
5460 ;;
5461 esac
5462fi
5463
doko@python.orgd65e2ba2013-01-31 23:52:03 +01005464if test "$cross_compiling" = yes; then
5465 RUNSHARED=
5466fi
5467
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005468{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDLIBRARY" >&5
5469$as_echo "$LDLIBRARY" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005470
5471if test -n "$ac_tool_prefix"; then
5472 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
5473set dummy ${ac_tool_prefix}ranlib; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005474{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5475$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01005476if ${ac_cv_prog_RANLIB+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005477 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005478else
5479 if test -n "$RANLIB"; then
5480 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
5481else
5482as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5483for as_dir in $PATH
5484do
5485 IFS=$as_save_IFS
5486 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005487 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01005488 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005489 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005490 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005491 break 2
5492 fi
5493done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005494 done
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005495IFS=$as_save_IFS
5496
5497fi
5498fi
5499RANLIB=$ac_cv_prog_RANLIB
5500if test -n "$RANLIB"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005501 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
5502$as_echo "$RANLIB" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005503else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005504 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5505$as_echo "no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005506fi
5507
5508
5509fi
5510if test -z "$ac_cv_prog_RANLIB"; then
5511 ac_ct_RANLIB=$RANLIB
5512 # Extract the first word of "ranlib", so it can be a program name with args.
5513set dummy ranlib; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005514{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5515$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01005516if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005517 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005518else
5519 if test -n "$ac_ct_RANLIB"; then
5520 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
5521else
5522as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5523for as_dir in $PATH
5524do
5525 IFS=$as_save_IFS
5526 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005527 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01005528 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005529 ac_cv_prog_ac_ct_RANLIB="ranlib"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005530 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005531 break 2
5532 fi
5533done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005534 done
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005535IFS=$as_save_IFS
5536
5537fi
5538fi
5539ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
5540if test -n "$ac_ct_RANLIB"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005541 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
5542$as_echo "$ac_ct_RANLIB" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005543else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005544 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5545$as_echo "no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005546fi
5547
5548 if test "x$ac_ct_RANLIB" = x; then
5549 RANLIB=":"
5550 else
5551 case $cross_compiling:$ac_tool_warned in
5552yes:)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005553{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5554$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005555ac_tool_warned=yes ;;
5556esac
5557 RANLIB=$ac_ct_RANLIB
5558 fi
5559else
5560 RANLIB="$ac_cv_prog_RANLIB"
5561fi
5562
5563
doko@python.orgd65e2ba2013-01-31 23:52:03 +01005564if test -n "$ac_tool_prefix"; then
5565 for ac_prog in ar aal
5566 do
5567 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5568set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005569{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5570$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01005571if ${ac_cv_prog_AR+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005572 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005573else
5574 if test -n "$AR"; then
5575 ac_cv_prog_AR="$AR" # Let the user override the test.
5576else
5577as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5578for as_dir in $PATH
5579do
5580 IFS=$as_save_IFS
5581 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005582 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01005583 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@python.orgd65e2ba2013-01-31 23:52:03 +01005584 ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005585 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005586 break 2
5587 fi
5588done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005589 done
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005590IFS=$as_save_IFS
5591
5592fi
5593fi
5594AR=$ac_cv_prog_AR
5595if test -n "$AR"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005596 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
5597$as_echo "$AR" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005598else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005599 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5600$as_echo "no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005601fi
5602
5603
doko@python.orgd65e2ba2013-01-31 23:52:03 +01005604 test -n "$AR" && break
5605 done
5606fi
5607if test -z "$AR"; then
5608 ac_ct_AR=$AR
5609 for ac_prog in ar aal
5610do
5611 # Extract the first word of "$ac_prog", so it can be a program name with args.
5612set dummy $ac_prog; ac_word=$2
5613{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5614$as_echo_n "checking for $ac_word... " >&6; }
5615if ${ac_cv_prog_ac_ct_AR+:} false; then :
5616 $as_echo_n "(cached) " >&6
5617else
5618 if test -n "$ac_ct_AR"; then
5619 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
5620else
5621as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5622for as_dir in $PATH
5623do
5624 IFS=$as_save_IFS
5625 test -z "$as_dir" && as_dir=.
5626 for ac_exec_ext in '' $ac_executable_extensions; do
5627 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5628 ac_cv_prog_ac_ct_AR="$ac_prog"
5629 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5630 break 2
5631 fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005632done
doko@python.orgd65e2ba2013-01-31 23:52:03 +01005633 done
5634IFS=$as_save_IFS
5635
5636fi
5637fi
5638ac_ct_AR=$ac_cv_prog_ac_ct_AR
5639if test -n "$ac_ct_AR"; then
5640 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
5641$as_echo "$ac_ct_AR" >&6; }
5642else
5643 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5644$as_echo "no" >&6; }
5645fi
5646
5647
5648 test -n "$ac_ct_AR" && break
5649done
5650
5651 if test "x$ac_ct_AR" = x; then
5652 AR="ar"
5653 else
5654 case $cross_compiling:$ac_tool_warned in
5655yes:)
5656{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5657$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5658ac_tool_warned=yes ;;
5659esac
5660 AR=$ac_ct_AR
5661 fi
5662fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005663
5664
5665# tweak ARFLAGS only if the user didn't set it on the command line
5666
5667if test -z "$ARFLAGS"
5668then
5669 ARFLAGS="rc"
5670fi
5671
5672
5673# Extract the first word of "svnversion", so it can be a program name with args.
5674set dummy svnversion; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005675{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5676$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01005677if ${ac_cv_prog_SVNVERSION+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005678 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005679else
5680 if test -n "$SVNVERSION"; then
5681 ac_cv_prog_SVNVERSION="$SVNVERSION" # Let the user override the test.
5682else
5683as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5684for as_dir in $PATH
5685do
5686 IFS=$as_save_IFS
5687 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005688 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01005689 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005690 ac_cv_prog_SVNVERSION="found"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005691 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005692 break 2
5693 fi
5694done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005695 done
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005696IFS=$as_save_IFS
5697
5698 test -z "$ac_cv_prog_SVNVERSION" && ac_cv_prog_SVNVERSION="not-found"
5699fi
5700fi
5701SVNVERSION=$ac_cv_prog_SVNVERSION
5702if test -n "$SVNVERSION"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005703 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SVNVERSION" >&5
5704$as_echo "$SVNVERSION" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005705else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005706 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5707$as_echo "no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005708fi
5709
5710
5711if test $SVNVERSION = found
5712then
5713 SVNVERSION="svnversion \$(srcdir)"
5714else
5715 SVNVERSION="echo Unversioned directory"
5716fi
5717
Trent Nelsond86ceec2012-10-16 09:42:45 -04005718
Trent Nelsonabf20512012-10-17 04:32:49 -04005719if test "$abs_srcdir" != "$abs_builddir"; then
Trent Nelsond86ceec2012-10-16 09:42:45 -04005720 # If we're building out-of-tree make sure Include (in the current dir)
5721 # gets picked up before its $srcdir counterpart in order for Python-ast.h
5722 # and graminit.h to get picked up from the correct directory.
5723 # (A side effect of this is that these resources will automatically be
5724 # regenerated when building out-of-tree, regardless of whether or not
5725 # the $srcdir counterpart is up-to-date. This is an acceptable trade
5726 # off.)
5727 BASECPPFLAGS="-IInclude"
5728else
5729 BASECPPFLAGS=""
5730fi
5731
Georg Brandl3a5508e2011-03-06 10:42:21 +01005732
5733
5734
5735# Extract the first word of "hg", so it can be a program name with args.
5736set dummy hg; ac_word=$2
5737{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5738$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01005739if ${ac_cv_prog_HAS_HG+:} false; then :
Georg Brandl3a5508e2011-03-06 10:42:21 +01005740 $as_echo_n "(cached) " >&6
5741else
5742 if test -n "$HAS_HG"; then
5743 ac_cv_prog_HAS_HG="$HAS_HG" # Let the user override the test.
5744else
5745as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5746for as_dir in $PATH
5747do
5748 IFS=$as_save_IFS
5749 test -z "$as_dir" && as_dir=.
5750 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01005751 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Georg Brandl3a5508e2011-03-06 10:42:21 +01005752 ac_cv_prog_HAS_HG="found"
5753 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5754 break 2
5755 fi
5756done
5757 done
5758IFS=$as_save_IFS
5759
5760 test -z "$ac_cv_prog_HAS_HG" && ac_cv_prog_HAS_HG="not-found"
5761fi
5762fi
5763HAS_HG=$ac_cv_prog_HAS_HG
5764if test -n "$HAS_HG"; then
5765 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAS_HG" >&5
5766$as_echo "$HAS_HG" >&6; }
5767else
5768 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5769$as_echo "no" >&6; }
5770fi
5771
5772
5773if test $HAS_HG = found
5774then
5775 HGVERSION="hg id -i \$(srcdir)"
5776 HGTAG="hg id -t \$(srcdir)"
5777 HGBRANCH="hg id -b \$(srcdir)"
5778else
5779 HGVERSION=""
5780 HGTAG=""
5781 HGBRANCH=""
5782fi
5783
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005784case $MACHDEP in
5785bsdos*|hp*|HP*)
5786 # install -d does not work on BSDI or HP-UX
5787 if test -z "$INSTALL"
5788 then
5789 INSTALL="${srcdir}/install-sh -c"
5790 fi
5791esac
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005792# Find a good install program. We prefer a C program (faster),
5793# so one script is as good as another. But avoid the broken or
5794# incompatible versions:
5795# SysV /etc/install, /usr/sbin/install
5796# SunOS /usr/etc/install
5797# IRIX /sbin/install
5798# AIX /bin/install
5799# AmigaOS /C/install, which installs bootblocks on floppy discs
5800# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
5801# AFS /usr/afsws/bin/install, which mishandles nonexistent args
5802# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
5803# OS/2's system install, which has a completely different semantic
5804# ./install, which can be erroneously created by make from ./install.sh.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005805# Reject install programs that cannot install multiple files.
5806{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
5807$as_echo_n "checking for a BSD-compatible install... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005808if test -z "$INSTALL"; then
Matthias Klose3cef2a92012-03-14 23:39:33 +01005809if ${ac_cv_path_install+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005810 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005811else
5812 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5813for as_dir in $PATH
5814do
5815 IFS=$as_save_IFS
5816 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005817 # Account for people who put trailing slashes in PATH elements.
5818case $as_dir/ in #((
5819 ./ | .// | /[cC]/* | \
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005820 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005821 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005822 /usr/ucb/* ) ;;
5823 *)
5824 # OSF1 and SCO ODT 3.0 have their own names for install.
5825 # Don't use installbsd from OSF since it installs stuff as root
5826 # by default.
5827 for ac_prog in ginstall scoinst install; do
5828 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01005829 if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005830 if test $ac_prog = install &&
5831 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
5832 # AIX install. It has an incompatible calling convention.
5833 :
5834 elif test $ac_prog = install &&
5835 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
5836 # program-specific install script used by HP pwplus--don't use.
5837 :
5838 else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005839 rm -rf conftest.one conftest.two conftest.dir
5840 echo one > conftest.one
5841 echo two > conftest.two
5842 mkdir conftest.dir
5843 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
5844 test -s conftest.one && test -s conftest.two &&
5845 test -s conftest.dir/conftest.one &&
5846 test -s conftest.dir/conftest.two
5847 then
5848 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
5849 break 3
5850 fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005851 fi
5852 fi
5853 done
5854 done
5855 ;;
5856esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005857
5858 done
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005859IFS=$as_save_IFS
5860
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005861rm -rf conftest.one conftest.two conftest.dir
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005862
5863fi
5864 if test "${ac_cv_path_install+set}" = set; then
5865 INSTALL=$ac_cv_path_install
5866 else
5867 # As a last resort, use the slow shell script. Don't cache a
5868 # value for INSTALL within a source directory, because that will
5869 # break other packages using the cache if that directory is
5870 # removed, or if the value is a relative name.
5871 INSTALL=$ac_install_sh
5872 fi
5873fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005874{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
5875$as_echo "$INSTALL" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005876
5877# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
5878# It thinks the first close brace ends the variable substitution.
5879test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
5880
5881test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
5882
5883test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
5884
Trent Nelsonf6407a12012-08-30 14:56:13 +00005885{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
5886$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
5887if test -z "$MKDIR_P"; then
5888 if ${ac_cv_path_mkdir+:} false; then :
5889 $as_echo_n "(cached) " >&6
5890else
5891 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5892for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
5893do
5894 IFS=$as_save_IFS
5895 test -z "$as_dir" && as_dir=.
5896 for ac_prog in mkdir gmkdir; do
5897 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01005898 as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
Trent Nelsonf6407a12012-08-30 14:56:13 +00005899 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
5900 'mkdir (GNU coreutils) '* | \
5901 'mkdir (coreutils) '* | \
5902 'mkdir (fileutils) '4.1*)
5903 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
5904 break 3;;
5905 esac
5906 done
5907 done
5908 done
5909IFS=$as_save_IFS
5910
5911fi
5912
5913 test -d ./--version && rmdir ./--version
5914 if test "${ac_cv_path_mkdir+set}" = set; then
5915 MKDIR_P="$ac_cv_path_mkdir -p"
5916 else
5917 # As a last resort, use the slow shell script. Don't cache a
5918 # value for MKDIR_P within a source directory, because that will
5919 # break other packages using the cache if that directory is
5920 # removed, or if the value is a relative name.
5921 MKDIR_P="$ac_install_sh -d"
5922 fi
5923fi
5924{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
5925$as_echo "$MKDIR_P" >&6; }
5926
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005927
5928# Not every filesystem supports hard links
5929
5930if test -z "$LN" ; then
5931 case $ac_sys_system in
5932 BeOS*) LN="ln -s";;
5933 CYGWIN*) LN="ln -s";;
5934 atheos*) LN="ln -s";;
5935 *) LN=ln;;
5936 esac
5937fi
5938
5939# Check for --with-pydebug
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005940{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pydebug" >&5
5941$as_echo_n "checking for --with-pydebug... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005942
5943# Check whether --with-pydebug was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005944if test "${with_pydebug+set}" = set; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005945 withval=$with_pydebug;
5946if test "$withval" != no
5947then
5948
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005949$as_echo "#define Py_DEBUG 1" >>confdefs.h
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005950
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005951 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5952$as_echo "yes" >&6; };
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005953 Py_DEBUG='true'
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005954else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5955$as_echo "no" >&6; }; Py_DEBUG='false'
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005956fi
5957else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005958 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5959$as_echo "no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005960fi
5961
5962
5963# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
5964# merged with this chunk of code?
5965
5966# Optimizer/debugger flags
5967# ------------------------
5968# (The following bit of code is complicated enough - please keep things
5969# indented properly. Just pretend you're editing Python code. ;-)
5970
5971# There are two parallel sets of case statements below, one that checks to
5972# see if OPT was set and one that does BASECFLAGS setting based upon
5973# compiler and platform. BASECFLAGS tweaks need to be made even if the
5974# user set OPT.
5975
5976# tweak OPT based on compiler and platform, only if the user didn't set
5977# it on the command line
5978
Benjamin Petersond4b721b2010-03-23 20:58:37 +00005979if test "${OPT-unset}" = "unset"
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005980then
5981 case $GCC in
5982 yes)
5983 if test "$CC" != 'g++' ; then
5984 STRICT_PROTO="-Wstrict-prototypes"
5985 fi
5986 # For gcc 4.x we need to use -fwrapv so lets check if its supported
5987 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
5988 WRAP="-fwrapv"
5989 fi
Stefan Krah503e5e12011-09-14 15:19:42 +02005990
5991 # Clang also needs -fwrapv
Stefan Krah2bc1e8f2011-12-08 22:26:06 +01005992 case $CC in
5993 *clang*) WRAP="-fwrapv"
5994 ;;
5995 esac
Stefan Krah503e5e12011-09-14 15:19:42 +02005996
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005997 case $ac_cv_prog_cc_g in
5998 yes)
5999 if test "$Py_DEBUG" = 'true' ; then
6000 # Optimization messes up debuggers, so turn it off for
6001 # debug builds.
Mark Dickinsond2f3e3f2010-05-05 22:23:58 +00006002 OPT="-g -O0 -Wall $STRICT_PROTO"
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006003 else
6004 OPT="-g $WRAP -O3 -Wall $STRICT_PROTO"
6005 fi
6006 ;;
6007 *)
6008 OPT="-O3 -Wall $STRICT_PROTO"
6009 ;;
6010 esac
6011 case $ac_sys_system in
6012 SCO_SV*) OPT="$OPT -m486 -DSCO5"
6013 ;;
6014 esac
6015 ;;
6016
6017 *)
6018 OPT="-O"
6019 ;;
6020 esac
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006021fi
6022
6023
6024
6025# The -arch flags for universal builds on OSX
6026UNIVERSAL_ARCH_FLAGS=
6027
6028
6029# tweak BASECFLAGS based on compiler and platform
6030case $GCC in
6031yes)
6032 # Python violates C99 rules, by casting between incompatible
6033 # pointer types. GCC may generate bad code as a result of that,
6034 # so use -fno-strict-aliasing if supported.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006035 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -fno-strict-aliasing" >&5
6036$as_echo_n "checking whether $CC accepts -fno-strict-aliasing... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006037 ac_save_cc="$CC"
6038 CC="$CC -fno-strict-aliasing"
Matthias Klose3cef2a92012-03-14 23:39:33 +01006039 if ${ac_cv_no_strict_aliasing_ok+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006040 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00006041else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006042 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006043/* end confdefs.h. */
Gregory P. Smith373469a2009-11-01 21:03:38 +00006044
6045int
6046main ()
6047{
Mark Dickinson5e13e292010-05-11 08:55:06 +00006048
Gregory P. Smith373469a2009-11-01 21:03:38 +00006049 ;
6050 return 0;
6051}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006052_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006053if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006054 ac_cv_no_strict_aliasing_ok=yes
6055else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006056 ac_cv_no_strict_aliasing_ok=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006057fi
Gregory P. Smith373469a2009-11-01 21:03:38 +00006058rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00006059fi
6060
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006061 CC="$ac_save_cc"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006062 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_no_strict_aliasing_ok" >&5
6063$as_echo "$ac_cv_no_strict_aliasing_ok" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006064 if test $ac_cv_no_strict_aliasing_ok = yes
6065 then
6066 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
6067 fi
6068
6069 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
6070 # support. Without this, treatment of subnormals doesn't follow
6071 # the standard.
doko@python.orgd65e2ba2013-01-31 23:52:03 +01006072 case $host in
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006073 alpha*)
6074 BASECFLAGS="$BASECFLAGS -mieee"
6075 ;;
6076 esac
6077
6078 case $ac_sys_system in
6079 SCO_SV*)
6080 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
6081 ;;
6082 # is there any other compiler on Darwin besides gcc?
6083 Darwin*)
6084 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
6085 # used to be here, but non-Apple gcc doesn't accept them.
Ronald Oussorena55af9a2010-01-17 16:25:57 +00006086 if test "${CC}" = gcc
6087 then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006088 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which compiler should be used" >&5
6089$as_echo_n "checking which compiler should be used... " >&6; }
Ronald Oussorena55af9a2010-01-17 16:25:57 +00006090 case "${UNIVERSALSDK}" in
6091 */MacOSX10.4u.sdk)
6092 # Build using 10.4 SDK, force usage of gcc when the
6093 # compiler is gcc, otherwise the user will get very
6094 # confusing error messages when building on OSX 10.6
6095 CC=gcc-4.0
6096 CPP=cpp-4.0
6097 ;;
6098 esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006099 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
6100$as_echo "$CC" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006101 fi
6102
6103 # Calculate the right deployment target for this build.
6104 #
Ned Deilyc40b9032014-06-25 13:48:46 -07006105 cur_target_major=`sw_vers -productVersion | \
6106 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
6107 cur_target_minor=`sw_vers -productVersion | \
6108 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
6109 cur_target="${cur_target_major}.${cur_target_minor}"
6110 if test ${cur_target_major} -eq 10 && \
6111 test ${cur_target_minor} -ge 3
6112 then
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006113 cur_target=10.3
Ronald Oussoren25967582009-09-06 10:00:26 +00006114 if test ${enable_universalsdk}; then
6115 if test "${UNIVERSAL_ARCHS}" = "all"; then
6116 # Ensure that the default platform for a
6117 # 4-way universal build is OSX 10.5,
6118 # that's the first OS release where
6119 # 4-way builds make sense.
6120 cur_target='10.5'
Ronald Oussoren23d92532009-09-07 06:12:00 +00006121
6122 elif test "${UNIVERSAL_ARCHS}" = "3-way"; then
6123 cur_target='10.5'
6124
6125 elif test "${UNIVERSAL_ARCHS}" = "intel"; then
6126 cur_target='10.5'
6127
6128 elif test "${UNIVERSAL_ARCHS}" = "64-bit"; then
6129 cur_target='10.5'
Ronald Oussoren25967582009-09-06 10:00:26 +00006130 fi
6131 else
Ronald Oussorenbc0e83c2010-02-11 13:26:54 +00006132 if test `/usr/bin/arch` = "i386"; then
Ronald Oussoren25967582009-09-06 10:00:26 +00006133 # On Intel macs default to a deployment
6134 # target of 10.4, that's the first OSX
6135 # release with Intel support.
6136 cur_target="10.4"
6137 fi
6138 fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006139 fi
6140 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
6141
6142 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
6143 # environment with a value that is the same as what we'll use
6144 # in the Makefile to ensure that we'll get the same compiler
6145 # environment during configure and build time.
6146 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
6147 export MACOSX_DEPLOYMENT_TARGET
6148 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
6149
Ronald Oussorena55af9a2010-01-17 16:25:57 +00006150 if test "${enable_universalsdk}"; then
6151 UNIVERSAL_ARCH_FLAGS=""
6152 if test "$UNIVERSAL_ARCHS" = "32-bit" ; then
6153 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
6154 ARCH_RUN_32BIT=""
Ronald Oussoren75912852010-04-08 08:13:31 +00006155 LIPO_32BIT_FLAGS=""
Ronald Oussorena55af9a2010-01-17 16:25:57 +00006156
6157 elif test "$UNIVERSAL_ARCHS" = "64-bit" ; then
6158 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
6159 LIPO_32BIT_FLAGS=""
6160 ARCH_RUN_32BIT="true"
6161
6162 elif test "$UNIVERSAL_ARCHS" = "all" ; then
6163 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
6164 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Ronald Oussoren92397ce2010-01-17 19:32:00 +00006165 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
Ronald Oussorena55af9a2010-01-17 16:25:57 +00006166
6167 elif test "$UNIVERSAL_ARCHS" = "intel" ; then
6168 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
6169 LIPO_32BIT_FLAGS="-extract i386"
Ronald Oussoren92397ce2010-01-17 19:32:00 +00006170 ARCH_RUN_32BIT="/usr/bin/arch -i386"
Ronald Oussorena55af9a2010-01-17 16:25:57 +00006171
6172 elif test "$UNIVERSAL_ARCHS" = "3-way" ; then
6173 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
6174 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Ronald Oussoren9922f172010-02-11 13:19:34 +00006175 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
Ronald Oussorena55af9a2010-01-17 16:25:57 +00006176
6177 else
Georg Brandl71f4fbb2011-02-25 11:04:50 +00006178 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 +00006179
6180 fi
6181
6182
Ronald Oussoren974eb5e2010-04-18 17:59:37 +00006183 CFLAGS="${UNIVERSAL_ARCH_FLAGS} ${CFLAGS}"
6184 if test "${UNIVERSALSDK}" != "/"
6185 then
6186 CPPFLAGS="-isysroot ${UNIVERSALSDK} ${CPPFLAGS}"
6187 LDFLAGS="-isysroot ${UNIVERSALSDK} ${LDFLAGS}"
6188 CFLAGS="-isysroot ${UNIVERSALSDK} ${CFLAGS}"
Ronald Oussorena55af9a2010-01-17 16:25:57 +00006189 fi
6190
6191 fi
6192
6193
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006194 ;;
6195 OSF*)
6196 BASECFLAGS="$BASECFLAGS -mieee"
6197 ;;
6198 esac
6199 ;;
6200
6201*)
6202 case $ac_sys_system in
6203 OpenUNIX*|UnixWare*)
6204 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
6205 ;;
6206 OSF*)
6207 BASECFLAGS="$BASECFLAGS -ieee -std"
6208 ;;
6209 SCO_SV*)
6210 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
6211 ;;
6212 esac
6213 ;;
6214esac
6215
Zachary Ware6ed42ea2015-12-21 11:43:03 -06006216# ICC needs -fp-model strict or floats behave badly
6217case "$CC" in
6218*icc*)
6219 BASECFLAGS="$BASECFLAGS -fp-model strict"
6220 ;;
6221esac
6222
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006223if test "$Py_DEBUG" = 'true'; then
6224 :
6225else
6226 OPT="-DNDEBUG $OPT"
6227fi
6228
6229if test "$ac_arch_flags"
6230then
6231 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
6232fi
6233
6234# disable check for icc since it seems to pass, but generates a warning
6235if test "$CC" = icc
6236then
6237 ac_cv_opt_olimit_ok=no
6238fi
6239
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006240{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -OPT:Olimit=0" >&5
6241$as_echo_n "checking whether $CC accepts -OPT:Olimit=0... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01006242if ${ac_cv_opt_olimit_ok+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006243 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006244else
6245 ac_save_cc="$CC"
6246CC="$CC -OPT:Olimit=0"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006247cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006248/* end confdefs.h. */
Gregory P. Smith373469a2009-11-01 21:03:38 +00006249
6250int
6251main ()
6252{
Mark Dickinson5e13e292010-05-11 08:55:06 +00006253
Gregory P. Smith373469a2009-11-01 21:03:38 +00006254 ;
6255 return 0;
6256}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006257_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006258if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006259 ac_cv_opt_olimit_ok=yes
6260else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006261 ac_cv_opt_olimit_ok=no
Matthias Klosec511b472010-05-08 11:01:39 +00006262
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006263fi
Gregory P. Smith373469a2009-11-01 21:03:38 +00006264rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006265CC="$ac_save_cc"
6266fi
6267
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006268{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_opt_olimit_ok" >&5
6269$as_echo "$ac_cv_opt_olimit_ok" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006270if test $ac_cv_opt_olimit_ok = yes; then
6271 case $ac_sys_system in
6272 # XXX is this branch needed? On MacOSX 10.2.2 the result of the
6273 # olimit_ok test is "no". Is it "yes" in some other Darwin-esque
6274 # environment?
6275 Darwin*)
6276 ;;
Trent Nelson34562e12012-10-17 18:01:12 -04006277 # XXX thankfully this useless troublemaker of a flag has been
6278 # eradicated in the 3.x line. For now, make sure it isn't picked
6279 # up by any of our other platforms that use CC.
6280 AIX*|SunOS*|HP-UX*|IRIX*)
6281 ;;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006282 *)
6283 BASECFLAGS="$BASECFLAGS -OPT:Olimit=0"
6284 ;;
6285 esac
6286else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006287 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Olimit 1500" >&5
6288$as_echo_n "checking whether $CC accepts -Olimit 1500... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01006289 if ${ac_cv_olimit_ok+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006290 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006291else
6292 ac_save_cc="$CC"
6293 CC="$CC -Olimit 1500"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006294 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006295/* end confdefs.h. */
Gregory P. Smith373469a2009-11-01 21:03:38 +00006296
6297int
6298main ()
6299{
Mark Dickinson5e13e292010-05-11 08:55:06 +00006300
Gregory P. Smith373469a2009-11-01 21:03:38 +00006301 ;
6302 return 0;
6303}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006304_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006305if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006306 ac_cv_olimit_ok=yes
6307else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006308 ac_cv_olimit_ok=no
Matthias Klosec511b472010-05-08 11:01:39 +00006309
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006310fi
Gregory P. Smith373469a2009-11-01 21:03:38 +00006311rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006312 CC="$ac_save_cc"
6313fi
6314
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006315 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_olimit_ok" >&5
6316$as_echo "$ac_cv_olimit_ok" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006317 if test $ac_cv_olimit_ok = yes; then
Stefan Krah67473262012-11-29 00:17:05 +01006318 case $ac_sys_system in
6319 # Issue #16534: On HP-UX ac_cv_olimit_ok=yes is a false positive.
6320 HP-UX*)
6321 ;;
6322 *)
6323 BASECFLAGS="$BASECFLAGS -Olimit 1500"
6324 ;;
6325 esac
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006326 fi
6327fi
6328
6329# Check whether GCC supports PyArg_ParseTuple format
6330if test "$GCC" = "yes"
6331then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006332 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc supports ParseTuple __format__" >&5
6333$as_echo_n "checking whether gcc supports ParseTuple __format__... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006334 save_CFLAGS=$CFLAGS
Benjamin Petersonc8759662013-05-11 13:00:05 -05006335 CFLAGS="$CFLAGS -Werror -Wformat"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006336 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006337/* end confdefs.h. */
6338
6339 void f(char*,...)__attribute((format(PyArg_ParseTuple, 1, 2)));
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006340int
6341main ()
6342{
6343
6344 ;
6345 return 0;
6346}
Matthias Klosec511b472010-05-08 11:01:39 +00006347
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006348_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006349if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006350
Matthias Klosec511b472010-05-08 11:01:39 +00006351
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006352$as_echo "#define HAVE_ATTRIBUTE_FORMAT_PARSETUPLE 1" >>confdefs.h
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006353
Matthias Klosec511b472010-05-08 11:01:39 +00006354 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006355$as_echo "yes" >&6; }
Matthias Klosec511b472010-05-08 11:01:39 +00006356
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006357else
Matthias Klosec511b472010-05-08 11:01:39 +00006358
6359 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006360$as_echo "no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006361
6362fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006363rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6364 CFLAGS=$save_CFLAGS
6365fi
6366
Brett Cannon4ff151a2015-09-18 15:09:42 -07006367
6368# Enable PGO flags.
Zachary Ware6ed42ea2015-12-21 11:43:03 -06006369
6370
6371
6372
6373
6374
Brett Cannon4ff151a2015-09-18 15:09:42 -07006375# Extract the first word of "llvm-profdata", so it can be a program name with args.
6376set dummy llvm-profdata; ac_word=$2
6377{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6378$as_echo_n "checking for $ac_word... " >&6; }
6379if ${ac_cv_prog_LLVM_PROF_FOUND+:} false; then :
6380 $as_echo_n "(cached) " >&6
6381else
6382 if test -n "$LLVM_PROF_FOUND"; then
6383 ac_cv_prog_LLVM_PROF_FOUND="$LLVM_PROF_FOUND" # Let the user override the test.
6384else
6385as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6386for as_dir in $PATH
6387do
6388 IFS=$as_save_IFS
6389 test -z "$as_dir" && as_dir=.
6390 for ac_exec_ext in '' $ac_executable_extensions; do
6391 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6392 ac_cv_prog_LLVM_PROF_FOUND="found"
6393 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6394 break 2
6395 fi
6396done
6397 done
6398IFS=$as_save_IFS
6399
6400 test -z "$ac_cv_prog_LLVM_PROF_FOUND" && ac_cv_prog_LLVM_PROF_FOUND="not-found"
6401fi
6402fi
6403LLVM_PROF_FOUND=$ac_cv_prog_LLVM_PROF_FOUND
6404if test -n "$LLVM_PROF_FOUND"; then
6405 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_PROF_FOUND" >&5
6406$as_echo "$LLVM_PROF_FOUND" >&6; }
6407else
6408 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6409$as_echo "no" >&6; }
6410fi
6411
6412
6413LLVM_PROF_ERR=no
6414case $CC in
6415 *clang*)
6416 # Any changes made here should be reflected in the GCC+Darwin case below
6417 PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
6418 PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd"
6419 LLVM_PROF_MERGER="llvm-profdata merge -output=code.profclangd *.profclangr"
6420 LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"code-%p.profclangr\""
6421 if test $LLVM_PROF_FOUND = not-found
6422 then
6423 LLVM_PROF_ERR=yes
6424 fi
6425 ;;
6426 *gcc*)
6427 case $ac_sys_system in
6428 Darwin*)
6429 PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
6430 PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd"
6431 LLVM_PROF_MERGER="llvm-profdata merge -output=code.profclangd *.profclangr"
6432 LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"code-%p.profclangr\""
6433 if test $LLVM_PROF_FOUND = not-found
6434 then
6435 LLVM_PROF_ERR=yes
6436 fi
6437 ;;
6438 *)
6439 PGO_PROF_GEN_FLAG="-fprofile-generate"
6440 PGO_PROF_USE_FLAG="-fprofile-use -fprofile-correction"
6441 LLVM_PROF_MERGER="true"
6442 LLVM_PROF_FILE=""
6443 ;;
6444 esac
6445 ;;
Zachary Ware6ed42ea2015-12-21 11:43:03 -06006446 *icc*)
6447 PGO_PROF_GEN_FLAG="-prof-gen"
6448 PGO_PROF_USE_FLAG="-prof-use"
6449 LLVM_PROF_MERGER="true"
6450 LLVM_PROF_FILE=""
6451 ;;
Brett Cannon4ff151a2015-09-18 15:09:42 -07006452esac
6453
6454
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006455# On some compilers, pthreads are available without further options
6456# (e.g. MacOS X). On some of these systems, the compiler will not
6457# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
6458# So we have to see first whether pthreads are available without
6459# options before we can check whether -Kpthread improves anything.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006460{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads are available without options" >&5
6461$as_echo_n "checking whether pthreads are available without options... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01006462if ${ac_cv_pthread_is_default+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006463 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006464else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006465 if test "$cross_compiling" = yes; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006466 ac_cv_pthread_is_default=no
6467else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006468 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006469/* end confdefs.h. */
6470
Stefan Krahae66ca62012-11-22 22:36:57 +01006471#include <stdio.h>
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006472#include <pthread.h>
6473
6474void* routine(void* p){return NULL;}
6475
6476int main(){
6477 pthread_t p;
6478 if(pthread_create(&p,NULL,routine,NULL)!=0)
6479 return 1;
6480 (void)pthread_detach(p);
6481 return 0;
6482}
6483
6484_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006485if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006486
6487 ac_cv_pthread_is_default=yes
6488 ac_cv_kthread=no
6489 ac_cv_pthread=no
6490
6491else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006492 ac_cv_pthread_is_default=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006493fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006494rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6495 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006496fi
6497
6498
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006499fi
6500
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006501{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_is_default" >&5
6502$as_echo "$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006503
6504
6505if test $ac_cv_pthread_is_default = yes
6506then
6507 ac_cv_kpthread=no
6508else
6509# -Kpthread, if available, provides the right #defines
6510# and linker options to make pthread_create available
6511# Some compilers won't report that they do not support -Kpthread,
6512# so we need to run a program to see whether it really made the
6513# function available.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006514{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kpthread" >&5
6515$as_echo_n "checking whether $CC accepts -Kpthread... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01006516if ${ac_cv_kpthread+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006517 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006518else
6519 ac_save_cc="$CC"
6520CC="$CC -Kpthread"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006521if test "$cross_compiling" = yes; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006522 ac_cv_kpthread=no
6523else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006524 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006525/* end confdefs.h. */
6526
Stefan Krahae66ca62012-11-22 22:36:57 +01006527#include <stdio.h>
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006528#include <pthread.h>
6529
6530void* routine(void* p){return NULL;}
6531
6532int main(){
6533 pthread_t p;
6534 if(pthread_create(&p,NULL,routine,NULL)!=0)
6535 return 1;
6536 (void)pthread_detach(p);
6537 return 0;
6538}
6539
6540_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006541if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006542 ac_cv_kpthread=yes
6543else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006544 ac_cv_kpthread=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006545fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006546rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6547 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006548fi
6549
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006550CC="$ac_save_cc"
6551fi
6552
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006553{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kpthread" >&5
6554$as_echo "$ac_cv_kpthread" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006555fi
6556
6557if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
6558then
6559# -Kthread, if available, provides the right #defines
6560# and linker options to make pthread_create available
6561# Some compilers won't report that they do not support -Kthread,
6562# so we need to run a program to see whether it really made the
6563# function available.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006564{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kthread" >&5
6565$as_echo_n "checking whether $CC accepts -Kthread... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01006566if ${ac_cv_kthread+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006567 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006568else
6569 ac_save_cc="$CC"
6570CC="$CC -Kthread"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006571if test "$cross_compiling" = yes; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006572 ac_cv_kthread=no
6573else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006574 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006575/* end confdefs.h. */
6576
Stefan Krahae66ca62012-11-22 22:36:57 +01006577#include <stdio.h>
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006578#include <pthread.h>
6579
6580void* routine(void* p){return NULL;}
6581
6582int main(){
6583 pthread_t p;
6584 if(pthread_create(&p,NULL,routine,NULL)!=0)
6585 return 1;
6586 (void)pthread_detach(p);
6587 return 0;
6588}
6589
6590_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006591if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006592 ac_cv_kthread=yes
6593else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006594 ac_cv_kthread=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006595fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006596rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6597 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006598fi
6599
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006600CC="$ac_save_cc"
6601fi
6602
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006603{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kthread" >&5
6604$as_echo "$ac_cv_kthread" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006605fi
6606
6607if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
6608then
6609# -pthread, if available, provides the right #defines
6610# and linker options to make pthread_create available
6611# Some compilers won't report that they do not support -pthread,
6612# so we need to run a program to see whether it really made the
6613# function available.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006614{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -pthread" >&5
6615$as_echo_n "checking whether $CC accepts -pthread... " >&6; }
doko@python.orgfa3f9a32013-01-25 15:32:31 +01006616if ${ac_cv_pthread+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006617 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006618else
6619 ac_save_cc="$CC"
6620CC="$CC -pthread"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006621if test "$cross_compiling" = yes; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006622 ac_cv_pthread=no
6623else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006624 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006625/* end confdefs.h. */
6626
Stefan Krahae66ca62012-11-22 22:36:57 +01006627#include <stdio.h>
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006628#include <pthread.h>
6629
6630void* routine(void* p){return NULL;}
6631
6632int main(){
6633 pthread_t p;
6634 if(pthread_create(&p,NULL,routine,NULL)!=0)
6635 return 1;
6636 (void)pthread_detach(p);
6637 return 0;
6638}
6639
6640_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006641if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006642 ac_cv_pthread=yes
6643else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006644 ac_cv_pthread=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006645fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006646rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6647 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006648fi
6649
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006650CC="$ac_save_cc"
6651fi
6652
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006653{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread" >&5
6654$as_echo "$ac_cv_pthread" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006655fi
6656
6657# If we have set a CC compiler flag for thread support then
6658# check if it works for CXX, too.
6659ac_cv_cxx_thread=no
6660if test ! -z "$CXX"
6661then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006662{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX also accepts flags for thread support" >&5
6663$as_echo_n "checking whether $CXX also accepts flags for thread support... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006664ac_save_cxx="$CXX"
6665
6666if test "$ac_cv_kpthread" = "yes"
6667then
6668 CXX="$CXX -Kpthread"
6669 ac_cv_cxx_thread=yes
6670elif test "$ac_cv_kthread" = "yes"
6671then
6672 CXX="$CXX -Kthread"
6673 ac_cv_cxx_thread=yes
6674elif test "$ac_cv_pthread" = "yes"
6675then
6676 CXX="$CXX -pthread"
6677 ac_cv_cxx_thread=yes
6678fi
6679
6680if test $ac_cv_cxx_thread = yes
6681then
6682 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
6683 $CXX -c conftest.$ac_ext 2>&5
6684 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
6685 && test -s conftest$ac_exeext && ./conftest$ac_exeext
6686 then
6687 ac_cv_cxx_thread=yes
6688 else
6689 ac_cv_cxx_thread=no
6690 fi
6691 rm -fr conftest*
6692fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006693{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_thread" >&5
6694$as_echo "$ac_cv_cxx_thread" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006695fi
6696CXX="$ac_save_cxx"
6697
6698
6699# checks for header files
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006700{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
6701$as_echo_n "checking for ANSI C header files... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01006702if ${ac_cv_header_stdc+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006703 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006704else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006705 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006706/* end confdefs.h. */
6707#include <stdlib.h>
6708#include <stdarg.h>
6709#include <string.h>
6710#include <float.h>
6711
6712int
6713main ()
6714{
6715
6716 ;
6717 return 0;
6718}
6719_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006720if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006721 ac_cv_header_stdc=yes
6722else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006723 ac_cv_header_stdc=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006724fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006725rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6726
6727if test $ac_cv_header_stdc = yes; then
6728 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006729 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006730/* end confdefs.h. */
6731#include <string.h>
6732
6733_ACEOF
6734if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006735 $EGREP "memchr" >/dev/null 2>&1; then :
6736
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006737else
6738 ac_cv_header_stdc=no
6739fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00006740rm -f conftest*
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006741
6742fi
6743
6744if test $ac_cv_header_stdc = yes; then
6745 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006746 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006747/* end confdefs.h. */
6748#include <stdlib.h>
6749
6750_ACEOF
6751if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006752 $EGREP "free" >/dev/null 2>&1; then :
6753
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006754else
6755 ac_cv_header_stdc=no
6756fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00006757rm -f conftest*
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006758
6759fi
6760
6761if test $ac_cv_header_stdc = yes; then
6762 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006763 if test "$cross_compiling" = yes; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006764 :
6765else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006766 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006767/* end confdefs.h. */
6768#include <ctype.h>
6769#include <stdlib.h>
6770#if ((' ' & 0x0FF) == 0x020)
6771# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
6772# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
6773#else
6774# define ISLOWER(c) \
6775 (('a' <= (c) && (c) <= 'i') \
6776 || ('j' <= (c) && (c) <= 'r') \
6777 || ('s' <= (c) && (c) <= 'z'))
6778# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
6779#endif
6780
6781#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
6782int
6783main ()
6784{
6785 int i;
6786 for (i = 0; i < 256; i++)
6787 if (XOR (islower (i), ISLOWER (i))
6788 || toupper (i) != TOUPPER (i))
6789 return 2;
6790 return 0;
6791}
6792_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006793if ac_fn_c_try_run "$LINENO"; then :
6794
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006795else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006796 ac_cv_header_stdc=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006797fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006798rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6799 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006800fi
6801
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006802fi
6803fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006804{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
6805$as_echo "$ac_cv_header_stdc" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006806if test $ac_cv_header_stdc = yes; then
6807
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006808$as_echo "#define STDC_HEADERS 1" >>confdefs.h
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006809
6810fi
6811
doko@ubuntu.comf27ec3e2014-04-17 20:11:19 +02006812for ac_header in asm/types.h conio.h direct.h dlfcn.h errno.h \
Martin v. Löwis0e8bd7e2006-06-10 12:23:46 +00006813fcntl.h grp.h \
doko@ubuntu.comf27ec3e2014-04-17 20:11:19 +02006814ieeefp.h io.h langinfo.h libintl.h poll.h process.h pthread.h \
Martin v. Löwis40e9aed2006-10-02 15:20:37 +00006815shadow.h signal.h stdint.h stropts.h termios.h thread.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00006816unistd.h utime.h \
Christian Heimes0e9ab5f2008-03-21 23:49:44 +00006817sys/audioio.h sys/bsdtty.h sys/epoll.h sys/event.h sys/file.h sys/loadavg.h \
6818sys/lock.h sys/mkdev.h sys/modem.h \
Martin v. Löwis0e8bd7e2006-06-10 12:23:46 +00006819sys/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 +00006820sys/termio.h sys/time.h \
Martin v. Löwis0e8bd7e2006-06-10 12:23:46 +00006821sys/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 +00006822sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Christian Heimes3aa138f2013-06-18 13:25:24 +02006823bluetooth/bluetooth.h linux/tipc.h spawn.h util.h alloca.h
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006824do :
6825 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
6826ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
Georg Brandl71f4fbb2011-02-25 11:04:50 +00006827if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006828 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006829#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00006830_ACEOF
6831
6832fi
6833
Guido van Rossum627b2d71993-12-24 10:39:16 +00006834done
6835
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006836ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00006837for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006838 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
6839{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
6840$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01006841if eval \${$as_ac_Header+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006842 $as_echo_n "(cached) " >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00006843else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006844 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006845/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006846#include <sys/types.h>
6847#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00006848
Martin v. Löwis11437992002-04-12 09:54:03 +00006849int
6850main ()
6851{
6852if ((DIR *) 0)
6853return 0;
6854 ;
6855 return 0;
6856}
6857_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006858if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006859 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00006860else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006861 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006862fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006863rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006864fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006865eval ac_res=\$$as_ac_Header
6866 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
6867$as_echo "$ac_res" >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00006868if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006869 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006870#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00006871_ACEOF
6872
6873ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00006874fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006875
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006876done
6877# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
6878if test $ac_header_dirent = dirent.h; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006879 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
6880$as_echo_n "checking for library containing opendir... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01006881if ${ac_cv_search_opendir+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006882 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006883else
Martin v. Löwis11437992002-04-12 09:54:03 +00006884 ac_func_search_save_LIBS=$LIBS
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006885cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006886/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006887
Martin v. Löwiseba40652007-08-30 20:10:57 +00006888/* Override any GCC internal prototype to avoid an error.
6889 Use char because int might match the return type of a GCC
6890 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006891#ifdef __cplusplus
6892extern "C"
6893#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006894char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006895int
6896main ()
6897{
Martin v. Löwiseba40652007-08-30 20:10:57 +00006898return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006899 ;
6900 return 0;
6901}
6902_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00006903for ac_lib in '' dir; do
6904 if test -z "$ac_lib"; then
6905 ac_res="none required"
6906 else
6907 ac_res=-l$ac_lib
Skip Montanaro89e975f2007-08-22 19:05:21 +00006908 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Martin v. Löwiseba40652007-08-30 20:10:57 +00006909 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006910 if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00006911 ac_cv_search_opendir=$ac_res
Brett Cannon19fab762007-06-02 03:02:29 +00006912fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006913rm -f core conftest.err conftest.$ac_objext \
6914 conftest$ac_exeext
Matthias Klose3cef2a92012-03-14 23:39:33 +01006915 if ${ac_cv_search_opendir+:} false; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00006916 break
Skip Montanaro89e975f2007-08-22 19:05:21 +00006917fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006918done
Matthias Klose3cef2a92012-03-14 23:39:33 +01006919if ${ac_cv_search_opendir+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006920
Martin v. Löwiseba40652007-08-30 20:10:57 +00006921else
6922 ac_cv_search_opendir=no
6923fi
6924rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006925LIBS=$ac_func_search_save_LIBS
6926fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006927{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
6928$as_echo "$ac_cv_search_opendir" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006929ac_res=$ac_cv_search_opendir
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006930if test "$ac_res" != no; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00006931 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00006932
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006933fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006934
Michael W. Hudson54241132001-12-07 15:38:26 +00006935else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006936 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
6937$as_echo_n "checking for library containing opendir... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01006938if ${ac_cv_search_opendir+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006939 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006940else
6941 ac_func_search_save_LIBS=$LIBS
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006942cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006943/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006944
Martin v. Löwiseba40652007-08-30 20:10:57 +00006945/* Override any GCC internal prototype to avoid an error.
6946 Use char because int might match the return type of a GCC
6947 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006948#ifdef __cplusplus
6949extern "C"
6950#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006951char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006952int
6953main ()
6954{
Martin v. Löwiseba40652007-08-30 20:10:57 +00006955return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006956 ;
6957 return 0;
6958}
6959_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00006960for ac_lib in '' x; do
6961 if test -z "$ac_lib"; then
6962 ac_res="none required"
6963 else
6964 ac_res=-l$ac_lib
Skip Montanaro89e975f2007-08-22 19:05:21 +00006965 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Martin v. Löwiseba40652007-08-30 20:10:57 +00006966 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006967 if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00006968 ac_cv_search_opendir=$ac_res
Brett Cannon19fab762007-06-02 03:02:29 +00006969fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006970rm -f core conftest.err conftest.$ac_objext \
6971 conftest$ac_exeext
Matthias Klose3cef2a92012-03-14 23:39:33 +01006972 if ${ac_cv_search_opendir+:} false; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00006973 break
Skip Montanaro89e975f2007-08-22 19:05:21 +00006974fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006975done
Matthias Klose3cef2a92012-03-14 23:39:33 +01006976if ${ac_cv_search_opendir+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006977
Martin v. Löwiseba40652007-08-30 20:10:57 +00006978else
6979 ac_cv_search_opendir=no
6980fi
6981rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006982LIBS=$ac_func_search_save_LIBS
6983fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006984{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
6985$as_echo "$ac_cv_search_opendir" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006986ac_res=$ac_cv_search_opendir
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006987if test "$ac_res" != no; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00006988 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00006989
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006990fi
6991
6992fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00006993
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006994{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5
6995$as_echo_n "checking whether sys/types.h defines makedev... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01006996if ${ac_cv_header_sys_types_h_makedev+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006997 $as_echo_n "(cached) " >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006998else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006999 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007000/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007001#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007002int
7003main ()
7004{
7005return makedev(0, 0);
7006 ;
7007 return 0;
7008}
7009_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007010if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007011 ac_cv_header_sys_types_h_makedev=yes
7012else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007013 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007014fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007015rm -f core conftest.err conftest.$ac_objext \
7016 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007017
7018fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007019{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_types_h_makedev" >&5
7020$as_echo "$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007021
7022if test $ac_cv_header_sys_types_h_makedev = no; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007023ac_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 +01007024if test "x$ac_cv_header_sys_mkdev_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007025
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007026$as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007027
7028fi
7029
7030
7031
7032 if test $ac_cv_header_sys_mkdev_h = no; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007033 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 +01007034if test "x$ac_cv_header_sys_sysmacros_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007035
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007036$as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007037
7038fi
7039
7040
7041 fi
7042fi
7043
Michael W. Hudson54241132001-12-07 15:38:26 +00007044
Martin v. Löwis11017b12006-01-14 18:12:57 +00007045# On Linux, netlink.h requires asm/types.h
Martin v. Löwis11017b12006-01-14 18:12:57 +00007046for ac_header in linux/netlink.h
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007047do :
7048 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 +00007049#ifdef HAVE_ASM_TYPES_H
7050#include <asm/types.h>
7051#endif
7052#ifdef HAVE_SYS_SOCKET_H
7053#include <sys/socket.h>
7054#endif
7055
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007056"
Matthias Klose3cef2a92012-03-14 23:39:33 +01007057if test "x$ac_cv_header_linux_netlink_h" = xyes; then :
Martin v. Löwis11017b12006-01-14 18:12:57 +00007058 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007059#define HAVE_LINUX_NETLINK_H 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00007060_ACEOF
7061
7062fi
7063
7064done
7065
7066
Guido van Rossum627b2d71993-12-24 10:39:16 +00007067# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00007068was_it_defined=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007069{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_t in time.h" >&5
7070$as_echo_n "checking for clock_t in time.h... " >&6; }
7071cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007072/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007073#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007074
7075_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007076if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007077 $EGREP "clock_t" >/dev/null 2>&1; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +00007078 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00007079else
Martin v. Löwis11437992002-04-12 09:54:03 +00007080
7081
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007082$as_echo "#define clock_t long" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00007083
Martin v. Löwisc45929e2002-04-06 10:10:49 +00007084
Guido van Rossum627b2d71993-12-24 10:39:16 +00007085fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00007086rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00007087
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007088{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
7089$as_echo "$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00007090
Neal Norwitz11690112002-07-30 01:08:28 +00007091# Check whether using makedev requires defining _OSF_SOURCE
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007092{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for makedev" >&5
7093$as_echo_n "checking for makedev... " >&6; }
7094cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007095/* end confdefs.h. */
Jesus Cea616de772010-04-28 10:32:30 +00007096
7097#if defined(MAJOR_IN_MKDEV)
7098#include <sys/mkdev.h>
7099#elif defined(MAJOR_IN_SYSMACROS)
7100#include <sys/sysmacros.h>
7101#else
Neal Norwitz6eb37f02003-02-23 23:28:15 +00007102#include <sys/types.h>
Jesus Cea616de772010-04-28 10:32:30 +00007103#endif
Neal Norwitz11690112002-07-30 01:08:28 +00007104int
7105main ()
7106{
7107 makedev(0, 0)
7108 ;
7109 return 0;
7110}
7111_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007112if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00007113 ac_cv_has_makedev=yes
7114else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007115 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00007116fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007117rm -f core conftest.err conftest.$ac_objext \
7118 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00007119if test "$ac_cv_has_makedev" = "no"; then
7120 # we didn't link, try if _OSF_SOURCE will allow us to link
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007121 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007122/* end confdefs.h. */
Neal Norwitz11690112002-07-30 01:08:28 +00007123
Neal Norwitz6eb37f02003-02-23 23:28:15 +00007124#define _OSF_SOURCE 1
7125#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00007126
Neal Norwitz11690112002-07-30 01:08:28 +00007127int
7128main ()
7129{
7130 makedev(0, 0)
7131 ;
7132 return 0;
7133}
7134_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007135if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00007136 ac_cv_has_makedev=yes
7137else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007138 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00007139fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007140rm -f core conftest.err conftest.$ac_objext \
7141 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00007142 if test "$ac_cv_has_makedev" = "yes"; then
7143
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007144$as_echo "#define _OSF_SOURCE 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00007145
7146 fi
7147fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007148{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_makedev" >&5
7149$as_echo "$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00007150if test "$ac_cv_has_makedev" = "yes"; then
7151
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007152$as_echo "#define HAVE_MAKEDEV 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00007153
7154fi
7155
Martin v. Löwis399a6892002-10-04 10:22:02 +00007156# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
7157# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
7158# defined, but the compiler does not support pragma redefine_extname,
7159# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
7160# structures (such as rlimit64) without declaring them. As a
7161# work-around, disable LFS on such configurations
7162
7163use_lfs=yes
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007164{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Solaris LFS bug" >&5
7165$as_echo_n "checking Solaris LFS bug... " >&6; }
7166cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007167/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00007168
7169#define _LARGEFILE_SOURCE 1
7170#define _FILE_OFFSET_BITS 64
7171#include <sys/resource.h>
7172
Martin v. Löwis399a6892002-10-04 10:22:02 +00007173int
7174main ()
7175{
7176struct rlimit foo;
7177 ;
7178 return 0;
7179}
7180_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007181if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis399a6892002-10-04 10:22:02 +00007182 sol_lfs_bug=no
7183else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007184 sol_lfs_bug=yes
Martin v. Löwis399a6892002-10-04 10:22:02 +00007185fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007186rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007187{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $sol_lfs_bug" >&5
7188$as_echo "$sol_lfs_bug" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00007189if test "$sol_lfs_bug" = "yes"; then
7190 use_lfs=no
7191fi
7192
7193if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00007194# Two defines needed to enable largefile support on various platforms
7195# These may affect some typedefs
Georg Brandl94800df2011-02-25 11:09:02 +00007196case $ac_sys_system/$ac_sys_release in
7197AIX*)
7198
7199$as_echo "#define _LARGE_FILES 1" >>confdefs.h
7200
7201 ;;
7202esac
Guido van Rossum810cc512001-09-09 23:51:39 +00007203
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007204$as_echo "#define _LARGEFILE_SOURCE 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007205
7206
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007207$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
Guido van Rossum810cc512001-09-09 23:51:39 +00007208
Martin v. Löwis399a6892002-10-04 10:22:02 +00007209fi
Michael W. Hudson54241132001-12-07 15:38:26 +00007210
Guido van Rossum84e7b241996-08-19 21:59:00 +00007211# Add some code to confdefs.h so that the test for off_t works on SCO
7212cat >> confdefs.h <<\EOF
7213#if defined(SCO_DS)
7214#undef _OFF_T
7215#endif
7216EOF
7217
Guido van Rossumef2255b2000-03-10 22:30:29 +00007218# Type availability checks
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007219ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
Matthias Klose3cef2a92012-03-14 23:39:33 +01007220if test "x$ac_cv_type_mode_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007221
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007222else
Martin v. Löwis11437992002-04-12 09:54:03 +00007223
7224cat >>confdefs.h <<_ACEOF
7225#define mode_t int
7226_ACEOF
7227
7228fi
7229
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007230ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
Matthias Klose3cef2a92012-03-14 23:39:33 +01007231if test "x$ac_cv_type_off_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007232
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007233else
Martin v. Löwis11437992002-04-12 09:54:03 +00007234
7235cat >>confdefs.h <<_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00007236#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00007237_ACEOF
7238
7239fi
7240
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007241ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
Matthias Klose3cef2a92012-03-14 23:39:33 +01007242if test "x$ac_cv_type_pid_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007243
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007244else
Martin v. Löwis11437992002-04-12 09:54:03 +00007245
7246cat >>confdefs.h <<_ACEOF
7247#define pid_t int
7248_ACEOF
7249
7250fi
7251
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00007252
Martin v. Löwis11437992002-04-12 09:54:03 +00007253cat >>confdefs.h <<_ACEOF
Matthias Klosecbf54b12010-05-08 11:04:18 +00007254#define RETSIGTYPE void
Martin v. Löwis11437992002-04-12 09:54:03 +00007255_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00007256
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007257ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
Matthias Klose3cef2a92012-03-14 23:39:33 +01007258if test "x$ac_cv_type_size_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007259
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007260else
Martin v. Löwis11437992002-04-12 09:54:03 +00007261
7262cat >>confdefs.h <<_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00007263#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00007264_ACEOF
7265
7266fi
7267
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007268{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
7269$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007270if ${ac_cv_type_uid_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007271 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007272else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007273 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007274/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007275#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007276
7277_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007278if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007279 $EGREP "uid_t" >/dev/null 2>&1; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007280 ac_cv_type_uid_t=yes
7281else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007282 ac_cv_type_uid_t=no
7283fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00007284rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00007285
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007286fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007287{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
7288$as_echo "$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00007289if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007290
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007291$as_echo "#define uid_t int" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007292
7293
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007294$as_echo "#define gid_t int" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007295
7296fi
7297
Mark Dickinson17c50cd2012-12-02 13:13:56 +00007298
7299# There are two separate checks for each of the exact-width integer types we
7300# need. First we check whether the type is available using the usual
7301# AC_CHECK_TYPE macro with the default includes (which includes <inttypes.h>
7302# and <stdint.h> where available). We then also use the special type checks of
7303# the form AC_TYPE_UINT32_T, which in the case that uint32_t is not available
7304# directly, #define's uint32_t to be a suitable type.
7305
7306ac_fn_c_check_type "$LINENO" "uint32_t" "ac_cv_type_uint32_t" "$ac_includes_default"
7307if test "x$ac_cv_type_uint32_t" = xyes; then :
7308
7309$as_echo "#define HAVE_UINT32_T 1" >>confdefs.h
7310
7311fi
7312
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007313ac_fn_c_find_uintX_t "$LINENO" "32" "ac_cv_c_uint32_t"
7314case $ac_cv_c_uint32_t in #(
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007315 no|yes) ;; #(
7316 *)
7317
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007318$as_echo "#define _UINT32_T 1" >>confdefs.h
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007319
7320
7321cat >>confdefs.h <<_ACEOF
7322#define uint32_t $ac_cv_c_uint32_t
7323_ACEOF
7324;;
7325 esac
7326
Mark Dickinson17c50cd2012-12-02 13:13:56 +00007327
7328ac_fn_c_check_type "$LINENO" "uint64_t" "ac_cv_type_uint64_t" "$ac_includes_default"
7329if test "x$ac_cv_type_uint64_t" = xyes; then :
7330
7331$as_echo "#define HAVE_UINT64_T 1" >>confdefs.h
7332
7333fi
7334
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007335ac_fn_c_find_uintX_t "$LINENO" "64" "ac_cv_c_uint64_t"
7336case $ac_cv_c_uint64_t in #(
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007337 no|yes) ;; #(
7338 *)
7339
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007340$as_echo "#define _UINT64_T 1" >>confdefs.h
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007341
7342
7343cat >>confdefs.h <<_ACEOF
7344#define uint64_t $ac_cv_c_uint64_t
7345_ACEOF
7346;;
7347 esac
7348
Mark Dickinson17c50cd2012-12-02 13:13:56 +00007349
7350ac_fn_c_check_type "$LINENO" "int32_t" "ac_cv_type_int32_t" "$ac_includes_default"
7351if test "x$ac_cv_type_int32_t" = xyes; then :
7352
7353$as_echo "#define HAVE_INT32_T 1" >>confdefs.h
7354
7355fi
7356
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007357ac_fn_c_find_intX_t "$LINENO" "32" "ac_cv_c_int32_t"
7358case $ac_cv_c_int32_t in #(
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007359 no|yes) ;; #(
7360 *)
7361
7362cat >>confdefs.h <<_ACEOF
7363#define int32_t $ac_cv_c_int32_t
7364_ACEOF
7365;;
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007366esac
7367
Mark Dickinson17c50cd2012-12-02 13:13:56 +00007368
7369ac_fn_c_check_type "$LINENO" "int64_t" "ac_cv_type_int64_t" "$ac_includes_default"
7370if test "x$ac_cv_type_int64_t" = xyes; then :
7371
7372$as_echo "#define HAVE_INT64_T 1" >>confdefs.h
7373
7374fi
7375
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007376ac_fn_c_find_intX_t "$LINENO" "64" "ac_cv_c_int64_t"
7377case $ac_cv_c_int64_t in #(
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007378 no|yes) ;; #(
7379 *)
7380
7381cat >>confdefs.h <<_ACEOF
7382#define int64_t $ac_cv_c_int64_t
7383_ACEOF
7384;;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00007385esac
Martin v. Löwis18e16552006-02-15 17:27:45 +00007386
Mark Dickinson17c50cd2012-12-02 13:13:56 +00007387
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007388ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
Matthias Klose3cef2a92012-03-14 23:39:33 +01007389if test "x$ac_cv_type_ssize_t" = xyes; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00007390
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007391$as_echo "#define HAVE_SSIZE_T 1" >>confdefs.h
Martin v. Löwis18e16552006-02-15 17:27:45 +00007392
7393fi
7394
Jack Jansendd19cf82001-12-06 22:36:17 +00007395
Michael W. Hudson54241132001-12-07 15:38:26 +00007396# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00007397# ANSI C requires sizeof(char) == 1, so no need to check it
Martin v. Löwiseba40652007-08-30 20:10:57 +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 int" >&5
7403$as_echo_n "checking size of int... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007404if ${ac_cv_sizeof_int+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007405 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007406else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007407 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 +00007408
Martin v. Löwis11437992002-04-12 09:54:03 +00007409else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007410 if test "$ac_cv_type_int" = yes; then
7411 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7412$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007413as_fn_error 77 "cannot compute sizeof (int)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007414See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007415 else
7416 ac_cv_sizeof_int=0
7417 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007418fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007419
Martin v. Löwis11437992002-04-12 09:54:03 +00007420fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007421{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
7422$as_echo "$ac_cv_sizeof_int" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007423
7424
7425
Martin v. Löwis11437992002-04-12 09:54:03 +00007426cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007427#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00007428_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007429
7430
Martin v. Löwiseba40652007-08-30 20:10:57 +00007431# The cast to long int works around a bug in the HP C Compiler
7432# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7433# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7434# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007435{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
7436$as_echo_n "checking size of long... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007437if ${ac_cv_sizeof_long+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007438 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007439else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007440 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 +00007441
Martin v. Löwis11437992002-04-12 09:54:03 +00007442else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007443 if test "$ac_cv_type_long" = yes; then
7444 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7445$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007446as_fn_error 77 "cannot compute sizeof (long)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007447See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007448 else
7449 ac_cv_sizeof_long=0
7450 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007451fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007452
Martin v. Löwis11437992002-04-12 09:54:03 +00007453fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007454{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
7455$as_echo "$ac_cv_sizeof_long" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007456
7457
7458
Martin v. Löwis11437992002-04-12 09:54:03 +00007459cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007460#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00007461_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007462
7463
Martin v. Löwiseba40652007-08-30 20:10:57 +00007464# The cast to long int works around a bug in the HP C Compiler
7465# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7466# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7467# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007468{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
7469$as_echo_n "checking size of void *... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007470if ${ac_cv_sizeof_void_p+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007471 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007472else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007473 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 +00007474
Martin v. Löwis11437992002-04-12 09:54:03 +00007475else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007476 if test "$ac_cv_type_void_p" = yes; then
7477 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7478$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007479as_fn_error 77 "cannot compute sizeof (void *)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007480See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007481 else
7482 ac_cv_sizeof_void_p=0
7483 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007484fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007485
Martin v. Löwis11437992002-04-12 09:54:03 +00007486fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007487{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
7488$as_echo "$ac_cv_sizeof_void_p" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007489
7490
7491
Martin v. Löwis11437992002-04-12 09:54:03 +00007492cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00007493#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00007494_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00007495
7496
Martin v. Löwiseba40652007-08-30 20:10:57 +00007497# The cast to long int works around a bug in the HP C Compiler
7498# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7499# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7500# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007501{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
7502$as_echo_n "checking size of short... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007503if ${ac_cv_sizeof_short+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007504 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007505else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007506 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 +00007507
Martin v. Löwis11437992002-04-12 09:54:03 +00007508else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007509 if test "$ac_cv_type_short" = yes; then
7510 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7511$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007512as_fn_error 77 "cannot compute sizeof (short)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007513See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007514 else
7515 ac_cv_sizeof_short=0
7516 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007517fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007518
Martin v. Löwis11437992002-04-12 09:54:03 +00007519fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007520{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
7521$as_echo "$ac_cv_sizeof_short" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007522
7523
7524
Martin v. Löwis11437992002-04-12 09:54:03 +00007525cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007526#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00007527_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007528
7529
Martin v. Löwiseba40652007-08-30 20:10:57 +00007530# The cast to long int works around a bug in the HP C Compiler
7531# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7532# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7533# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007534{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of float" >&5
7535$as_echo_n "checking size of float... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007536if ${ac_cv_sizeof_float+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007537 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007538else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007539 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 +00007540
Martin v. Löwis11437992002-04-12 09:54:03 +00007541else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007542 if test "$ac_cv_type_float" = yes; then
7543 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7544$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007545as_fn_error 77 "cannot compute sizeof (float)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007546See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007547 else
7548 ac_cv_sizeof_float=0
7549 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007550fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007551
Martin v. Löwis11437992002-04-12 09:54:03 +00007552fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007553{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_float" >&5
7554$as_echo "$ac_cv_sizeof_float" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007555
7556
7557
Martin v. Löwis11437992002-04-12 09:54:03 +00007558cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007559#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00007560_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007561
7562
Martin v. Löwiseba40652007-08-30 20:10:57 +00007563# The cast to long int works around a bug in the HP C Compiler
7564# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7565# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7566# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007567{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of double" >&5
7568$as_echo_n "checking size of double... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007569if ${ac_cv_sizeof_double+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007570 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007571else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007572 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 +00007573
Martin v. Löwis11437992002-04-12 09:54:03 +00007574else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007575 if test "$ac_cv_type_double" = yes; then
7576 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7577$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007578as_fn_error 77 "cannot compute sizeof (double)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007579See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007580 else
7581 ac_cv_sizeof_double=0
7582 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007583fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007584
Martin v. Löwis11437992002-04-12 09:54:03 +00007585fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007586{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5
7587$as_echo "$ac_cv_sizeof_double" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007588
7589
7590
Martin v. Löwis11437992002-04-12 09:54:03 +00007591cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007592#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00007593_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007594
7595
Martin v. Löwiseba40652007-08-30 20:10:57 +00007596# The cast to long int works around a bug in the HP C Compiler
7597# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7598# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7599# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007600{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of fpos_t" >&5
7601$as_echo_n "checking size of fpos_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007602if ${ac_cv_sizeof_fpos_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007603 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007604else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007605 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 +00007606
Martin v. Löwis11437992002-04-12 09:54:03 +00007607else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007608 if test "$ac_cv_type_fpos_t" = yes; then
7609 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7610$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007611as_fn_error 77 "cannot compute sizeof (fpos_t)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007612See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007613 else
7614 ac_cv_sizeof_fpos_t=0
7615 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007616fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007617
Martin v. Löwis11437992002-04-12 09:54:03 +00007618fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007619{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_fpos_t" >&5
7620$as_echo "$ac_cv_sizeof_fpos_t" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007621
7622
7623
Martin v. Löwis11437992002-04-12 09:54:03 +00007624cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007625#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007626_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007627
Michael W. Hudson54241132001-12-07 15:38:26 +00007628
Martin v. Löwiseba40652007-08-30 20:10:57 +00007629# The cast to long int works around a bug in the HP C Compiler
7630# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7631# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7632# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007633{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
7634$as_echo_n "checking size of size_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007635if ${ac_cv_sizeof_size_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007636 $as_echo_n "(cached) " >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00007637else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007638 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 +00007639
Martin v. Löwis18e16552006-02-15 17:27:45 +00007640else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007641 if test "$ac_cv_type_size_t" = yes; then
7642 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7643$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007644as_fn_error 77 "cannot compute sizeof (size_t)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007645See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007646 else
7647 ac_cv_sizeof_size_t=0
7648 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +00007649fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007650
Martin v. Löwis18e16552006-02-15 17:27:45 +00007651fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007652{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
7653$as_echo "$ac_cv_sizeof_size_t" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007654
7655
7656
Martin v. Löwis18e16552006-02-15 17:27:45 +00007657cat >>confdefs.h <<_ACEOF
7658#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
7659_ACEOF
7660
7661
Christian Heimes951cc0f2008-01-31 23:08:23 +00007662# The cast to long int works around a bug in the HP C Compiler
7663# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7664# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7665# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007666{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pid_t" >&5
7667$as_echo_n "checking size of pid_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007668if ${ac_cv_sizeof_pid_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007669 $as_echo_n "(cached) " >&6
Christian Heimes951cc0f2008-01-31 23:08:23 +00007670else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007671 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 +00007672
Christian Heimes951cc0f2008-01-31 23:08:23 +00007673else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007674 if test "$ac_cv_type_pid_t" = yes; then
7675 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7676$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007677as_fn_error 77 "cannot compute sizeof (pid_t)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007678See \`config.log' for more details" "$LINENO" 5; }
Christian Heimes951cc0f2008-01-31 23:08:23 +00007679 else
7680 ac_cv_sizeof_pid_t=0
7681 fi
7682fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007683
Christian Heimes951cc0f2008-01-31 23:08:23 +00007684fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007685{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pid_t" >&5
7686$as_echo "$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes951cc0f2008-01-31 23:08:23 +00007687
7688
7689
7690cat >>confdefs.h <<_ACEOF
7691#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
7692_ACEOF
7693
7694
Michael W. Hudson54241132001-12-07 15:38:26 +00007695
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007696{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support" >&5
7697$as_echo_n "checking for long long support... " >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007698have_long_long=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007699cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007700/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007701
Martin v. Löwis11437992002-04-12 09:54:03 +00007702int
7703main ()
7704{
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007705long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007706 ;
7707 return 0;
7708}
7709_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007710if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007711
7712
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007713$as_echo "#define HAVE_LONG_LONG 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007714
Martin v. Löwisc45929e2002-04-06 10:10:49 +00007715 have_long_long=yes
7716
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007717fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007718rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007719{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_long" >&5
7720$as_echo "$have_long_long" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +00007721if test "$have_long_long" = yes ; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00007722# The cast to long int works around a bug in the HP C Compiler
7723# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7724# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7725# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007726{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
7727$as_echo_n "checking size of long long... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007728if ${ac_cv_sizeof_long_long+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007729 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007730else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007731 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 +00007732
Martin v. Löwis11437992002-04-12 09:54:03 +00007733else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007734 if test "$ac_cv_type_long_long" = yes; then
7735 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7736$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007737as_fn_error 77 "cannot compute sizeof (long long)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007738See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007739 else
7740 ac_cv_sizeof_long_long=0
7741 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007742fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007743
Martin v. Löwis11437992002-04-12 09:54:03 +00007744fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007745{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
7746$as_echo "$ac_cv_sizeof_long_long" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007747
7748
7749
Martin v. Löwis11437992002-04-12 09:54:03 +00007750cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007751#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +00007752_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007753
Michael W. Hudson54241132001-12-07 15:38:26 +00007754
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007755fi
7756
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007757{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support" >&5
7758$as_echo_n "checking for long double support... " >&6; }
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007759have_long_double=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007760cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007761/* end confdefs.h. */
7762
7763int
7764main ()
7765{
Matthias Klosec511b472010-05-08 11:01:39 +00007766long double x; x = (long double)0;
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007767 ;
7768 return 0;
7769}
7770_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007771if ac_fn_c_try_compile "$LINENO"; then :
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007772
7773
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007774$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007775
7776 have_long_double=yes
7777
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007778fi
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007779rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007780{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_double" >&5
7781$as_echo "$have_long_double" >&6; }
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007782if test "$have_long_double" = yes ; then
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007783# The cast to long int works around a bug in the HP C Compiler
7784# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7785# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7786# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007787{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long double" >&5
7788$as_echo_n "checking size of long double... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007789if ${ac_cv_sizeof_long_double+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007790 $as_echo_n "(cached) " >&6
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007791else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007792 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 +00007793
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007794else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007795 if test "$ac_cv_type_long_double" = yes; then
7796 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7797$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007798as_fn_error 77 "cannot compute sizeof (long double)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007799See \`config.log' for more details" "$LINENO" 5; }
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007800 else
7801 ac_cv_sizeof_long_double=0
7802 fi
7803fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007804
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007805fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007806{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double" >&5
7807$as_echo "$ac_cv_sizeof_long_double" >&6; }
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007808
7809
7810
7811cat >>confdefs.h <<_ACEOF
7812#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
7813_ACEOF
7814
7815
7816fi
7817
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007818{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _Bool support" >&5
7819$as_echo_n "checking for _Bool support... " >&6; }
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007820have_c99_bool=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007821cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007822/* end confdefs.h. */
7823
7824int
7825main ()
7826{
7827_Bool x; x = (_Bool)0;
7828 ;
7829 return 0;
7830}
7831_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007832if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007833
7834
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007835$as_echo "#define HAVE_C99_BOOL 1" >>confdefs.h
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007836
7837 have_c99_bool=yes
7838
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007839fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007840rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007841{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_c99_bool" >&5
7842$as_echo "$have_c99_bool" >&6; }
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007843if test "$have_c99_bool" = yes ; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00007844# The cast to long int works around a bug in the HP C Compiler
7845# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7846# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7847# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007848{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of _Bool" >&5
7849$as_echo_n "checking size of _Bool... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007850if ${ac_cv_sizeof__Bool+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007851 $as_echo_n "(cached) " >&6
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007852else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007853 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 +00007854
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007855else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007856 if test "$ac_cv_type__Bool" = yes; then
7857 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7858$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007859as_fn_error 77 "cannot compute sizeof (_Bool)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007860See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007861 else
7862 ac_cv_sizeof__Bool=0
7863 fi
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007864fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007865
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007866fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007867{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof__Bool" >&5
7868$as_echo "$ac_cv_sizeof__Bool" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007869
7870
7871
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007872cat >>confdefs.h <<_ACEOF
7873#define SIZEOF__BOOL $ac_cv_sizeof__Bool
7874_ACEOF
7875
7876
7877fi
7878
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007879ac_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 +00007880 #include <stdint.h>
7881 #endif
Antoine Pitrou7be5a652010-10-10 08:14:41 +00007882 #ifdef HAVE_INTTYPES_H
7883 #include <inttypes.h>
7884 #endif
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007885"
Matthias Klose3cef2a92012-03-14 23:39:33 +01007886if test "x$ac_cv_type_uintptr_t" = xyes; then :
Martin v. Löwisebe26702006-10-02 14:55:51 +00007887
7888cat >>confdefs.h <<_ACEOF
7889#define HAVE_UINTPTR_T 1
7890_ACEOF
7891
Martin v. Löwiseba40652007-08-30 20:10:57 +00007892# The cast to long int works around a bug in the HP C Compiler
7893# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7894# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7895# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007896{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of uintptr_t" >&5
7897$as_echo_n "checking size of uintptr_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007898if ${ac_cv_sizeof_uintptr_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007899 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007900else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007901 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 +00007902
Martin v. Löwis11437992002-04-12 09:54:03 +00007903else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007904 if test "$ac_cv_type_uintptr_t" = yes; then
7905 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7906$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007907as_fn_error 77 "cannot compute sizeof (uintptr_t)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007908See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007909 else
7910 ac_cv_sizeof_uintptr_t=0
7911 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007912fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007913
Martin v. Löwis11437992002-04-12 09:54:03 +00007914fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007915{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uintptr_t" >&5
7916$as_echo "$ac_cv_sizeof_uintptr_t" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007917
7918
7919
Martin v. Löwis11437992002-04-12 09:54:03 +00007920cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007921#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007922_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007923
Michael W. Hudson54241132001-12-07 15:38:26 +00007924
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007925fi
7926
Martin v. Löwisebe26702006-10-02 14:55:51 +00007927
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007928# The cast to long int works around a bug in the HP C Compiler
7929# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7930# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7931# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007932{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
7933$as_echo_n "checking size of off_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007934if ${ac_cv_sizeof_off_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007935 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007936else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007937 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007938#ifdef HAVE_SYS_TYPES_H
7939#include <sys/types.h>
7940#endif
7941
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007942"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007943
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007944else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007945 if test "$ac_cv_type_off_t" = yes; then
7946 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7947$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007948as_fn_error 77 "cannot compute sizeof (off_t)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007949See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007950 else
7951 ac_cv_sizeof_off_t=0
7952 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007953fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007954
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007955fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007956{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
7957$as_echo "$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007958
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007959
7960
Martin v. Löwis11437992002-04-12 09:54:03 +00007961cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007962#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007963_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007964
Michael W. Hudson54241132001-12-07 15:38:26 +00007965
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007966
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007967{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable large file support" >&5
7968$as_echo_n "checking whether to enable large file support... " >&6; }
Mark Dickinson0ef0b912009-12-31 21:11:48 +00007969if test "$have_long_long" = yes
7970then
7971if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +00007972 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007973
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007974$as_echo "#define HAVE_LARGEFILE_SUPPORT 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007975
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007976 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7977$as_echo "yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007978else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007979 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7980$as_echo "no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007981fi
Mark Dickinson0ef0b912009-12-31 21:11:48 +00007982else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007983 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7984$as_echo "no" >&6; }
Mark Dickinson0ef0b912009-12-31 21:11:48 +00007985fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007986
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007987# The cast to long int works around a bug in the HP C Compiler
7988# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7989# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7990# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007991{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
7992$as_echo_n "checking size of time_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007993if ${ac_cv_sizeof_time_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007994 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007995else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007996 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007997#ifdef HAVE_SYS_TYPES_H
7998#include <sys/types.h>
7999#endif
8000#ifdef HAVE_TIME_H
8001#include <time.h>
8002#endif
8003
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008004"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008005
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008006else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008007 if test "$ac_cv_type_time_t" = yes; then
8008 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8009$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00008010as_fn_error 77 "cannot compute sizeof (time_t)
Matthias Klose3cef2a92012-03-14 23:39:33 +01008011See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008012 else
8013 ac_cv_sizeof_time_t=0
8014 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008015fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008016
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008017fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008018{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
8019$as_echo "$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008020
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008021
8022
Martin v. Löwis11437992002-04-12 09:54:03 +00008023cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008024#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008025_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008026
Michael W. Hudson54241132001-12-07 15:38:26 +00008027
8028
Trent Mick635f6fb2000-08-23 21:33:05 +00008029# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008030ac_save_cc="$CC"
8031if test "$ac_cv_kpthread" = "yes"
8032then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00008033elif test "$ac_cv_kthread" = "yes"
8034then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008035elif test "$ac_cv_pthread" = "yes"
8036then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008037fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008038{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_t" >&5
8039$as_echo_n "checking for pthread_t... " >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00008040have_pthread_t=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008041cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008042/* end confdefs.h. */
Matthias Klosec511b472010-05-08 11:01:39 +00008043
8044 #include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008045int
8046main ()
8047{
Guido van Rossum12580492000-09-24 16:47:19 +00008048pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008049 ;
8050 return 0;
8051}
Matthias Klosec511b472010-05-08 11:01:39 +00008052
Martin v. Löwis11437992002-04-12 09:54:03 +00008053_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008054if ac_fn_c_try_compile "$LINENO"; then :
Trent Mick635f6fb2000-08-23 21:33:05 +00008055 have_pthread_t=yes
Trent Mick635f6fb2000-08-23 21:33:05 +00008056fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008057rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008058{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_pthread_t" >&5
8059$as_echo "$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00008060if test "$have_pthread_t" = yes ; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008061 # The cast to long int works around a bug in the HP C Compiler
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008062# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8063# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8064# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008065{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
8066$as_echo_n "checking size of pthread_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008067if ${ac_cv_sizeof_pthread_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008068 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008069else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008070 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t" "
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008071#ifdef HAVE_PTHREAD_H
8072#include <pthread.h>
8073#endif
8074
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008075"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008076
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008077else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008078 if test "$ac_cv_type_pthread_t" = yes; then
8079 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8080$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00008081as_fn_error 77 "cannot compute sizeof (pthread_t)
Matthias Klose3cef2a92012-03-14 23:39:33 +01008082See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008083 else
8084 ac_cv_sizeof_pthread_t=0
8085 fi
Trent Mick635f6fb2000-08-23 21:33:05 +00008086fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008087
Trent Mick635f6fb2000-08-23 21:33:05 +00008088fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008089{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
8090$as_echo "$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008091
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008092
8093
Martin v. Löwis11437992002-04-12 09:54:03 +00008094cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00008095#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008096_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00008097
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008098
Trent Mick635f6fb2000-08-23 21:33:05 +00008099fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008100CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00008101
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008102{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-toolbox-glue" >&5
8103$as_echo_n "checking for --enable-toolbox-glue... " >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008104# Check whether --enable-toolbox-glue was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008105if test "${enable_toolbox_glue+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00008106 enableval=$enable_toolbox_glue;
8107fi
Jack Jansene578a632001-08-15 01:27:14 +00008108
8109
8110if test -z "$enable_toolbox_glue"
Martin v. Löwis11437992002-04-12 09:54:03 +00008111then
Jack Jansene578a632001-08-15 01:27:14 +00008112 case $ac_sys_system/$ac_sys_release in
8113 Darwin/*)
8114 enable_toolbox_glue="yes";;
8115 *)
8116 enable_toolbox_glue="no";;
8117 esac
8118fi
8119case "$enable_toolbox_glue" in
8120yes)
Jack Jansene578a632001-08-15 01:27:14 +00008121 extra_machdep_objs="Python/mactoolboxglue.o"
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00008122 extra_undefs="-u _PyMac_Error"
Martin v. Löwis11437992002-04-12 09:54:03 +00008123
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008124$as_echo "#define USE_TOOLBOX_OBJECT_GLUE 1" >>confdefs.h
Jack Jansene578a632001-08-15 01:27:14 +00008125
8126 ;;
8127*)
Jack Jansene578a632001-08-15 01:27:14 +00008128 extra_machdep_objs=""
Jack Jansen591cbed2001-08-15 13:55:15 +00008129 extra_undefs=""
Jack Jansene578a632001-08-15 01:27:14 +00008130 ;;
8131esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008132{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_toolbox_glue" >&5
8133$as_echo "$enable_toolbox_glue" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00008134
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008135
Ronald Oussoren0d236eb2008-06-06 21:31:33 +00008136
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008137case $ac_sys_system/$ac_sys_release in
Anthony Baxter82201742006-04-09 15:07:40 +00008138 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008139 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
8140 ;;
8141 Darwin/*)
8142 OTHER_LIBTOOL_OPT=""
8143 ;;
8144esac
8145
8146
Ronald Oussoren25967582009-09-06 10:00:26 +00008147
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008148case $ac_sys_system/$ac_sys_release in
Anthony Baxter82201742006-04-09 15:07:40 +00008149 Darwin/[01567]\..*)
Ronald Oussoren988117f2006-04-29 11:31:35 +00008150 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
8151 if test "${enable_universalsdk}"; then
8152 :
8153 else
Ronald Oussorenbc0e83c2010-02-11 13:26:54 +00008154 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Ronald Oussoren988117f2006-04-29 11:31:35 +00008155 fi
Jack Jansenb36687a2004-07-16 08:43:47 +00008156 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00008157 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00008158 Darwin/*)
Ronald Oussorena55af9a2010-01-17 16:25:57 +00008159 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008160 if test ${gcc_version} '<' 4.0
8161 then
8162 LIBTOOL_CRUFT="-lcc_dynamic"
8163 else
8164 LIBTOOL_CRUFT=""
8165 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008166 if test "$cross_compiling" = yes; then :
Ronald Oussoren23d92532009-09-07 06:12:00 +00008167 ac_osx_32bit=yes
Ronald Oussoren25967582009-09-06 10:00:26 +00008168else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008169 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren25967582009-09-06 10:00:26 +00008170/* end confdefs.h. */
Ronald Oussoren23d92532009-09-07 06:12:00 +00008171
Ronald Oussoren25967582009-09-06 10:00:26 +00008172 #include <unistd.h>
8173 int main(int argc, char*argv[])
8174 {
8175 if (sizeof(long) == 4) {
8176 return 0;
8177 } else {
8178 return 1;
8179 }
Ronald Oussoren84ddd722009-09-08 07:17:10 +00008180 }
Ronald Oussoren23d92532009-09-07 06:12:00 +00008181
Ronald Oussoren25967582009-09-06 10:00:26 +00008182_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008183if ac_fn_c_try_run "$LINENO"; then :
Ronald Oussoren25967582009-09-06 10:00:26 +00008184 ac_osx_32bit=yes
8185else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008186 ac_osx_32bit=no
Ronald Oussoren25967582009-09-06 10:00:26 +00008187fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008188rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8189 conftest.$ac_objext conftest.beam conftest.$ac_ext
Ronald Oussoren25967582009-09-06 10:00:26 +00008190fi
8191
8192
Ronald Oussoren25967582009-09-06 10:00:26 +00008193 if test "${ac_osx_32bit}" = "yes"; then
Ronald Oussorenbc0e83c2010-02-11 13:26:54 +00008194 case `/usr/bin/arch` in
Ronald Oussoren25967582009-09-06 10:00:26 +00008195 i386)
8196 MACOSX_DEFAULT_ARCH="i386"
8197 ;;
8198 ppc)
8199 MACOSX_DEFAULT_ARCH="ppc"
8200 ;;
8201 *)
Georg Brandl71f4fbb2011-02-25 11:04:50 +00008202 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren25967582009-09-06 10:00:26 +00008203 ;;
8204 esac
8205 else
Ronald Oussorenbc0e83c2010-02-11 13:26:54 +00008206 case `/usr/bin/arch` in
Ronald Oussoren25967582009-09-06 10:00:26 +00008207 i386)
8208 MACOSX_DEFAULT_ARCH="x86_64"
8209 ;;
8210 ppc)
8211 MACOSX_DEFAULT_ARCH="ppc64"
8212 ;;
8213 *)
Georg Brandl71f4fbb2011-02-25 11:04:50 +00008214 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren25967582009-09-06 10:00:26 +00008215 ;;
8216 esac
8217
8218 #ARCH_RUN_32BIT="true"
8219 fi
8220
8221 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +00008222 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00008223 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008224esac
8225
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008226{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-framework" >&5
8227$as_echo_n "checking for --enable-framework... " >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00008228if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008229then
Skip Montanarodecc6a42003-01-01 20:07:49 +00008230 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00008231 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00008232 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008233
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008234$as_echo "#define WITH_NEXT_FRAMEWORK 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008235
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008236 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8237$as_echo "yes" >&6; }
Ronald Oussoren450d5612009-06-08 21:12:41 +00008238 if test $enable_shared = "yes"
8239 then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00008240 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 +00008241 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008242else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008243 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8244$as_echo "no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008245fi
8246
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008247{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dyld" >&5
8248$as_echo_n "checking for dyld... " >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008249case $ac_sys_system/$ac_sys_release in
8250 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008251
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008252$as_echo "#define WITH_DYLD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008253
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008254 { $as_echo "$as_me:${as_lineno-$LINENO}: result: always on for Darwin" >&5
8255$as_echo "always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008256 ;;
8257 *)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008258 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8259$as_echo "no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00008260 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008261esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008262
Guido van Rossum0a516c91994-09-12 10:58:40 +00008263# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00008264
Michael W. Hudson54241132001-12-07 15:38:26 +00008265
8266
8267
8268
Ronald Oussoren75912852010-04-08 08:13:31 +00008269
Guido van Rossum0a516c91994-09-12 10:58:40 +00008270# SO is the extension of shared libraries `(including the dot!)
Guido van Rossumaef734b2001-01-10 21:09:12 +00008271# -- usually .so, .sl on HP-UX, .dll on Cygwin
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008272{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SO" >&5
8273$as_echo_n "checking SO... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008274if test -z "$SO"
8275then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008276 case $ac_sys_system in
Neal Norwitz58e28882006-05-19 07:00:58 +00008277 hp*|HP*)
8278 case `uname -m` in
8279 ia64) SO=.so;;
8280 *) SO=.sl;;
8281 esac
8282 ;;
Guido van Rossumaef734b2001-01-10 21:09:12 +00008283 CYGWIN*) SO=.dll;;
Guido van Rossum563e7081996-09-10 18:20:48 +00008284 *) SO=.so;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008285 esac
Martin v. Löwis368de8f2003-06-14 14:46:38 +00008286else
8287 # this might also be a termcap variable, see #610332
8288 echo
8289 echo '====================================================================='
8290 echo '+ +'
8291 echo '+ WARNING: You have set SO in your environment. +'
8292 echo '+ Do you really mean to change the extension for shared libraries? +'
8293 echo '+ Continuing in 10 seconds to let you to ponder. +'
8294 echo '+ +'
8295 echo '====================================================================='
8296 sleep 10
Guido van Rossum0a516c91994-09-12 10:58:40 +00008297fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008298{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SO" >&5
8299$as_echo "$SO" >&6; }
Neal Norwitz58e28882006-05-19 07:00:58 +00008300
Ronald Oussoren79f90492009-01-02 10:44:46 +00008301
Neal Norwitz58e28882006-05-19 07:00:58 +00008302cat >>confdefs.h <<_ACEOF
8303#define SHLIB_EXT "$SO"
8304_ACEOF
8305
Guido van Rossum0a516c91994-09-12 10:58:40 +00008306# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +00008307# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008308# (Shared libraries in this instance are shared modules to be loaded into
8309# Python, as opposed to building Python itself as a shared library.)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008310{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDSHARED" >&5
8311$as_echo_n "checking LDSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008312if test -z "$LDSHARED"
8313then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008314 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008315 AIX*)
Georg Brandl71f4fbb2011-02-25 11:04:50 +00008316 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:\$(srcdir)/Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +00008317 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008318 ;;
8319 BeOS*)
8320 BLDSHARED="\$(srcdir)/Modules/ld_so_beos $LDLIBRARY"
Guido van Rossumce608b02001-09-28 15:59:38 +00008321 LDSHARED="\$(BINLIBDEST)/config/ld_so_beos \$(LIBDIR)/$LDLIBRARY"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008322 ;;
Guido van Rossum07397971997-04-29 21:49:50 +00008323 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00008324 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +00008325 SunOS/5*)
Ronald Oussoren75912852010-04-08 08:13:31 +00008326 if test "$GCC" = "yes" ; then
8327 LDSHARED='$(CC) -shared'
8328 LDCXXSHARED='$(CXX) -shared'
8329 else
8330 LDSHARED='$(CC) -G'
8331 LDCXXSHARED='$(CXX) -G'
Greg Ward57c9a662000-05-26 12:22:54 +00008332 fi ;;
Thomas Hellerdc96a772008-04-04 10:07:55 +00008333 hp*|HP*)
Ronald Oussoren75912852010-04-08 08:13:31 +00008334 if test "$GCC" = "yes" ; then
8335 LDSHARED='$(CC) -shared'
8336 LDCXXSHARED='$(CXX) -shared'
8337 else
8338 LDSHARED='ld -b'
Thomas Hellerdc96a772008-04-04 10:07:55 +00008339 fi ;;
Guido van Rossumda88dad1995-01-26 00:46:29 +00008340 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
Jack Jansen418c3b12001-11-14 10:59:57 +00008341 Darwin/1.3*)
Stefan Krah3a3e2032010-11-28 15:30:05 +00008342 LDSHARED='$(CC) -bundle'
8343 LDCXXSHARED='$(CXX) -bundle'
Jack Jansena3891ea2001-09-07 14:25:12 +00008344 if test "$enable_framework" ; then
8345 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00008346 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
8347 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Ronald Oussoren75912852010-04-08 08:13:31 +00008348 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00008349 else
8350 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00008351 LDSHARED="$LDSHARED -undefined suppress"
Ronald Oussoren75912852010-04-08 08:13:31 +00008352 LDCXXSHARED="$LDCXXSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00008353 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00008354 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Stefan Krah3a3e2032010-11-28 15:30:05 +00008355 LDSHARED='$(CC) -bundle'
8356 LDCXXSHARED='$(CXX) -bundle'
Jack Jansene578a632001-08-15 01:27:14 +00008357 if test "$enable_framework" ; then
8358 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00008359 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
8360 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Ronald Oussoren75912852010-04-08 08:13:31 +00008361 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00008362 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00008363 # No framework, use the Python app as bundle-loader
8364 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00008365 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Ronald Oussoren75912852010-04-08 08:13:31 +00008366 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008367 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00008368 Darwin/*)
8369 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
8370 # This allows an extension to be used in any Python
Ronald Oussoren38f1b982007-09-02 09:46:07 +00008371
Ned Deilyc40b9032014-06-25 13:48:46 -07008372 dep_target_major=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
8373 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
8374 dep_target_minor=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
8375 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
8376 if test ${dep_target_major} -eq 10 && \
8377 test ${dep_target_minor} -le 2
Jack Jansen6b08a402004-06-03 12:41:45 +00008378 then
Ned Deilyc40b9032014-06-25 13:48:46 -07008379 # building for OS X 10.0 through 10.2
Stefan Krah3a3e2032010-11-28 15:30:05 +00008380 LDSHARED='$(CC) -bundle'
8381 LDCXXSHARED='$(CXX) -bundle'
Jack Jansen6b08a402004-06-03 12:41:45 +00008382 if test "$enable_framework" ; then
8383 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00008384 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
8385 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Ronald Oussoren75912852010-04-08 08:13:31 +00008386 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +00008387 else
8388 # No framework, use the Python app as bundle-loader
8389 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
8390 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Ronald Oussoren75912852010-04-08 08:13:31 +00008391 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Jack Jansen6b08a402004-06-03 12:41:45 +00008392 fi
Ned Deilyc40b9032014-06-25 13:48:46 -07008393 else
8394 # building for OS X 10.3 and later
8395 if test "${enable_universalsdk}"; then
8396 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
8397 fi
8398 LDSHARED='$(CC) -bundle -undefined dynamic_lookup'
8399 LDCXXSHARED='$(CXX) -bundle -undefined dynamic_lookup'
8400 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +00008401 fi
8402 ;;
Ronald Oussoren75912852010-04-08 08:13:31 +00008403 Linux*|GNU*|QNX*)
8404 LDSHARED='$(CC) -shared'
8405 LDCXXSHARED='$(CXX) -shared';;
8406 BSD/OS*/4*)
8407 LDSHARED="gcc -shared"
8408 LDCXXSHARED="g++ -shared";;
Martin v. Löwis222c5152006-06-03 07:37:13 +00008409 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00008410 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00008411 then
Stefan Krah3a3e2032010-11-28 15:30:05 +00008412 LDSHARED='$(CC) -shared'
8413 LDCXXSHARED='$(CXX) -shared'
Guido van Rossum0286ae82000-08-29 15:06:49 +00008414 else
Stefan Krah3a3e2032010-11-28 15:30:05 +00008415 LDSHARED="ld -Bshareable"
Guido van Rossum0286ae82000-08-29 15:06:49 +00008416 fi;;
Martin v. Löwis222c5152006-06-03 07:37:13 +00008417 OpenBSD*)
8418 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
8419 then
Stefan Krah3a3e2032010-11-28 15:30:05 +00008420 LDSHARED='$(CC) -shared $(CCSHARED)'
8421 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Martin v. Löwis222c5152006-06-03 07:37:13 +00008422 else
8423 case `uname -r` in
8424 [01].* | 2.[0-7] | 2.[0-7].*)
8425 LDSHARED="ld -Bshareable ${LDFLAGS}"
8426 ;;
8427 *)
Stefan Krah3a3e2032010-11-28 15:30:05 +00008428 LDSHARED='$(CC) -shared $(CCSHARED)'
8429 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Martin v. Löwis222c5152006-06-03 07:37:13 +00008430 ;;
8431 esac
8432 fi;;
Ronald Oussoren75912852010-04-08 08:13:31 +00008433 NetBSD*|DragonFly*)
Antoine Pitroucb402772011-01-02 20:51:34 +00008434 LDSHARED='$(CC) -shared'
8435 LDCXXSHARED='$(CXX) -shared';;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00008436 OpenUNIX*|UnixWare*)
Ronald Oussoren75912852010-04-08 08:13:31 +00008437 if test "$GCC" = "yes" ; then
8438 LDSHARED='$(CC) -shared'
8439 LDCXXSHARED='$(CXX) -shared'
8440 else
8441 LDSHARED='$(CC) -G'
8442 LDCXXSHARED='$(CXX) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00008443 fi;;
Ronald Oussoren75912852010-04-08 08:13:31 +00008444 SCO_SV*)
8445 LDSHARED='$(CC) -Wl,-G,-Bexport'
8446 LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
8447 CYGWIN*)
8448 LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
8449 LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
8450 atheos*)
8451 LDSHARED="gcc -shared"
8452 LDCXXSHARED="g++ -shared";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008453 *) LDSHARED="ld";;
8454 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008455fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008456{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDSHARED" >&5
8457$as_echo "$LDSHARED" >&6; }
Ronald Oussoren75912852010-04-08 08:13:31 +00008458LDCXXSHARED=${LDCXXSHARED-$LDSHARED}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008459BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00008460# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008461# library (module) -- this is only needed for a few systems
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008462{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CCSHARED" >&5
8463$as_echo_n "checking CCSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008464if test -z "$CCSHARED"
8465then
Guido van Rossum07397971997-04-29 21:49:50 +00008466 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00008467 SunOS*) if test "$GCC" = yes;
Martin v. Löwiseb623572007-03-12 10:50:39 +00008468 then CCSHARED="-fPIC";
8469 elif test `uname -p` = sparc;
8470 then CCSHARED="-xcode=pic32";
8471 else CCSHARED="-Kpic";
8472 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00008473 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00008474 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00008475 else CCSHARED="+z";
8476 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008477 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00008478 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00008479 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00008480 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00008481 if test "$GCC" = "yes"
8482 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008483 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00008484 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00008485 SCO_SV*)
8486 if test "$GCC" = "yes"
8487 then CCSHARED="-fPIC"
8488 else CCSHARED="-Kpic -belf"
8489 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008490 IRIX*/6*) case $CC in
8491 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00008492 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008493 esac;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008494 atheos*) CCSHARED="-fPIC";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008495 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008496fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008497{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCSHARED" >&5
8498$as_echo "$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008499# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008500# the python executable -- this is only needed for a few systems
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008501{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKFORSHARED" >&5
8502$as_echo_n "checking LINKFORSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008503if test -z "$LINKFORSHARED"
8504then
Guido van Rossum07397971997-04-29 21:49:50 +00008505 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008506 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008507 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00008508 LINKFORSHARED="-Wl,-E -Wl,+s";;
8509# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00008510 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008511 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008512 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00008513 Darwin/*)
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00008514 # -u _PyMac_Error is needed to pull in the mac toolbox glue,
8515 # which is
Jack Jansene578a632001-08-15 01:27:14 +00008516 # not used by the core itself but which needs to be in the core so
8517 # that dynamically loaded extension modules have access to it.
Jack Jansen97e3f002003-02-23 22:59:01 +00008518 # -prebind is no longer used, because it actually seems to give a
8519 # slowdown in stead of a speedup, maybe due to the large number of
8520 # dynamic loads Python does.
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00008521
8522 LINKFORSHARED="$extra_undefs"
Jack Jansene578a632001-08-15 01:27:14 +00008523 if test "$enable_framework"
8524 then
Jack Jansenda49e192005-01-07 13:08:22 +00008525 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00008526 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00008527 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00008528 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00008529 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00008530 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00008531 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +00008532 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
8533 then
8534 LINKFORSHARED="-Wl,--export-dynamic"
8535 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008536 SunOS/5*) case $CC in
8537 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00008538 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00008539 then
8540 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008541 fi;;
8542 esac;;
Jason Tishler30765592003-09-04 11:04:06 +00008543 CYGWIN*)
8544 if test $enable_shared = "no"
8545 then
8546 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
8547 fi;;
Martin v. Löwis8c255e42008-05-23 15:06:50 +00008548 QNX*)
8549 # -Wl,-E causes the symbols to be added to the dynamic
8550 # symbol table so that they can be found when a module
8551 # is loaded. -N 2048K causes the stack size to be set
8552 # to 2048 kilobytes so that the stack doesn't overflow
8553 # when running test_compile.py.
8554 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008555 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008556fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008557{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKFORSHARED" >&5
8558$as_echo "$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008559
Michael W. Hudson54241132001-12-07 15:38:26 +00008560
Ronald Oussoren0d236eb2008-06-06 21:31:33 +00008561
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008562{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAGSFORSHARED" >&5
8563$as_echo_n "checking CFLAGSFORSHARED... " >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00008564if test ! "$LIBRARY" = "$LDLIBRARY"
8565then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00008566 case $ac_sys_system in
8567 CYGWIN*)
8568 # Cygwin needs CCSHARED when building extension DLLs
8569 # but not when building the interpreter DLL.
8570 CFLAGSFORSHARED='';;
8571 *)
8572 CFLAGSFORSHARED='$(CCSHARED)'
8573 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00008574fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008575{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CFLAGSFORSHARED" >&5
8576$as_echo "$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00008577
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008578# SHLIBS are libraries (except -lc and -lm) to link to the python shared
8579# library (with --enable-shared).
8580# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00008581# symbols, this must be set to $(LIBS) (expanded by make). We do this even
8582# if it is not required, since it creates a dependency of the shared library
8583# to LIBS. This, in turn, means that applications linking the shared libpython
8584# don't need to link LIBS explicitly. The default should be only changed
8585# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008586
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008587{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SHLIBS" >&5
8588$as_echo_n "checking SHLIBS... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008589case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008590 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00008591 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008592esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008593{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIBS" >&5
8594$as_echo "$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008595
8596
Guido van Rossum627b2d71993-12-24 10:39:16 +00008597# checks for libraries
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008598{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
8599$as_echo_n "checking for dlopen in -ldl... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008600if ${ac_cv_lib_dl_dlopen+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008601 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008602else
Martin v. Löwis11437992002-04-12 09:54:03 +00008603 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008604LIBS="-ldl $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008605cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008606/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008607
Martin v. Löwiseba40652007-08-30 20:10:57 +00008608/* Override any GCC internal prototype to avoid an error.
8609 Use char because int might match the return type of a GCC
8610 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008611#ifdef __cplusplus
8612extern "C"
8613#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008614char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008615int
8616main ()
8617{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008618return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008619 ;
8620 return 0;
8621}
8622_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008623if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008624 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008625else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008626 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008627fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008628rm -f core conftest.err conftest.$ac_objext \
8629 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008630LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00008631fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008632{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
8633$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008634if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008635 cat >>confdefs.h <<_ACEOF
8636#define HAVE_LIBDL 1
8637_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00008638
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008639 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00008640
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008641fi
8642 # Dynamic linking for SunOS/Solaris and SYSV
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008643{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
8644$as_echo_n "checking for shl_load in -ldld... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008645if ${ac_cv_lib_dld_shl_load+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008646 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008647else
Martin v. Löwis11437992002-04-12 09:54:03 +00008648 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008649LIBS="-ldld $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008650cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008651/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008652
Martin v. Löwiseba40652007-08-30 20:10:57 +00008653/* Override any GCC internal prototype to avoid an error.
8654 Use char because int might match the return type of a GCC
8655 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008656#ifdef __cplusplus
8657extern "C"
8658#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008659char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008660int
8661main ()
8662{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008663return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008664 ;
8665 return 0;
8666}
8667_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008668if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008669 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008670else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008671 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008672fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008673rm -f core conftest.err conftest.$ac_objext \
8674 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008675LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00008676fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008677{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
8678$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008679if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008680 cat >>confdefs.h <<_ACEOF
8681#define HAVE_LIBDLD 1
8682_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00008683
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008684 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008685
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008686fi
8687 # Dynamic linking for HP-UX
Victor Stinner7c906672015-01-06 13:53:37 +01008688{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for RAND_egd in -lcrypto" >&5
8689$as_echo_n "checking for RAND_egd in -lcrypto... " >&6; }
8690if ${ac_cv_lib_crypto_RAND_egd+:} false; then :
8691 $as_echo_n "(cached) " >&6
8692else
8693 ac_check_lib_save_LIBS=$LIBS
8694LIBS="-lcrypto $LIBS"
8695cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8696/* end confdefs.h. */
8697
8698/* Override any GCC internal prototype to avoid an error.
8699 Use char because int might match the return type of a GCC
8700 builtin and then its argument prototype would still apply. */
8701#ifdef __cplusplus
8702extern "C"
8703#endif
8704char RAND_egd ();
8705int
8706main ()
8707{
8708return RAND_egd ();
8709 ;
8710 return 0;
8711}
8712_ACEOF
8713if ac_fn_c_try_link "$LINENO"; then :
8714 ac_cv_lib_crypto_RAND_egd=yes
8715else
8716 ac_cv_lib_crypto_RAND_egd=no
8717fi
8718rm -f core conftest.err conftest.$ac_objext \
8719 conftest$ac_exeext conftest.$ac_ext
8720LIBS=$ac_check_lib_save_LIBS
8721fi
8722{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_RAND_egd" >&5
8723$as_echo "$ac_cv_lib_crypto_RAND_egd" >&6; }
8724if test "x$ac_cv_lib_crypto_RAND_egd" = xyes; then :
8725
8726$as_echo "#define HAVE_RAND_EGD 1" >>confdefs.h
8727
8728fi
8729
Martin v. Löwis519adae2003-09-20 10:47:47 +00008730
Ronald Oussoren79f90492009-01-02 10:44:46 +00008731# only check for sem_init if thread support is requested
Martin v. Löwis519adae2003-09-20 10:47:47 +00008732if test "$with_threads" = "yes" -o -z "$with_threads"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008733 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
8734$as_echo_n "checking for library containing sem_init... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008735if ${ac_cv_search_sem_init+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008736 $as_echo_n "(cached) " >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00008737else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00008738 ac_func_search_save_LIBS=$LIBS
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008739cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008740/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008741
Martin v. Löwiseba40652007-08-30 20:10:57 +00008742/* Override any GCC internal prototype to avoid an error.
8743 Use char because int might match the return type of a GCC
8744 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008745#ifdef __cplusplus
8746extern "C"
8747#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008748char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008749int
8750main ()
8751{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008752return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008753 ;
8754 return 0;
8755}
8756_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00008757for ac_lib in '' pthread rt posix4; do
8758 if test -z "$ac_lib"; then
8759 ac_res="none required"
8760 else
8761 ac_res=-l$ac_lib
Skip Montanaro89e975f2007-08-22 19:05:21 +00008762 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Martin v. Löwiseba40652007-08-30 20:10:57 +00008763 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008764 if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00008765 ac_cv_search_sem_init=$ac_res
Brett Cannon19fab762007-06-02 03:02:29 +00008766fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008767rm -f core conftest.err conftest.$ac_objext \
8768 conftest$ac_exeext
Matthias Klose3cef2a92012-03-14 23:39:33 +01008769 if ${ac_cv_search_sem_init+:} false; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00008770 break
Skip Montanaro89e975f2007-08-22 19:05:21 +00008771fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008772done
Matthias Klose3cef2a92012-03-14 23:39:33 +01008773if ${ac_cv_search_sem_init+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008774
Martin v. Löwiseba40652007-08-30 20:10:57 +00008775else
8776 ac_cv_search_sem_init=no
8777fi
8778rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00008779LIBS=$ac_func_search_save_LIBS
8780fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008781{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
8782$as_echo "$ac_cv_search_sem_init" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008783ac_res=$ac_cv_search_sem_init
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008784if test "$ac_res" != no; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00008785 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00008786
Martin v. Löwis41933dd2002-03-21 15:10:58 +00008787fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +00008788 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +00008789 # posix4 on Solaris 2.6
8790 # pthread (first!) on Linux
8791fi
8792
Martin v. Löwis19d17342003-06-14 21:03:05 +00008793# check if we need libintl for locale functions
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008794{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for textdomain in -lintl" >&5
8795$as_echo_n "checking for textdomain in -lintl... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008796if ${ac_cv_lib_intl_textdomain+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008797 $as_echo_n "(cached) " >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +00008798else
8799 ac_check_lib_save_LIBS=$LIBS
8800LIBS="-lintl $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008801cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008802/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00008803
Martin v. Löwiseba40652007-08-30 20:10:57 +00008804/* Override any GCC internal prototype to avoid an error.
8805 Use char because int might match the return type of a GCC
8806 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00008807#ifdef __cplusplus
8808extern "C"
8809#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +00008810char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00008811int
8812main ()
8813{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008814return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00008815 ;
8816 return 0;
8817}
8818_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008819if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00008820 ac_cv_lib_intl_textdomain=yes
8821else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008822 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +00008823fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008824rm -f core conftest.err conftest.$ac_objext \
8825 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +00008826LIBS=$ac_check_lib_save_LIBS
8827fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008828{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_textdomain" >&5
8829$as_echo "$ac_cv_lib_intl_textdomain" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008830if test "x$ac_cv_lib_intl_textdomain" = xyes; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00008831
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008832$as_echo "#define WITH_LIBINTL 1" >>confdefs.h
Martin v. Löwis19d17342003-06-14 21:03:05 +00008833
8834fi
8835
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008836
8837# checks for system dependent C++ extensions support
8838case "$ac_sys_system" in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008839 AIX*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for genuine AIX C++ extensions support" >&5
8840$as_echo_n "checking for genuine AIX C++ extensions support... " >&6; }
8841 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008842/* end confdefs.h. */
Matthias Klosec511b472010-05-08 11:01:39 +00008843
Georg Brandl94800df2011-02-25 11:09:02 +00008844 #include <load.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008845int
8846main ()
8847{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008848loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00008849 ;
8850 return 0;
8851}
Matthias Klosec511b472010-05-08 11:01:39 +00008852
Martin v. Löwis11437992002-04-12 09:54:03 +00008853_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008854if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008855
Matthias Klosec511b472010-05-08 11:01:39 +00008856
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008857$as_echo "#define AIX_GENUINE_CPLUSPLUS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008858
Matthias Klosec511b472010-05-08 11:01:39 +00008859 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008860$as_echo "yes" >&6; }
Matthias Klosec511b472010-05-08 11:01:39 +00008861
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008862else
Matthias Klosec511b472010-05-08 11:01:39 +00008863
8864 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008865$as_echo "no" >&6; }
Matthias Klosec511b472010-05-08 11:01:39 +00008866
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008867fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008868rm -f core conftest.err conftest.$ac_objext \
8869 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008870 *) ;;
8871esac
8872
Guido van Rossum70c7f481998-03-26 18:44:10 +00008873# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008874# BeOS' sockets are stashed in libnet.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008875{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_open in -lnsl" >&5
8876$as_echo_n "checking for t_open in -lnsl... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008877if ${ac_cv_lib_nsl_t_open+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008878 $as_echo_n "(cached) " >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008879else
Martin v. Löwis11437992002-04-12 09:54:03 +00008880 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008881LIBS="-lnsl $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008882cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008883/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008884
Martin v. Löwiseba40652007-08-30 20:10:57 +00008885/* Override any GCC internal prototype to avoid an error.
8886 Use char because int might match the return type of a GCC
8887 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008888#ifdef __cplusplus
8889extern "C"
8890#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008891char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008892int
8893main ()
8894{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008895return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008896 ;
8897 return 0;
8898}
8899_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008900if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008901 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008902else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008903 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008904fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008905rm -f core conftest.err conftest.$ac_objext \
8906 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008907LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008908fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008909{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_t_open" >&5
8910$as_echo "$ac_cv_lib_nsl_t_open" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008911if test "x$ac_cv_lib_nsl_t_open" = xyes; then :
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008912 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008913fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00008914 # SVR4
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008915{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
8916$as_echo_n "checking for socket in -lsocket... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008917if ${ac_cv_lib_socket_socket+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008918 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008919else
Martin v. Löwis11437992002-04-12 09:54:03 +00008920 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008921LIBS="-lsocket $LIBS $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008922cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008923/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008924
Martin v. Löwiseba40652007-08-30 20:10:57 +00008925/* Override any GCC internal prototype to avoid an error.
8926 Use char because int might match the return type of a GCC
8927 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008928#ifdef __cplusplus
8929extern "C"
8930#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008931char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008932int
8933main ()
8934{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008935return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008936 ;
8937 return 0;
8938}
8939_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008940if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008941 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008942else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008943 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008944fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008945rm -f core conftest.err conftest.$ac_objext \
8946 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008947LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008948fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008949{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
8950$as_echo "$ac_cv_lib_socket_socket" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008951if test "x$ac_cv_lib_socket_socket" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +00008952 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +00008953fi
8954 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +00008955
Jeremy Hyltoncb25d5e2000-07-27 21:23:28 +00008956case "$ac_sys_system" in
8957BeOS*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008958{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lnet" >&5
8959$as_echo_n "checking for socket in -lnet... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008960if ${ac_cv_lib_net_socket+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008961 $as_echo_n "(cached) " >&6
Guido van Rossumad678af1998-10-02 14:42:15 +00008962else
Martin v. Löwis11437992002-04-12 09:54:03 +00008963 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +00008964LIBS="-lnet $LIBS $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008965cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008966/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008967
Martin v. Löwiseba40652007-08-30 20:10:57 +00008968/* Override any GCC internal prototype to avoid an error.
8969 Use char because int might match the return type of a GCC
8970 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008971#ifdef __cplusplus
8972extern "C"
8973#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008974char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008975int
8976main ()
8977{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008978return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008979 ;
8980 return 0;
8981}
8982_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008983if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008984 ac_cv_lib_net_socket=yes
Guido van Rossumad678af1998-10-02 14:42:15 +00008985else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008986 ac_cv_lib_net_socket=no
Guido van Rossumad678af1998-10-02 14:42:15 +00008987fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008988rm -f core conftest.err conftest.$ac_objext \
8989 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008990LIBS=$ac_check_lib_save_LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +00008991fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008992{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_net_socket" >&5
8993$as_echo "$ac_cv_lib_net_socket" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008994if test "x$ac_cv_lib_net_socket" = xyes; then :
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008995 LIBS="-lnet $LIBS"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008996fi
8997 # BeOS
8998;;
8999esac
Guido van Rossum70c7f481998-03-26 18:44:10 +00009000
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009001{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libs" >&5
9002$as_echo_n "checking for --with-libs... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009003
Martin v. Löwiseba40652007-08-30 20:10:57 +00009004# Check whether --with-libs was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009005if test "${with_libs+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00009006 withval=$with_libs;
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009007{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9008$as_echo "$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +00009009LIBS="$withval $LIBS"
9010
9011else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009012 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9013$as_echo "no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009014fi
9015
Guido van Rossum7f43da71994-08-01 12:15:30 +00009016
Benjamin Peterson64e8f6e2014-12-15 00:00:23 -05009017
9018
9019
9020
9021
9022
9023
9024if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
9025 if test -n "$ac_tool_prefix"; then
Benjamin Peterson1c335e62010-01-01 15:16:29 +00009026 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
9027set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009028{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9029$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009030if ${ac_cv_path_PKG_CONFIG+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009031 $as_echo_n "(cached) " >&6
Benjamin Peterson1c335e62010-01-01 15:16:29 +00009032else
9033 case $PKG_CONFIG in
9034 [\\/]* | ?:[\\/]*)
9035 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
9036 ;;
9037 *)
9038 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9039for as_dir in $PATH
9040do
9041 IFS=$as_save_IFS
9042 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009043 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01009044 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Benjamin Peterson1c335e62010-01-01 15:16:29 +00009045 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009046 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Peterson1c335e62010-01-01 15:16:29 +00009047 break 2
9048 fi
9049done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009050 done
Benjamin Peterson1c335e62010-01-01 15:16:29 +00009051IFS=$as_save_IFS
9052
9053 ;;
9054esac
9055fi
9056PKG_CONFIG=$ac_cv_path_PKG_CONFIG
9057if test -n "$PKG_CONFIG"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009058 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
9059$as_echo "$PKG_CONFIG" >&6; }
Benjamin Peterson1c335e62010-01-01 15:16:29 +00009060else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009061 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9062$as_echo "no" >&6; }
Benjamin Peterson1c335e62010-01-01 15:16:29 +00009063fi
9064
9065
9066fi
9067if test -z "$ac_cv_path_PKG_CONFIG"; then
9068 ac_pt_PKG_CONFIG=$PKG_CONFIG
9069 # Extract the first word of "pkg-config", so it can be a program name with args.
9070set dummy pkg-config; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009071{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9072$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009073if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009074 $as_echo_n "(cached) " >&6
Benjamin Peterson1c335e62010-01-01 15:16:29 +00009075else
9076 case $ac_pt_PKG_CONFIG in
9077 [\\/]* | ?:[\\/]*)
9078 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
9079 ;;
9080 *)
9081 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9082for as_dir in $PATH
9083do
9084 IFS=$as_save_IFS
9085 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009086 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01009087 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Benjamin Peterson1c335e62010-01-01 15:16:29 +00009088 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009089 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Peterson1c335e62010-01-01 15:16:29 +00009090 break 2
9091 fi
9092done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009093 done
Benjamin Peterson1c335e62010-01-01 15:16:29 +00009094IFS=$as_save_IFS
9095
9096 ;;
9097esac
9098fi
9099ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
9100if test -n "$ac_pt_PKG_CONFIG"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009101 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
9102$as_echo "$ac_pt_PKG_CONFIG" >&6; }
Benjamin Peterson1c335e62010-01-01 15:16:29 +00009103else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009104 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9105$as_echo "no" >&6; }
Benjamin Peterson1c335e62010-01-01 15:16:29 +00009106fi
9107
9108 if test "x$ac_pt_PKG_CONFIG" = x; then
9109 PKG_CONFIG=""
9110 else
9111 case $cross_compiling:$ac_tool_warned in
9112yes:)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009113{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9114$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Benjamin Peterson1c335e62010-01-01 15:16:29 +00009115ac_tool_warned=yes ;;
9116esac
9117 PKG_CONFIG=$ac_pt_PKG_CONFIG
9118 fi
9119else
9120 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
9121fi
9122
Benjamin Peterson64e8f6e2014-12-15 00:00:23 -05009123fi
9124if test -n "$PKG_CONFIG"; then
9125 _pkg_min_version=0.9.0
9126 { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
9127$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
9128 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
9129 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9130$as_echo "yes" >&6; }
9131 else
9132 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9133$as_echo "no" >&6; }
9134 PKG_CONFIG=""
9135 fi
9136fi
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00009137
9138# Check for use of the system expat library
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009139{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-expat" >&5
9140$as_echo_n "checking for --with-system-expat... " >&6; }
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00009141
9142# Check whether --with-system_expat was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009143if test "${with_system_expat+set}" = set; then :
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00009144 withval=$with_system_expat;
Benjamin Petersonf2d1b2a2010-10-31 16:53:53 +00009145else
9146 with_system_expat="no"
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00009147fi
9148
9149
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009150{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_expat" >&5
9151$as_echo "$with_system_expat" >&6; }
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00009152
9153# Check for use of the system libffi library
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009154{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-ffi" >&5
9155$as_echo_n "checking for --with-system-ffi... " >&6; }
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00009156
9157# Check whether --with-system_ffi was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009158if test "${with_system_ffi+set}" = set; then :
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00009159 withval=$with_system_ffi;
Benjamin Petersonf2d1b2a2010-10-31 16:53:53 +00009160else
9161 with_system_ffi="no"
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00009162fi
9163
9164
9165if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
Benjamin Peterson1c335e62010-01-01 15:16:29 +00009166 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
9167else
9168 LIBFFI_INCLUDEDIR=""
9169fi
9170
9171
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009172{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_ffi" >&5
9173$as_echo "$with_system_ffi" >&6; }
Martin v. Löwis9176fc12006-04-11 11:12:43 +00009174
Ned Deilya2a9f572013-10-25 00:30:10 -07009175# Check for --with-tcltk-includes=path and --with-tcltk-libs=path
9176
9177
9178{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-includes" >&5
9179$as_echo_n "checking for --with-tcltk-includes... " >&6; }
9180
9181# Check whether --with-tcltk-includes was given.
9182if test "${with_tcltk_includes+set}" = set; then :
9183 withval=$with_tcltk_includes;
9184else
9185 with_tcltk_includes="default"
9186fi
9187
9188{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_includes" >&5
9189$as_echo "$with_tcltk_includes" >&6; }
9190{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-libs" >&5
9191$as_echo_n "checking for --with-tcltk-libs... " >&6; }
9192
9193# Check whether --with-tcltk-libs was given.
9194if test "${with_tcltk_libs+set}" = set; then :
9195 withval=$with_tcltk_libs;
9196else
9197 with_tcltk_libs="default"
9198fi
9199
9200{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_libs" >&5
9201$as_echo "$with_tcltk_libs" >&6; }
9202if test "x$with_tcltk_includes" = xdefault || test "x$with_tcltk_libs" = xdefault
9203then
9204 if test "x$with_tcltk_includes" != "x$with_tcltk_libs"
9205 then
9206 as_fn_error $? "use both --with-tcltk-includes='...' and --with-tcltk-libs='...' or neither" "$LINENO" 5
9207 fi
9208 TCLTK_INCLUDES=""
9209 TCLTK_LIBS=""
9210else
9211 TCLTK_INCLUDES="$with_tcltk_includes"
9212 TCLTK_LIBS="$with_tcltk_libs"
9213fi
9214
Benjamin Peterson867475c2009-04-29 20:36:25 +00009215# Check for --with-dbmliborder
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009216{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dbmliborder" >&5
9217$as_echo_n "checking for --with-dbmliborder... " >&6; }
Benjamin Peterson867475c2009-04-29 20:36:25 +00009218
9219# Check whether --with-dbmliborder was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009220if test "${with_dbmliborder+set}" = set; then :
Benjamin Peterson867475c2009-04-29 20:36:25 +00009221 withval=$with_dbmliborder;
9222if test x$with_dbmliborder = xyes
9223then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00009224as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Benjamin Peterson867475c2009-04-29 20:36:25 +00009225else
9226 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
9227 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
9228 then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00009229 as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Benjamin Peterson867475c2009-04-29 20:36:25 +00009230 fi
9231 done
9232fi
9233fi
9234
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009235{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dbmliborder" >&5
9236$as_echo "$with_dbmliborder" >&6; }
Benjamin Peterson867475c2009-04-29 20:36:25 +00009237
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00009238# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009239
9240
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009241{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-signal-module" >&5
9242$as_echo_n "checking for --with-signal-module... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009243
Martin v. Löwiseba40652007-08-30 20:10:57 +00009244# Check whether --with-signal-module was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009245if test "${with_signal_module+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00009246 withval=$with_signal_module;
9247fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009248
9249
9250if test -z "$with_signal_module"
9251then with_signal_module="yes"
9252fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009253{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_signal_module" >&5
9254$as_echo "$with_signal_module" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009255
9256if test "${with_signal_module}" = "yes"; then
9257 USE_SIGNAL_MODULE=""
9258 SIGNAL_OBJS=""
9259else
9260 USE_SIGNAL_MODULE="#"
9261 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
9262fi
9263
Guido van Rossum3d15bd82001-01-10 18:53:48 +00009264# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +00009265
Barry Warsawc0d24d82000-06-29 16:12:00 +00009266USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +00009267
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009268{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dec-threads" >&5
9269$as_echo_n "checking for --with-dec-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009270
Guido van Rossumec2f0731997-01-22 20:54:01 +00009271
Martin v. Löwiseba40652007-08-30 20:10:57 +00009272# Check whether --with-dec-threads was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009273if test "${with_dec_threads+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00009274 withval=$with_dec_threads;
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009275{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9276$as_echo "$withval" >&6; }
Guido van Rossumec2f0731997-01-22 20:54:01 +00009277LDLAST=-threads
Guido van Rossumf78abae1997-01-21 22:02:36 +00009278if test "${with_thread+set}" != set; then
Guido van Rossumec2f0731997-01-22 20:54:01 +00009279 with_thread="$withval";
Guido van Rossumf78abae1997-01-21 22:02:36 +00009280fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00009281else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009282 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9283$as_echo "no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009284fi
9285
Martin v. Löwis11437992002-04-12 09:54:03 +00009286
9287# Templates for things AC_DEFINEd more than once.
9288# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +00009289
9290
Martin v. Löwis11437992002-04-12 09:54:03 +00009291
9292
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009293{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-threads" >&5
9294$as_echo_n "checking for --with-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009295
Martin v. Löwiseba40652007-08-30 20:10:57 +00009296# Check whether --with-threads was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009297if test "${with_threads+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00009298 withval=$with_threads;
9299fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00009300
9301
Barry Warsawc0d24d82000-06-29 16:12:00 +00009302# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +00009303
Martin v. Löwiseba40652007-08-30 20:10:57 +00009304# Check whether --with-thread was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009305if test "${with_thread+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00009306 withval=$with_thread; with_threads=$with_thread
9307fi
9308
Barry Warsawc0d24d82000-06-29 16:12:00 +00009309
9310if test -z "$with_threads"
9311then with_threads="yes"
9312fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009313{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_threads" >&5
9314$as_echo "$with_threads" >&6; }
Barry Warsawc0d24d82000-06-29 16:12:00 +00009315
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009316
Barry Warsawc0d24d82000-06-29 16:12:00 +00009317if test "$with_threads" = "no"
9318then
9319 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009320elif test "$ac_cv_pthread_is_default" = yes
9321then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009322 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009323
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009324 # Defining _REENTRANT on system with POSIX threads should not hurt.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009325 $as_echo "#define _REENTRANT 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009326
9327 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +00009328 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009329elif test "$ac_cv_kpthread" = "yes"
9330then
9331 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00009332 if test "$ac_cv_cxx_thread" = "yes"; then
9333 CXX="$CXX -Kpthread"
9334 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009335 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum2242f2f2001-04-11 20:58:20 +00009336
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009337 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009338 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00009339elif test "$ac_cv_kthread" = "yes"
9340then
9341 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00009342 if test "$ac_cv_cxx_thread" = "yes"; then
9343 CXX="$CXX -Kthread"
9344 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009345 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis5f433f02003-05-05 05:05:30 +00009346
9347 posix_threads=yes
9348 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009349elif test "$ac_cv_pthread" = "yes"
9350then
9351 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00009352 if test "$ac_cv_cxx_thread" = "yes"; then
9353 CXX="$CXX -pthread"
9354 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009355 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009356
9357 posix_threads=yes
9358 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009359else
9360 if test ! -z "$with_threads" -a -d "$with_threads"
9361 then LDFLAGS="$LDFLAGS -L$with_threads"
9362 fi
9363 if test ! -z "$withval" -a -d "$withval"
9364 then LDFLAGS="$LDFLAGS -L$withval"
9365 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009366
9367 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +00009368 # define _POSIX_THREADS in unistd.h. Some apparently don't
9369 # (e.g. gnu pth with pthread emulation)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009370 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _POSIX_THREADS in unistd.h" >&5
9371$as_echo_n "checking for _POSIX_THREADS in unistd.h... " >&6; }
9372 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009373/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +00009374
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009375#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +00009376#ifdef _POSIX_THREADS
9377yes
9378#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009379
9380_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009381if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009382 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009383 unistd_defines_pthreads=yes
9384else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009385 unistd_defines_pthreads=no
9386fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00009387rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009388
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009389 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $unistd_defines_pthreads" >&5
9390$as_echo "$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009391
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009392 $as_echo "#define _REENTRANT 1" >>confdefs.h
Guido van Rossum9caf77a1996-08-01 00:52:26 +00009393
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009394 ac_fn_c_check_header_mongrel "$LINENO" "cthreads.h" "ac_cv_header_cthreads_h" "$ac_includes_default"
Matthias Klose3cef2a92012-03-14 23:39:33 +01009395if test "x$ac_cv_header_cthreads_h" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009396 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +00009397
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009398 $as_echo "#define C_THREADS 1" >>confdefs.h
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009399
Martin v. Löwis11437992002-04-12 09:54:03 +00009400
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009401$as_echo "#define HURD_C_THREADS 1" >>confdefs.h
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009402
9403 LIBS="$LIBS -lthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009404 THREADOBJ="Python/thread.o"
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009405else
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009406
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009407 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 +01009408if test "x$ac_cv_header_mach_cthreads_h" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009409 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +00009410
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009411 $as_echo "#define C_THREADS 1" >>confdefs.h
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009412
Martin v. Löwis11437992002-04-12 09:54:03 +00009413
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009414$as_echo "#define MACH_C_THREADS 1" >>confdefs.h
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009415
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009416 THREADOBJ="Python/thread.o"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009417else
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009418
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009419 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pth" >&5
9420$as_echo_n "checking for --with-pth... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009421
Martin v. Löwiseba40652007-08-30 20:10:57 +00009422# Check whether --with-pth was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009423if test "${with_pth+set}" = set; then :
9424 withval=$with_pth; { $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9425$as_echo "$withval" >&6; }
9426 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009427
9428
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009429$as_echo "#define HAVE_PTH 1" >>confdefs.h
Guido van Rossum9e8181b2000-09-19 00:46:46 +00009430
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00009431 LIBS="-lpth $LIBS"
9432 THREADOBJ="Python/thread.o"
Guido van Rossum9e8181b2000-09-19 00:46:46 +00009433else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009434 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9435$as_echo "no" >&6; }
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009436
9437 # Just looking for pthread_create in libpthread is not enough:
9438 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
9439 # So we really have to include pthread.h, and then link.
9440 _libs=$LIBS
9441 LIBS="$LIBS -lpthread"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009442 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
9443$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
9444 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009445/* end confdefs.h. */
Stefan Krahae66ca62012-11-22 22:36:57 +01009446
9447#include <stdio.h>
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009448#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +00009449
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009450void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +00009451int
9452main ()
9453{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009454
9455pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +00009456 ;
9457 return 0;
9458}
9459_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009460if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009461
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009462 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9463$as_echo "yes" >&6; }
9464 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum02a1c402000-02-25 19:26:31 +00009465
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009466 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009467 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +00009468else
Martin v. Löwis11437992002-04-12 09:54:03 +00009469
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009470 LIBS=$_libs
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009471 ac_fn_c_check_func "$LINENO" "pthread_detach" "ac_cv_func_pthread_detach"
Matthias Klose3cef2a92012-03-14 23:39:33 +01009472if test "x$ac_cv_func_pthread_detach" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009473 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumad678af1998-10-02 14:42:15 +00009474
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009475 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009476 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +00009477else
Guido van Rossumad678af1998-10-02 14:42:15 +00009478
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009479 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 +01009480if test "x$ac_cv_header_atheos_threads_h" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009481 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009482
9483
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009484$as_echo "#define ATHEOS_THREADS 1" >>confdefs.h
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009485
9486 THREADOBJ="Python/thread.o"
9487else
9488
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009489 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 +01009490if test "x$ac_cv_header_kernel_OS_h" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009491 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009492
9493
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009494$as_echo "#define BEOS_THREADS 1" >>confdefs.h
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009495
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009496 THREADOBJ="Python/thread.o"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009497else
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009498
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009499 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5
9500$as_echo_n "checking for pthread_create in -lpthreads... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009501if ${ac_cv_lib_pthreads_pthread_create+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009502 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009503else
Martin v. Löwis11437992002-04-12 09:54:03 +00009504 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009505LIBS="-lpthreads $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009506cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009507/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009508
Martin v. Löwiseba40652007-08-30 20:10:57 +00009509/* Override any GCC internal prototype to avoid an error.
9510 Use char because int might match the return type of a GCC
9511 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009512#ifdef __cplusplus
9513extern "C"
9514#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009515char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009516int
9517main ()
9518{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009519return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009520 ;
9521 return 0;
9522}
9523_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009524if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009525 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +00009526else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009527 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +00009528fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009529rm -f core conftest.err conftest.$ac_objext \
9530 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009531LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00009532fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009533{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5
9534$as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009535if test "x$ac_cv_lib_pthreads_pthread_create" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009536 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Greg Steinadf63d62000-07-05 10:38:09 +00009537
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009538 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00009539 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009540 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +00009541else
Greg Steinadf63d62000-07-05 10:38:09 +00009542
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009543 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5
9544$as_echo_n "checking for pthread_create in -lc_r... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009545if ${ac_cv_lib_c_r_pthread_create+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009546 $as_echo_n "(cached) " >&6
Greg Steinadf63d62000-07-05 10:38:09 +00009547else
Martin v. Löwis11437992002-04-12 09:54:03 +00009548 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00009549LIBS="-lc_r $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009550cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009551/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009552
Martin v. Löwiseba40652007-08-30 20:10:57 +00009553/* Override any GCC internal prototype to avoid an error.
9554 Use char because int might match the return type of a GCC
9555 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009556#ifdef __cplusplus
9557extern "C"
9558#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009559char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009560int
9561main ()
9562{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009563return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009564 ;
9565 return 0;
9566}
9567_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009568if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009569 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +00009570else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009571 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +00009572fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009573rm -f core conftest.err conftest.$ac_objext \
9574 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009575LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +00009576fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009577{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5
9578$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009579if test "x$ac_cv_lib_c_r_pthread_create" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009580 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum49545951997-12-02 19:28:29 +00009581
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009582 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00009583 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009584 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +00009585else
Guido van Rossum07bd90e2000-05-08 13:41:38 +00009586
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009587 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_create_system in -lpthread" >&5
9588$as_echo_n "checking for __pthread_create_system in -lpthread... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009589if ${ac_cv_lib_pthread___pthread_create_system+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009590 $as_echo_n "(cached) " >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009591else
Martin v. Löwis11437992002-04-12 09:54:03 +00009592 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009593LIBS="-lpthread $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009594cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009595/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009596
Martin v. Löwiseba40652007-08-30 20:10:57 +00009597/* Override any GCC internal prototype to avoid an error.
9598 Use char because int might match the return type of a GCC
9599 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009600#ifdef __cplusplus
9601extern "C"
9602#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009603char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009604int
9605main ()
9606{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009607return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009608 ;
9609 return 0;
9610}
9611_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009612if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009613 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009614else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009615 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009616fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009617rm -f core conftest.err conftest.$ac_objext \
9618 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009619LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009620fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009621{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_create_system" >&5
9622$as_echo "$ac_cv_lib_pthread___pthread_create_system" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009623if test "x$ac_cv_lib_pthread___pthread_create_system" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009624 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009625
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009626 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00009627 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009628 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009629else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009630
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009631 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lcma" >&5
9632$as_echo_n "checking for pthread_create in -lcma... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009633if ${ac_cv_lib_cma_pthread_create+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009634 $as_echo_n "(cached) " >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +00009635else
Martin v. Löwis11437992002-04-12 09:54:03 +00009636 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00009637LIBS="-lcma $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009638cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009639/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009640
Martin v. Löwiseba40652007-08-30 20:10:57 +00009641/* Override any GCC internal prototype to avoid an error.
9642 Use char because int might match the return type of a GCC
9643 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009644#ifdef __cplusplus
9645extern "C"
9646#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009647char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009648int
9649main ()
9650{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009651return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009652 ;
9653 return 0;
9654}
9655_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009656if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009657 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +00009658else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009659 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +00009660fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009661rm -f core conftest.err conftest.$ac_objext \
9662 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009663LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00009664fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009665{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cma_pthread_create" >&5
9666$as_echo "$ac_cv_lib_cma_pthread_create" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009667if test "x$ac_cv_lib_cma_pthread_create" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009668 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumb93a8621998-05-07 13:27:32 +00009669
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009670 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00009671 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009672 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +00009673else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +00009674
Martin v. Löwis130fb172001-07-19 11:00:41 +00009675 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +00009676fi
9677
Guido van Rossum627b2d71993-12-24 10:39:16 +00009678
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009679fi
9680
Guido van Rossum0be3e491997-05-22 20:33:33 +00009681fi
9682
Guido van Rossum49545951997-12-02 19:28:29 +00009683fi
9684
Guido van Rossumb93a8621998-05-07 13:27:32 +00009685fi
9686
Guido van Rossum07bd90e2000-05-08 13:41:38 +00009687
Michael W. Hudson54241132001-12-07 15:38:26 +00009688fi
9689
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009690
9691fi
9692
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009693fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009694rm -f core conftest.err conftest.$ac_objext \
9695 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009696fi
9697
Martin v. Löwis11437992002-04-12 09:54:03 +00009698fi
9699
9700
9701fi
9702
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009703
Michael W. Hudson54241132001-12-07 15:38:26 +00009704
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009705 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usconfig in -lmpc" >&5
9706$as_echo_n "checking for usconfig in -lmpc... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009707if ${ac_cv_lib_mpc_usconfig+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009708 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009709else
Martin v. Löwis11437992002-04-12 09:54:03 +00009710 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009711LIBS="-lmpc $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009712cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009713/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009714
Martin v. Löwiseba40652007-08-30 20:10:57 +00009715/* Override any GCC internal prototype to avoid an error.
9716 Use char because int might match the return type of a GCC
9717 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009718#ifdef __cplusplus
9719extern "C"
9720#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009721char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009722int
9723main ()
9724{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009725return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009726 ;
9727 return 0;
9728}
9729_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009730if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009731 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009732else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009733 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009734fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009735rm -f core conftest.err conftest.$ac_objext \
9736 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009737LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009738fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009739{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpc_usconfig" >&5
9740$as_echo "$ac_cv_lib_mpc_usconfig" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009741if test "x$ac_cv_lib_mpc_usconfig" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009742 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00009743
Martin v. Löwis130fb172001-07-19 11:00:41 +00009744 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009745 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009746 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +00009747fi
9748
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00009749
Neal Norwitza978ab02002-11-02 16:58:05 +00009750 if test "$posix_threads" != "yes"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009751 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thr_create in -lthread" >&5
9752$as_echo_n "checking for thr_create in -lthread... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009753if ${ac_cv_lib_thread_thr_create+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009754 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009755else
Martin v. Löwis11437992002-04-12 09:54:03 +00009756 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009757LIBS="-lthread $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009758cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009759/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009760
Martin v. Löwiseba40652007-08-30 20:10:57 +00009761/* Override any GCC internal prototype to avoid an error.
9762 Use char because int might match the return type of a GCC
9763 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009764#ifdef __cplusplus
9765extern "C"
9766#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009767char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009768int
9769main ()
9770{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009771return thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009772 ;
9773 return 0;
9774}
9775_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009776if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009777 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009778else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009779 ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009780fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009781rm -f core conftest.err conftest.$ac_objext \
9782 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009783LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009784fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009785{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_thread_thr_create" >&5
9786$as_echo "$ac_cv_lib_thread_thr_create" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009787if test "x$ac_cv_lib_thread_thr_create" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009788 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00009789
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00009790 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009791 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00009792 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +00009793fi
9794
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00009795 fi
Michael W. Hudson54241132001-12-07 15:38:26 +00009796
Martin v. Löwis130fb172001-07-19 11:00:41 +00009797 if test "$USE_THREAD_MODULE" != "#"
9798 then
9799 # If the above checks didn't disable threads, (at least) OSF1
9800 # needs this '-threads' argument during linking.
9801 case $ac_sys_system in
9802 OSF1) LDLAST=-threads;;
9803 esac
Jeremy Hylton1a2ca862000-10-16 16:59:12 +00009804 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009805fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00009806
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009807if test "$posix_threads" = "yes"; then
9808 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00009809
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009810$as_echo "#define _POSIX_THREADS 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009811
9812 fi
9813
9814 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
9815 case $ac_sys_system/$ac_sys_release in
Charles-François Natali4929eb92011-07-21 19:41:04 +02009816 SunOS/5.6)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009817$as_echo "#define HAVE_PTHREAD_DESTRUCTOR 1" >>confdefs.h
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00009818
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009819 ;;
9820 SunOS/5.8)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009821$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009822
9823 ;;
Charles-François Natali4929eb92011-07-21 19:41:04 +02009824 AIX/*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009825$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Christian Heimescba36bb2008-01-30 22:54:18 +00009826
9827 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009828 esac
9829
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009830 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
9831$as_echo_n "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009832 if ${ac_cv_pthread_system_supported+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009833 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009834else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009835 if test "$cross_compiling" = yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009836 ac_cv_pthread_system_supported=no
9837else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009838 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009839/* end confdefs.h. */
Stefan Krahae66ca62012-11-22 22:36:57 +01009840
9841 #include <stdio.h>
9842 #include <pthread.h>
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009843 void *foo(void *parm) {
9844 return NULL;
9845 }
9846 main() {
9847 pthread_attr_t attr;
9848 pthread_t id;
9849 if (pthread_attr_init(&attr)) exit(-1);
9850 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
9851 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
9852 exit(0);
9853 }
9854_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009855if ac_fn_c_try_run "$LINENO"; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009856 ac_cv_pthread_system_supported=yes
9857else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009858 ac_cv_pthread_system_supported=no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009859fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009860rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9861 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009862fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00009863
Martin v. Löwiseba40652007-08-30 20:10:57 +00009864
Guido van Rossum627b2d71993-12-24 10:39:16 +00009865fi
9866
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009867 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_system_supported" >&5
9868$as_echo "$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009869 if test "$ac_cv_pthread_system_supported" = "yes"; then
9870
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009871$as_echo "#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009872
9873 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009874 for ac_func in pthread_sigmask
9875do :
9876 ac_fn_c_check_func "$LINENO" "pthread_sigmask" "ac_cv_func_pthread_sigmask"
Matthias Klose3cef2a92012-03-14 23:39:33 +01009877if test "x$ac_cv_func_pthread_sigmask" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009878 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009879#define HAVE_PTHREAD_SIGMASK 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009880_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +00009881 case $ac_sys_system in
9882 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009883
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009884$as_echo "#define HAVE_BROKEN_PTHREAD_SIGMASK 1" >>confdefs.h
Jason Tishlerfac083d2003-07-22 15:20:49 +00009885
9886 ;;
9887 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009888fi
9889done
9890
Christian Heimes0d604cf2013-08-21 13:26:05 +02009891 for ac_func in pthread_atfork
9892do :
9893 ac_fn_c_check_func "$LINENO" "pthread_atfork" "ac_cv_func_pthread_atfork"
9894if test "x$ac_cv_func_pthread_atfork" = xyes; then :
9895 cat >>confdefs.h <<_ACEOF
9896#define HAVE_PTHREAD_ATFORK 1
9897_ACEOF
9898
9899fi
9900done
9901
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009902fi
9903
9904
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009905# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +00009906
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009907{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if --enable-ipv6 is specified" >&5
9908$as_echo_n "checking if --enable-ipv6 is specified... " >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009909# Check whether --enable-ipv6 was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009910if test "${enable_ipv6+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00009911 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009912 no)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009913 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9914$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009915 ipv6=no
9916 ;;
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009917 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9918$as_echo "yes" >&6; }
9919 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009920
9921 ipv6=yes
9922 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009923 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009924else
Martin v. Löwis11437992002-04-12 09:54:03 +00009925
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009926 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009927/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009928 /* AF_INET6 available check */
9929#include <sys/types.h>
9930#include <sys/socket.h>
Charles-François Natalibe2b9072013-01-08 19:47:00 +01009931int
9932main ()
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009933{
Charles-François Natalibe2b9072013-01-08 19:47:00 +01009934int domain = AF_INET6;
9935 ;
9936 return 0;
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009937}
Martin v. Löwis11437992002-04-12 09:54:03 +00009938_ACEOF
Charles-François Natalibe2b9072013-01-08 19:47:00 +01009939if ac_fn_c_try_compile "$LINENO"; then :
Matthias Klosec511b472010-05-08 11:01:39 +00009940
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009941 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9942$as_echo "yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009943 ipv6=yes
Matthias Klosec511b472010-05-08 11:01:39 +00009944
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009945else
Matthias Klosec511b472010-05-08 11:01:39 +00009946
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009947 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9948$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009949 ipv6=no
Matthias Klosec511b472010-05-08 11:01:39 +00009950
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009951fi
Charles-François Natalibe2b9072013-01-08 19:47:00 +01009952rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009953
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009954if test "$ipv6" = "yes"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009955 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RFC2553 API is available" >&5
9956$as_echo_n "checking if RFC2553 API is available... " >&6; }
9957 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009958/* end confdefs.h. */
Matthias Klosec511b472010-05-08 11:01:39 +00009959
9960 #include <sys/types.h>
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009961#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009962int
9963main ()
9964{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009965struct sockaddr_in6 x;
Matthias Klosec511b472010-05-08 11:01:39 +00009966 x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +00009967 ;
9968 return 0;
9969}
Matthias Klosec511b472010-05-08 11:01:39 +00009970
Martin v. Löwis11437992002-04-12 09:54:03 +00009971_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009972if ac_fn_c_try_compile "$LINENO"; then :
Matthias Klosec511b472010-05-08 11:01:39 +00009973
9974 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009975$as_echo "yes" >&6; }
Matthias Klosec511b472010-05-08 11:01:39 +00009976 ipv6=yes
9977
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009978else
Matthias Klosec511b472010-05-08 11:01:39 +00009979
9980 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009981$as_echo "no" >&6; }
Matthias Klosec511b472010-05-08 11:01:39 +00009982 ipv6=no
9983
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009984fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009985rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009986fi
9987
9988if test "$ipv6" = "yes"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009989 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009990
9991fi
9992
Martin v. Löwiseba40652007-08-30 20:10:57 +00009993fi
9994
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009995
9996ipv6type=unknown
9997ipv6lib=none
9998ipv6trylibc=no
9999
10000if test "$ipv6" = "yes"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010001 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5
10002$as_echo_n "checking ipv6 stack type... " >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +000010003 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
10004 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010005 case $i in
10006 inria)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010007 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010008/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010009
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010010#include <netinet/in.h>
10011#ifdef IPV6_INRIA_VERSION
10012yes
10013#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010014_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010015if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010016 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010017 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010018fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +000010019rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010020
10021 ;;
10022 kame)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010023 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010024/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010025
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010026#include <netinet/in.h>
10027#ifdef __KAME__
10028yes
10029#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010030_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010031if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010032 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010033 ipv6type=$i;
10034 ipv6lib=inet6
10035 ipv6libdir=/usr/local/v6/lib
10036 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010037fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +000010038rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010039
10040 ;;
10041 linux-glibc)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010042 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010043/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010044
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010045#include <features.h>
10046#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
10047yes
10048#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010049_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010050if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010051 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010052 ipv6type=$i;
10053 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010054fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +000010055rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010056
10057 ;;
10058 linux-inet6)
10059 if test -d /usr/inet6; then
10060 ipv6type=$i
10061 ipv6lib=inet6
10062 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000010063 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010064 fi
10065 ;;
10066 solaris)
10067 if test -f /etc/netconfig; then
Antoine Pitrou31e85952011-01-03 18:57:14 +000010068 if $GREP -q tcp6 /etc/netconfig; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010069 ipv6type=$i
10070 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010071 fi
10072 fi
10073 ;;
10074 toshiba)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010075 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010076/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010077
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010078#include <sys/param.h>
10079#ifdef _TOSHIBA_INET6
10080yes
10081#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010082_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010083if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010084 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010085 ipv6type=$i;
10086 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010087 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010088fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +000010089rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010090
10091 ;;
10092 v6d)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010093 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010094/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010095
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010096#include </usr/local/v6/include/sys/v6config.h>
10097#ifdef __V6D__
10098yes
10099#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010100_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010101if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010102 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010103 ipv6type=$i;
10104 ipv6lib=v6;
10105 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000010106 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010107fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +000010108rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010109
10110 ;;
10111 zeta)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010112 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010113/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010114
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010115#include <sys/param.h>
10116#ifdef _ZETA_MINAMI_INET6
10117yes
10118#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010119_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010120if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010121 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010122 ipv6type=$i;
10123 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010124 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010125fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +000010126rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010127
10128 ;;
10129 esac
10130 if test "$ipv6type" != "unknown"; then
10131 break
10132 fi
10133 done
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010134 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5
10135$as_echo "$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010136fi
10137
10138if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
10139 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
10140 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
10141 echo "using lib$ipv6lib"
10142 else
10143 if test $ipv6trylibc = "yes"; then
10144 echo "using libc"
10145 else
10146 echo 'Fatal: no $ipv6lib library found. cannot continue.'
10147 echo "You need to fetch lib$ipv6lib.a from appropriate"
10148 echo 'ipv6 kit and compile beforehand.'
10149 exit 1
10150 fi
10151 fi
10152fi
10153
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010154{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for OSX 10.5 SDK or later" >&5
10155$as_echo_n "checking for OSX 10.5 SDK or later... " >&6; }
10156cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000010157/* end confdefs.h. */
Matthias Klosec511b472010-05-08 11:01:39 +000010158
10159 #include <Carbon/Carbon.h>
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000010160int
10161main ()
10162{
10163FSIORefNum fRef = 0
10164 ;
10165 return 0;
10166}
Mark Dickinson0712b562010-05-08 19:13:21 +000010167
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000010168_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010169if ac_fn_c_try_compile "$LINENO"; then :
Matthias Klosec511b472010-05-08 11:01:39 +000010170
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000010171
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010172$as_echo "#define HAVE_OSX105_SDK 1" >>confdefs.h
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000010173
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010174 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10175$as_echo "yes" >&6; }
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000010176
Mark Dickinson0712b562010-05-08 19:13:21 +000010177else
10178
10179 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10180$as_echo "no" >&6; }
10181
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000010182fi
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000010183rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10184
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010185# Check for --with-doc-strings
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010186{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-doc-strings" >&5
10187$as_echo_n "checking for --with-doc-strings... " >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010188
Martin v. Löwiseba40652007-08-30 20:10:57 +000010189# Check whether --with-doc-strings was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010190if test "${with_doc_strings+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +000010191 withval=$with_doc_strings;
10192fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010193
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010194
10195if test -z "$with_doc_strings"
10196then with_doc_strings="yes"
10197fi
10198if test "$with_doc_strings" != "no"
10199then
10200
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010201$as_echo "#define WITH_DOC_STRINGS 1" >>confdefs.h
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010202
10203fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010204{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_doc_strings" >&5
10205$as_echo "$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010206
Neil Schemenauera35c6882001-02-27 04:45:05 +000010207# Check for Python-specific malloc support
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010208{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tsc" >&5
10209$as_echo_n "checking for --with-tsc... " >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010210
Martin v. Löwiseba40652007-08-30 20:10:57 +000010211# Check whether --with-tsc was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010212if test "${with_tsc+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +000010213 withval=$with_tsc;
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010214if test "$withval" != no
10215then
10216
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010217$as_echo "#define WITH_TSC 1" >>confdefs.h
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010218
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010219 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10220$as_echo "yes" >&6; }
10221else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10222$as_echo "no" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010223fi
10224else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010225 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10226$as_echo "no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000010227fi
10228
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010229
10230# Check for Python-specific malloc support
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010231{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pymalloc" >&5
10232$as_echo_n "checking for --with-pymalloc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010233
Martin v. Löwiseba40652007-08-30 20:10:57 +000010234# Check whether --with-pymalloc was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010235if test "${with_pymalloc+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +000010236 withval=$with_pymalloc;
10237fi
Michael W. Hudson54241132001-12-07 15:38:26 +000010238
Neil Schemenauera35c6882001-02-27 04:45:05 +000010239
Neil Schemenauer16c22972002-03-22 15:34:49 +000010240if test -z "$with_pymalloc"
10241then with_pymalloc="yes"
10242fi
10243if test "$with_pymalloc" != "no"
10244then
Martin v. Löwis11437992002-04-12 09:54:03 +000010245
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010246$as_echo "#define WITH_PYMALLOC 1" >>confdefs.h
Neil Schemenauer16c22972002-03-22 15:34:49 +000010247
10248fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010249{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pymalloc" >&5
10250$as_echo "$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +000010251
Benjamin Peterson91c12eb2009-12-03 02:52:39 +000010252# Check for Valgrind support
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010253{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-valgrind" >&5
10254$as_echo_n "checking for --with-valgrind... " >&6; }
Benjamin Peterson91c12eb2009-12-03 02:52:39 +000010255
10256# Check whether --with-valgrind was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010257if test "${with_valgrind+set}" = set; then :
Benjamin Peterson91c12eb2009-12-03 02:52:39 +000010258 withval=$with_valgrind;
10259else
10260 with_valgrind=no
10261fi
10262
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010263{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_valgrind" >&5
10264$as_echo "$with_valgrind" >&6; }
Benjamin Peterson91c12eb2009-12-03 02:52:39 +000010265if test "$with_valgrind" != no; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010266 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 +010010267if test "x$ac_cv_header_valgrind_valgrind_h" = xyes; then :
Benjamin Peterson91c12eb2009-12-03 02:52:39 +000010268
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010269$as_echo "#define WITH_VALGRIND 1" >>confdefs.h
Benjamin Peterson91c12eb2009-12-03 02:52:39 +000010270
10271else
Georg Brandl71f4fbb2011-02-25 11:04:50 +000010272 as_fn_error $? "Valgrind support requested but headers not available" "$LINENO" 5
Benjamin Peterson91c12eb2009-12-03 02:52:39 +000010273
10274fi
10275
10276
10277fi
10278
Barry Warsawef82cd72000-06-30 16:21:01 +000010279# Check for --with-wctype-functions
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010280{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-wctype-functions" >&5
10281$as_echo_n "checking for --with-wctype-functions... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010282
Martin v. Löwiseba40652007-08-30 20:10:57 +000010283# Check whether --with-wctype-functions was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010284if test "${with_wctype_functions+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +000010285 withval=$with_wctype_functions;
Barry Warsawef82cd72000-06-30 16:21:01 +000010286if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000010287then
10288
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010289$as_echo "#define WANT_WCTYPE_FUNCTIONS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000010290
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010291 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10292$as_echo "yes" >&6; }
10293else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10294$as_echo "no" >&6; }
Barry Warsawef82cd72000-06-30 16:21:01 +000010295fi
10296else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010297 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10298$as_echo "no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000010299fi
10300
Barry Warsawef82cd72000-06-30 16:21:01 +000010301
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010302# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000010303
Guido van Rossum98935bf2001-09-05 19:13:16 +000010304DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000010305
Guido van Rossume97ee181999-12-20 21:27:22 +000010306# the dlopen() function means we might want to use dynload_shlib.o. some
10307# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +000010308for ac_func in dlopen
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010309do :
10310 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
Matthias Klose3cef2a92012-03-14 23:39:33 +010010311if test "x$ac_cv_func_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010312 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010313#define HAVE_DLOPEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010314_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000010315
Guido van Rossume97ee181999-12-20 21:27:22 +000010316fi
Thomas Wouters3a584202000-08-05 23:28:51 +000010317done
Guido van Rossume97ee181999-12-20 21:27:22 +000010318
Michael W. Hudson54241132001-12-07 15:38:26 +000010319
Guido van Rossume97ee181999-12-20 21:27:22 +000010320# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
10321# loading of modules.
10322
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010323{ $as_echo "$as_me:${as_lineno-$LINENO}: checking DYNLOADFILE" >&5
10324$as_echo_n "checking DYNLOADFILE... " >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000010325if test -z "$DYNLOADFILE"
10326then
10327 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000010328 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
10329 if test "$ac_cv_func_dlopen" = yes
10330 then DYNLOADFILE="dynload_shlib.o"
10331 else DYNLOADFILE="dynload_aix.o"
10332 fi
10333 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000010334 BeOS*) DYNLOADFILE="dynload_beos.o";;
10335 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Anthony Baxter82201742006-04-09 15:07:40 +000010336 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
10337 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010338 atheos*) DYNLOADFILE="dynload_atheos.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000010339 *)
10340 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
10341 # out any dynamic loading
10342 if test "$ac_cv_func_dlopen" = yes
10343 then DYNLOADFILE="dynload_shlib.o"
10344 else DYNLOADFILE="dynload_stub.o"
10345 fi
10346 ;;
10347 esac
10348fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010349{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DYNLOADFILE" >&5
10350$as_echo "$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000010351if test "$DYNLOADFILE" != "dynload_stub.o"
10352then
Martin v. Löwis11437992002-04-12 09:54:03 +000010353
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010354$as_echo "#define HAVE_DYNAMIC_LOADING 1" >>confdefs.h
Guido van Rossume97ee181999-12-20 21:27:22 +000010355
10356fi
10357
Neil Schemenauer4e425612001-06-19 15:44:15 +000010358# MACHDEP_OBJS can be set to platform-specific object files needed by Python
10359
Michael W. Hudson54241132001-12-07 15:38:26 +000010360
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010361{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP_OBJS" >&5
10362$as_echo_n "checking MACHDEP_OBJS... " >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000010363if test -z "$MACHDEP_OBJS"
10364then
Jack Jansene578a632001-08-15 01:27:14 +000010365 MACHDEP_OBJS=$extra_machdep_objs
10366else
10367 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000010368fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010369{ $as_echo "$as_me:${as_lineno-$LINENO}: result: MACHDEP_OBJS" >&5
10370$as_echo "MACHDEP_OBJS" >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000010371
Guido van Rossum627b2d71993-12-24 10:39:16 +000010372# checks for library functions
Martin v. Löwisaef18b12008-03-24 13:31:16 +000010373for ac_func in alarm setitimer getitimer bind_textdomain_codeset chown \
10374 clock confstr ctermid execv fchmod fchown fork fpathconf ftime ftruncate \
doko@ubuntu.coma50b0de2015-04-13 21:55:59 +020010375 gai_strerror getgroups getlogin getloadavg getpeername getpgid getpid \
10376 getentropy \
Martin v. Löwis50ea4562009-11-27 13:56:01 +000010377 getpriority getresuid getresgid getpwent getspnam getspent getsid getwd \
Benjamin Petersond16e01c2014-02-04 10:20:26 -050010378 initgroups kill killpg lchmod lchown lstat mkfifo mknod mktime mmap \
Martin v. Löwisa5f09072002-10-11 05:37:59 +000010379 mremap nice pathconf pause plock poll pthread_init \
Guido van Rossum162e38c2003-02-19 15:25:10 +000010380 putenv readlink realpath \
Jesse Noller355b1262009-04-02 00:03:28 +000010381 select sem_open sem_timedwait sem_getvalue sem_unlink setegid seteuid \
10382 setgid \
Martin v. Löwis4daacb12003-03-28 18:37:01 +000010383 setlocale setregid setreuid setsid setpgid setpgrp setuid setvbuf snprintf \
Martin v. Löwis50ea4562009-11-27 13:56:01 +000010384 setlocale setregid setreuid setresuid setresgid \
10385 setsid setpgid setpgrp setuid setvbuf snprintf \
Skip Montanaro7e11a012004-02-07 12:55:46 +000010386 sigaction siginterrupt sigrelse strftime \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000010387 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Neal Norwitz05a45592006-03-20 06:30:08 +000010388 truncate uname unsetenv utimes waitpid wait3 wait4 wcscoll _getpty
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010389do :
10390 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10391ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Georg Brandl71f4fbb2011-02-25 11:04:50 +000010392if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010393 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010394#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010395_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000010396
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010397fi
10398done
10399
Michael W. Hudson54241132001-12-07 15:38:26 +000010400
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010401# For some functions, having a definition is not sufficient, since
10402# we want to take their address.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010403{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chroot" >&5
10404$as_echo_n "checking for chroot... " >&6; }
10405cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010406/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010407#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010408int
10409main ()
10410{
10411void *x=chroot
10412 ;
10413 return 0;
10414}
10415_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010416if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010417
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010418$as_echo "#define HAVE_CHROOT 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010419
Matthias Klosec511b472010-05-08 11:01:39 +000010420 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010421$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010422else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010423 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10424$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010425
10426fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010427rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010428{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for link" >&5
10429$as_echo_n "checking for link... " >&6; }
10430cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010431/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010432#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010433int
10434main ()
10435{
10436void *x=link
10437 ;
10438 return 0;
10439}
10440_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010441if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010442
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010443$as_echo "#define HAVE_LINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010444
Matthias Klosec511b472010-05-08 11:01:39 +000010445 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010446$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010447else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010448 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10449$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010450
10451fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010452rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010453{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for symlink" >&5
10454$as_echo_n "checking for symlink... " >&6; }
10455cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010456/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010457#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010458int
10459main ()
10460{
10461void *x=symlink
10462 ;
10463 return 0;
10464}
10465_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010466if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010467
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010468$as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010469
Matthias Klosec511b472010-05-08 11:01:39 +000010470 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010471$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010472else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010473 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10474$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010475
10476fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010477rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010478{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fchdir" >&5
10479$as_echo_n "checking for fchdir... " >&6; }
10480cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010481/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010482#include <unistd.h>
10483int
10484main ()
10485{
10486void *x=fchdir
10487 ;
10488 return 0;
10489}
10490_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010491if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010492
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010493$as_echo "#define HAVE_FCHDIR 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010494
Matthias Klosec511b472010-05-08 11:01:39 +000010495 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010496$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010497else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010498 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10499$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010500
10501fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010502rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010503{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fsync" >&5
10504$as_echo_n "checking for fsync... " >&6; }
10505cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010506/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010507#include <unistd.h>
10508int
10509main ()
10510{
10511void *x=fsync
10512 ;
10513 return 0;
10514}
10515_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010516if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010517
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010518$as_echo "#define HAVE_FSYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010519
Matthias Klosec511b472010-05-08 11:01:39 +000010520 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010521$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010522else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010523 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10524$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010525
10526fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010527rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010528{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fdatasync" >&5
10529$as_echo_n "checking for fdatasync... " >&6; }
10530cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010531/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010532#include <unistd.h>
10533int
10534main ()
10535{
10536void *x=fdatasync
10537 ;
10538 return 0;
10539}
10540_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010541if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010542
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010543$as_echo "#define HAVE_FDATASYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010544
Matthias Klosec511b472010-05-08 11:01:39 +000010545 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010546$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010547else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010548 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10549$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010550
10551fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010552rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010553{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll" >&5
10554$as_echo_n "checking for epoll... " >&6; }
10555cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000010556/* end confdefs.h. */
10557#include <sys/epoll.h>
10558int
10559main ()
10560{
10561void *x=epoll_create
10562 ;
10563 return 0;
10564}
10565_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010566if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010567
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010568$as_echo "#define HAVE_EPOLL 1" >>confdefs.h
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000010569
Matthias Klosec511b472010-05-08 11:01:39 +000010570 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010571$as_echo "yes" >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000010572else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010573 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10574$as_echo "no" >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000010575
10576fi
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000010577rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010578{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kqueue" >&5
10579$as_echo_n "checking for kqueue... " >&6; }
10580cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000010581/* end confdefs.h. */
10582
10583#include <sys/types.h>
10584#include <sys/event.h>
10585
10586int
10587main ()
10588{
10589int x=kqueue()
10590 ;
10591 return 0;
10592}
10593_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010594if ac_fn_c_try_compile "$LINENO"; then :
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000010595
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010596$as_echo "#define HAVE_KQUEUE 1" >>confdefs.h
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000010597
Matthias Klosec511b472010-05-08 11:01:39 +000010598 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010599$as_echo "yes" >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000010600else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010601 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10602$as_echo "no" >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000010603
10604fi
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000010605rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000010606# On some systems (eg. FreeBSD 5), we would find a definition of the
10607# functions ctermid_r, setgroups in the library, but no prototype
10608# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
10609# address to avoid compiler warnings and potential miscompilations
10610# because of the missing prototypes.
10611
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010612{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ctermid_r" >&5
10613$as_echo_n "checking for ctermid_r... " >&6; }
10614cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010615/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000010616
Martin v. Löwisd5843682002-11-21 20:41:28 +000010617#include <stdio.h>
10618
Martin v. Löwisd5843682002-11-21 20:41:28 +000010619int
10620main ()
10621{
10622void* p = ctermid_r
10623 ;
10624 return 0;
10625}
10626_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010627if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000010628
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010629$as_echo "#define HAVE_CTERMID_R 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000010630
Matthias Klosec511b472010-05-08 11:01:39 +000010631 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010632$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010633else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010634 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10635$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010636
10637fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010638rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10639
Antoine Pitroub170f172010-09-10 18:47:36 +000010640{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock declaration" >&5
10641$as_echo_n "checking for flock declaration... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010642if ${ac_cv_flock_decl+:} false; then :
Antoine Pitroub170f172010-09-10 18:47:36 +000010643 $as_echo_n "(cached) " >&6
10644else
10645 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010646/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010647#include <sys/file.h>
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010648int
10649main ()
10650{
10651void* p = flock
Antoine Pitroub170f172010-09-10 18:47:36 +000010652
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010653 ;
10654 return 0;
10655}
10656_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010657if ac_fn_c_try_compile "$LINENO"; then :
Antoine Pitroub170f172010-09-10 18:47:36 +000010658 ac_cv_flock_decl=yes
10659else
10660 ac_cv_flock_decl=no
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010661
10662fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010663rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitrou85729812010-09-07 14:55:24 +000010664
Antoine Pitroub170f172010-09-10 18:47:36 +000010665fi
10666{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_flock_decl" >&5
10667$as_echo "$ac_cv_flock_decl" >&6; }
10668if test "x${ac_cv_flock_decl}" = xyes; then
10669 for ac_func in flock
10670do :
10671 ac_fn_c_check_func "$LINENO" "flock" "ac_cv_func_flock"
Matthias Klose3cef2a92012-03-14 23:39:33 +010010672if test "x$ac_cv_func_flock" = xyes; then :
Antoine Pitroub170f172010-09-10 18:47:36 +000010673 cat >>confdefs.h <<_ACEOF
10674#define HAVE_FLOCK 1
Antoine Pitrou85729812010-09-07 14:55:24 +000010675_ACEOF
Antoine Pitroub170f172010-09-10 18:47:36 +000010676
Antoine Pitrou85729812010-09-07 14:55:24 +000010677else
Antoine Pitroub170f172010-09-10 18:47:36 +000010678 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock in -lbsd" >&5
Antoine Pitrou85729812010-09-07 14:55:24 +000010679$as_echo_n "checking for flock in -lbsd... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010680if ${ac_cv_lib_bsd_flock+:} false; then :
Antoine Pitrou85729812010-09-07 14:55:24 +000010681 $as_echo_n "(cached) " >&6
10682else
10683 ac_check_lib_save_LIBS=$LIBS
10684LIBS="-lbsd $LIBS"
10685cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10686/* end confdefs.h. */
10687
10688/* Override any GCC internal prototype to avoid an error.
10689 Use char because int might match the return type of a GCC
10690 builtin and then its argument prototype would still apply. */
10691#ifdef __cplusplus
10692extern "C"
10693#endif
10694char flock ();
10695int
10696main ()
10697{
10698return flock ();
10699 ;
10700 return 0;
10701}
10702_ACEOF
10703if ac_fn_c_try_link "$LINENO"; then :
10704 ac_cv_lib_bsd_flock=yes
10705else
10706 ac_cv_lib_bsd_flock=no
10707fi
10708rm -f core conftest.err conftest.$ac_objext \
10709 conftest$ac_exeext conftest.$ac_ext
10710LIBS=$ac_check_lib_save_LIBS
10711fi
10712{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_flock" >&5
10713$as_echo "$ac_cv_lib_bsd_flock" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010714if test "x$ac_cv_lib_bsd_flock" = xyes; then :
Antoine Pitroub170f172010-09-10 18:47:36 +000010715 $as_echo "#define HAVE_FLOCK 1" >>confdefs.h
Antoine Pitrou85729812010-09-07 14:55:24 +000010716
10717
10718$as_echo "#define FLOCK_NEEDS_LIBBSD 1" >>confdefs.h
10719
10720
10721fi
10722
10723
10724fi
Antoine Pitroub170f172010-09-10 18:47:36 +000010725done
10726
Antoine Pitrou85729812010-09-07 14:55:24 +000010727fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010728
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010729{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
10730$as_echo_n "checking for getpagesize... " >&6; }
10731cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010732/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010733
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010734#include <unistd.h>
10735
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010736int
10737main ()
10738{
10739void* p = getpagesize
10740 ;
10741 return 0;
10742}
10743_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010744if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010745
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010746$as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010747
Matthias Klosec511b472010-05-08 11:01:39 +000010748 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010749$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010750else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010751 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10752$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010753
10754fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010755rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010756
Charles-François Natali93a11752011-11-27 13:01:35 +010010757{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken unsetenv" >&5
10758$as_echo_n "checking for broken unsetenv... " >&6; }
10759cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10760/* end confdefs.h. */
10761
10762#include <stdlib.h>
10763
10764int
10765main ()
10766{
10767int res = unsetenv("DUMMY")
10768 ;
10769 return 0;
10770}
10771_ACEOF
10772if ac_fn_c_try_compile "$LINENO"; then :
10773 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10774$as_echo "no" >&6; }
10775else
10776
10777$as_echo "#define HAVE_BROKEN_UNSETENV 1" >>confdefs.h
10778
10779 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10780$as_echo "yes" >&6; }
10781
10782fi
10783rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10784
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010785for ac_prog in true
10786do
10787 # Extract the first word of "$ac_prog", so it can be a program name with args.
10788set dummy $ac_prog; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010789{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10790$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010791if ${ac_cv_prog_TRUE+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010792 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010793else
10794 if test -n "$TRUE"; then
10795 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
10796else
10797as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10798for as_dir in $PATH
10799do
10800 IFS=$as_save_IFS
10801 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010802 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +010010803 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010804 ac_cv_prog_TRUE="$ac_prog"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010805 $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 +000010806 break 2
10807 fi
10808done
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010809 done
Martin v. Löwiseba40652007-08-30 20:10:57 +000010810IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010811
10812fi
10813fi
10814TRUE=$ac_cv_prog_TRUE
10815if test -n "$TRUE"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010816 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TRUE" >&5
10817$as_echo "$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010818else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010819 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10820$as_echo "no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010821fi
10822
Martin v. Löwiseba40652007-08-30 20:10:57 +000010823
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010824 test -n "$TRUE" && break
10825done
10826test -n "$TRUE" || TRUE="/bin/true"
10827
10828
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010829{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lc" >&5
10830$as_echo_n "checking for inet_aton in -lc... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010831if ${ac_cv_lib_c_inet_aton+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010832 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010833else
10834 ac_check_lib_save_LIBS=$LIBS
10835LIBS="-lc $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010836cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010837/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010838
Martin v. Löwiseba40652007-08-30 20:10:57 +000010839/* Override any GCC internal prototype to avoid an error.
10840 Use char because int might match the return type of a GCC
10841 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010842#ifdef __cplusplus
10843extern "C"
10844#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010845char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010846int
10847main ()
10848{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010849return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010850 ;
10851 return 0;
10852}
10853_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010854if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010855 ac_cv_lib_c_inet_aton=yes
10856else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010857 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010858fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010859rm -f core conftest.err conftest.$ac_objext \
10860 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010861LIBS=$ac_check_lib_save_LIBS
10862fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010863{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_inet_aton" >&5
10864$as_echo "$ac_cv_lib_c_inet_aton" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010865if test "x$ac_cv_lib_c_inet_aton" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010866 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010867else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010868 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5
10869$as_echo_n "checking for inet_aton in -lresolv... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010870if ${ac_cv_lib_resolv_inet_aton+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010871 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010872else
10873 ac_check_lib_save_LIBS=$LIBS
10874LIBS="-lresolv $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010875cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010876/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010877
Martin v. Löwiseba40652007-08-30 20:10:57 +000010878/* Override any GCC internal prototype to avoid an error.
10879 Use char because int might match the return type of a GCC
10880 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010881#ifdef __cplusplus
10882extern "C"
10883#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010884char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010885int
10886main ()
10887{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010888return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010889 ;
10890 return 0;
10891}
10892_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010893if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010894 ac_cv_lib_resolv_inet_aton=yes
10895else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010896 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010897fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010898rm -f core conftest.err conftest.$ac_objext \
10899 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010900LIBS=$ac_check_lib_save_LIBS
10901fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010902{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5
10903$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010904if test "x$ac_cv_lib_resolv_inet_aton" = xyes; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010905 cat >>confdefs.h <<_ACEOF
10906#define HAVE_LIBRESOLV 1
10907_ACEOF
10908
10909 LIBS="-lresolv $LIBS"
10910
10911fi
10912
10913
10914fi
10915
10916
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010917# On Tru64, chflags seems to be present, but calling it will
10918# exit Python
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010919{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chflags" >&5
10920$as_echo_n "checking for chflags... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010921if ${ac_cv_have_chflags+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010922 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010923else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010924 if test "$cross_compiling" = yes; then :
Gregory P. Smith49437c22009-11-02 01:38:35 +000010925 ac_cv_have_chflags=cross
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010926else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010927 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010928/* end confdefs.h. */
Ned Deily43e10542011-06-27 23:41:53 -070010929
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010930#include <sys/stat.h>
10931#include <unistd.h>
10932int main(int argc, char*argv[])
10933{
10934 if(chflags(argv[0], 0) != 0)
10935 return 1;
10936 return 0;
10937}
Ned Deily43e10542011-06-27 23:41:53 -070010938
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010939_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010940if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010941 ac_cv_have_chflags=yes
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010942else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010943 ac_cv_have_chflags=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010944fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010945rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10946 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +000010947fi
10948
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010949
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010950fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010951{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_chflags" >&5
10952$as_echo "$ac_cv_have_chflags" >&6; }
Gregory P. Smith49437c22009-11-02 01:38:35 +000010953if test "$ac_cv_have_chflags" = cross ; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010954 ac_fn_c_check_func "$LINENO" "chflags" "ac_cv_func_chflags"
Matthias Klose3cef2a92012-03-14 23:39:33 +010010955if test "x$ac_cv_func_chflags" = xyes; then :
Gregory P. Smith49437c22009-11-02 01:38:35 +000010956 ac_cv_have_chflags="yes"
10957else
10958 ac_cv_have_chflags="no"
10959fi
10960
10961fi
10962if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010963
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010964$as_echo "#define HAVE_CHFLAGS 1" >>confdefs.h
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010965
10966fi
10967
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010968{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lchflags" >&5
10969$as_echo_n "checking for lchflags... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010970if ${ac_cv_have_lchflags+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010971 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010972else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010973 if test "$cross_compiling" = yes; then :
Gregory P. Smith49437c22009-11-02 01:38:35 +000010974 ac_cv_have_lchflags=cross
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010975else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010976 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010977/* end confdefs.h. */
Ned Deily43e10542011-06-27 23:41:53 -070010978
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010979#include <sys/stat.h>
10980#include <unistd.h>
10981int main(int argc, char*argv[])
10982{
10983 if(lchflags(argv[0], 0) != 0)
10984 return 1;
10985 return 0;
10986}
Ned Deily43e10542011-06-27 23:41:53 -070010987
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010988_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010989if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010990 ac_cv_have_lchflags=yes
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010991else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010992 ac_cv_have_lchflags=no
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010993fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010994rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10995 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010996fi
10997
10998
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010999fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011000{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lchflags" >&5
11001$as_echo "$ac_cv_have_lchflags" >&6; }
Gregory P. Smith49437c22009-11-02 01:38:35 +000011002if test "$ac_cv_have_lchflags" = cross ; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011003 ac_fn_c_check_func "$LINENO" "lchflags" "ac_cv_func_lchflags"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011004if test "x$ac_cv_func_lchflags" = xyes; then :
Gregory P. Smith49437c22009-11-02 01:38:35 +000011005 ac_cv_have_lchflags="yes"
11006else
11007 ac_cv_have_lchflags="no"
11008fi
11009
11010fi
11011if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011012
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011013$as_echo "#define HAVE_LCHFLAGS 1" >>confdefs.h
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011014
11015fi
11016
Ronald Oussorenf8752642006-07-06 10:13:35 +000011017case $ac_sys_system/$ac_sys_release in
11018Darwin/*)
11019 _CUR_CFLAGS="${CFLAGS}"
11020 _CUR_LDFLAGS="${LDFLAGS}"
11021 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
11022 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
11023 ;;
11024esac
11025
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011026{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5
11027$as_echo_n "checking for inflateCopy in -lz... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011028if ${ac_cv_lib_z_inflateCopy+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011029 $as_echo_n "(cached) " >&6
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000011030else
11031 ac_check_lib_save_LIBS=$LIBS
11032LIBS="-lz $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011033cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000011034/* end confdefs.h. */
11035
Martin v. Löwiseba40652007-08-30 20:10:57 +000011036/* Override any GCC internal prototype to avoid an error.
11037 Use char because int might match the return type of a GCC
11038 builtin and then its argument prototype would still apply. */
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000011039#ifdef __cplusplus
11040extern "C"
11041#endif
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000011042char inflateCopy ();
11043int
11044main ()
11045{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011046return inflateCopy ();
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000011047 ;
11048 return 0;
11049}
11050_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011051if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000011052 ac_cv_lib_z_inflateCopy=yes
11053else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011054 ac_cv_lib_z_inflateCopy=no
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000011055fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011056rm -f core conftest.err conftest.$ac_objext \
11057 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000011058LIBS=$ac_check_lib_save_LIBS
11059fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011060{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5
11061$as_echo "$ac_cv_lib_z_inflateCopy" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011062if test "x$ac_cv_lib_z_inflateCopy" = xyes; then :
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000011063
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011064$as_echo "#define HAVE_ZLIB_COPY 1" >>confdefs.h
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000011065
11066fi
11067
11068
Ronald Oussorenf8752642006-07-06 10:13:35 +000011069case $ac_sys_system/$ac_sys_release in
11070Darwin/*)
11071 CFLAGS="${_CUR_CFLAGS}"
11072 LDFLAGS="${_CUR_LDFLAGS}"
11073 ;;
11074esac
11075
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011076{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hstrerror" >&5
11077$as_echo_n "checking for hstrerror... " >&6; }
11078cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011079/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000011080
Martin v. Löwise9416172003-05-03 10:12:45 +000011081#include <netdb.h>
11082
Martin v. Löwise9416172003-05-03 10:12:45 +000011083int
11084main ()
11085{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011086void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000011087 ;
11088 return 0;
11089}
11090_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011091if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000011092
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011093$as_echo "#define HAVE_HSTRERROR 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000011094
Matthias Klosec511b472010-05-08 11:01:39 +000011095 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011096$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011097else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011098 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11099$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011100
11101fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011102rm -f core conftest.err conftest.$ac_objext \
11103 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011104
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011105{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5
11106$as_echo_n "checking for inet_aton... " >&6; }
11107cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011108/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000011109
Martin v. Löwis86d66262006-02-17 08:40:11 +000011110#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000011111#include <sys/socket.h>
11112#include <netinet/in.h>
11113#include <arpa/inet.h>
11114
Martin v. Löwise9416172003-05-03 10:12:45 +000011115int
11116main ()
11117{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011118void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000011119 ;
11120 return 0;
11121}
11122_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011123if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000011124
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011125$as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000011126
Matthias Klosec511b472010-05-08 11:01:39 +000011127 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011128$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011129else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011130 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11131$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011132
11133fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011134rm -f core conftest.err conftest.$ac_objext \
11135 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011136
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011137{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_pton" >&5
11138$as_echo_n "checking for inet_pton... " >&6; }
11139cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011140/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000011141
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000011142#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000011143#include <sys/socket.h>
11144#include <netinet/in.h>
11145#include <arpa/inet.h>
11146
Martin v. Löwise9416172003-05-03 10:12:45 +000011147int
11148main ()
11149{
11150void* p = inet_pton
11151 ;
11152 return 0;
11153}
11154_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011155if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000011156
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011157$as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000011158
Matthias Klosec511b472010-05-08 11:01:39 +000011159 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011160$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011161else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011162 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11163$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011164
11165fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011166rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000011167
Martin v. Löwisd6640d42003-07-06 09:29:52 +000011168# On some systems, setgroups is in unistd.h, on others, in grp.h
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011169{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for setgroups" >&5
11170$as_echo_n "checking for setgroups... " >&6; }
11171cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011172/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000011173
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000011174#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000011175#ifdef HAVE_GRP_H
11176#include <grp.h>
11177#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000011178
Martin v. Löwisd5843682002-11-21 20:41:28 +000011179int
11180main ()
11181{
11182void* p = setgroups
11183 ;
11184 return 0;
11185}
11186_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011187if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000011188
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011189$as_echo "#define HAVE_SETGROUPS 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000011190
Matthias Klosec511b472010-05-08 11:01:39 +000011191 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011192$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011193else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011194 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11195$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011196
11197fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011198rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000011199
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011200# check for openpty and forkpty
11201
11202for ac_func in openpty
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011203do :
11204 ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011205if test "x$ac_cv_func_openpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011206 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011207#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011208_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011209
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011210else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011211 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5
11212$as_echo_n "checking for openpty in -lutil... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011213if ${ac_cv_lib_util_openpty+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011214 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000011215else
Martin v. Löwis11437992002-04-12 09:54:03 +000011216 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011217LIBS="-lutil $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011218cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011219/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011220
Martin v. Löwiseba40652007-08-30 20:10:57 +000011221/* Override any GCC internal prototype to avoid an error.
11222 Use char because int might match the return type of a GCC
11223 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011224#ifdef __cplusplus
11225extern "C"
11226#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011227char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011228int
11229main ()
11230{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011231return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011232 ;
11233 return 0;
11234}
11235_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011236if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011237 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000011238else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011239 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011240fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011241rm -f core conftest.err conftest.$ac_objext \
11242 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011243LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011244fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011245{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5
11246$as_echo "$ac_cv_lib_util_openpty" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011247if test "x$ac_cv_lib_util_openpty" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011248 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000011249 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011250else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011251 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lbsd" >&5
11252$as_echo_n "checking for openpty in -lbsd... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011253if ${ac_cv_lib_bsd_openpty+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011254 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011255else
11256 ac_check_lib_save_LIBS=$LIBS
11257LIBS="-lbsd $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011258cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011259/* end confdefs.h. */
11260
Martin v. Löwiseba40652007-08-30 20:10:57 +000011261/* Override any GCC internal prototype to avoid an error.
11262 Use char because int might match the return type of a GCC
11263 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011264#ifdef __cplusplus
11265extern "C"
11266#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011267char openpty ();
11268int
11269main ()
11270{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011271return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011272 ;
11273 return 0;
11274}
11275_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011276if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011277 ac_cv_lib_bsd_openpty=yes
11278else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011279 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011280fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011281rm -f core conftest.err conftest.$ac_objext \
11282 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011283LIBS=$ac_check_lib_save_LIBS
11284fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011285{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_openpty" >&5
11286$as_echo "$ac_cv_lib_bsd_openpty" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011287if test "x$ac_cv_lib_bsd_openpty" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011288 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011289 LIBS="$LIBS -lbsd"
11290fi
11291
11292
11293fi
11294
Fred Drake8cef4cf2000-06-28 16:40:38 +000011295
11296fi
11297done
11298
11299for ac_func in forkpty
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011300do :
11301 ac_fn_c_check_func "$LINENO" "forkpty" "ac_cv_func_forkpty"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011302if test "x$ac_cv_func_forkpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011303 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011304#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011305_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011306
Fred Drake8cef4cf2000-06-28 16:40:38 +000011307else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011308 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5
11309$as_echo_n "checking for forkpty in -lutil... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011310if ${ac_cv_lib_util_forkpty+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011311 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000011312else
Martin v. Löwis11437992002-04-12 09:54:03 +000011313 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011314LIBS="-lutil $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011315cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011316/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011317
Martin v. Löwiseba40652007-08-30 20:10:57 +000011318/* Override any GCC internal prototype to avoid an error.
11319 Use char because int might match the return type of a GCC
11320 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011321#ifdef __cplusplus
11322extern "C"
11323#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011324char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011325int
11326main ()
11327{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011328return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011329 ;
11330 return 0;
11331}
11332_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011333if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011334 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000011335else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011336 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011337fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011338rm -f core conftest.err conftest.$ac_objext \
11339 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011340LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011341fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011342{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5
11343$as_echo "$ac_cv_lib_util_forkpty" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011344if test "x$ac_cv_lib_util_forkpty" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011345 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000011346 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011347else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011348 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lbsd" >&5
11349$as_echo_n "checking for forkpty in -lbsd... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011350if ${ac_cv_lib_bsd_forkpty+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011351 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011352else
11353 ac_check_lib_save_LIBS=$LIBS
11354LIBS="-lbsd $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011355cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011356/* end confdefs.h. */
11357
Martin v. Löwiseba40652007-08-30 20:10:57 +000011358/* Override any GCC internal prototype to avoid an error.
11359 Use char because int might match the return type of a GCC
11360 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011361#ifdef __cplusplus
11362extern "C"
11363#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011364char forkpty ();
11365int
11366main ()
11367{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011368return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011369 ;
11370 return 0;
11371}
11372_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011373if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011374 ac_cv_lib_bsd_forkpty=yes
11375else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011376 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011377fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011378rm -f core conftest.err conftest.$ac_objext \
11379 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011380LIBS=$ac_check_lib_save_LIBS
11381fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011382{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_forkpty" >&5
11383$as_echo "$ac_cv_lib_bsd_forkpty" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011384if test "x$ac_cv_lib_bsd_forkpty" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011385 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011386 LIBS="$LIBS -lbsd"
11387fi
11388
11389
11390fi
11391
Fred Drake8cef4cf2000-06-28 16:40:38 +000011392
11393fi
11394done
11395
Jack Jansendd19cf82001-12-06 22:36:17 +000011396
Brett Cannonaa5778d2008-03-18 04:09:00 +000011397# Stuff for expat.
Brett Cannonaa5778d2008-03-18 04:09:00 +000011398for ac_func in memmove
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011399do :
11400 ac_fn_c_check_func "$LINENO" "memmove" "ac_cv_func_memmove"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011401if test "x$ac_cv_func_memmove" = xyes; then :
Brett Cannonaa5778d2008-03-18 04:09:00 +000011402 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011403#define HAVE_MEMMOVE 1
Brett Cannonaa5778d2008-03-18 04:09:00 +000011404_ACEOF
11405
11406fi
11407done
11408
11409
Michael W. Hudson54241132001-12-07 15:38:26 +000011410# check for long file support functions
Fred Drake8cef4cf2000-06-28 16:40:38 +000011411for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011412do :
11413 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11414ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Georg Brandl71f4fbb2011-02-25 11:04:50 +000011415if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011416 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011417#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011418_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000011419
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011420fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000011421done
11422
Michael W. Hudson54241132001-12-07 15:38:26 +000011423
Georg Brandl71f4fbb2011-02-25 11:04:50 +000011424ac_fn_c_check_func "$LINENO" "dup2" "ac_cv_func_dup2"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011425if test "x$ac_cv_func_dup2" = xyes; then :
Georg Brandl71f4fbb2011-02-25 11:04:50 +000011426 $as_echo "#define HAVE_DUP2 1" >>confdefs.h
Martin v. Löwis1142de32002-03-29 16:28:31 +000011427
Martin v. Löwis1142de32002-03-29 16:28:31 +000011428else
Martin v. Löwiseba40652007-08-30 20:10:57 +000011429 case " $LIBOBJS " in
Georg Brandl71f4fbb2011-02-25 11:04:50 +000011430 *" dup2.$ac_objext "* ) ;;
11431 *) LIBOBJS="$LIBOBJS dup2.$ac_objext"
Martin v. Löwiseba40652007-08-30 20:10:57 +000011432 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000011433esac
11434
Martin v. Löwis1142de32002-03-29 16:28:31 +000011435fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +000011436
11437ac_fn_c_check_func "$LINENO" "getcwd" "ac_cv_func_getcwd"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011438if test "x$ac_cv_func_getcwd" = xyes; then :
Georg Brandl71f4fbb2011-02-25 11:04:50 +000011439 $as_echo "#define HAVE_GETCWD 1" >>confdefs.h
11440
11441else
11442 case " $LIBOBJS " in
11443 *" getcwd.$ac_objext "* ) ;;
11444 *) LIBOBJS="$LIBOBJS getcwd.$ac_objext"
11445 ;;
11446esac
11447
11448fi
11449
11450ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011451if test "x$ac_cv_func_strdup" = xyes; then :
Georg Brandl71f4fbb2011-02-25 11:04:50 +000011452 $as_echo "#define HAVE_STRDUP 1" >>confdefs.h
11453
11454else
11455 case " $LIBOBJS " in
11456 *" strdup.$ac_objext "* ) ;;
11457 *) LIBOBJS="$LIBOBJS strdup.$ac_objext"
11458 ;;
11459esac
11460
11461fi
Martin v. Löwis1142de32002-03-29 16:28:31 +000011462
11463
11464for ac_func in getpgrp
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011465do :
11466 ac_fn_c_check_func "$LINENO" "getpgrp" "ac_cv_func_getpgrp"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011467if test "x$ac_cv_func_getpgrp" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011468 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011469#define HAVE_GETPGRP 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011470_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011471 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011472/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011473#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011474int
11475main ()
11476{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011477getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000011478 ;
11479 return 0;
11480}
11481_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011482if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011483
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011484$as_echo "#define GETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000011485
Guido van Rossum627b2d71993-12-24 10:39:16 +000011486fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011487rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011488
Guido van Rossum627b2d71993-12-24 10:39:16 +000011489fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011490done
Guido van Rossum627b2d71993-12-24 10:39:16 +000011491
Jack Jansen150753c2003-03-29 22:07:47 +000011492for ac_func in setpgrp
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011493do :
11494 ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011495if test "x$ac_cv_func_setpgrp" = xyes; then :
Jack Jansen150753c2003-03-29 22:07:47 +000011496 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011497#define HAVE_SETPGRP 1
Jack Jansen150753c2003-03-29 22:07:47 +000011498_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011499 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011500/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000011501#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000011502int
11503main ()
11504{
11505setpgrp(0,0);
11506 ;
11507 return 0;
11508}
11509_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011510if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011511
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011512$as_echo "#define SETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000011513
Guido van Rossum8eee56f1994-10-20 22:18:37 +000011514fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011515rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000011516
11517fi
11518done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000011519
Thomas Wouters3a584202000-08-05 23:28:51 +000011520for ac_func in gettimeofday
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011521do :
11522 ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011523if test "x$ac_cv_func_gettimeofday" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011524 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011525#define HAVE_GETTIMEOFDAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011526_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011527 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011528/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000011529#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011530int
11531main ()
11532{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011533gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000011534 ;
11535 return 0;
11536}
11537_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011538if ac_fn_c_try_compile "$LINENO"; then :
11539
Guido van Rossum627b2d71993-12-24 10:39:16 +000011540else
Skip Montanaro6dead952003-09-25 14:50:04 +000011541
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011542$as_echo "#define GETTIMEOFDAY_NO_TZ 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000011543
Martin v. Löwis11437992002-04-12 09:54:03 +000011544
Guido van Rossum627b2d71993-12-24 10:39:16 +000011545fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011546rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011547
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011548fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011549done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011550
Michael W. Hudson54241132001-12-07 15:38:26 +000011551
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011552{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for major" >&5
11553$as_echo_n "checking for major... " >&6; }
11554cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011555/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011556
Neal Norwitz6eb37f02003-02-23 23:28:15 +000011557#if defined(MAJOR_IN_MKDEV)
11558#include <sys/mkdev.h>
11559#elif defined(MAJOR_IN_SYSMACROS)
11560#include <sys/sysmacros.h>
11561#else
11562#include <sys/types.h>
11563#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011564
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011565int
11566main ()
11567{
11568
11569 makedev(major(0),minor(0));
11570
11571 ;
11572 return 0;
11573}
11574_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011575if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011576
11577
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011578$as_echo "#define HAVE_DEVICE_MACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011579
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011580 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11581$as_echo "yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011582
11583else
Skip Montanaro6dead952003-09-25 14:50:04 +000011584
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011585 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11586$as_echo "no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011587
11588fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011589rm -f core conftest.err conftest.$ac_objext \
11590 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000011591
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011592# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000011593# for [no]getaddrinfo in netdb.h.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011594{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
11595$as_echo_n "checking for getaddrinfo... " >&6; }
11596cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011597/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011598
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000011599#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011600#include <sys/socket.h>
11601#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000011602#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011603
Martin v. Löwis11437992002-04-12 09:54:03 +000011604int
11605main ()
11606{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011607getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000011608 ;
11609 return 0;
11610}
11611_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011612if ac_fn_c_try_link "$LINENO"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011613 have_getaddrinfo=yes
11614else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011615 have_getaddrinfo=no
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011616fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011617rm -f core conftest.err conftest.$ac_objext \
11618 conftest$ac_exeext conftest.$ac_ext
11619{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getaddrinfo" >&5
11620$as_echo "$have_getaddrinfo" >&6; }
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011621if test $have_getaddrinfo = yes
11622then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011623 { $as_echo "$as_me:${as_lineno-$LINENO}: checking getaddrinfo bug" >&5
11624$as_echo_n "checking getaddrinfo bug... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011625 if ${ac_cv_buggy_getaddrinfo+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011626 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011627else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011628 if test "$cross_compiling" = yes; then :
doko@python.orgd65e2ba2013-01-31 23:52:03 +010011629
11630if test "${enable_ipv6+set}" = set; then
11631 ac_cv_buggy_getaddrinfo="no -- configured with --(en|dis)able-ipv6"
11632else
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011633 ac_cv_buggy_getaddrinfo=yes
doko@python.orgd65e2ba2013-01-31 23:52:03 +010011634fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011635else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011636 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011637/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011638
Stefan Krah0afe4e42012-11-22 23:56:51 +010011639#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011640#include <sys/types.h>
11641#include <netdb.h>
11642#include <string.h>
11643#include <sys/socket.h>
11644#include <netinet/in.h>
11645
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011646int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011647{
11648 int passive, gaierr, inet4 = 0, inet6 = 0;
11649 struct addrinfo hints, *ai, *aitop;
11650 char straddr[INET6_ADDRSTRLEN], strport[16];
11651
11652 for (passive = 0; passive <= 1; passive++) {
11653 memset(&hints, 0, sizeof(hints));
11654 hints.ai_family = AF_UNSPEC;
11655 hints.ai_flags = passive ? AI_PASSIVE : 0;
11656 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000011657 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011658 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
11659 (void)gai_strerror(gaierr);
11660 goto bad;
11661 }
11662 for (ai = aitop; ai; ai = ai->ai_next) {
11663 if (ai->ai_addr == NULL ||
11664 ai->ai_addrlen == 0 ||
11665 getnameinfo(ai->ai_addr, ai->ai_addrlen,
11666 straddr, sizeof(straddr), strport, sizeof(strport),
11667 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
11668 goto bad;
11669 }
11670 switch (ai->ai_family) {
11671 case AF_INET:
11672 if (strcmp(strport, "54321") != 0) {
11673 goto bad;
11674 }
11675 if (passive) {
11676 if (strcmp(straddr, "0.0.0.0") != 0) {
11677 goto bad;
11678 }
11679 } else {
11680 if (strcmp(straddr, "127.0.0.1") != 0) {
11681 goto bad;
11682 }
11683 }
11684 inet4++;
11685 break;
11686 case AF_INET6:
11687 if (strcmp(strport, "54321") != 0) {
11688 goto bad;
11689 }
11690 if (passive) {
11691 if (strcmp(straddr, "::") != 0) {
11692 goto bad;
11693 }
11694 } else {
11695 if (strcmp(straddr, "::1") != 0) {
11696 goto bad;
11697 }
11698 }
11699 inet6++;
11700 break;
11701 case AF_UNSPEC:
11702 goto bad;
11703 break;
11704 default:
11705 /* another family support? */
11706 break;
11707 }
11708 }
11709 }
11710
11711 if (!(inet4 == 0 || inet4 == 2))
11712 goto bad;
11713 if (!(inet6 == 0 || inet6 == 2))
11714 goto bad;
11715
11716 if (aitop)
11717 freeaddrinfo(aitop);
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011718 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011719
11720 bad:
11721 if (aitop)
11722 freeaddrinfo(aitop);
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011723 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011724}
11725
Martin v. Löwis11437992002-04-12 09:54:03 +000011726_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011727if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011728 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011729else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011730 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011731fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011732rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11733 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011734fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011735
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011736fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011737
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011738fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011739
Benjamin Peterson75fed812010-11-01 01:47:19 +000011740{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_buggy_getaddrinfo" >&5
11741$as_echo "$ac_cv_buggy_getaddrinfo" >&6; }
11742
Mark Dickinson0ef0b912009-12-31 21:11:48 +000011743if test $have_getaddrinfo = no -o "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011744then
11745 if test $ipv6 = yes
11746 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011747 echo 'Fatal: You must get working getaddrinfo() function.'
11748 echo ' or you can specify "--disable-ipv6"'.
11749 exit 1
11750 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011751else
Martin v. Löwis11437992002-04-12 09:54:03 +000011752
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011753$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011754
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011755fi
Benjamin Peterson75fed812010-11-01 01:47:19 +000011756
Jack Jansen9a66b6d2001-08-08 13:56:14 +000011757for ac_func in getnameinfo
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011758do :
11759 ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011760if test "x$ac_cv_func_getnameinfo" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011761 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011762#define HAVE_GETNAMEINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011763_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011764
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011765fi
11766done
11767
Michael W. Hudson54241132001-12-07 15:38:26 +000011768
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011769# checks for structures
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011770{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
11771$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011772if ${ac_cv_header_time+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011773 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011774else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011775 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011776/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011777#include <sys/types.h>
11778#include <sys/time.h>
11779#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011780
Martin v. Löwis11437992002-04-12 09:54:03 +000011781int
11782main ()
11783{
11784if ((struct tm *) 0)
11785return 0;
11786 ;
11787 return 0;
11788}
11789_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011790if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011791 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000011792else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011793 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011794fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011795rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011796fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011797{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
11798$as_echo "$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000011799if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011800
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011801$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011802
11803fi
11804
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011805{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
11806$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011807if ${ac_cv_struct_tm+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011808 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011809else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011810 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011811/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011812#include <sys/types.h>
11813#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011814
Martin v. Löwis11437992002-04-12 09:54:03 +000011815int
11816main ()
11817{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011818struct tm tm;
11819 int *p = &tm.tm_sec;
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011820 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000011821 ;
11822 return 0;
11823}
11824_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011825if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011826 ac_cv_struct_tm=time.h
11827else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011828 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011829fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011830rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011831fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011832{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
11833$as_echo "$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000011834if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011835
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011836$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011837
11838fi
11839
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011840ac_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 +000011841#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000011842
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011843"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011844if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011845
11846cat >>confdefs.h <<_ACEOF
11847#define HAVE_STRUCT_TM_TM_ZONE 1
11848_ACEOF
11849
11850
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011851fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011852
Martin v. Löwis11437992002-04-12 09:54:03 +000011853if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
11854
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011855$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011856
11857else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011858 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
11859"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011860if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011861 ac_have_decl=1
Martin v. Löwiseba40652007-08-30 20:10:57 +000011862else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011863 ac_have_decl=0
Martin v. Löwiseba40652007-08-30 20:10:57 +000011864fi
11865
Martin v. Löwiseba40652007-08-30 20:10:57 +000011866cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011867#define HAVE_DECL_TZNAME $ac_have_decl
Martin v. Löwiseba40652007-08-30 20:10:57 +000011868_ACEOF
11869
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011870 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
11871$as_echo_n "checking for tzname... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011872if ${ac_cv_var_tzname+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011873 $as_echo_n "(cached) " >&6
Martin v. Löwiseba40652007-08-30 20:10:57 +000011874else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011875 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011876/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000011877#include <time.h>
Martin v. Löwiseba40652007-08-30 20:10:57 +000011878#if !HAVE_DECL_TZNAME
11879extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000011880#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011881
Martin v. Löwis11437992002-04-12 09:54:03 +000011882int
11883main ()
11884{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011885return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000011886 ;
11887 return 0;
11888}
11889_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011890if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011891 ac_cv_var_tzname=yes
11892else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011893 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011894fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011895rm -f core conftest.err conftest.$ac_objext \
11896 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000011897fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011898{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
11899$as_echo "$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000011900 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011901
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011902$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000011903
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011904 fi
11905fi
11906
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011907ac_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 +010011908if test "x$ac_cv_member_struct_stat_st_rdev" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011909
11910cat >>confdefs.h <<_ACEOF
11911#define HAVE_STRUCT_STAT_ST_RDEV 1
11912_ACEOF
11913
11914
Guido van Rossum98bf58f2001-10-18 20:34:25 +000011915fi
11916
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011917ac_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 +010011918if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000011919
Martin v. Löwis11437992002-04-12 09:54:03 +000011920cat >>confdefs.h <<_ACEOF
11921#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
11922_ACEOF
11923
11924
Guido van Rossum98bf58f2001-10-18 20:34:25 +000011925fi
11926
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011927ac_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 +010011928if test "x$ac_cv_member_struct_stat_st_flags" = xyes; then :
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000011929
11930cat >>confdefs.h <<_ACEOF
11931#define HAVE_STRUCT_STAT_ST_FLAGS 1
11932_ACEOF
11933
11934
11935fi
11936
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011937ac_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 +010011938if test "x$ac_cv_member_struct_stat_st_gen" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000011939
11940cat >>confdefs.h <<_ACEOF
11941#define HAVE_STRUCT_STAT_ST_GEN 1
11942_ACEOF
11943
11944
11945fi
11946
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011947ac_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 +010011948if test "x$ac_cv_member_struct_stat_st_birthtime" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000011949
11950cat >>confdefs.h <<_ACEOF
11951#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
11952_ACEOF
11953
11954
11955fi
11956
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011957ac_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 +010011958if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000011959
Martin v. Löwis11437992002-04-12 09:54:03 +000011960cat >>confdefs.h <<_ACEOF
11961#define HAVE_STRUCT_STAT_ST_BLOCKS 1
11962_ACEOF
11963
11964
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011965$as_echo "#define HAVE_ST_BLOCKS 1" >>confdefs.h
Guido van Rossum98bf58f2001-10-18 20:34:25 +000011966
11967else
Martin v. Löwiseba40652007-08-30 20:10:57 +000011968 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000011969 *" fileblocks.$ac_objext "* ) ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000011970 *) LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
11971 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000011972esac
11973
Guido van Rossum98bf58f2001-10-18 20:34:25 +000011974fi
11975
Michael W. Hudson54241132001-12-07 15:38:26 +000011976
Martin v. Löwis11437992002-04-12 09:54:03 +000011977
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011978{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5
11979$as_echo_n "checking for time.h that defines altzone... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011980if ${ac_cv_header_time_altzone+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011981 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011982else
Matthias Klosec511b472010-05-08 11:01:39 +000011983
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011984 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011985/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000011986#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011987int
11988main ()
11989{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011990return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000011991 ;
11992 return 0;
11993}
11994_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011995if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011996 ac_cv_header_time_altzone=yes
11997else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011998 ac_cv_header_time_altzone=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011999fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012000rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosec511b472010-05-08 11:01:39 +000012001
Martin v. Löwiseba40652007-08-30 20:10:57 +000012002fi
12003
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012004{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5
12005$as_echo "$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012006if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012007
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012008$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012009
12010fi
12011
Guido van Rossumda88dad1995-01-26 00:46:29 +000012012was_it_defined=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012013{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
12014$as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
12015cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012016/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012017
12018#include <sys/types.h>
12019#include <sys/select.h>
12020#include <sys/time.h>
12021
Martin v. Löwis11437992002-04-12 09:54:03 +000012022int
12023main ()
12024{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012025;
Martin v. Löwis11437992002-04-12 09:54:03 +000012026 ;
12027 return 0;
12028}
12029_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012030if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012031
12032
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012033$as_echo "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012034
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012035 was_it_defined=yes
12036
Martin v. Löwiseba40652007-08-30 20:10:57 +000012037fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012038rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012039{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
12040$as_echo "$was_it_defined" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012041
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012042{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for addrinfo" >&5
12043$as_echo_n "checking for addrinfo... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012044if ${ac_cv_struct_addrinfo+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012045 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012046else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012047 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012048/* end confdefs.h. */
Matthias Klosec511b472010-05-08 11:01:39 +000012049#include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012050int
12051main ()
12052{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012053struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000012054 ;
12055 return 0;
12056}
12057_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012058if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012059 ac_cv_struct_addrinfo=yes
12060else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012061 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012062fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012063rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12064fi
12065
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012066{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5
12067$as_echo "$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012068if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012069
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012070$as_echo "#define HAVE_ADDRINFO 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012071
12072fi
12073
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012074{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5
12075$as_echo_n "checking for sockaddr_storage... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012076if ${ac_cv_struct_sockaddr_storage+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012077 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012078else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012079 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012080/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012081
12082# include <sys/types.h>
12083# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012084int
12085main ()
12086{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012087struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000012088 ;
12089 return 0;
12090}
12091_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012092if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012093 ac_cv_struct_sockaddr_storage=yes
12094else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012095 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012096fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012097rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12098fi
12099
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012100{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5
12101$as_echo "$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012102if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012103
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012104$as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012105
12106fi
12107
Guido van Rossum627b2d71993-12-24 10:39:16 +000012108# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000012109
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012110{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
12111$as_echo_n "checking whether char is unsigned... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012112if ${ac_cv_c_char_unsigned+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012113 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000012114else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012115 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012116/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012117$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000012118int
12119main ()
12120{
12121static int test_array [1 - 2 * !(((char) -1) < 0)];
Charles-François Natalibe2b9072013-01-08 19:47:00 +010012122test_array [0] = 0;
12123return test_array [0];
Martin v. Löwis11437992002-04-12 09:54:03 +000012124
12125 ;
12126 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000012127}
Martin v. Löwis11437992002-04-12 09:54:03 +000012128_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012129if ac_fn_c_try_compile "$LINENO"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000012130 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000012131else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012132 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012133fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012134rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012135fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012136{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
12137$as_echo "$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012138if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012139 $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012140
12141fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000012142
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012143{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
12144$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012145if ${ac_cv_c_const+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012146 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000012147else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012148 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012149/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012150
Martin v. Löwis11437992002-04-12 09:54:03 +000012151int
12152main ()
12153{
Charles-François Natalibe2b9072013-01-08 19:47:00 +010012154
Martin v. Löwis11437992002-04-12 09:54:03 +000012155#ifndef __cplusplus
Charles-François Natalibe2b9072013-01-08 19:47:00 +010012156 /* Ultrix mips cc rejects this sort of thing. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012157 typedef int charset[2];
Charles-François Natalibe2b9072013-01-08 19:47:00 +010012158 const charset cs = { 0, 0 };
Martin v. Löwis11437992002-04-12 09:54:03 +000012159 /* SunOS 4.1.1 cc rejects this. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000012160 char const *const *pcpcc;
12161 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000012162 /* NEC SVR4.0.2 mips cc rejects this. */
12163 struct point {int x, y;};
12164 static struct point const zero = {0,0};
12165 /* AIX XL C 1.02.0.0 rejects this.
12166 It does not let you subtract one const X* pointer from another in
12167 an arm of an if-expression whose if-part is not a constant
12168 expression */
12169 const char *g = "string";
Martin v. Löwiseba40652007-08-30 20:10:57 +000012170 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012171 /* HPUX 7.0 cc rejects these. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000012172 ++pcpcc;
12173 ppc = (char**) pcpcc;
12174 pcpcc = (char const *const *) ppc;
Charles-François Natalibe2b9072013-01-08 19:47:00 +010012175 { /* SCO 3.2v4 cc rejects this sort of thing. */
12176 char tx;
12177 char *t = &tx;
Martin v. Löwis11437992002-04-12 09:54:03 +000012178 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012179
Martin v. Löwis11437992002-04-12 09:54:03 +000012180 *t++ = 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +000012181 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012182 }
12183 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
12184 int x[] = {25, 17};
12185 const int *foo = &x[0];
12186 ++foo;
12187 }
12188 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
12189 typedef const int *iptr;
12190 iptr p = 0;
12191 ++p;
12192 }
Charles-François Natalibe2b9072013-01-08 19:47:00 +010012193 { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
Martin v. Löwis11437992002-04-12 09:54:03 +000012194 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
Charles-François Natalibe2b9072013-01-08 19:47:00 +010012195 struct s { int j; const int *ap[3]; } bx;
12196 struct s *b = &bx; b->j = 5;
Martin v. Löwis11437992002-04-12 09:54:03 +000012197 }
12198 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
12199 const int foo = 10;
Martin v. Löwiseba40652007-08-30 20:10:57 +000012200 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012201 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012202 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000012203#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000012204
Martin v. Löwis11437992002-04-12 09:54:03 +000012205 ;
12206 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000012207}
Martin v. Löwis11437992002-04-12 09:54:03 +000012208_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012209if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012210 ac_cv_c_const=yes
12211else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012212 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012213fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012214rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012215fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012216{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
12217$as_echo "$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012218if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012219
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012220$as_echo "#define const /**/" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012221
12222fi
12223
Michael W. Hudson54241132001-12-07 15:38:26 +000012224
Guido van Rossumda88dad1995-01-26 00:46:29 +000012225works=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012226{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5
12227$as_echo_n "checking for working volatile... " >&6; }
12228cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012229/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000012230
Martin v. Löwis11437992002-04-12 09:54:03 +000012231int
12232main ()
12233{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012234volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012235 ;
12236 return 0;
12237}
12238_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012239if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000012240 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000012241else
Skip Montanaro6dead952003-09-25 14:50:04 +000012242
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012243$as_echo "#define volatile /**/" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000012244
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012245
Guido van Rossum627b2d71993-12-24 10:39:16 +000012246fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012247rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012248{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
12249$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000012250
Guido van Rossumda88dad1995-01-26 00:46:29 +000012251works=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012252{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working signed char" >&5
12253$as_echo_n "checking for working signed char... " >&6; }
12254cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012255/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000012256
Martin v. Löwis11437992002-04-12 09:54:03 +000012257int
12258main ()
12259{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012260signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000012261 ;
12262 return 0;
12263}
12264_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012265if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000012266 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000012267else
Skip Montanaro6dead952003-09-25 14:50:04 +000012268
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012269$as_echo "#define signed /**/" >>confdefs.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000012270
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012271
Guido van Rossum7f43da71994-08-01 12:15:30 +000012272fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012273rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012274{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
12275$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000012276
Guido van Rossumda88dad1995-01-26 00:46:29 +000012277have_prototypes=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012278{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototypes" >&5
12279$as_echo_n "checking for prototypes... " >&6; }
12280cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012281/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012282int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012283int
12284main ()
12285{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012286return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000012287 ;
12288 return 0;
12289}
12290_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012291if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012292
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012293$as_echo "#define HAVE_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012294
Matthias Klosec511b472010-05-08 11:01:39 +000012295 have_prototypes=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000012296fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012297rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012298{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_prototypes" >&5
12299$as_echo "$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012300
Guido van Rossumda88dad1995-01-26 00:46:29 +000012301works=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012302{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for variable length prototypes and stdarg.h" >&5
12303$as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; }
12304cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012305/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012306
12307#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000012308int foo(int x, ...) {
12309 va_list va;
12310 va_start(va, x);
12311 va_arg(va, int);
12312 va_arg(va, char *);
12313 va_arg(va, double);
12314 return 0;
12315}
Guido van Rossum7f43da71994-08-01 12:15:30 +000012316
Martin v. Löwis11437992002-04-12 09:54:03 +000012317int
12318main ()
12319{
Guido van Rossum90eea071996-08-30 20:58:57 +000012320return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000012321 ;
12322 return 0;
12323}
12324_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012325if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012326
12327
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012328$as_echo "#define HAVE_STDARG_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012329
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012330 works=yes
12331
Guido van Rossum627b2d71993-12-24 10:39:16 +000012332fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012333rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012334{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
12335$as_echo "$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012336
Martin v. Löwisd6320502004-08-12 13:45:08 +000012337# check for socketpair
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012338{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair" >&5
12339$as_echo_n "checking for socketpair... " >&6; }
12340cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000012341/* end confdefs.h. */
12342
12343#include <sys/types.h>
12344#include <sys/socket.h>
12345
12346int
12347main ()
12348{
12349void *x=socketpair
12350 ;
12351 return 0;
12352}
12353_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012354if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd6320502004-08-12 13:45:08 +000012355
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012356$as_echo "#define HAVE_SOCKETPAIR 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +000012357
Matthias Klosec511b472010-05-08 11:01:39 +000012358 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012359$as_echo "yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000012360else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012361 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12362$as_echo "no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000012363
12364fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012365rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000012366
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012367# check if sockaddr has sa_len member
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012368{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr has sa_len member" >&5
12369$as_echo_n "checking if sockaddr has sa_len member... " >&6; }
12370cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012371/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012372#include <sys/types.h>
12373#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012374int
12375main ()
12376{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012377struct sockaddr x;
12378x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012379 ;
12380 return 0;
12381}
12382_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012383if ac_fn_c_try_compile "$LINENO"; then :
12384 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12385$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012386
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012387$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012388
12389else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012390 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12391$as_echo "no" >&6; }
Matthias Klosec511b472010-05-08 11:01:39 +000012392
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012393fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012394rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012395
Guido van Rossumda88dad1995-01-26 00:46:29 +000012396va_list_is_array=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012397{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether va_list is an array" >&5
12398$as_echo_n "checking whether va_list is an array... " >&6; }
12399cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012400/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012401
12402#ifdef HAVE_STDARG_PROTOTYPES
12403#include <stdarg.h>
12404#else
12405#include <varargs.h>
12406#endif
12407
Martin v. Löwis11437992002-04-12 09:54:03 +000012408int
12409main ()
12410{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012411va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000012412 ;
12413 return 0;
12414}
12415_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012416if ac_fn_c_try_compile "$LINENO"; then :
12417
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012418else
Skip Montanaro6dead952003-09-25 14:50:04 +000012419
Martin v. Löwis11437992002-04-12 09:54:03 +000012420
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012421$as_echo "#define VA_LIST_IS_ARRAY 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012422
Guido van Rossumda88dad1995-01-26 00:46:29 +000012423 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012424
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012425fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012426rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012427{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $va_list_is_array" >&5
12428$as_echo "$va_list_is_array" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012429
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012430# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000012431
12432
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012433ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r"
Matthias Klose3cef2a92012-03-14 23:39:33 +010012434if test "x$ac_cv_func_gethostbyname_r" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012435
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012436 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000012437
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012438 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 6 args" >&5
12439$as_echo_n "checking gethostbyname_r with 6 args... " >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012440 OLD_CFLAGS=$CFLAGS
12441 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012442 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012443/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012444
12445# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012446
Martin v. Löwis11437992002-04-12 09:54:03 +000012447int
12448main ()
12449{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012450
12451 char *name;
12452 struct hostent *he, *res;
12453 char buffer[2048];
12454 int buflen = 2048;
12455 int h_errnop;
12456
12457 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000012458
12459 ;
12460 return 0;
12461}
12462_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012463if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012464
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012465 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000012466
Martin v. Löwis11437992002-04-12 09:54:03 +000012467
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012468$as_echo "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012469
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012470 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12471$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012472
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012473else
Skip Montanaro6dead952003-09-25 14:50:04 +000012474
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012475 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12476$as_echo "no" >&6; }
12477 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 5 args" >&5
12478$as_echo_n "checking gethostbyname_r with 5 args... " >&6; }
12479 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012480/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012481
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012482# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012483
Martin v. Löwis11437992002-04-12 09:54:03 +000012484int
12485main ()
12486{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012487
12488 char *name;
12489 struct hostent *he;
Matthias Klosec511b472010-05-08 11:01:39 +000012490 char buffer[2048];
12491 int buflen = 2048;
12492 int h_errnop;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012493
Matthias Klosec511b472010-05-08 11:01:39 +000012494 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000012495
12496 ;
12497 return 0;
12498}
12499_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012500if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012501
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012502 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000012503
Martin v. Löwis11437992002-04-12 09:54:03 +000012504
Matthias Klosec511b472010-05-08 11:01:39 +000012505$as_echo "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012506
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012507 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12508$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012509
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012510else
Skip Montanaro6dead952003-09-25 14:50:04 +000012511
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012512 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12513$as_echo "no" >&6; }
Matthias Klosec511b472010-05-08 11:01:39 +000012514 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 3 args" >&5
12515$as_echo_n "checking gethostbyname_r with 3 args... " >&6; }
12516 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12517/* end confdefs.h. */
12518
12519# include <netdb.h>
12520
12521int
12522main ()
12523{
12524
12525 char *name;
12526 struct hostent *he;
12527 struct hostent_data data;
12528
12529 (void) gethostbyname_r(name, he, &data);
12530
12531 ;
12532 return 0;
12533}
12534_ACEOF
12535if ac_fn_c_try_compile "$LINENO"; then :
12536
12537 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
12538
12539
12540$as_echo "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h
12541
12542 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12543$as_echo "yes" >&6; }
12544
12545else
12546
12547 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12548$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012549
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012550fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012551rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012552
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012553fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012554rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012555
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012556fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012557rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012558 CFLAGS=$OLD_CFLAGS
12559
12560else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012561
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012562 for ac_func in gethostbyname
12563do :
12564 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
Matthias Klose3cef2a92012-03-14 23:39:33 +010012565if test "x$ac_cv_func_gethostbyname" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012566 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012567#define HAVE_GETHOSTBYNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012568_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012569
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012570fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012571done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012572
Michael W. Hudson54241132001-12-07 15:38:26 +000012573
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012574fi
12575
Michael W. Hudson54241132001-12-07 15:38:26 +000012576
12577
12578
12579
12580
12581
Guido van Rossum627b2d71993-12-24 10:39:16 +000012582# checks for system services
12583# (none yet)
12584
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012585# Linux requires this for correct f.p. operations
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012586ac_fn_c_check_func "$LINENO" "__fpu_control" "ac_cv_func___fpu_control"
Matthias Klose3cef2a92012-03-14 23:39:33 +010012587if test "x$ac_cv_func___fpu_control" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012588
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000012589else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012590 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5
12591$as_echo_n "checking for __fpu_control in -lieee... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012592if ${ac_cv_lib_ieee___fpu_control+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012593 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012594else
Martin v. Löwis11437992002-04-12 09:54:03 +000012595 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012596LIBS="-lieee $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012597cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012598/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012599
Martin v. Löwiseba40652007-08-30 20:10:57 +000012600/* Override any GCC internal prototype to avoid an error.
12601 Use char because int might match the return type of a GCC
12602 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012603#ifdef __cplusplus
12604extern "C"
12605#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012606char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012607int
12608main ()
12609{
Martin v. Löwiseba40652007-08-30 20:10:57 +000012610return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012611 ;
12612 return 0;
12613}
12614_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012615if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012616 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000012617else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012618 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012619fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012620rm -f core conftest.err conftest.$ac_objext \
12621 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012622LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012623fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012624{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee___fpu_control" >&5
12625$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012626if test "x$ac_cv_lib_ieee___fpu_control" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012627 cat >>confdefs.h <<_ACEOF
12628#define HAVE_LIBIEEE 1
12629_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012630
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012631 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012632
Guido van Rossum627b2d71993-12-24 10:39:16 +000012633fi
12634
Michael W. Hudson54241132001-12-07 15:38:26 +000012635
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000012636fi
12637
Michael W. Hudson54241132001-12-07 15:38:26 +000012638
Guido van Rossum7f253911997-05-09 02:42:48 +000012639# Check for --with-fpectl
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012640{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-fpectl" >&5
12641$as_echo_n "checking for --with-fpectl... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012642
Martin v. Löwiseba40652007-08-30 20:10:57 +000012643# Check whether --with-fpectl was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012644if test "${with_fpectl+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +000012645 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000012646if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000012647then
12648
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012649$as_echo "#define WANT_SIGFPE_HANDLER 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012650
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012651 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12652$as_echo "yes" >&6; }
12653else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12654$as_echo "no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000012655fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000012656else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012657 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12658$as_echo "no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012659fi
12660
Guido van Rossum7f253911997-05-09 02:42:48 +000012661
Guido van Rossum7f43da71994-08-01 12:15:30 +000012662# check for --with-libm=...
12663
Guido van Rossum563e7081996-09-10 18:20:48 +000012664case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000012665Darwin) ;;
Guido van Rossumec95c7b1998-08-04 17:59:56 +000012666BeOS) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000012667*) LIBM=-lm
12668esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012669{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libm=STRING" >&5
12670$as_echo_n "checking for --with-libm=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012671
Martin v. Löwiseba40652007-08-30 20:10:57 +000012672# Check whether --with-libm was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012673if test "${with_libm+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +000012674 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000012675if test "$withval" = no
12676then LIBM=
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012677 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBM empty" >&5
12678$as_echo "force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000012679elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000012680then LIBM=$withval
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012681 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBM=\"$withval\"" >&5
12682$as_echo "set LIBM=\"$withval\"" >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +000012683else as_fn_error $? "proper usage is --with-libm=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000012684fi
Guido van Rossum7f253911997-05-09 02:42:48 +000012685else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012686 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBM=\"$LIBM\"" >&5
12687$as_echo "default LIBM=\"$LIBM\"" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012688fi
12689
Guido van Rossum7f43da71994-08-01 12:15:30 +000012690
12691# check for --with-libc=...
12692
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012693{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libc=STRING" >&5
12694$as_echo_n "checking for --with-libc=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012695
Martin v. Löwiseba40652007-08-30 20:10:57 +000012696# Check whether --with-libc was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012697if test "${with_libc+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +000012698 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000012699if test "$withval" = no
12700then LIBC=
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012701 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBC empty" >&5
12702$as_echo "force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000012703elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000012704then LIBC=$withval
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012705 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBC=\"$withval\"" >&5
12706$as_echo "set LIBC=\"$withval\"" >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +000012707else as_fn_error $? "proper usage is --with-libc=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000012708fi
Guido van Rossum7f253911997-05-09 02:42:48 +000012709else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012710 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBC=\"$LIBC\"" >&5
12711$as_echo "default LIBC=\"$LIBC\"" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012712fi
12713
Guido van Rossum7f43da71994-08-01 12:15:30 +000012714
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012715# **************************************************
12716# * Check for various properties of floating point *
12717# **************************************************
Mark Dickinson265d7382008-04-21 22:32:24 +000012718
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012719{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are little-endian IEEE 754 binary64" >&5
12720$as_echo_n "checking whether C doubles are little-endian IEEE 754 binary64... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012721if ${ac_cv_little_endian_double+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012722 $as_echo_n "(cached) " >&6
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012723else
12724
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012725if test "$cross_compiling" = yes; then :
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012726 ac_cv_little_endian_double=no
12727else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012728 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012729/* end confdefs.h. */
12730
12731#include <string.h>
12732int main() {
12733 double x = 9006104071832581.0;
12734 if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
12735 return 0;
12736 else
12737 return 1;
12738}
12739
12740_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012741if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012742 ac_cv_little_endian_double=yes
12743else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012744 ac_cv_little_endian_double=no
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012745fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012746rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12747 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012748fi
12749
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012750fi
12751
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012752{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_little_endian_double" >&5
12753$as_echo "$ac_cv_little_endian_double" >&6; }
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012754if test "$ac_cv_little_endian_double" = yes
12755then
12756
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012757$as_echo "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012758
12759fi
12760
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012761{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are big-endian IEEE 754 binary64" >&5
12762$as_echo_n "checking whether C doubles are big-endian IEEE 754 binary64... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012763if ${ac_cv_big_endian_double+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012764 $as_echo_n "(cached) " >&6
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012765else
12766
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012767if test "$cross_compiling" = yes; then :
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012768 ac_cv_big_endian_double=no
12769else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012770 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012771/* end confdefs.h. */
12772
12773#include <string.h>
12774int main() {
12775 double x = 9006104071832581.0;
12776 if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
12777 return 0;
12778 else
12779 return 1;
12780}
12781
12782_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012783if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012784 ac_cv_big_endian_double=yes
12785else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012786 ac_cv_big_endian_double=no
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012787fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012788rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12789 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012790fi
12791
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012792fi
12793
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012794{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_big_endian_double" >&5
12795$as_echo "$ac_cv_big_endian_double" >&6; }
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012796if test "$ac_cv_big_endian_double" = yes
12797then
12798
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012799$as_echo "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012800
12801fi
12802
12803# Some ARM platforms use a mixed-endian representation for doubles.
12804# While Python doesn't currently have full support for these platforms
12805# (see e.g., issue 1762561), we can at least make sure that float <-> string
12806# conversions work.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012807{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5
12808$as_echo_n "checking whether C doubles are ARM mixed-endian IEEE 754 binary64... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012809if ${ac_cv_mixed_endian_double+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012810 $as_echo_n "(cached) " >&6
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012811else
12812
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012813if test "$cross_compiling" = yes; then :
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012814 ac_cv_mixed_endian_double=no
12815else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012816 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012817/* end confdefs.h. */
12818
12819#include <string.h>
12820int main() {
12821 double x = 9006104071832581.0;
12822 if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
12823 return 0;
12824 else
12825 return 1;
12826}
12827
12828_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012829if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012830 ac_cv_mixed_endian_double=yes
12831else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012832 ac_cv_mixed_endian_double=no
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012833fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012834rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12835 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012836fi
12837
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012838fi
12839
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012840{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mixed_endian_double" >&5
12841$as_echo "$ac_cv_mixed_endian_double" >&6; }
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012842if test "$ac_cv_mixed_endian_double" = yes
12843then
12844
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012845$as_echo "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012846
12847fi
12848
12849# The short float repr introduced in Python 3.1 requires the
12850# correctly-rounded string <-> double conversion functions from
12851# Python/dtoa.c, which in turn require that the FPU uses 53-bit
12852# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsona548dee2009-11-15 13:12:43 +000012853# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012854# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsona548dee2009-11-15 13:12:43 +000012855
12856# This inline assembler syntax may also work for suncc and icc,
12857# so we try it on all platforms.
12858
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012859{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
12860$as_echo_n "checking whether we can use gcc inline assembler to get and set x87 control word... " >&6; }
12861cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012862/* end confdefs.h. */
12863
12864int
12865main ()
12866{
12867
Mark Dickinsona548dee2009-11-15 13:12:43 +000012868 unsigned short cw;
12869 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
12870 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012871
12872 ;
12873 return 0;
12874}
12875_ACEOF
Stefan Krah99e36b92015-07-03 15:30:54 +020012876if ac_fn_c_try_link "$LINENO"; then :
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012877 have_gcc_asm_for_x87=yes
12878else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012879 have_gcc_asm_for_x87=no
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012880fi
Stefan Krah99e36b92015-07-03 15:30:54 +020012881rm -f core conftest.err conftest.$ac_objext \
12882 conftest$ac_exeext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012883{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x87" >&5
12884$as_echo "$have_gcc_asm_for_x87" >&6; }
Mark Dickinsona548dee2009-11-15 13:12:43 +000012885if test "$have_gcc_asm_for_x87" = yes
12886then
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012887
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012888$as_echo "#define HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012889
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012890fi
Mark Dickinson7a3d8642008-04-22 00:54:27 +000012891
Mark Dickinson04b27232009-01-04 12:29:36 +000012892# Detect whether system arithmetic is subject to x87-style double
12893# rounding issues. The result of this test has little meaning on non
12894# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
12895# mode is round-to-nearest and double rounding issues are present, and
12896# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012897{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x87-style double rounding" >&5
12898$as_echo_n "checking for x87-style double rounding... " >&6; }
Mark Dickinson99abd142009-10-24 13:44:16 +000012899# $BASECFLAGS may affect the result
12900ac_save_cc="$CC"
12901CC="$CC $BASECFLAGS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012902if test "$cross_compiling" = yes; then :
Mark Dickinson04b27232009-01-04 12:29:36 +000012903 ac_cv_x87_double_rounding=no
12904else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012905 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson04b27232009-01-04 12:29:36 +000012906/* end confdefs.h. */
12907
12908#include <stdlib.h>
12909#include <math.h>
12910int main() {
12911 volatile double x, y, z;
12912 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
12913 x = 0.99999999999999989; /* 1-2**-53 */
12914 y = 1./x;
12915 if (y != 1.)
12916 exit(0);
12917 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
12918 x = 1e16;
12919 y = 2.99999;
12920 z = x + y;
12921 if (z != 1e16+4.)
12922 exit(0);
12923 /* both tests show evidence of double rounding */
12924 exit(1);
12925}
12926
12927_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012928if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson04b27232009-01-04 12:29:36 +000012929 ac_cv_x87_double_rounding=no
12930else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012931 ac_cv_x87_double_rounding=yes
Mark Dickinson04b27232009-01-04 12:29:36 +000012932fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012933rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12934 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson04b27232009-01-04 12:29:36 +000012935fi
12936
Mark Dickinson99abd142009-10-24 13:44:16 +000012937CC="$ac_save_cc"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012938{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5
12939$as_echo "$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson04b27232009-01-04 12:29:36 +000012940if test "$ac_cv_x87_double_rounding" = yes
12941then
12942
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012943$as_echo "#define X87_DOUBLE_ROUNDING 1" >>confdefs.h
Mark Dickinson04b27232009-01-04 12:29:36 +000012944
12945fi
12946
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012947# ************************************
12948# * Check for mathematical functions *
12949# ************************************
12950
12951LIBS_SAVE=$LIBS
12952LIBS="$LIBS $LIBM"
12953
Mark Dickinson265d7382008-04-21 22:32:24 +000012954# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
12955# -0. on some architectures.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012956{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether tanh preserves the sign of zero" >&5
12957$as_echo_n "checking whether tanh preserves the sign of zero... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012958if ${ac_cv_tanh_preserves_zero_sign+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012959 $as_echo_n "(cached) " >&6
Mark Dickinson265d7382008-04-21 22:32:24 +000012960else
12961
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012962if test "$cross_compiling" = yes; then :
Mark Dickinson265d7382008-04-21 22:32:24 +000012963 ac_cv_tanh_preserves_zero_sign=no
12964else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012965 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson265d7382008-04-21 22:32:24 +000012966/* end confdefs.h. */
12967
12968#include <math.h>
Mark Dickinson7a3d8642008-04-22 00:54:27 +000012969#include <stdlib.h>
Mark Dickinson265d7382008-04-21 22:32:24 +000012970int main() {
12971 /* return 0 if either negative zeros don't exist
12972 on this platform or if negative zeros exist
12973 and tanh(-0.) == -0. */
12974 if (atan2(0., -1.) == atan2(-0., -1.) ||
12975 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
12976 else exit(1);
12977}
12978
12979_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012980if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson265d7382008-04-21 22:32:24 +000012981 ac_cv_tanh_preserves_zero_sign=yes
12982else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012983 ac_cv_tanh_preserves_zero_sign=no
Mark Dickinson265d7382008-04-21 22:32:24 +000012984fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012985rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12986 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson265d7382008-04-21 22:32:24 +000012987fi
12988
Mark Dickinson265d7382008-04-21 22:32:24 +000012989fi
12990
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012991{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_tanh_preserves_zero_sign" >&5
12992$as_echo "$ac_cv_tanh_preserves_zero_sign" >&6; }
Mark Dickinson265d7382008-04-21 22:32:24 +000012993if test "$ac_cv_tanh_preserves_zero_sign" = yes
12994then
12995
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012996$as_echo "#define TANH_PRESERVES_ZERO_SIGN 1" >>confdefs.h
Mark Dickinson265d7382008-04-21 22:32:24 +000012997
12998fi
12999
Mark Dickinson65898e02009-09-05 10:27:00 +000013000for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013001do :
13002 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13003ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Georg Brandl71f4fbb2011-02-25 11:04:50 +000013004if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinson65898e02009-09-05 10:27:00 +000013005 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013006#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Mark Dickinson65898e02009-09-05 10:27:00 +000013007_ACEOF
13008
13009fi
13010done
13011
Mark Dickinson65898e02009-09-05 10:27:00 +000013012for ac_func in hypot lgamma log1p round tgamma
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013013do :
13014 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13015ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Georg Brandl71f4fbb2011-02-25 11:04:50 +000013016if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Christian Heimes0a8143f2007-12-18 23:22:54 +000013017 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013018#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Christian Heimes0a8143f2007-12-18 23:22:54 +000013019_ACEOF
13020
13021fi
13022done
13023
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013024ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
13025"
Matthias Klose3cef2a92012-03-14 23:39:33 +010013026if test "x$ac_cv_have_decl_isinf" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013027 ac_have_decl=1
Mark Dickinsond181e3a2009-01-04 13:57:26 +000013028else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013029 ac_have_decl=0
Mark Dickinsond181e3a2009-01-04 13:57:26 +000013030fi
13031
Mark Dickinsond181e3a2009-01-04 13:57:26 +000013032cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013033#define HAVE_DECL_ISINF $ac_have_decl
Mark Dickinsond181e3a2009-01-04 13:57:26 +000013034_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013035ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h>
13036"
Matthias Klose3cef2a92012-03-14 23:39:33 +010013037if test "x$ac_cv_have_decl_isnan" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013038 ac_have_decl=1
Mark Dickinsond181e3a2009-01-04 13:57:26 +000013039else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013040 ac_have_decl=0
Mark Dickinsond181e3a2009-01-04 13:57:26 +000013041fi
Mark Dickinsond181e3a2009-01-04 13:57:26 +000013042
13043cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013044#define HAVE_DECL_ISNAN $ac_have_decl
Mark Dickinsond181e3a2009-01-04 13:57:26 +000013045_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013046ac_fn_c_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include <math.h>
13047"
Matthias Klose3cef2a92012-03-14 23:39:33 +010013048if test "x$ac_cv_have_decl_isfinite" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013049 ac_have_decl=1
Mark Dickinsond181e3a2009-01-04 13:57:26 +000013050else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013051 ac_have_decl=0
Mark Dickinsond181e3a2009-01-04 13:57:26 +000013052fi
Mark Dickinsond181e3a2009-01-04 13:57:26 +000013053
13054cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013055#define HAVE_DECL_ISFINITE $ac_have_decl
Mark Dickinsond181e3a2009-01-04 13:57:26 +000013056_ACEOF
13057
13058
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000013059LIBS=$LIBS_SAVE
13060
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013061# For multiprocessing module, check that sem_open
13062# actually works. For FreeBSD versions <= 7.2,
13063# the kernel module that provides POSIX semaphores
13064# isn't loaded by default, so an attempt to call
13065# sem_open results in a 'Signal 12' error.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013066{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX semaphores are enabled" >&5
13067$as_echo_n "checking whether POSIX semaphores are enabled... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013068if ${ac_cv_posix_semaphores_enabled+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013069 $as_echo_n "(cached) " >&6
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013070else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013071 if test "$cross_compiling" = yes; then :
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013072 ac_cv_posix_semaphores_enabled=yes
13073else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013074 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013075/* end confdefs.h. */
13076
13077#include <unistd.h>
13078#include <fcntl.h>
13079#include <stdio.h>
13080#include <semaphore.h>
13081#include <sys/stat.h>
13082
13083int main(void) {
13084 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
13085 if (a == SEM_FAILED) {
13086 perror("sem_open");
13087 return 1;
13088 }
13089 sem_close(a);
Mark Dickinson59dc89e2009-12-13 21:06:06 +000013090 sem_unlink("/autoconf");
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013091 return 0;
13092}
13093
13094_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013095if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013096 ac_cv_posix_semaphores_enabled=yes
13097else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013098 ac_cv_posix_semaphores_enabled=no
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013099fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013100rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13101 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013102fi
13103
13104
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013105fi
13106
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013107{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_semaphores_enabled" >&5
13108$as_echo "$ac_cv_posix_semaphores_enabled" >&6; }
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013109if test $ac_cv_posix_semaphores_enabled = no
13110then
13111
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013112$as_echo "#define POSIX_SEMAPHORES_NOT_ENABLED 1" >>confdefs.h
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013113
13114fi
13115
13116# Multiprocessing check for broken sem_getvalue
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013117{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken sem_getvalue" >&5
13118$as_echo_n "checking for broken sem_getvalue... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013119if ${ac_cv_broken_sem_getvalue+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013120 $as_echo_n "(cached) " >&6
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013121else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013122 if test "$cross_compiling" = yes; then :
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013123 ac_cv_broken_sem_getvalue=yes
13124else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013125 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013126/* end confdefs.h. */
13127
13128#include <unistd.h>
13129#include <fcntl.h>
13130#include <stdio.h>
13131#include <semaphore.h>
13132#include <sys/stat.h>
13133
13134int main(void){
Mark Dickinson59dc89e2009-12-13 21:06:06 +000013135 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013136 int count;
13137 int res;
13138 if(a==SEM_FAILED){
13139 perror("sem_open");
13140 return 1;
13141
13142 }
13143 res = sem_getvalue(a, &count);
13144 sem_close(a);
Mark Dickinson59dc89e2009-12-13 21:06:06 +000013145 sem_unlink("/autocftw");
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013146 return res==-1 ? 1 : 0;
13147}
13148
13149_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013150if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013151 ac_cv_broken_sem_getvalue=no
13152else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013153 ac_cv_broken_sem_getvalue=yes
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013154fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013155rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13156 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013157fi
13158
13159
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013160fi
13161
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013162{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_sem_getvalue" >&5
13163$as_echo "$ac_cv_broken_sem_getvalue" >&6; }
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013164if test $ac_cv_broken_sem_getvalue = yes
13165then
13166
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013167$as_echo "#define HAVE_BROKEN_SEM_GETVALUE 1" >>confdefs.h
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013168
13169fi
13170
Mark Dickinsonefc82f72009-03-20 15:51:55 +000013171# determine what size digit to use for Python's longs
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013172{ $as_echo "$as_me:${as_lineno-$LINENO}: checking digit size for Python's longs" >&5
13173$as_echo_n "checking digit size for Python's longs... " >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +000013174# Check whether --enable-big-digits was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013175if test "${enable_big_digits+set}" = set; then :
Mark Dickinsonefc82f72009-03-20 15:51:55 +000013176 enableval=$enable_big_digits; case $enable_big_digits in
13177yes)
13178 enable_big_digits=30 ;;
13179no)
13180 enable_big_digits=15 ;;
1318115|30)
13182 ;;
13183*)
Matthias Klose3cef2a92012-03-14 23:39:33 +010013184 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 +000013185esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013186{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_big_digits" >&5
13187$as_echo "$enable_big_digits" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +000013188
13189cat >>confdefs.h <<_ACEOF
13190#define PYLONG_BITS_IN_DIGIT $enable_big_digits
13191_ACEOF
13192
13193
13194else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013195 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
13196$as_echo "no value specified" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +000013197fi
13198
13199
Guido van Rossumef2255b2000-03-10 22:30:29 +000013200# check for wchar.h
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013201ac_fn_c_check_header_mongrel "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
Matthias Klose3cef2a92012-03-14 23:39:33 +010013202if test "x$ac_cv_header_wchar_h" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013203
13204
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013205$as_echo "#define HAVE_WCHAR_H 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013206
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013207 wchar_h="yes"
13208
Guido van Rossumef2255b2000-03-10 22:30:29 +000013209else
Martin v. Löwis11437992002-04-12 09:54:03 +000013210 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000013211
13212fi
13213
Michael W. Hudson54241132001-12-07 15:38:26 +000013214
Martin v. Löwis11437992002-04-12 09:54:03 +000013215
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013216# determine wchar_t size
13217if test "$wchar_h" = yes
13218then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013219 # The cast to long int works around a bug in the HP C Compiler
Martin v. Löwiseba40652007-08-30 20:10:57 +000013220# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
13221# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
13222# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013223{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
13224$as_echo_n "checking size of wchar_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013225if ${ac_cv_sizeof_wchar_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013226 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000013227else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013228 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "#include <wchar.h>
13229"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013230
Martin v. Löwis11437992002-04-12 09:54:03 +000013231else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013232 if test "$ac_cv_type_wchar_t" = yes; then
13233 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
13234$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +000013235as_fn_error 77 "cannot compute sizeof (wchar_t)
Matthias Klose3cef2a92012-03-14 23:39:33 +010013236See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000013237 else
13238 ac_cv_sizeof_wchar_t=0
13239 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013240fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013241
Martin v. Löwis11437992002-04-12 09:54:03 +000013242fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013243{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
13244$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000013245
13246
13247
Martin v. Löwis11437992002-04-12 09:54:03 +000013248cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013249#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000013250_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013251
Michael W. Hudson54241132001-12-07 15:38:26 +000013252
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013253fi
13254
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013255{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UCS-4 tcl" >&5
13256$as_echo_n "checking for UCS-4 tcl... " >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013257have_ucs4_tcl=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013258cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013259/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013260
13261#include <tcl.h>
13262#if TCL_UTF_MAX != 6
13263# error "NOT UCS4_TCL"
13264#endif
13265int
13266main ()
13267{
13268
13269 ;
13270 return 0;
13271}
13272_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013273if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013274
13275
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013276$as_echo "#define HAVE_UCS4_TCL 1" >>confdefs.h
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013277
13278 have_ucs4_tcl=yes
13279
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013280fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013281rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013282{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ucs4_tcl" >&5
13283$as_echo "$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013284
Skip Montanaro6dead952003-09-25 14:50:04 +000013285# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013286if test "$wchar_h" = yes
13287then
13288 # check whether wchar_t is signed or not
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013289 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is signed" >&5
13290$as_echo_n "checking whether wchar_t is signed... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013291 if ${ac_cv_wchar_t_signed+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013292 $as_echo_n "(cached) " >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013293else
13294
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013295 if test "$cross_compiling" = yes; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013296 ac_cv_wchar_t_signed=yes
13297else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013298 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013299/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013300
13301 #include <wchar.h>
13302 int main()
13303 {
Martin v. Löwis44fe0e42006-04-11 07:15:30 +000013304 /* Success: exit code 0 */
13305 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013306 }
13307
13308_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013309if ac_fn_c_try_run "$LINENO"; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013310 ac_cv_wchar_t_signed=yes
13311else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013312 ac_cv_wchar_t_signed=no
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013313fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013314rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13315 conftest.$ac_objext conftest.beam conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013316fi
13317
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013318fi
13319
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013320 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wchar_t_signed" >&5
13321$as_echo "$ac_cv_wchar_t_signed" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000013322fi
13323
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013324{ $as_echo "$as_me:${as_lineno-$LINENO}: checking what type to use for unicode" >&5
13325$as_echo_n "checking what type to use for unicode... " >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000013326# Check whether --enable-unicode was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013327if test "${enable_unicode+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +000013328 enableval=$enable_unicode;
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013329else
13330 enable_unicode=yes
Martin v. Löwiseba40652007-08-30 20:10:57 +000013331fi
13332
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013333
13334if test $enable_unicode = yes
13335then
Martin v. Löwisfd917792001-06-27 20:22:04 +000013336 # Without any arguments, Py_UNICODE defaults to two-byte mode
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013337 case "$have_ucs4_tcl" in
13338 yes) enable_unicode="ucs4"
13339 ;;
13340 *) enable_unicode="ucs2"
13341 ;;
13342 esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013343fi
13344
Martin v. Löwis0036cba2002-04-12 09:58:45 +000013345
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013346case "$enable_unicode" in
13347ucs2) unicode_size="2"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013348 $as_echo "#define Py_UNICODE_SIZE 2" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013349
13350 ;;
13351ucs4) unicode_size="4"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013352 $as_echo "#define Py_UNICODE_SIZE 4" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013353
13354 ;;
Martin v. Löwised11a5d2012-05-20 10:42:17 +020013355no) ;; # To allow --disable-unicode
Matthias Klose3cef2a92012-03-14 23:39:33 +010013356*) 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 +000013357esac
13358
Michael W. Hudson54241132001-12-07 15:38:26 +000013359
Martin v. Löwis11437992002-04-12 09:54:03 +000013360
13361
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013362if test "$enable_unicode" = "no"
13363then
Martin v. Löwis339d0f72001-08-17 18:39:25 +000013364 UNICODE_OBJS=""
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013365 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not used" >&5
13366$as_echo "not used" >&6; }
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013367else
Martin v. Löwis339d0f72001-08-17 18:39:25 +000013368 UNICODE_OBJS="Objects/unicodeobject.o Objects/unicodectype.o"
Martin v. Löwis11437992002-04-12 09:54:03 +000013369
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013370$as_echo "#define Py_USING_UNICODE 1" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013371
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013372
13373 # wchar_t is only usable if it maps to an unsigned type
13374 if test "$unicode_size" = "$ac_cv_sizeof_wchar_t" \
Matthias Klose7dbeed72004-12-24 08:22:17 +000013375 -a "$ac_cv_wchar_t_signed" = "no"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013376 then
13377 PY_UNICODE_TYPE="wchar_t"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013378
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013379$as_echo "#define HAVE_USABLE_WCHAR_T 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013380
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013381 $as_echo "#define PY_UNICODE_TYPE wchar_t" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013382
13383 elif test "$ac_cv_sizeof_short" = "$unicode_size"
13384 then
13385 PY_UNICODE_TYPE="unsigned short"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013386 $as_echo "#define PY_UNICODE_TYPE unsigned short" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013387
13388 elif test "$ac_cv_sizeof_long" = "$unicode_size"
13389 then
13390 PY_UNICODE_TYPE="unsigned long"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013391 $as_echo "#define PY_UNICODE_TYPE unsigned long" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013392
13393 else
13394 PY_UNICODE_TYPE="no type found"
13395 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013396 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PY_UNICODE_TYPE" >&5
13397$as_echo "$PY_UNICODE_TYPE" >&6; }
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013398fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000013399
13400# check for endianness
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013401 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
13402$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013403if ${ac_cv_c_bigendian+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013404 $as_echo_n "(cached) " >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000013405else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013406 ac_cv_c_bigendian=unknown
13407 # See if we're dealing with a universal compiler.
13408 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13409/* end confdefs.h. */
13410#ifndef __APPLE_CC__
13411 not a universal capable compiler
13412 #endif
13413 typedef int dummy;
13414
Skip Montanaro6dead952003-09-25 14:50:04 +000013415_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013416if ac_fn_c_try_compile "$LINENO"; then :
13417
13418 # Check for potential -arch flags. It is not universal unless
13419 # there are at least two -arch flags with different values.
13420 ac_arch=
13421 ac_prev=
13422 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
13423 if test -n "$ac_prev"; then
13424 case $ac_word in
13425 i?86 | x86_64 | ppc | ppc64)
13426 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
13427 ac_arch=$ac_word
13428 else
13429 ac_cv_c_bigendian=universal
13430 break
13431 fi
13432 ;;
13433 esac
13434 ac_prev=
13435 elif test "x$ac_word" = "x-arch"; then
13436 ac_prev=arch
13437 fi
13438 done
13439fi
13440rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13441 if test $ac_cv_c_bigendian = unknown; then
13442 # See if sys/param.h defines the BYTE_ORDER macro.
13443 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013444/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000013445#include <sys/types.h>
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013446 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000013447
Martin v. Löwis11437992002-04-12 09:54:03 +000013448int
13449main ()
13450{
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013451#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
13452 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
13453 && LITTLE_ENDIAN)
13454 bogus endian macros
13455 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013456
13457 ;
13458 return 0;
13459}
13460_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013461if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000013462 # It does; now see whether it defined to BIG_ENDIAN or not.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013463 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013464/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000013465#include <sys/types.h>
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013466 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000013467
Martin v. Löwis11437992002-04-12 09:54:03 +000013468int
13469main ()
13470{
Guido van Rossumef2255b2000-03-10 22:30:29 +000013471#if BYTE_ORDER != BIG_ENDIAN
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013472 not big endian
13473 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013474
13475 ;
13476 return 0;
13477}
13478_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013479if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000013480 ac_cv_c_bigendian=yes
13481else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013482 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000013483fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013484rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013485fi
13486rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13487 fi
13488 if test $ac_cv_c_bigendian = unknown; then
13489 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
13490 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013491/* end confdefs.h. */
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013492#include <limits.h>
13493
Martin v. Löwis11437992002-04-12 09:54:03 +000013494int
13495main ()
13496{
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013497#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
13498 bogus endian macros
13499 #endif
13500
Martin v. Löwis11437992002-04-12 09:54:03 +000013501 ;
13502 return 0;
13503}
13504_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013505if ac_fn_c_try_compile "$LINENO"; then :
13506 # It does; now see whether it defined to _BIG_ENDIAN or not.
13507 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13508/* end confdefs.h. */
13509#include <limits.h>
13510
13511int
13512main ()
13513{
13514#ifndef _BIG_ENDIAN
13515 not big endian
13516 #endif
13517
13518 ;
13519 return 0;
13520}
13521_ACEOF
13522if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013523 ac_cv_c_bigendian=yes
Alexandre Vassalottia2db6872009-07-17 07:46:46 +000013524else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013525 ac_cv_c_bigendian=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013526fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013527rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13528fi
13529rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13530 fi
13531 if test $ac_cv_c_bigendian = unknown; then
13532 # Compile a test program.
13533 if test "$cross_compiling" = yes; then :
13534 # Try to guess by grepping values from an object file.
13535 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13536/* end confdefs.h. */
13537short int ascii_mm[] =
13538 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
13539 short int ascii_ii[] =
13540 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
13541 int use_ascii (int i) {
13542 return ascii_mm[i] + ascii_ii[i];
13543 }
13544 short int ebcdic_ii[] =
13545 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
13546 short int ebcdic_mm[] =
13547 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
13548 int use_ebcdic (int i) {
13549 return ebcdic_mm[i] + ebcdic_ii[i];
13550 }
13551 extern int foo;
Martin v. Löwiseba40652007-08-30 20:10:57 +000013552
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013553int
13554main ()
13555{
13556return use_ascii (foo) == use_ebcdic (foo);
13557 ;
13558 return 0;
13559}
13560_ACEOF
13561if ac_fn_c_try_compile "$LINENO"; then :
13562 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
13563 ac_cv_c_bigendian=yes
13564 fi
13565 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
13566 if test "$ac_cv_c_bigendian" = unknown; then
13567 ac_cv_c_bigendian=no
13568 else
13569 # finding both strings is unlikely to happen, but who knows?
13570 ac_cv_c_bigendian=unknown
13571 fi
13572 fi
13573fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013574rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013575else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013576 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013577/* end confdefs.h. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000013578$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000013579int
13580main ()
13581{
Martin v. Löwiseba40652007-08-30 20:10:57 +000013582
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013583 /* Are we little or big endian? From Harbison&Steele. */
13584 union
13585 {
13586 long int l;
13587 char c[sizeof (long int)];
13588 } u;
13589 u.l = 1;
13590 return u.c[sizeof (long int) - 1] == 1;
Martin v. Löwiseba40652007-08-30 20:10:57 +000013591
13592 ;
13593 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000013594}
Martin v. Löwis11437992002-04-12 09:54:03 +000013595_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013596if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000013597 ac_cv_c_bigendian=no
13598else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013599 ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000013600fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013601rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13602 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000013603fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013604
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013605 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013606fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013607{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
13608$as_echo "$ac_cv_c_bigendian" >&6; }
13609 case $ac_cv_c_bigendian in #(
13610 yes)
13611 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
13612;; #(
13613 no)
13614 ;; #(
13615 universal)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013616
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013617$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Alexandre Vassalottia2db6872009-07-17 07:46:46 +000013618
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013619 ;; #(
13620 *)
Georg Brandl71f4fbb2011-02-25 11:04:50 +000013621 as_fn_error $? "unknown endianness
Matthias Klose3cef2a92012-03-14 23:39:33 +010013622 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013623 esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000013624
Michael W. Hudson54241132001-12-07 15:38:26 +000013625
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013626# Check whether right shifting a negative integer extends the sign bit
13627# or fills with zeros (like the Cray J90, according to Tim Peters).
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013628{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether right shift extends the sign bit" >&5
13629$as_echo_n "checking whether right shift extends the sign bit... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013630if ${ac_cv_rshift_extends_sign+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013631 $as_echo_n "(cached) " >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000013632else
Martin v. Löwis11437992002-04-12 09:54:03 +000013633
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013634if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000013635 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013636else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013637 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013638/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013639
13640int main()
13641{
Vladimir Marangozova6180282000-07-12 05:05:06 +000013642 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013643}
13644
Martin v. Löwis11437992002-04-12 09:54:03 +000013645_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013646if ac_fn_c_try_run "$LINENO"; then :
Vladimir Marangozova6180282000-07-12 05:05:06 +000013647 ac_cv_rshift_extends_sign=yes
13648else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013649 ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000013650fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013651rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13652 conftest.$ac_objext conftest.beam conftest.$ac_ext
Vladimir Marangozova6180282000-07-12 05:05:06 +000013653fi
13654
Martin v. Löwiseba40652007-08-30 20:10:57 +000013655fi
13656
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013657{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rshift_extends_sign" >&5
13658$as_echo "$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000013659if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013660then
Martin v. Löwis11437992002-04-12 09:54:03 +000013661
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013662$as_echo "#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1" >>confdefs.h
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013663
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013664fi
13665
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013666# check for getc_unlocked and related locking functions
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013667{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getc_unlocked() and friends" >&5
13668$as_echo_n "checking for getc_unlocked() and friends... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013669if ${ac_cv_have_getc_unlocked+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013670 $as_echo_n "(cached) " >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013671else
Martin v. Löwis11437992002-04-12 09:54:03 +000013672
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013673cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013674/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013675#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013676int
13677main ()
13678{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013679
13680 FILE *f = fopen("/dev/null", "r");
13681 flockfile(f);
13682 getc_unlocked(f);
13683 funlockfile(f);
13684
Martin v. Löwis11437992002-04-12 09:54:03 +000013685 ;
13686 return 0;
13687}
13688_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013689if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013690 ac_cv_have_getc_unlocked=yes
13691else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013692 ac_cv_have_getc_unlocked=no
13693fi
13694rm -f core conftest.err conftest.$ac_objext \
13695 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013696fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013697
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013698{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getc_unlocked" >&5
13699$as_echo "$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013700if test "$ac_cv_have_getc_unlocked" = yes
13701then
Martin v. Löwis11437992002-04-12 09:54:03 +000013702
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013703$as_echo "#define HAVE_GETC_UNLOCKED 1" >>confdefs.h
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013704
13705fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013706
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013707# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000013708# save the value of LIBS so we don't actually link Python with readline
13709LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013710
Gregory P. Smithcc023f12008-09-07 05:15:58 +000013711# On some systems we need to link readline to a termcap compatible
13712# library. NOTE: Keep the precedence of listed libraries synchronised
13713# with setup.py.
13714py_cv_lib_readline=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013715{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link readline libs" >&5
13716$as_echo_n "checking how to link readline libs... " >&6; }
Gregory P. Smithcc023f12008-09-07 05:15:58 +000013717for py_libtermcap in "" ncursesw ncurses curses termcap; do
13718 if test -z "$py_libtermcap"; then
13719 READLINE_LIBS="-lreadline"
13720 else
13721 READLINE_LIBS="-lreadline -l$py_libtermcap"
13722 fi
13723 LIBS="$READLINE_LIBS $LIBS_no_readline"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013724 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013725/* end confdefs.h. */
13726
Martin v. Löwiseba40652007-08-30 20:10:57 +000013727/* Override any GCC internal prototype to avoid an error.
13728 Use char because int might match the return type of a GCC
13729 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013730#ifdef __cplusplus
13731extern "C"
13732#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013733char readline ();
13734int
13735main ()
13736{
Martin v. Löwiseba40652007-08-30 20:10:57 +000013737return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013738 ;
13739 return 0;
13740}
13741_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013742if ac_fn_c_try_link "$LINENO"; then :
Gregory P. Smithcc023f12008-09-07 05:15:58 +000013743 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013744fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013745rm -f core conftest.err conftest.$ac_objext \
13746 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smithcc023f12008-09-07 05:15:58 +000013747 if test $py_cv_lib_readline = yes; then
13748 break
13749 fi
13750done
13751# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
13752#AC_SUBST([READLINE_LIBS])
Gregory P. Smithe080cdf2008-09-07 19:19:04 +000013753if test $py_cv_lib_readline = no; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013754 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
13755$as_echo "none" >&6; }
Gregory P. Smithcc023f12008-09-07 05:15:58 +000013756else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013757 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_LIBS" >&5
13758$as_echo "$READLINE_LIBS" >&6; }
Gregory P. Smithcc023f12008-09-07 05:15:58 +000013759
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013760$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013761
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013762fi
13763
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013764# check for readline 2.1
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013765{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_callback_handler_install in -lreadline" >&5
13766$as_echo_n "checking for rl_callback_handler_install in -lreadline... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013767if ${ac_cv_lib_readline_rl_callback_handler_install+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013768 $as_echo_n "(cached) " >&6
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013769else
13770 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000013771LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013772cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013773/* end confdefs.h. */
13774
Martin v. Löwiseba40652007-08-30 20:10:57 +000013775/* Override any GCC internal prototype to avoid an error.
13776 Use char because int might match the return type of a GCC
13777 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013778#ifdef __cplusplus
13779extern "C"
13780#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013781char rl_callback_handler_install ();
13782int
13783main ()
13784{
Martin v. Löwiseba40652007-08-30 20:10:57 +000013785return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013786 ;
13787 return 0;
13788}
13789_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013790if ac_fn_c_try_link "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013791 ac_cv_lib_readline_rl_callback_handler_install=yes
13792else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013793 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013794fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013795rm -f core conftest.err conftest.$ac_objext \
13796 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013797LIBS=$ac_check_lib_save_LIBS
13798fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013799{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
13800$as_echo "$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013801if test "x$ac_cv_lib_readline_rl_callback_handler_install" = xyes; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013802
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013803$as_echo "#define HAVE_RL_CALLBACK 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013804
13805fi
13806
13807
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013808# check for readline 2.2
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013809cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013810/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013811#include <readline/readline.h>
13812_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013813if ac_fn_c_try_cpp "$LINENO"; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013814 have_readline=yes
13815else
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013816 have_readline=no
Matthias Klosec511b472010-05-08 11:01:39 +000013817
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013818fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +000013819rm -f conftest.err conftest.i conftest.$ac_ext
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013820if test $have_readline = yes
13821then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013822 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013823/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013824#include <readline/readline.h>
13825
13826_ACEOF
13827if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013828 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013829
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013830$as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013831
13832fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +000013833rm -f conftest*
Antoine Pitroud9ff74e2009-10-26 19:16:46 +000013834
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013835 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroud9ff74e2009-10-26 19:16:46 +000013836/* end confdefs.h. */
13837#include <readline/readline.h>
13838
13839_ACEOF
13840if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013841 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then :
Antoine Pitroud9ff74e2009-10-26 19:16:46 +000013842
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013843$as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h
Antoine Pitroud9ff74e2009-10-26 19:16:46 +000013844
13845fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +000013846rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013847
13848fi
13849
Martin v. Löwis0daad592001-09-30 21:09:59 +000013850# check for readline 4.0
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013851{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -lreadline" >&5
13852$as_echo_n "checking for rl_pre_input_hook in -lreadline... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013853if ${ac_cv_lib_readline_rl_pre_input_hook+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013854 $as_echo_n "(cached) " >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000013855else
Martin v. Löwis11437992002-04-12 09:54:03 +000013856 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000013857LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013858cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013859/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013860
Martin v. Löwiseba40652007-08-30 20:10:57 +000013861/* Override any GCC internal prototype to avoid an error.
13862 Use char because int might match the return type of a GCC
13863 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013864#ifdef __cplusplus
13865extern "C"
13866#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013867char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013868int
13869main ()
13870{
Martin v. Löwiseba40652007-08-30 20:10:57 +000013871return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013872 ;
13873 return 0;
13874}
13875_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013876if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013877 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000013878else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013879 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000013880fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013881rm -f core conftest.err conftest.$ac_objext \
13882 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013883LIBS=$ac_check_lib_save_LIBS
13884fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013885{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
13886$as_echo "$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013887if test "x$ac_cv_lib_readline_rl_pre_input_hook" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000013888
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013889$as_echo "#define HAVE_RL_PRE_INPUT_HOOK 1" >>confdefs.h
Martin v. Löwis0daad592001-09-30 21:09:59 +000013890
Martin v. Löwis0daad592001-09-30 21:09:59 +000013891fi
13892
Michael W. Hudson54241132001-12-07 15:38:26 +000013893
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000013894# also in 4.0
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013895{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -lreadline" >&5
13896$as_echo_n "checking for rl_completion_display_matches_hook in -lreadline... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013897if ${ac_cv_lib_readline_rl_completion_display_matches_hook+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013898 $as_echo_n "(cached) " >&6
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000013899else
13900 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000013901LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013902cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000013903/* end confdefs.h. */
13904
13905/* Override any GCC internal prototype to avoid an error.
13906 Use char because int might match the return type of a GCC
13907 builtin and then its argument prototype would still apply. */
13908#ifdef __cplusplus
13909extern "C"
13910#endif
13911char rl_completion_display_matches_hook ();
13912int
13913main ()
13914{
13915return rl_completion_display_matches_hook ();
13916 ;
13917 return 0;
13918}
13919_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013920if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000013921 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
13922else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013923 ac_cv_lib_readline_rl_completion_display_matches_hook=no
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000013924fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013925rm -f core conftest.err conftest.$ac_objext \
13926 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000013927LIBS=$ac_check_lib_save_LIBS
13928fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013929{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
13930$as_echo "$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013931if test "x$ac_cv_lib_readline_rl_completion_display_matches_hook" = xyes; then :
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000013932
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013933$as_echo "#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000013934
13935fi
13936
13937
Martin v. Löwis0daad592001-09-30 21:09:59 +000013938# check for readline 4.2
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013939{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5
13940$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013941if ${ac_cv_lib_readline_rl_completion_matches+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013942 $as_echo_n "(cached) " >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000013943else
Martin v. Löwis11437992002-04-12 09:54:03 +000013944 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000013945LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013946cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013947/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013948
Martin v. Löwiseba40652007-08-30 20:10:57 +000013949/* Override any GCC internal prototype to avoid an error.
13950 Use char because int might match the return type of a GCC
13951 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013952#ifdef __cplusplus
13953extern "C"
13954#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013955char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013956int
13957main ()
13958{
Martin v. Löwiseba40652007-08-30 20:10:57 +000013959return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013960 ;
13961 return 0;
13962}
13963_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013964if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013965 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000013966else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013967 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000013968fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013969rm -f core conftest.err conftest.$ac_objext \
13970 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013971LIBS=$ac_check_lib_save_LIBS
13972fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013973{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_matches" >&5
13974$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013975if test "x$ac_cv_lib_readline_rl_completion_matches" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000013976
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013977$as_echo "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h
Guido van Rossum353ae582001-07-10 16:45:32 +000013978
Guido van Rossum353ae582001-07-10 16:45:32 +000013979fi
13980
Jack Jansendd19cf82001-12-06 22:36:17 +000013981
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013982# also in readline 4.2
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013983cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013984/* end confdefs.h. */
13985#include <readline/readline.h>
13986_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013987if ac_fn_c_try_cpp "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013988 have_readline=yes
13989else
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013990 have_readline=no
Matthias Klosec511b472010-05-08 11:01:39 +000013991
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013992fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +000013993rm -f conftest.err conftest.i conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013994if test $have_readline = yes
13995then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013996 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013997/* end confdefs.h. */
13998#include <readline/readline.h>
13999
14000_ACEOF
14001if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014002 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014003
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014004$as_echo "#define HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014005
14006fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +000014007rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014008
14009fi
14010
Martin v. Löwis82bca632006-02-10 20:49:30 +000014011# End of readline checks: restore LIBS
14012LIBS=$LIBS_no_readline
14013
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014014{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken nice()" >&5
14015$as_echo_n "checking for broken nice()... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010014016if ${ac_cv_broken_nice+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014017 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000014018else
Martin v. Löwis11437992002-04-12 09:54:03 +000014019
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014020if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000014021 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014022else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014023 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014024/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014025
14026int main()
14027{
14028 int val1 = nice(1);
14029 if (val1 != -1 && val1 == nice(2))
14030 exit(0);
14031 exit(1);
14032}
14033
Martin v. Löwis11437992002-04-12 09:54:03 +000014034_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014035if ac_fn_c_try_run "$LINENO"; then :
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014036 ac_cv_broken_nice=yes
14037else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014038 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014039fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014040rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14041 conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014042fi
14043
Martin v. Löwiseba40652007-08-30 20:10:57 +000014044fi
14045
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014046{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_nice" >&5
14047$as_echo "$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014048if test "$ac_cv_broken_nice" = yes
14049then
Martin v. Löwis11437992002-04-12 09:54:03 +000014050
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014051$as_echo "#define HAVE_BROKEN_NICE 1" >>confdefs.h
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014052
14053fi
14054
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014055{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken poll()" >&5
14056$as_echo_n "checking for broken poll()... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010014057if ${ac_cv_broken_poll+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014058 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014059else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014060 if test "$cross_compiling" = yes; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014061 ac_cv_broken_poll=no
14062else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014063 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014064/* end confdefs.h. */
14065
14066#include <poll.h>
14067
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014068int main()
14069{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014070 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014071 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014072
14073 close (42);
14074
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014075 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014076 if (poll_test < 0)
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014077 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014078 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014079 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014080 else
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014081 return 1;
14082}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014083
14084_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014085if ac_fn_c_try_run "$LINENO"; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014086 ac_cv_broken_poll=yes
14087else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014088 ac_cv_broken_poll=no
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014089fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014090rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14091 conftest.$ac_objext conftest.beam conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014092fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014093
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014094fi
14095
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014096{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_poll" >&5
14097$as_echo "$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014098if test "$ac_cv_broken_poll" = yes
14099then
14100
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014101$as_echo "#define HAVE_BROKEN_POLL 1" >>confdefs.h
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014102
14103fi
14104
Brett Cannon43802422005-02-10 20:48:03 +000014105# 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 +000014106# (which is not required by ISO C or UNIX spec) and/or if we support
14107# tzname[]
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014108ac_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 +000014109#include <$ac_cv_struct_tm>
14110
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014111"
Matthias Klose3cef2a92012-03-14 23:39:33 +010014112if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Brett Cannon43802422005-02-10 20:48:03 +000014113
14114cat >>confdefs.h <<_ACEOF
14115#define HAVE_STRUCT_TM_TM_ZONE 1
14116_ACEOF
14117
14118
14119fi
14120
14121if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
14122
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014123$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000014124
14125else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014126 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
14127"
Matthias Klose3cef2a92012-03-14 23:39:33 +010014128if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014129 ac_have_decl=1
Martin v. Löwiseba40652007-08-30 20:10:57 +000014130else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014131 ac_have_decl=0
Martin v. Löwiseba40652007-08-30 20:10:57 +000014132fi
14133
Martin v. Löwiseba40652007-08-30 20:10:57 +000014134cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014135#define HAVE_DECL_TZNAME $ac_have_decl
Martin v. Löwiseba40652007-08-30 20:10:57 +000014136_ACEOF
14137
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014138 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
14139$as_echo_n "checking for tzname... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010014140if ${ac_cv_var_tzname+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014141 $as_echo_n "(cached) " >&6
Martin v. Löwiseba40652007-08-30 20:10:57 +000014142else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014143 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000014144/* end confdefs.h. */
14145#include <time.h>
Martin v. Löwiseba40652007-08-30 20:10:57 +000014146#if !HAVE_DECL_TZNAME
14147extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000014148#endif
14149
14150int
14151main ()
14152{
Martin v. Löwiseba40652007-08-30 20:10:57 +000014153return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000014154 ;
14155 return 0;
14156}
14157_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014158if ac_fn_c_try_link "$LINENO"; then :
Brett Cannon43802422005-02-10 20:48:03 +000014159 ac_cv_var_tzname=yes
14160else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014161 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000014162fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014163rm -f core conftest.err conftest.$ac_objext \
14164 conftest$ac_exeext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000014165fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014166{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
14167$as_echo "$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000014168 if test $ac_cv_var_tzname = yes; then
14169
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014170$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000014171
14172 fi
14173fi
14174
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014175
Martin v. Löwis1d459062005-03-14 21:23:33 +000014176# check tzset(3) exists and works like we expect it to
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014177{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working tzset()" >&5
14178$as_echo_n "checking for working tzset()... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010014179if ${ac_cv_working_tzset+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014180 $as_echo_n "(cached) " >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014181else
14182
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014183if test "$cross_compiling" = yes; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014184 ac_cv_working_tzset=no
14185else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014186 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014187/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014188
14189#include <stdlib.h>
14190#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000014191#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000014192
14193#if HAVE_TZNAME
14194extern char *tzname[];
14195#endif
14196
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014197int main()
14198{
Brett Cannon18367812003-09-19 00:59:16 +000014199 /* Note that we need to ensure that not only does tzset(3)
14200 do 'something' with localtime, but it works as documented
14201 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000014202 This includes making sure that tzname is set properly if
14203 tm->tm_zone does not exist since it is the alternative way
14204 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000014205
14206 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000014207 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000014208 */
14209
Martin v. Löwis1d459062005-03-14 21:23:33 +000014210 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000014211 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
14212
Neal Norwitz7f2588c2003-04-11 15:35:53 +000014213 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014214 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000014215 if (localtime(&groundhogday)->tm_hour != 0)
14216 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000014217#if HAVE_TZNAME
14218 /* For UTC, tzname[1] is sometimes "", sometimes " " */
14219 if (strcmp(tzname[0], "UTC") ||
14220 (tzname[1][0] != 0 && tzname[1][0] != ' '))
14221 exit(1);
14222#endif
Brett Cannon18367812003-09-19 00:59:16 +000014223
Neal Norwitz7f2588c2003-04-11 15:35:53 +000014224 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014225 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000014226 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014227 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000014228#if HAVE_TZNAME
14229 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
14230 exit(1);
14231#endif
Brett Cannon18367812003-09-19 00:59:16 +000014232
14233 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
14234 tzset();
14235 if (localtime(&groundhogday)->tm_hour != 11)
14236 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000014237#if HAVE_TZNAME
14238 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
14239 exit(1);
14240#endif
14241
14242#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000014243 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
14244 exit(1);
14245 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
14246 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000014247#endif
Brett Cannon18367812003-09-19 00:59:16 +000014248
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014249 exit(0);
14250}
14251
14252_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014253if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014254 ac_cv_working_tzset=yes
14255else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014256 ac_cv_working_tzset=no
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014257fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014258rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14259 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014260fi
14261
Martin v. Löwiseba40652007-08-30 20:10:57 +000014262fi
14263
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014264{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_tzset" >&5
14265$as_echo "$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014266if test "$ac_cv_working_tzset" = yes
14267then
14268
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014269$as_echo "#define HAVE_WORKING_TZSET 1" >>confdefs.h
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014270
14271fi
14272
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014273# Look for subsecond timestamps in struct stat
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014274{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec in struct stat" >&5
14275$as_echo_n "checking for tv_nsec in struct stat... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010014276if ${ac_cv_stat_tv_nsec+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014277 $as_echo_n "(cached) " >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014278else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014279 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014280/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014281#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014282int
14283main ()
14284{
14285
14286struct stat st;
14287st.st_mtim.tv_nsec = 1;
14288
14289 ;
14290 return 0;
14291}
14292_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014293if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa32c9942002-09-09 16:17:47 +000014294 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014295else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014296 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014297fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014298rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14299fi
14300
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014301{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec" >&5
14302$as_echo "$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014303if test "$ac_cv_stat_tv_nsec" = yes
14304then
14305
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014306$as_echo "#define HAVE_STAT_TV_NSEC 1" >>confdefs.h
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014307
14308fi
14309
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014310# Look for BSD style subsecond timestamps in struct stat
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014311{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec2 in struct stat" >&5
14312$as_echo_n "checking for tv_nsec2 in struct stat... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010014313if ${ac_cv_stat_tv_nsec2+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014314 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014315else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014316 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014317/* end confdefs.h. */
14318#include <sys/stat.h>
14319int
14320main ()
14321{
14322
14323struct stat st;
14324st.st_mtimespec.tv_nsec = 1;
14325
14326 ;
14327 return 0;
14328}
14329_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014330if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014331 ac_cv_stat_tv_nsec2=yes
14332else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014333 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014334fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014335rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14336fi
14337
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014338{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec2" >&5
14339$as_echo "$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014340if test "$ac_cv_stat_tv_nsec2" = yes
14341then
14342
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014343$as_echo "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014344
14345fi
14346
doko@ubuntu.comf27ec3e2014-04-17 20:11:19 +020014347# first curses configure check
14348ac_save_cppflags="$CPPFLAGS"
14349CPPFLAGS="$CPPFLAGS -I/usr/include/ncursesw"
14350
14351for ac_header in curses.h ncurses.h
14352do :
14353 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
14354ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
14355if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
14356 cat >>confdefs.h <<_ACEOF
14357#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
14358_ACEOF
14359
14360fi
14361
14362done
14363
14364
14365# On Solaris, term.h requires curses.h
14366for ac_header in term.h
14367do :
14368 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "
14369#ifdef HAVE_CURSES_H
14370#include <curses.h>
14371#endif
14372
14373"
14374if test "x$ac_cv_header_term_h" = xyes; then :
14375 cat >>confdefs.h <<_ACEOF
14376#define HAVE_TERM_H 1
14377_ACEOF
14378
14379fi
14380
14381done
14382
14383
Jack Jansen666b1e72001-10-31 12:11:48 +000014384# On HP/UX 11.0, mvwdelch is a block with a return statement
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014385{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mvwdelch is an expression" >&5
14386$as_echo_n "checking whether mvwdelch is an expression... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010014387if ${ac_cv_mvwdelch_is_expression+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014388 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000014389else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014390 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014391/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000014392#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014393int
14394main ()
14395{
Jack Jansen666b1e72001-10-31 12:11:48 +000014396
14397 int rtn;
14398 rtn = mvwdelch(0,0,0);
14399
Martin v. Löwis11437992002-04-12 09:54:03 +000014400 ;
14401 return 0;
14402}
14403_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014404if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000014405 ac_cv_mvwdelch_is_expression=yes
14406else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014407 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000014408fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014409rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14410fi
14411
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014412{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mvwdelch_is_expression" >&5
14413$as_echo "$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000014414
14415if test "$ac_cv_mvwdelch_is_expression" = yes
14416then
Martin v. Löwis11437992002-04-12 09:54:03 +000014417
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014418$as_echo "#define MVWDELCH_IS_EXPRESSION 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000014419
14420fi
14421
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014422{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WINDOW has _flags" >&5
14423$as_echo_n "checking whether WINDOW has _flags... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010014424if ${ac_cv_window_has_flags+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014425 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000014426else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014427 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014428/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000014429#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014430int
14431main ()
14432{
Jack Jansen666b1e72001-10-31 12:11:48 +000014433
14434 WINDOW *w;
14435 w->_flags = 0;
14436
Martin v. Löwis11437992002-04-12 09:54:03 +000014437 ;
14438 return 0;
14439}
14440_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014441if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000014442 ac_cv_window_has_flags=yes
14443else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014444 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000014445fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014446rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14447fi
14448
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014449{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_window_has_flags" >&5
14450$as_echo "$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000014451
Jack Jansen666b1e72001-10-31 12:11:48 +000014452
14453if test "$ac_cv_window_has_flags" = yes
14454then
Martin v. Löwis11437992002-04-12 09:54:03 +000014455
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014456$as_echo "#define WINDOW_HAS_FLAGS 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000014457
14458fi
14459
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014460{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_term_resized" >&5
14461$as_echo_n "checking for is_term_resized... " >&6; }
14462cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Walter Dörwald4994d952006-06-19 08:07:50 +000014463/* end confdefs.h. */
14464#include <curses.h>
14465int
14466main ()
14467{
14468void *x=is_term_resized
14469 ;
14470 return 0;
14471}
14472_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014473if ac_fn_c_try_compile "$LINENO"; then :
Walter Dörwald4994d952006-06-19 08:07:50 +000014474
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014475$as_echo "#define HAVE_CURSES_IS_TERM_RESIZED 1" >>confdefs.h
Walter Dörwald4994d952006-06-19 08:07:50 +000014476
Matthias Klosec511b472010-05-08 11:01:39 +000014477 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014478$as_echo "yes" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000014479else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014480 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14481$as_echo "no" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000014482
14483fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014484rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14485
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014486{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resize_term" >&5
14487$as_echo_n "checking for resize_term... " >&6; }
14488cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Walter Dörwald4994d952006-06-19 08:07:50 +000014489/* end confdefs.h. */
14490#include <curses.h>
14491int
14492main ()
14493{
14494void *x=resize_term
14495 ;
14496 return 0;
14497}
14498_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014499if ac_fn_c_try_compile "$LINENO"; then :
Walter Dörwald4994d952006-06-19 08:07:50 +000014500
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014501$as_echo "#define HAVE_CURSES_RESIZE_TERM 1" >>confdefs.h
Walter Dörwald4994d952006-06-19 08:07:50 +000014502
Matthias Klosec511b472010-05-08 11:01:39 +000014503 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014504$as_echo "yes" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000014505else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014506 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14507$as_echo "no" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000014508
14509fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014510rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14511
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014512{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resizeterm" >&5
14513$as_echo_n "checking for resizeterm... " >&6; }
14514cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Walter Dörwald4994d952006-06-19 08:07:50 +000014515/* end confdefs.h. */
14516#include <curses.h>
14517int
14518main ()
14519{
14520void *x=resizeterm
14521 ;
14522 return 0;
14523}
14524_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014525if ac_fn_c_try_compile "$LINENO"; then :
Walter Dörwald4994d952006-06-19 08:07:50 +000014526
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014527$as_echo "#define HAVE_CURSES_RESIZETERM 1" >>confdefs.h
Walter Dörwald4994d952006-06-19 08:07:50 +000014528
Matthias Klosec511b472010-05-08 11:01:39 +000014529 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014530$as_echo "yes" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000014531else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014532 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14533$as_echo "no" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000014534
14535fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014536rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
doko@ubuntu.comf27ec3e2014-04-17 20:11:19 +020014537# last curses configure check
14538CPPFLAGS=$ac_save_cppflags
Martin v. Löwiseba40652007-08-30 20:10:57 +000014539
doko@python.orgd65e2ba2013-01-31 23:52:03 +010014540{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for device files" >&5
14541$as_echo "$as_me: checking for device files" >&6;}
14542
14543if test "x$cross_compiling" = xyes; then
14544 if test "${ac_cv_file__dev_ptmx+set}" != set; then
14545 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
14546$as_echo_n "checking for /dev/ptmx... " >&6; }
14547 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
14548$as_echo "not set" >&6; }
14549 as_fn_error $? "set ac_cv_file__dev_ptmx to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
14550 fi
14551 if test "${ac_cv_file__dev_ptc+set}" != set; then
14552 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
14553$as_echo_n "checking for /dev/ptc... " >&6; }
14554 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
14555$as_echo "not set" >&6; }
14556 as_fn_error $? "set ac_cv_file__dev_ptc to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
14557 fi
14558fi
14559
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014560{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
14561$as_echo_n "checking for /dev/ptmx... " >&6; }
doko@python.orgd65e2ba2013-01-31 23:52:03 +010014562if ${ac_cv_file__dev_ptmx+:} false; then :
14563 $as_echo_n "(cached) " >&6
14564else
14565 test "$cross_compiling" = yes &&
14566 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
14567if test -r "/dev/ptmx"; then
14568 ac_cv_file__dev_ptmx=yes
14569else
14570 ac_cv_file__dev_ptmx=no
14571fi
14572fi
14573{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptmx" >&5
14574$as_echo "$ac_cv_file__dev_ptmx" >&6; }
14575if test "x$ac_cv_file__dev_ptmx" = xyes; then :
Martin v. Löwisfefbc202006-10-17 18:59:23 +000014576
doko@python.orgd65e2ba2013-01-31 23:52:03 +010014577fi
14578
14579if test "x$ac_cv_file__dev_ptmx" = xyes; then
Martin v. Löwis24a880b2002-12-31 12:55:15 +000014580
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014581$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
Martin v. Löwis24a880b2002-12-31 12:55:15 +000014582
Martin v. Löwis24a880b2002-12-31 12:55:15 +000014583fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014584{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
14585$as_echo_n "checking for /dev/ptc... " >&6; }
doko@python.orgd65e2ba2013-01-31 23:52:03 +010014586if ${ac_cv_file__dev_ptc+:} false; then :
14587 $as_echo_n "(cached) " >&6
14588else
14589 test "$cross_compiling" = yes &&
14590 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
14591if test -r "/dev/ptc"; then
14592 ac_cv_file__dev_ptc=yes
14593else
14594 ac_cv_file__dev_ptc=no
14595fi
14596fi
14597{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptc" >&5
14598$as_echo "$ac_cv_file__dev_ptc" >&6; }
14599if test "x$ac_cv_file__dev_ptc" = xyes; then :
Martin v. Löwisfefbc202006-10-17 18:59:23 +000014600
doko@python.orgd65e2ba2013-01-31 23:52:03 +010014601fi
14602
14603if test "x$ac_cv_file__dev_ptc" = xyes; then
Neal Norwitz865400f2003-03-21 01:42:58 +000014604
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014605$as_echo "#define HAVE_DEV_PTC 1" >>confdefs.h
Neal Norwitz865400f2003-03-21 01:42:58 +000014606
Neal Norwitz865400f2003-03-21 01:42:58 +000014607fi
14608
Mark Dickinson82864d12009-11-15 16:18:58 +000014609if test "$have_long_long" = yes
14610then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014611 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for %lld and %llu printf() format support" >&5
14612$as_echo_n "checking for %lld and %llu printf() format support... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010014613 if ${ac_cv_have_long_long_format+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014614 $as_echo_n "(cached) " >&6
Mark Dickinson82864d12009-11-15 16:18:58 +000014615else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014616 if test "$cross_compiling" = yes; then :
doko@python.orgd65e2ba2013-01-31 23:52:03 +010014617 ac_cv_have_long_long_format="cross -- assuming no"
14618 if test x$GCC = xyes; then
14619 save_CFLAGS=$CFLAGS
14620 CFLAGS="$CFLAGS -Werror -Wformat"
14621 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14622/* end confdefs.h. */
14623
14624 #include <stdio.h>
14625 #include <stddef.h>
14626
14627int
14628main ()
14629{
14630
14631 char *buffer;
14632 sprintf(buffer, "%lld", (long long)123);
14633 sprintf(buffer, "%lld", (long long)-123);
14634 sprintf(buffer, "%llu", (unsigned long long)123);
14635
14636 ;
14637 return 0;
14638}
14639_ACEOF
14640if ac_fn_c_try_compile "$LINENO"; then :
14641 ac_cv_have_long_long_format=yes
14642
14643fi
14644rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14645 CFLAGS=$save_CFLAGS
14646 fi
Mark Dickinson82864d12009-11-15 16:18:58 +000014647else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014648 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson82864d12009-11-15 16:18:58 +000014649/* end confdefs.h. */
14650
14651 #include <stdio.h>
14652 #include <stddef.h>
14653 #include <string.h>
14654
14655 #ifdef HAVE_SYS_TYPES_H
14656 #include <sys/types.h>
14657 #endif
14658
14659 int main()
14660 {
14661 char buffer[256];
14662
14663 if (sprintf(buffer, "%lld", (long long)123) < 0)
14664 return 1;
14665 if (strcmp(buffer, "123"))
14666 return 1;
14667
14668 if (sprintf(buffer, "%lld", (long long)-123) < 0)
14669 return 1;
14670 if (strcmp(buffer, "-123"))
14671 return 1;
14672
14673 if (sprintf(buffer, "%llu", (unsigned long long)123) < 0)
14674 return 1;
14675 if (strcmp(buffer, "123"))
14676 return 1;
14677
14678 return 0;
14679 }
14680
14681_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014682if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson82864d12009-11-15 16:18:58 +000014683 ac_cv_have_long_long_format=yes
14684else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014685 ac_cv_have_long_long_format=no
Mark Dickinson82864d12009-11-15 16:18:58 +000014686fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014687rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14688 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson82864d12009-11-15 16:18:58 +000014689fi
14690
14691
Mark Dickinson82864d12009-11-15 16:18:58 +000014692fi
14693
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014694 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_long_long_format" >&5
14695$as_echo "$ac_cv_have_long_long_format" >&6; }
Mark Dickinson82864d12009-11-15 16:18:58 +000014696fi
14697
Mark Dickinson5ce84742009-12-31 20:48:04 +000014698if test "$ac_cv_have_long_long_format" = yes
Mark Dickinson82864d12009-11-15 16:18:58 +000014699then
14700
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014701$as_echo "#define PY_FORMAT_LONG_LONG \"ll\"" >>confdefs.h
Mark Dickinson82864d12009-11-15 16:18:58 +000014702
14703fi
14704
Ronald Oussoren315cd0c2009-11-19 16:25:21 +000014705if test $ac_sys_system = Darwin
14706then
14707 LIBS="$LIBS -framework CoreFoundation"
14708fi
14709
Mark Dickinson82864d12009-11-15 16:18:58 +000014710
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014711{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for %zd printf() format support" >&5
14712$as_echo_n "checking for %zd printf() format support... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010014713if ${ac_cv_have_size_t_format+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014714 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014715else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014716 if test "$cross_compiling" = yes; then :
Gregory P. Smithc9ff3a72009-11-02 02:03:16 +000014717 ac_cv_have_size_t_format="cross -- assuming yes"
14718
Brett Cannon09d12362006-05-11 05:11:33 +000014719else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014720 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Brett Cannon09d12362006-05-11 05:11:33 +000014721/* end confdefs.h. */
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014722
Brett Cannon09d12362006-05-11 05:11:33 +000014723#include <stdio.h>
14724#include <stddef.h>
14725#include <string.h>
14726
Christian Heimesdb3d6cb2007-12-16 21:39:43 +000014727#ifdef HAVE_SYS_TYPES_H
14728#include <sys/types.h>
14729#endif
Neal Norwitz4a8fbdb2006-09-22 08:16:26 +000014730
14731#ifdef HAVE_SSIZE_T
14732typedef ssize_t Py_ssize_t;
14733#elif SIZEOF_VOID_P == SIZEOF_LONG
14734typedef long Py_ssize_t;
14735#else
14736typedef int Py_ssize_t;
14737#endif
Brett Cannon09d12362006-05-11 05:11:33 +000014738
Christian Heimesdb3d6cb2007-12-16 21:39:43 +000014739int main()
14740{
14741 char buffer[256];
14742
Brett Cannon09d12362006-05-11 05:11:33 +000014743 if(sprintf(buffer, "%zd", (size_t)123) < 0)
14744 return 1;
14745
Neal Norwitz4a8fbdb2006-09-22 08:16:26 +000014746 if (strcmp(buffer, "123"))
14747 return 1;
14748
14749 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
14750 return 1;
14751
14752 if (strcmp(buffer, "-123"))
Brett Cannon09d12362006-05-11 05:11:33 +000014753 return 1;
14754
14755 return 0;
14756}
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014757
Brett Cannon09d12362006-05-11 05:11:33 +000014758_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014759if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014760 ac_cv_have_size_t_format=yes
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014761else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014762 ac_cv_have_size_t_format=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014763fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014764rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14765 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +000014766fi
14767
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014768fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014769{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t_format" >&5
14770$as_echo "$ac_cv_have_size_t_format" >&6; }
Gregory P. Smithc9ff3a72009-11-02 02:03:16 +000014771if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014772
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014773$as_echo "#define PY_FORMAT_SIZE_T \"z\"" >>confdefs.h
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014774
14775fi
14776
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014777ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
Martin v. Löwis01c04012002-11-11 14:58:44 +000014778#ifdef HAVE_SYS_TYPES_H
14779#include <sys/types.h>
14780#endif
14781#ifdef HAVE_SYS_SOCKET_H
14782#include <sys/socket.h>
14783#endif
14784
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014785"
Matthias Klose3cef2a92012-03-14 23:39:33 +010014786if test "x$ac_cv_type_socklen_t" = xyes; then :
Martin v. Löwis01c04012002-11-11 14:58:44 +000014787
Martin v. Löwis11437992002-04-12 09:54:03 +000014788else
Guido van Rossum95713eb2000-05-18 20:53:31 +000014789
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014790$as_echo "#define socklen_t int" >>confdefs.h
Guido van Rossum95713eb2000-05-18 20:53:31 +000014791
14792fi
14793
Michael W. Hudson54241132001-12-07 15:38:26 +000014794
Benjamin Peterson7497e912010-10-16 00:53:39 +000014795case $ac_sys_system in
14796AIX*)
14797
14798$as_echo "#define HAVE_BROKEN_PIPE_BUF 1" >>confdefs.h
14799 ;;
14800esac
14801
14802
Michael W. Hudson54241132001-12-07 15:38:26 +000014803
14804
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000014805for h in `(cd $srcdir;echo Python/thread_*.h)`
14806do
14807 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
14808done
14809
Michael W. Hudson54241132001-12-07 15:38:26 +000014810
Neal Norwitzd24499d2005-12-18 21:36:39 +000014811SRCDIRS="Parser Grammar Objects Python Modules Mac"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014812{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5
14813$as_echo_n "checking for build directories... " >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000014814for dir in $SRCDIRS; do
14815 if test ! -d $dir; then
14816 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000014817 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000014818done
Benjamin Peterson2c992a02015-05-28 12:45:31 -050014819
14820# BEGIN_COMPUTED_GOTO
14821# Check for --with-computed-gotos
14822{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-computed-gotos" >&5
14823$as_echo_n "checking for --with-computed-gotos... " >&6; }
14824
14825# Check whether --with-computed-gotos was given.
14826if test "${with_computed_gotos+set}" = set; then :
14827 withval=$with_computed_gotos;
14828if test "$withval" = yes
14829then
14830
14831$as_echo "#define USE_COMPUTED_GOTOS 1" >>confdefs.h
14832
14833 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14834$as_echo "yes" >&6; }
14835fi
14836if test "$withval" = no
14837then
14838
14839$as_echo "#define USE_COMPUTED_GOTOS 0" >>confdefs.h
14840
14841 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14842$as_echo "no" >&6; }
14843fi
14844
14845else
14846 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
14847$as_echo "no value specified" >&6; }
14848fi
14849
14850
14851{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports computed gotos" >&5
14852$as_echo_n "checking whether $CC supports computed gotos... " >&6; }
14853if ${ac_cv_computed_gotos+:} false; then :
14854 $as_echo_n "(cached) " >&6
14855else
14856 if test "$cross_compiling" = yes; then :
14857 if test "${with_computed_gotos+set}" = set; then
14858 ac_cv_computed_gotos="$with_computed_gotos -- configured --with(out)-computed-gotos"
14859 else
14860 ac_cv_computed_gotos=no
14861 fi
14862else
14863 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14864/* end confdefs.h. */
14865
14866int main(int argc, char **argv)
14867{
14868 static void *targets[1] = { &&LABEL1 };
14869 goto LABEL2;
14870LABEL1:
14871 return 0;
14872LABEL2:
14873 goto *targets[0];
14874 return 1;
14875}
14876
14877_ACEOF
14878if ac_fn_c_try_run "$LINENO"; then :
14879 ac_cv_computed_gotos=yes
14880else
14881 ac_cv_computed_gotos=no
14882fi
14883rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14884 conftest.$ac_objext conftest.beam conftest.$ac_ext
14885fi
14886
14887fi
14888
14889{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_computed_gotos" >&5
14890$as_echo "$ac_cv_computed_gotos" >&6; }
14891case "$ac_cv_computed_gotos" in yes*)
14892
14893$as_echo "#define HAVE_COMPUTED_GOTOS 1" >>confdefs.h
14894
14895esac
14896# END_COMPUTED_GOTO
14897
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014898{ $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
14899$as_echo "done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000014900
Ned Deily3f1d0b32014-11-20 02:11:03 -080014901# ensurepip option
14902{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ensurepip" >&5
14903$as_echo_n "checking for ensurepip... " >&6; }
14904
14905# Check whether --with-ensurepip was given.
14906if test "${with_ensurepip+set}" = set; then :
14907 withval=$with_ensurepip;
14908else
14909 with_ensurepip=no
14910fi
14911
14912case $with_ensurepip in #(
14913 yes|upgrade) :
14914 ENSUREPIP=upgrade ;; #(
14915 install) :
14916 ENSUREPIP=install ;; #(
14917 no) :
14918 ENSUREPIP=no ;; #(
14919 *) :
14920 as_fn_error $? "--with-ensurepip=upgrade|install|no" "$LINENO" 5 ;;
14921esac
14922{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENSUREPIP" >&5
14923$as_echo "$ENSUREPIP" >&6; }
14924
14925
Guido van Rossum627b2d71993-12-24 10:39:16 +000014926# generate output files
Antoine Pitrouf2caeed2009-05-24 20:23:57 +000014927ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config Misc/python.pc"
Martin v. Löwis88afe662002-10-26 13:47:44 +000014928
Antoine Pitrouaabdceb2010-09-10 20:03:17 +000014929ac_config_files="$ac_config_files Modules/ld_so_aix"
14930
Martin v. Löwis11437992002-04-12 09:54:03 +000014931cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014932# This file is a shell script that caches the results of configure
14933# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000014934# scripts and configure runs, see configure's option --config-cache.
14935# It is not useful on other systems. If it contains results you don't
14936# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014937#
Martin v. Löwis11437992002-04-12 09:54:03 +000014938# config.status only pays attention to the cache file if you give it
14939# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014940#
Skip Montanaro6dead952003-09-25 14:50:04 +000014941# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000014942# loading this file, other *unset* `ac_cv_foo' will be assigned the
14943# following values.
14944
14945_ACEOF
14946
Guido van Rossumf78abae1997-01-21 22:02:36 +000014947# The following way of writing the cache mishandles newlines in values,
14948# but we know of no workaround that is simple, portable, and efficient.
Martin v. Löwiseba40652007-08-30 20:10:57 +000014949# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014950# Ultrix sh set writes to stderr and can't be redirected directly,
14951# and sets the high bit in the cache file unless we assign to the vars.
Martin v. Löwiseba40652007-08-30 20:10:57 +000014952(
14953 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
14954 eval ac_val=\$$ac_var
14955 case $ac_val in #(
14956 *${as_nl}*)
14957 case $ac_var in #(
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014958 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
14959$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000014960 esac
14961 case $ac_var in #(
14962 _ | IFS | as_nl) ;; #(
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014963 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
14964 *) { eval $ac_var=; unset $ac_var;} ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000014965 esac ;;
14966 esac
14967 done
14968
Martin v. Löwis11437992002-04-12 09:54:03 +000014969 (set) 2>&1 |
Martin v. Löwiseba40652007-08-30 20:10:57 +000014970 case $as_nl`(ac_space=' '; set) 2>&1` in #(
14971 *${as_nl}ac_space=\ *)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014972 # `set' does not quote correctly, so add quotes: double-quote
14973 # substitution turns \\\\ into \\, and sed turns \\ into \.
Martin v. Löwis11437992002-04-12 09:54:03 +000014974 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014975 "s/'/'\\\\''/g;
14976 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Martin v. Löwiseba40652007-08-30 20:10:57 +000014977 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000014978 *)
14979 # `set' quotes correctly as required by POSIX, so do not add quotes.
Martin v. Löwiseba40652007-08-30 20:10:57 +000014980 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000014981 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000014982 esac |
14983 sort
14984) |
Martin v. Löwis11437992002-04-12 09:54:03 +000014985 sed '
Martin v. Löwiseba40652007-08-30 20:10:57 +000014986 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000014987 t clear
Martin v. Löwiseba40652007-08-30 20:10:57 +000014988 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000014989 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
14990 t end
Martin v. Löwiseba40652007-08-30 20:10:57 +000014991 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
14992 :end' >>confcache
14993if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
14994 if test -w "$cache_file"; then
Matthias Klose3cef2a92012-03-14 23:39:33 +010014995 if test "x$cache_file" != "x/dev/null"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014996 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
14997$as_echo "$as_me: updating cache $cache_file" >&6;}
Matthias Klose3cef2a92012-03-14 23:39:33 +010014998 if test ! -f "$cache_file" || test -h "$cache_file"; then
14999 cat confcache >"$cache_file"
15000 else
15001 case $cache_file in #(
15002 */* | ?:*)
15003 mv -f confcache "$cache_file"$$ &&
15004 mv -f "$cache_file"$$ "$cache_file" ;; #(
15005 *)
15006 mv -f confcache "$cache_file" ;;
15007 esac
15008 fi
15009 fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015010 else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015011 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
15012$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015013 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015014fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015015rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000015016
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015017test "x$prefix" = xNONE && prefix=$ac_default_prefix
15018# Let make expand exec_prefix.
15019test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000015020
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015021DEFS=-DHAVE_CONFIG_H
15022
Skip Montanaro6dead952003-09-25 14:50:04 +000015023ac_libobjs=
15024ac_ltlibobjs=
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015025U=
Skip Montanaro6dead952003-09-25 14:50:04 +000015026for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
15027 # 1. Remove the extension, and $U if already installed.
Martin v. Löwiseba40652007-08-30 20:10:57 +000015028 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015029 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
Martin v. Löwiseba40652007-08-30 20:10:57 +000015030 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
15031 # will be set to the directory where LIBOBJS objects are built.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015032 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
15033 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000015034done
15035LIBOBJS=$ac_libobjs
15036
15037LTLIBOBJS=$ac_ltlibobjs
15038
15039
Martin v. Löwis11437992002-04-12 09:54:03 +000015040
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015041
Matthias Klose3cef2a92012-03-14 23:39:33 +010015042: "${CONFIG_STATUS=./config.status}"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015043ac_write_fail=0
Martin v. Löwis11437992002-04-12 09:54:03 +000015044ac_clean_files_save=$ac_clean_files
15045ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015046{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
15047$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
15048as_write_fail=0
15049cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015050#! $SHELL
15051# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000015052# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015053# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000015054# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000015055
Martin v. Löwis11437992002-04-12 09:54:03 +000015056debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000015057ac_cs_recheck=false
15058ac_cs_silent=false
Jack Jansendd19cf82001-12-06 22:36:17 +000015059
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015060SHELL=\${CONFIG_SHELL-$SHELL}
15061export SHELL
15062_ASEOF
15063cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
15064## -------------------- ##
15065## M4sh Initialization. ##
15066## -------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000015067
Martin v. Löwiseba40652007-08-30 20:10:57 +000015068# Be more Bourne compatible
15069DUALCASE=1; export DUALCASE # for MKS sh
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015070if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015071 emulate sh
15072 NULLCMD=:
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015073 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000015074 # is contrary to our usage. Disable this feature.
15075 alias -g '${1+"$@"}'='"$@"'
Martin v. Löwiseba40652007-08-30 20:10:57 +000015076 setopt NO_GLOB_SUBST
Skip Montanaro89e975f2007-08-22 19:05:21 +000015077else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015078 case `(set -o) 2>/dev/null` in #(
15079 *posix*) :
15080 set -o posix ;; #(
15081 *) :
15082 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015083esac
Martin v. Löwis11437992002-04-12 09:54:03 +000015084fi
Michael W. Hudson54241132001-12-07 15:38:26 +000015085
Skip Montanaro6dead952003-09-25 14:50:04 +000015086
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015087as_nl='
15088'
15089export as_nl
15090# Printing a long string crashes Solaris 7 /usr/bin/printf.
15091as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
15092as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
15093as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
15094# Prefer a ksh shell builtin over an external printf program on Solaris,
15095# but without wasting forks for bash or zsh.
15096if test -z "$BASH_VERSION$ZSH_VERSION" \
15097 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
15098 as_echo='print -r --'
15099 as_echo_n='print -rn --'
15100elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
15101 as_echo='printf %s\n'
15102 as_echo_n='printf %s'
15103else
15104 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
15105 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
15106 as_echo_n='/usr/ucb/echo -n'
15107 else
15108 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
15109 as_echo_n_body='eval
15110 arg=$1;
15111 case $arg in #(
15112 *"$as_nl"*)
15113 expr "X$arg" : "X\\(.*\\)$as_nl";
15114 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
15115 esac;
15116 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
15117 '
15118 export as_echo_n_body
15119 as_echo_n='sh -c $as_echo_n_body as_echo'
15120 fi
15121 export as_echo_body
15122 as_echo='sh -c $as_echo_body as_echo'
15123fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015124
15125# The user is always right.
15126if test "${PATH_SEPARATOR+set}" != set; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015127 PATH_SEPARATOR=:
15128 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
15129 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
15130 PATH_SEPARATOR=';'
15131 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000015132fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015133
Martin v. Löwiseba40652007-08-30 20:10:57 +000015134
15135# IFS
15136# We need space, tab and new line, in precisely that order. Quoting is
15137# there to prevent editors from complaining about space-tab.
15138# (If _AS_PATH_WALK were called with IFS unset, it would disable word
15139# splitting by setting IFS to empty value.)
Martin v. Löwiseba40652007-08-30 20:10:57 +000015140IFS=" "" $as_nl"
15141
15142# Find who we are. Look in the path if we contain no directory separator.
Matthias Klose3cef2a92012-03-14 23:39:33 +010015143as_myself=
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015144case $0 in #((
Martin v. Löwiseba40652007-08-30 20:10:57 +000015145 *[\\/]* ) as_myself=$0 ;;
15146 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000015147for as_dir in $PATH
15148do
15149 IFS=$as_save_IFS
15150 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015151 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
15152 done
Martin v. Löwiseba40652007-08-30 20:10:57 +000015153IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000015154
Martin v. Löwiseba40652007-08-30 20:10:57 +000015155 ;;
15156esac
15157# We did not find ourselves, most probably we were run as `sh COMMAND'
15158# in which case we are not to be found in the path.
15159if test "x$as_myself" = x; then
15160 as_myself=$0
15161fi
15162if test ! -f "$as_myself"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015163 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
15164 exit 1
Martin v. Löwiseba40652007-08-30 20:10:57 +000015165fi
15166
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015167# Unset variables that we do not need and which cause bugs (e.g. in
15168# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
15169# suppresses any "Segmentation fault" message there. '((' could
15170# trigger a bug in pdksh 5.2.14.
15171for as_var in BASH_ENV ENV MAIL MAILPATH
15172do eval test x\${$as_var+set} = xset \
15173 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Martin v. Löwiseba40652007-08-30 20:10:57 +000015174done
15175PS1='$ '
15176PS2='> '
15177PS4='+ '
15178
15179# NLS nuisances.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015180LC_ALL=C
15181export LC_ALL
15182LANGUAGE=C
15183export LANGUAGE
Martin v. Löwiseba40652007-08-30 20:10:57 +000015184
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015185# CDPATH.
15186(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
15187
15188
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015189# as_fn_error STATUS ERROR [LINENO LOG_FD]
15190# ----------------------------------------
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015191# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
15192# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015193# script with STATUS, using 1 if that was 0.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015194as_fn_error ()
15195{
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015196 as_status=$1; test $as_status -eq 0 && as_status=1
15197 if test "$4"; then
15198 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
15199 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015200 fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015201 $as_echo "$as_me: error: $2" >&2
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015202 as_fn_exit $as_status
15203} # as_fn_error
15204
15205
15206# as_fn_set_status STATUS
15207# -----------------------
15208# Set $? to STATUS, without forking.
15209as_fn_set_status ()
15210{
15211 return $1
15212} # as_fn_set_status
15213
15214# as_fn_exit STATUS
15215# -----------------
15216# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
15217as_fn_exit ()
15218{
15219 set +e
15220 as_fn_set_status $1
15221 exit $1
15222} # as_fn_exit
15223
15224# as_fn_unset VAR
15225# ---------------
15226# Portably unset VAR.
15227as_fn_unset ()
15228{
15229 { eval $1=; unset $1;}
15230}
15231as_unset=as_fn_unset
15232# as_fn_append VAR VALUE
15233# ----------------------
15234# Append the text in VALUE to the end of the definition contained in VAR. Take
15235# advantage of any shell optimizations that allow amortized linear growth over
15236# repeated appends, instead of the typical quadratic growth present in naive
15237# implementations.
15238if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
15239 eval 'as_fn_append ()
15240 {
15241 eval $1+=\$2
15242 }'
15243else
15244 as_fn_append ()
15245 {
15246 eval $1=\$$1\$2
15247 }
15248fi # as_fn_append
15249
15250# as_fn_arith ARG...
15251# ------------------
15252# Perform arithmetic evaluation on the ARGs, and store the result in the
15253# global $as_val. Take advantage of shells that can avoid forks. The arguments
15254# must be portable across $(()) and expr.
15255if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
15256 eval 'as_fn_arith ()
15257 {
15258 as_val=$(( $* ))
15259 }'
15260else
15261 as_fn_arith ()
15262 {
15263 as_val=`expr "$@" || test $? -eq 1`
15264 }
15265fi # as_fn_arith
15266
15267
Martin v. Löwiseba40652007-08-30 20:10:57 +000015268if expr a : '\(a\)' >/dev/null 2>&1 &&
15269 test "X`expr 00001 : '.*\(...\)'`" = X001; then
15270 as_expr=expr
15271else
15272 as_expr=false
15273fi
15274
15275if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
15276 as_basename=basename
15277else
15278 as_basename=false
15279fi
15280
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015281if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
15282 as_dirname=dirname
15283else
15284 as_dirname=false
15285fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015286
Martin v. Löwiseba40652007-08-30 20:10:57 +000015287as_me=`$as_basename -- "$0" ||
15288$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
15289 X"$0" : 'X\(//\)$' \| \
15290 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015291$as_echo X/"$0" |
Martin v. Löwiseba40652007-08-30 20:10:57 +000015292 sed '/^.*\/\([^/][^/]*\)\/*$/{
15293 s//\1/
15294 q
15295 }
15296 /^X\/\(\/\/\)$/{
15297 s//\1/
15298 q
15299 }
15300 /^X\/\(\/\).*/{
15301 s//\1/
15302 q
15303 }
15304 s/.*/./; q'`
15305
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015306# Avoid depending upon Character Ranges.
15307as_cr_letters='abcdefghijklmnopqrstuvwxyz'
15308as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
15309as_cr_Letters=$as_cr_letters$as_cr_LETTERS
15310as_cr_digits='0123456789'
15311as_cr_alnum=$as_cr_Letters$as_cr_digits
Martin v. Löwiseba40652007-08-30 20:10:57 +000015312
15313ECHO_C= ECHO_N= ECHO_T=
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015314case `echo -n x` in #(((((
Martin v. Löwiseba40652007-08-30 20:10:57 +000015315-n*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015316 case `echo 'xy\c'` in
Martin v. Löwiseba40652007-08-30 20:10:57 +000015317 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015318 xy) ECHO_C='\c';;
15319 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
15320 ECHO_T=' ';;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015321 esac;;
15322*)
15323 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000015324esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015325
Martin v. Löwis11437992002-04-12 09:54:03 +000015326rm -f conf$$ conf$$.exe conf$$.file
Martin v. Löwiseba40652007-08-30 20:10:57 +000015327if test -d conf$$.dir; then
15328 rm -f conf$$.dir/conf$$.file
15329else
15330 rm -f conf$$.dir
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015331 mkdir conf$$.dir 2>/dev/null
Martin v. Löwiseba40652007-08-30 20:10:57 +000015332fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015333if (echo >conf$$.file) 2>/dev/null; then
15334 if ln -s conf$$.file conf$$ 2>/dev/null; then
15335 as_ln_s='ln -s'
15336 # ... but there are two gotchas:
15337 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
15338 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
Charles-François Natalibe2b9072013-01-08 19:47:00 +010015339 # In both cases, we have to default to `cp -pR'.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015340 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Charles-François Natalibe2b9072013-01-08 19:47:00 +010015341 as_ln_s='cp -pR'
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015342 elif ln conf$$.file conf$$ 2>/dev/null; then
15343 as_ln_s=ln
15344 else
Charles-François Natalibe2b9072013-01-08 19:47:00 +010015345 as_ln_s='cp -pR'
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015346 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015347else
Charles-François Natalibe2b9072013-01-08 19:47:00 +010015348 as_ln_s='cp -pR'
Martin v. Löwis11437992002-04-12 09:54:03 +000015349fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015350rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
15351rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000015352
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015353
15354# as_fn_mkdir_p
15355# -------------
15356# Create "$as_dir" as a directory, including parents if necessary.
15357as_fn_mkdir_p ()
15358{
15359
15360 case $as_dir in #(
15361 -*) as_dir=./$as_dir;;
15362 esac
15363 test -d "$as_dir" || eval $as_mkdir_p || {
15364 as_dirs=
15365 while :; do
15366 case $as_dir in #(
15367 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
15368 *) as_qdir=$as_dir;;
15369 esac
15370 as_dirs="'$as_qdir' $as_dirs"
15371 as_dir=`$as_dirname -- "$as_dir" ||
15372$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
15373 X"$as_dir" : 'X\(//\)[^/]' \| \
15374 X"$as_dir" : 'X\(//\)$' \| \
15375 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
15376$as_echo X"$as_dir" |
15377 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
15378 s//\1/
15379 q
15380 }
15381 /^X\(\/\/\)[^/].*/{
15382 s//\1/
15383 q
15384 }
15385 /^X\(\/\/\)$/{
15386 s//\1/
15387 q
15388 }
15389 /^X\(\/\).*/{
15390 s//\1/
15391 q
15392 }
15393 s/.*/./; q'`
15394 test -d "$as_dir" && break
15395 done
15396 test -z "$as_dirs" || eval "mkdir $as_dirs"
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015397 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015398
15399
15400} # as_fn_mkdir_p
Skip Montanaro6dead952003-09-25 14:50:04 +000015401if mkdir -p . 2>/dev/null; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015402 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +000015403else
Skip Montanarof0d5f792004-08-15 14:08:23 +000015404 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000015405 as_mkdir_p=false
15406fi
15407
Charles-François Natalibe2b9072013-01-08 19:47:00 +010015408
15409# as_fn_executable_p FILE
15410# -----------------------
15411# Test if FILE is an executable regular file.
15412as_fn_executable_p ()
15413{
15414 test -f "$1" && test -x "$1"
15415} # as_fn_executable_p
15416as_test_x='test -x'
15417as_executable_p=as_fn_executable_p
Martin v. Löwis11437992002-04-12 09:54:03 +000015418
15419# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000015420as_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 +000015421
15422# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000015423as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000015424
15425
Martin v. Löwis11437992002-04-12 09:54:03 +000015426exec 6>&1
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015427## ----------------------------------- ##
15428## Main body of $CONFIG_STATUS script. ##
15429## ----------------------------------- ##
15430_ASEOF
15431test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015432
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015433cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15434# Save the log message, to keep $0 and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000015435# report actual input values of CONFIG_FILES etc. instead of their
Martin v. Löwiseba40652007-08-30 20:10:57 +000015436# values after options handling.
15437ac_log="
Martin v. Löwis174440b2008-10-03 08:59:41 +000015438This file was extended by python $as_me 2.7, which was
Charles-François Natalibe2b9072013-01-08 19:47:00 +010015439generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000015440
15441 CONFIG_FILES = $CONFIG_FILES
15442 CONFIG_HEADERS = $CONFIG_HEADERS
15443 CONFIG_LINKS = $CONFIG_LINKS
15444 CONFIG_COMMANDS = $CONFIG_COMMANDS
15445 $ $0 $@
15446
Martin v. Löwiseba40652007-08-30 20:10:57 +000015447on `(hostname || uname -n) 2>/dev/null | sed 1q`
15448"
15449
Martin v. Löwis11437992002-04-12 09:54:03 +000015450_ACEOF
15451
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015452case $ac_config_files in *"
15453"*) set x $ac_config_files; shift; ac_config_files=$*;;
15454esac
15455
15456case $ac_config_headers in *"
15457"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
15458esac
15459
15460
15461cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015462# Files that config.status was made for.
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015463config_files="$ac_config_files"
15464config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000015465
Martin v. Löwiseba40652007-08-30 20:10:57 +000015466_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000015467
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015468cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015469ac_cs_usage="\
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015470\`$as_me' instantiates files and other configuration actions
15471from templates according to the current configuration. Unless the files
15472and actions are specified as TAGs, all are instantiated by default.
Martin v. Löwis11437992002-04-12 09:54:03 +000015473
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015474Usage: $0 [OPTION]... [TAG]...
Martin v. Löwis11437992002-04-12 09:54:03 +000015475
15476 -h, --help print this help, then exit
Martin v. Löwiseba40652007-08-30 20:10:57 +000015477 -V, --version print version number and configuration settings, then exit
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015478 --config print configuration, then exit
15479 -q, --quiet, --silent
15480 do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000015481 -d, --debug don't remove temporary files
15482 --recheck update $as_me by reconfiguring in the same conditions
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015483 --file=FILE[:TEMPLATE]
15484 instantiate the configuration file FILE
15485 --header=FILE[:TEMPLATE]
15486 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000015487
15488Configuration files:
15489$config_files
15490
15491Configuration headers:
15492$config_headers
15493
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015494Report bugs to <http://bugs.python.org/>."
Skip Montanaro89e975f2007-08-22 19:05:21 +000015495
Martin v. Löwiseba40652007-08-30 20:10:57 +000015496_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015497cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15498ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
Martin v. Löwis11437992002-04-12 09:54:03 +000015499ac_cs_version="\\
Martin v. Löwis174440b2008-10-03 08:59:41 +000015500python config.status 2.7
Charles-François Natalibe2b9072013-01-08 19:47:00 +010015501configured by $0, generated by GNU Autoconf 2.69,
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015502 with options \\"\$ac_cs_config\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000015503
Charles-François Natalibe2b9072013-01-08 19:47:00 +010015504Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000015505This config.status script is free software; the Free Software Foundation
15506gives unlimited permission to copy, distribute and modify it."
Martin v. Löwiseba40652007-08-30 20:10:57 +000015507
15508ac_pwd='$ac_pwd'
15509srcdir='$srcdir'
15510INSTALL='$INSTALL'
Trent Nelsonf6407a12012-08-30 14:56:13 +000015511MKDIR_P='$MKDIR_P'
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015512test -n "\$AWK" || AWK=awk
Martin v. Löwis11437992002-04-12 09:54:03 +000015513_ACEOF
15514
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015515cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15516# The default lists apply if the user does not specify any file.
Martin v. Löwis11437992002-04-12 09:54:03 +000015517ac_need_defaults=:
15518while test $# != 0
15519do
15520 case $1 in
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015521 --*=?*)
Martin v. Löwiseba40652007-08-30 20:10:57 +000015522 ac_option=`expr "X$1" : 'X\([^=]*\)='`
15523 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000015524 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000015525 ;;
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015526 --*=)
15527 ac_option=`expr "X$1" : 'X\([^=]*\)='`
15528 ac_optarg=
15529 ac_shift=:
15530 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015531 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000015532 ac_option=$1
15533 ac_optarg=$2
15534 ac_shift=shift
15535 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015536 esac
15537
Skip Montanaro6dead952003-09-25 14:50:04 +000015538 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000015539 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000015540 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
15541 ac_cs_recheck=: ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015542 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015543 $as_echo "$ac_cs_version"; exit ;;
15544 --config | --confi | --conf | --con | --co | --c )
15545 $as_echo "$ac_cs_config"; exit ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015546 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000015547 debug=: ;;
15548 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000015549 $ac_shift
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015550 case $ac_optarg in
15551 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015552 '') as_fn_error $? "missing file argument" ;;
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015553 esac
15554 as_fn_append CONFIG_FILES " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000015555 ac_need_defaults=false;;
15556 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000015557 $ac_shift
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015558 case $ac_optarg in
15559 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
15560 esac
15561 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000015562 ac_need_defaults=false;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015563 --he | --h)
15564 # Conflict between --help and --header
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015565 as_fn_error $? "ambiguous option: \`$1'
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015566Try \`$0 --help' for more information.";;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015567 --help | --hel | -h )
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015568 $as_echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000015569 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
15570 | -silent | --silent | --silen | --sile | --sil | --si | --s)
15571 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015572
15573 # This is an error.
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015574 -*) as_fn_error $? "unrecognized option: \`$1'
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015575Try \`$0 --help' for more information." ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015576
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015577 *) as_fn_append ac_config_targets " $1"
Martin v. Löwiseba40652007-08-30 20:10:57 +000015578 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015579
15580 esac
15581 shift
15582done
15583
Skip Montanaro6dead952003-09-25 14:50:04 +000015584ac_configure_extra_args=
15585
15586if $ac_cs_silent; then
15587 exec 6>/dev/null
15588 ac_configure_extra_args="$ac_configure_extra_args --silent"
15589fi
15590
15591_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015592cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Skip Montanaro6dead952003-09-25 14:50:04 +000015593if \$ac_cs_recheck; then
Charles-François Natalibe2b9072013-01-08 19:47:00 +010015594 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015595 shift
15596 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
15597 CONFIG_SHELL='$SHELL'
Martin v. Löwiseba40652007-08-30 20:10:57 +000015598 export CONFIG_SHELL
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015599 exec "\$@"
Skip Montanaro6dead952003-09-25 14:50:04 +000015600fi
15601
Martin v. Löwis11437992002-04-12 09:54:03 +000015602_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015603cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwiseba40652007-08-30 20:10:57 +000015604exec 5>>config.log
15605{
15606 echo
15607 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
15608## Running $as_me. ##
15609_ASBOX
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015610 $as_echo "$ac_log"
Martin v. Löwiseba40652007-08-30 20:10:57 +000015611} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015612
Martin v. Löwiseba40652007-08-30 20:10:57 +000015613_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015614cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwiseba40652007-08-30 20:10:57 +000015615_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000015616
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015617cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwiseba40652007-08-30 20:10:57 +000015618
15619# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000015620for ac_config_target in $ac_config_targets
15621do
Martin v. Löwiseba40652007-08-30 20:10:57 +000015622 case $ac_config_target in
15623 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
15624 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
15625 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
15626 "Mac/IDLE/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/IDLE/Makefile" ;;
Ronald Oussoren580c7fe2008-05-02 19:45:11 +000015627 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
15628 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015629 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
15630 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
Antoine Pitrouf2caeed2009-05-24 20:23:57 +000015631 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
Antoine Pitrouaabdceb2010-09-10 20:03:17 +000015632 "Modules/ld_so_aix") CONFIG_FILES="$CONFIG_FILES Modules/ld_so_aix" ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015633
Matthias Klose3cef2a92012-03-14 23:39:33 +010015634 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015635 esac
15636done
15637
Martin v. Löwiseba40652007-08-30 20:10:57 +000015638
Martin v. Löwis11437992002-04-12 09:54:03 +000015639# If the user did not use the arguments to specify the items to instantiate,
15640# then the envvar interface is used. Set only those that are not.
15641# We use the long form for the default assignment because of an extremely
15642# bizarre bug on SunOS 4.1.3.
15643if $ac_need_defaults; then
15644 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
15645 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
15646fi
15647
Skip Montanaro6dead952003-09-25 14:50:04 +000015648# Have a temporary directory for convenience. Make it in the build tree
Martin v. Löwiseba40652007-08-30 20:10:57 +000015649# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000015650# creating and moving files from /tmp can sometimes cause problems.
Martin v. Löwiseba40652007-08-30 20:10:57 +000015651# Hook for its removal unless debugging.
15652# Note that there is a small window in which the directory will not be cleaned:
15653# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000015654$debug ||
15655{
Matthias Klose3cef2a92012-03-14 23:39:33 +010015656 tmp= ac_tmp=
Martin v. Löwiseba40652007-08-30 20:10:57 +000015657 trap 'exit_status=$?
Matthias Klose3cef2a92012-03-14 23:39:33 +010015658 : "${ac_tmp:=$tmp}"
15659 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
Martin v. Löwiseba40652007-08-30 20:10:57 +000015660' 0
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015661 trap 'as_fn_exit 1' 1 2 13 15
Martin v. Löwis11437992002-04-12 09:54:03 +000015662}
Martin v. Löwis11437992002-04-12 09:54:03 +000015663# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000015664
Martin v. Löwis11437992002-04-12 09:54:03 +000015665{
Martin v. Löwiseba40652007-08-30 20:10:57 +000015666 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Matthias Klose3cef2a92012-03-14 23:39:33 +010015667 test -d "$tmp"
Martin v. Löwis11437992002-04-12 09:54:03 +000015668} ||
15669{
Martin v. Löwiseba40652007-08-30 20:10:57 +000015670 tmp=./conf$$-$RANDOM
15671 (umask 077 && mkdir "$tmp")
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015672} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
Matthias Klose3cef2a92012-03-14 23:39:33 +010015673ac_tmp=$tmp
Martin v. Löwis11437992002-04-12 09:54:03 +000015674
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015675# Set up the scripts for CONFIG_FILES section.
15676# No need to generate them if there are no CONFIG_FILES.
15677# This happens for instance with `./config.status config.h'.
Martin v. Löwiseba40652007-08-30 20:10:57 +000015678if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015679
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015680
15681ac_cr=`echo X | tr X '\015'`
15682# On cygwin, bash can eat \r inside `` if the user requested igncr.
15683# But we know of no other shell where ac_cr would be empty at this
15684# point, so we can use a bashism as a fallback.
15685if test "x$ac_cr" = x; then
15686 eval ac_cr=\$\'\\r\'
15687fi
15688ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
15689if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015690 ac_cs_awk_cr='\\r'
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015691else
15692 ac_cs_awk_cr=$ac_cr
15693fi
15694
Matthias Klose3cef2a92012-03-14 23:39:33 +010015695echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
Martin v. Löwis11437992002-04-12 09:54:03 +000015696_ACEOF
15697
Martin v. Löwiseba40652007-08-30 20:10:57 +000015698
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015699{
15700 echo "cat >conf$$subs.awk <<_ACEOF" &&
15701 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
15702 echo "_ACEOF"
15703} >conf$$subs.sh ||
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015704 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
15705ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
Martin v. Löwiseba40652007-08-30 20:10:57 +000015706ac_delim='%!_!# '
15707for ac_last_try in false false false false false :; do
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015708 . ./conf$$subs.sh ||
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015709 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015710
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015711 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
15712 if test $ac_delim_n = $ac_delim_num; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015713 break
15714 elif $ac_last_try; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015715 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015716 else
15717 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000015718 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015719done
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015720rm -f conf$$subs.sh
Martin v. Löwiseba40652007-08-30 20:10:57 +000015721
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015722cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Matthias Klose3cef2a92012-03-14 23:39:33 +010015723cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
Martin v. Löwiseba40652007-08-30 20:10:57 +000015724_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015725sed -n '
15726h
15727s/^/S["/; s/!.*/"]=/
15728p
15729g
15730s/^[^!]*!//
15731:repl
15732t repl
15733s/'"$ac_delim"'$//
15734t delim
15735:nl
15736h
15737s/\(.\{148\}\)..*/\1/
15738t more1
15739s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
15740p
15741n
15742b repl
15743:more1
15744s/["\\]/\\&/g; s/^/"/; s/$/"\\/
15745p
15746g
15747s/.\{148\}//
15748t nl
15749:delim
15750h
15751s/\(.\{148\}\)..*/\1/
15752t more2
15753s/["\\]/\\&/g; s/^/"/; s/$/"/
15754p
15755b
15756:more2
15757s/["\\]/\\&/g; s/^/"/; s/$/"\\/
15758p
15759g
15760s/.\{148\}//
15761t delim
15762' <conf$$subs.awk | sed '
15763/^[^""]/{
15764 N
15765 s/\n//
15766}
15767' >>$CONFIG_STATUS || ac_write_fail=1
15768rm -f conf$$subs.awk
15769cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15770_ACAWK
Matthias Klose3cef2a92012-03-14 23:39:33 +010015771cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015772 for (key in S) S_is_set[key] = 1
15773 FS = ""
15774
15775}
15776{
15777 line = $ 0
15778 nfields = split(line, field, "@")
15779 substed = 0
15780 len = length(field[1])
15781 for (i = 2; i < nfields; i++) {
15782 key = field[i]
15783 keylen = length(key)
15784 if (S_is_set[key]) {
15785 value = S[key]
15786 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
15787 len += length(value) + length(field[++i])
15788 substed = 1
15789 } else
15790 len += 1 + keylen
15791 }
15792
15793 print line
15794}
15795
15796_ACAWK
Martin v. Löwiseba40652007-08-30 20:10:57 +000015797_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015798cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15799if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
15800 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
15801else
15802 cat
Matthias Klose3cef2a92012-03-14 23:39:33 +010015803fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015804 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015805_ACEOF
15806
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015807# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
15808# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
Martin v. Löwiseba40652007-08-30 20:10:57 +000015809# trailing colons and then remove the whole line if VPATH becomes empty
15810# (actually we leave an empty line to preserve line numbers).
15811if test "x$srcdir" = x.; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015812 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
15813h
15814s///
15815s/^/:/
15816s/[ ]*$/:/
15817s/:\$(srcdir):/:/g
15818s/:\${srcdir}:/:/g
15819s/:@srcdir@:/:/g
15820s/^:*//
Martin v. Löwiseba40652007-08-30 20:10:57 +000015821s/:*$//
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015822x
15823s/\(=[ ]*\).*/\1/
15824G
15825s/\n//
Martin v. Löwiseba40652007-08-30 20:10:57 +000015826s/^[^=]*=[ ]*$//
15827}'
15828fi
15829
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015830cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015831fi # test -n "$CONFIG_FILES"
15832
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015833# Set up the scripts for CONFIG_HEADERS section.
15834# No need to generate them if there are no CONFIG_HEADERS.
15835# This happens for instance with `./config.status Makefile'.
15836if test -n "$CONFIG_HEADERS"; then
Matthias Klose3cef2a92012-03-14 23:39:33 +010015837cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015838BEGIN {
15839_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000015840
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015841# Transform confdefs.h into an awk script `defines.awk', embedded as
15842# here-document in config.status, that substitutes the proper values into
15843# config.h.in to produce config.h.
15844
15845# Create a delimiter string that does not exist in confdefs.h, to ease
15846# handling of long lines.
15847ac_delim='%!_!# '
15848for ac_last_try in false false :; do
Matthias Klose3cef2a92012-03-14 23:39:33 +010015849 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
15850 if test -z "$ac_tt"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015851 break
15852 elif $ac_last_try; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015853 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015854 else
15855 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
15856 fi
15857done
15858
15859# For the awk script, D is an array of macro values keyed by name,
15860# likewise P contains macro parameters if any. Preserve backslash
15861# newline sequences.
15862
15863ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
15864sed -n '
15865s/.\{148\}/&'"$ac_delim"'/g
15866t rset
15867:rset
15868s/^[ ]*#[ ]*define[ ][ ]*/ /
15869t def
15870d
15871:def
15872s/\\$//
15873t bsnl
15874s/["\\]/\\&/g
15875s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
15876D["\1"]=" \3"/p
15877s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
15878d
15879:bsnl
15880s/["\\]/\\&/g
15881s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
15882D["\1"]=" \3\\\\\\n"\\/p
15883t cont
15884s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
15885t cont
15886d
15887:cont
15888n
15889s/.\{148\}/&'"$ac_delim"'/g
15890t clear
15891:clear
15892s/\\$//
15893t bsnlc
15894s/["\\]/\\&/g; s/^/"/; s/$/"/p
15895d
15896:bsnlc
15897s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
15898b cont
15899' <confdefs.h | sed '
15900s/'"$ac_delim"'/"\\\
15901"/g' >>$CONFIG_STATUS || ac_write_fail=1
15902
15903cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15904 for (key in D) D_is_set[key] = 1
15905 FS = ""
15906}
15907/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
15908 line = \$ 0
15909 split(line, arg, " ")
15910 if (arg[1] == "#") {
15911 defundef = arg[2]
15912 mac1 = arg[3]
15913 } else {
15914 defundef = substr(arg[1], 2)
15915 mac1 = arg[2]
15916 }
15917 split(mac1, mac2, "(") #)
15918 macro = mac2[1]
15919 prefix = substr(line, 1, index(line, defundef) - 1)
15920 if (D_is_set[macro]) {
15921 # Preserve the white space surrounding the "#".
15922 print prefix "define", macro P[macro] D[macro]
15923 next
15924 } else {
15925 # Replace #undef with comments. This is necessary, for example,
15926 # in the case of _POSIX_SOURCE, which is predefined and required
15927 # on some systems where configure will not decide to define it.
15928 if (defundef == "undef") {
15929 print "/*", prefix defundef, macro, "*/"
15930 next
15931 }
15932 }
15933}
15934{ print }
15935_ACAWK
15936_ACEOF
15937cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015938 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015939fi # test -n "$CONFIG_HEADERS"
15940
15941
15942eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
15943shift
15944for ac_tag
Martin v. Löwiseba40652007-08-30 20:10:57 +000015945do
15946 case $ac_tag in
15947 :[FHLC]) ac_mode=$ac_tag; continue;;
15948 esac
15949 case $ac_mode$ac_tag in
15950 :[FHL]*:*);;
Matthias Klose3cef2a92012-03-14 23:39:33 +010015951 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015952 :[FH]-) ac_tag=-:-;;
15953 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
15954 esac
15955 ac_save_IFS=$IFS
15956 IFS=:
15957 set x $ac_tag
15958 IFS=$ac_save_IFS
15959 shift
15960 ac_file=$1
15961 shift
15962
15963 case $ac_mode in
15964 :L) ac_source=$1;;
15965 :[FH])
15966 ac_file_inputs=
15967 for ac_f
15968 do
15969 case $ac_f in
Matthias Klose3cef2a92012-03-14 23:39:33 +010015970 -) ac_f="$ac_tmp/stdin";;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015971 *) # Look for the file first in the build tree, then in the source tree
15972 # (if the path is not absolute). The absolute path cannot be DOS-style,
15973 # because $ac_f cannot contain `:'.
15974 test -f "$ac_f" ||
15975 case $ac_f in
15976 [\\/$]*) false;;
15977 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
15978 esac ||
Matthias Klose3cef2a92012-03-14 23:39:33 +010015979 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015980 esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015981 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
15982 as_fn_append ac_file_inputs " '$ac_f'"
Martin v. Löwiseba40652007-08-30 20:10:57 +000015983 done
15984
15985 # Let's still pretend it is `configure' which instantiates (i.e., don't
15986 # use $as_me), people would be surprised to read:
15987 # /* config.h. Generated by config.status. */
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015988 configure_input='Generated from '`
15989 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
15990 `' by configure.'
Martin v. Löwiseba40652007-08-30 20:10:57 +000015991 if test x"$ac_file" != x-; then
15992 configure_input="$ac_file. $configure_input"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015993 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
15994$as_echo "$as_me: creating $ac_file" >&6;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000015995 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015996 # Neutralize special characters interpreted by sed in replacement strings.
15997 case $configure_input in #(
15998 *\&* | *\|* | *\\* )
15999 ac_sed_conf_input=`$as_echo "$configure_input" |
16000 sed 's/[\\\\&|]/\\\\&/g'`;; #(
16001 *) ac_sed_conf_input=$configure_input;;
16002 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000016003
16004 case $ac_tag in
Matthias Klose3cef2a92012-03-14 23:39:33 +010016005 *:-:* | *:-) cat >"$ac_tmp/stdin" \
16006 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000016007 esac
16008 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016009 esac
16010
Martin v. Löwiseba40652007-08-30 20:10:57 +000016011 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000016012$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016013 X"$ac_file" : 'X\(//\)[^/]' \| \
16014 X"$ac_file" : 'X\(//\)$' \| \
Martin v. Löwiseba40652007-08-30 20:10:57 +000016015 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016016$as_echo X"$ac_file" |
Martin v. Löwiseba40652007-08-30 20:10:57 +000016017 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
16018 s//\1/
16019 q
16020 }
16021 /^X\(\/\/\)[^/].*/{
16022 s//\1/
16023 q
16024 }
16025 /^X\(\/\/\)$/{
16026 s//\1/
16027 q
16028 }
16029 /^X\(\/\).*/{
16030 s//\1/
16031 q
16032 }
16033 s/.*/./; q'`
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016034 as_dir="$ac_dir"; as_fn_mkdir_p
Martin v. Löwis11437992002-04-12 09:54:03 +000016035 ac_builddir=.
16036
Martin v. Löwiseba40652007-08-30 20:10:57 +000016037case "$ac_dir" in
16038.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
16039*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016040 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Martin v. Löwiseba40652007-08-30 20:10:57 +000016041 # A ".." for each directory in $ac_dir_suffix.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016042 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Martin v. Löwiseba40652007-08-30 20:10:57 +000016043 case $ac_top_builddir_sub in
16044 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
16045 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
16046 esac ;;
16047esac
16048ac_abs_top_builddir=$ac_pwd
16049ac_abs_builddir=$ac_pwd$ac_dir_suffix
16050# for backward compatibility:
16051ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000016052
16053case $srcdir in
Martin v. Löwiseba40652007-08-30 20:10:57 +000016054 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000016055 ac_srcdir=.
Martin v. Löwiseba40652007-08-30 20:10:57 +000016056 ac_top_srcdir=$ac_top_builddir_sub
16057 ac_abs_top_srcdir=$ac_pwd ;;
16058 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000016059 ac_srcdir=$srcdir$ac_dir_suffix;
Martin v. Löwiseba40652007-08-30 20:10:57 +000016060 ac_top_srcdir=$srcdir
16061 ac_abs_top_srcdir=$srcdir ;;
16062 *) # Relative name.
16063 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
16064 ac_top_srcdir=$ac_top_build_prefix$srcdir
16065 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016066esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000016067ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000016068
Martin v. Löwis11437992002-04-12 09:54:03 +000016069
Martin v. Löwiseba40652007-08-30 20:10:57 +000016070 case $ac_mode in
16071 :F)
16072 #
16073 # CONFIG_FILE
16074 #
Martin v. Löwis11437992002-04-12 09:54:03 +000016075
16076 case $INSTALL in
16077 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000016078 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016079 esac
Trent Nelsonf6407a12012-08-30 14:56:13 +000016080 ac_MKDIR_P=$MKDIR_P
16081 case $MKDIR_P in
16082 [\\/$]* | ?:[\\/]* ) ;;
16083 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
16084 esac
Brett Cannon19fab762007-06-02 03:02:29 +000016085_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000016086
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016087cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwiseba40652007-08-30 20:10:57 +000016088# If the template does not know about datarootdir, expand it.
16089# FIXME: This hack should be removed a few years after 2.60.
16090ac_datarootdir_hack=; ac_datarootdir_seen=
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016091ac_sed_dataroot='
16092/datarootdir/ {
Martin v. Löwiseba40652007-08-30 20:10:57 +000016093 p
16094 q
16095}
16096/@datadir@/p
16097/@docdir@/p
16098/@infodir@/p
16099/@localedir@/p
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016100/@mandir@/p'
16101case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
Martin v. Löwiseba40652007-08-30 20:10:57 +000016102*datarootdir*) ac_datarootdir_seen=yes;;
16103*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016104 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
16105$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000016106_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016107cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwiseba40652007-08-30 20:10:57 +000016108 ac_datarootdir_hack='
16109 s&@datadir@&$datadir&g
16110 s&@docdir@&$docdir&g
16111 s&@infodir@&$infodir&g
16112 s&@localedir@&$localedir&g
16113 s&@mandir@&$mandir&g
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016114 s&\\\${datarootdir}&$datarootdir&g' ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000016115esac
16116_ACEOF
16117
16118# Neutralize VPATH when `$srcdir' = `.'.
16119# Shell code in configure.ac might set extrasub.
16120# FIXME: do we really want to maintain this feature?
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016121cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16122ac_sed_extra="$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000016123$extrasub
16124_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016125cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016126:t
16127/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016128s|@configure_input@|$ac_sed_conf_input|;t t
Martin v. Löwiseba40652007-08-30 20:10:57 +000016129s&@top_builddir@&$ac_top_builddir_sub&;t t
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016130s&@top_build_prefix@&$ac_top_build_prefix&;t t
Martin v. Löwiseba40652007-08-30 20:10:57 +000016131s&@srcdir@&$ac_srcdir&;t t
16132s&@abs_srcdir@&$ac_abs_srcdir&;t t
16133s&@top_srcdir@&$ac_top_srcdir&;t t
16134s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
16135s&@builddir@&$ac_builddir&;t t
16136s&@abs_builddir@&$ac_abs_builddir&;t t
16137s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
16138s&@INSTALL@&$ac_INSTALL&;t t
Trent Nelsonf6407a12012-08-30 14:56:13 +000016139s&@MKDIR_P@&$ac_MKDIR_P&;t t
Martin v. Löwiseba40652007-08-30 20:10:57 +000016140$ac_datarootdir_hack
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016141"
Matthias Klose3cef2a92012-03-14 23:39:33 +010016142eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
16143 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016144
Martin v. Löwiseba40652007-08-30 20:10:57 +000016145test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
Matthias Klose3cef2a92012-03-14 23:39:33 +010016146 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
16147 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
16148 "$ac_tmp/out"`; test -z "$ac_out"; } &&
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016149 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Georg Brandl71f4fbb2011-02-25 11:04:50 +000016150which seems to be undefined. Please make sure it is defined" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016151$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Georg Brandl71f4fbb2011-02-25 11:04:50 +000016152which seems to be undefined. Please make sure it is defined" >&2;}
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016153
Matthias Klose3cef2a92012-03-14 23:39:33 +010016154 rm -f "$ac_tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000016155 case $ac_file in
Matthias Klose3cef2a92012-03-14 23:39:33 +010016156 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
16157 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016158 esac \
Georg Brandl71f4fbb2011-02-25 11:04:50 +000016159 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016160 ;;
16161 :H)
16162 #
16163 # CONFIG_HEADER
16164 #
Martin v. Löwis11437992002-04-12 09:54:03 +000016165 if test x"$ac_file" != x-; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016166 {
16167 $as_echo "/* $configure_input */" \
Matthias Klose3cef2a92012-03-14 23:39:33 +010016168 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
16169 } >"$ac_tmp/config.h" \
Georg Brandl71f4fbb2011-02-25 11:04:50 +000016170 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Matthias Klose3cef2a92012-03-14 23:39:33 +010016171 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016172 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
16173$as_echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000016174 else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016175 rm -f "$ac_file"
Matthias Klose3cef2a92012-03-14 23:39:33 +010016176 mv "$ac_tmp/config.h" "$ac_file" \
Georg Brandl71f4fbb2011-02-25 11:04:50 +000016177 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000016178 fi
16179 else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016180 $as_echo "/* $configure_input */" \
Matthias Klose3cef2a92012-03-14 23:39:33 +010016181 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
Georg Brandl71f4fbb2011-02-25 11:04:50 +000016182 || as_fn_error $? "could not create -" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000016183 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016184 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000016185
Martin v. Löwiseba40652007-08-30 20:10:57 +000016186
16187 esac
16188
Antoine Pitrouaabdceb2010-09-10 20:03:17 +000016189
16190 case $ac_file$ac_mode in
16191 "Modules/ld_so_aix":F) chmod +x Modules/ld_so_aix ;;
16192
16193 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000016194done # for ac_tag
16195
Guido van Rossum627b2d71993-12-24 10:39:16 +000016196
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016197as_fn_exit 0
Martin v. Löwis11437992002-04-12 09:54:03 +000016198_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000016199ac_clean_files=$ac_clean_files_save
16200
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016201test $ac_write_fail = 0 ||
Georg Brandl71f4fbb2011-02-25 11:04:50 +000016202 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016203
Martin v. Löwis11437992002-04-12 09:54:03 +000016204
16205# configure is writing to config.log, and then calls config.status.
16206# config.status does its own redirection, appending to config.log.
16207# Unfortunately, on DOS this fails, as config.log is still kept open
16208# by configure, so config.status won't be able to write to it; its
16209# output is simply discarded. So we exec the FD to /dev/null,
16210# effectively closing config.log, so it can be properly (re)opened and
16211# appended to by config.status. When coming back to configure, we
16212# need to make the FD available again.
16213if test "$no_create" != yes; then
16214 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000016215 ac_config_status_args=
16216 test "$silent" = yes &&
16217 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000016218 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000016219 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000016220 exec 5>>config.log
16221 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
16222 # would make configure fail if this is the last instruction.
Georg Brandl71f4fbb2011-02-25 11:04:50 +000016223 $ac_cs_success || as_fn_exit 1
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016224fi
16225if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
16226 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
16227$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000016228fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000016229
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000016230
Martin v. Löwisf7afe952006-04-14 15:16:15 +000016231echo "creating Modules/Setup"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000016232if test ! -f Modules/Setup
16233then
16234 cp $srcdir/Modules/Setup.dist Modules/Setup
16235fi
16236
Martin v. Löwisf7afe952006-04-14 15:16:15 +000016237echo "creating Modules/Setup.local"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000016238if test ! -f Modules/Setup.local
16239then
16240 echo "# Edit this file for local setup changes" >Modules/Setup.local
16241fi
16242
16243echo "creating Makefile"
16244$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
16245 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000016246 Modules/Setup.local Modules/Setup
Skip Montanaro89e975f2007-08-22 19:05:21 +000016247
16248case $ac_sys_system in
16249BeOS)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016250 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
Skip Montanaro89e975f2007-08-22 19:05:21 +000016251
16252 Support for BeOS is deprecated as of Python 2.6.
16253 See PEP 11 for the gory details.
16254 " >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016255$as_echo "$as_me: WARNING:
Skip Montanaro89e975f2007-08-22 19:05:21 +000016256
16257 Support for BeOS is deprecated as of Python 2.6.
16258 See PEP 11 for the gory details.
16259 " >&2;}
16260 ;;
16261*) ;;
16262esac
16263
Neil Schemenauerc761fc82001-02-19 04:50:49 +000016264mv config.c Modules