blob: 4a047e69bda1fee42887b327d1bee76ecee2a88f [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#
Benjamin Petersoncc8929b2016-08-03 22:01:32 -07006# Report bugs to <https://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
Benjamin Petersoncc8929b2016-08-03 22:01:32 -0700271$0: https://bugs.python.org/ about your system, including
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000272$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'
Benjamin Petersoncc8929b2016-08-03 22:01:32 -0700586PACKAGE_BUGREPORT='https://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
Gregory P. Smith794b2912016-09-08 00:07:40 -0700665target_os
666target_vendor
667target_cpu
668target
669LLVM_PROFDATA
Brett Cannon4ff151a2015-09-18 15:09:42 -0700670LLVM_PROF_ERR
671LLVM_PROF_FILE
672LLVM_PROF_MERGER
673PGO_PROF_USE_FLAG
674PGO_PROF_GEN_FLAG
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)c543a0f2016-06-02 23:44:40 +0000675LTOFLAGS
Gregory P. Smith6d8fdfc2016-09-07 23:28:23 -0700676DEF_MAKE_RULE
677DEF_MAKE_ALL_RULE
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000678UNIVERSAL_ARCH_FLAGS
679BASECFLAGS
680OPT
681LN
Trent Nelsonf6407a12012-08-30 14:56:13 +0000682MKDIR_P
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000683INSTALL_DATA
684INSTALL_SCRIPT
685INSTALL_PROGRAM
Victor Stinner2c7085f2017-05-02 16:55:50 +0200686HAS_GIT
687GITBRANCH
688GITTAG
689GITVERSION
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000690ARFLAGS
doko@python.orgd65e2ba2013-01-31 23:52:03 +0100691ac_ct_AR
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000692AR
693RANLIB
694GNULD
695LINKCC
696RUNSHARED
697INSTSONAME
698LDLIBRARYDIR
699BLDLIBRARY
700DLLLIBRARY
701LDLIBRARY
702LIBRARY
703BUILDEXEEXT
704EGREP
705GREP
706CPP
doko@python.org4e63fbe2013-01-25 13:08:27 +0100707MULTIARCH
doko@python.orgd65e2ba2013-01-31 23:52:03 +0100708ac_ct_CXX
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000709MAINCC
710CXX
711OBJEXT
712EXEEXT
713ac_ct_CC
714CPPFLAGS
715LDFLAGS
716CFLAGS
717CC
718EXPORT_MACOSX_DEPLOYMENT_TARGET
719CONFIGURE_MACOSX_DEPLOYMENT_TARGET
720EXTRAMACHDEPPATH
721EXTRAPLATDIR
doko@ubuntu.coma50b0de2015-04-13 21:55:59 +0200722PLATDIR
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000723SGI_ABI
doko@python.orgd65e2ba2013-01-31 23:52:03 +0100724_PYTHON_HOST_PLATFORM
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000725MACHDEP
726FRAMEWORKINSTALLAPPSPREFIX
727FRAMEWORKUNIXTOOLSPREFIX
728FRAMEWORKALTINSTALLLAST
729FRAMEWORKALTINSTALLFIRST
730FRAMEWORKINSTALLLAST
731FRAMEWORKINSTALLFIRST
732PYTHONFRAMEWORKINSTALLDIR
733PYTHONFRAMEWORKPREFIX
734PYTHONFRAMEWORKDIR
735PYTHONFRAMEWORKIDENTIFIER
736PYTHONFRAMEWORK
737LIPO_32BIT_FLAGS
738ARCH_RUN_32BIT
739UNIVERSALSDK
740CONFIG_ARGS
741SOVERSION
742VERSION
doko@python.orgd65e2ba2013-01-31 23:52:03 +0100743PYTHON_FOR_BUILD
Victor Stinner8a19eb22017-05-05 03:14:23 +0200744PYTHON_FOR_REGEN
doko@python.orgd65e2ba2013-01-31 23:52:03 +0100745host_os
746host_vendor
747host_cpu
748host
749build_os
750build_vendor
751build_cpu
752build
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000753target_alias
754host_alias
755build_alias
756LIBS
757ECHO_T
758ECHO_N
759ECHO_C
760DEFS
761mandir
762localedir
763libdir
764psdir
765pdfdir
766dvidir
767htmldir
768infodir
769docdir
770oldincludedir
771includedir
772localstatedir
773sharedstatedir
774sysconfdir
775datadir
776datarootdir
777libexecdir
778sbindir
779bindir
780program_transform_name
781prefix
782exec_prefix
783PACKAGE_URL
784PACKAGE_BUGREPORT
785PACKAGE_STRING
786PACKAGE_VERSION
787PACKAGE_TARNAME
788PACKAGE_NAME
789PATH_SEPARATOR
790SHELL'
Skip Montanaro6dead952003-09-25 14:50:04 +0000791ac_subst_files=''
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000792ac_user_opts='
793enable_option_checking
794enable_universalsdk
795with_universal_archs
796with_framework_name
797enable_framework
798with_gcc
Zachary Ware6ed42ea2015-12-21 11:43:03 -0600799with_icc
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000800with_cxx_main
801with_suffix
802enable_shared
803enable_profiling
804with_pydebug
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)b9999152016-11-20 21:19:36 +0000805enable_optimizations
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)c543a0f2016-06-02 23:44:40 +0000806with_lto
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000807enable_toolbox_glue
808with_libs
809with_system_expat
810with_system_ffi
Ned Deilya2a9f572013-10-25 00:30:10 -0700811with_tcltk_includes
812with_tcltk_libs
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000813with_dbmliborder
814with_signal_module
815with_dec_threads
816with_threads
817with_thread
818with_pth
819enable_ipv6
820with_doc_strings
821with_tsc
822with_pymalloc
823with_valgrind
824with_wctype_functions
825with_fpectl
826with_libm
827with_libc
828enable_big_digits
829enable_unicode
Benjamin Peterson2c992a02015-05-28 12:45:31 -0500830with_computed_gotos
Ned Deily3f1d0b32014-11-20 02:11:03 -0800831with_ensurepip
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000832'
Martin v. Löwiseba40652007-08-30 20:10:57 +0000833 ac_precious_vars='build_alias
834host_alias
835target_alias
836CC
837CFLAGS
838LDFLAGS
839LIBS
840CPPFLAGS
Benjamin Peterson64e8f6e2014-12-15 00:00:23 -0500841CPP
842PKG_CONFIG
843PKG_CONFIG_PATH
844PKG_CONFIG_LIBDIR'
Martin v. Löwiseba40652007-08-30 20:10:57 +0000845
Guido van Rossum627b2d71993-12-24 10:39:16 +0000846
Guido van Rossum7f43da71994-08-01 12:15:30 +0000847# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000848ac_init_help=
849ac_init_version=false
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000850ac_unrecognized_opts=
851ac_unrecognized_sep=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000852# The variables have the same names as the options, with
853# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000854cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000855exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000856no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000857no_recursion=
858prefix=NONE
859program_prefix=NONE
860program_suffix=NONE
861program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000862silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000863site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000864srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000865verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000866x_includes=NONE
867x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000868
869# Installation directory options.
870# These are left unexpanded so users can "make install exec_prefix=/foo"
871# and all the variables that are supposed to be based on exec_prefix
872# by default will actually change.
873# Use braces instead of parens because sh, perl, etc. also accept them.
Martin v. Löwiseba40652007-08-30 20:10:57 +0000874# (The list follows the same order as the GNU Coding Standards.)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000875bindir='${exec_prefix}/bin'
876sbindir='${exec_prefix}/sbin'
877libexecdir='${exec_prefix}/libexec'
Martin v. Löwiseba40652007-08-30 20:10:57 +0000878datarootdir='${prefix}/share'
879datadir='${datarootdir}'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000880sysconfdir='${prefix}/etc'
881sharedstatedir='${prefix}/com'
882localstatedir='${prefix}/var'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000883includedir='${prefix}/include'
884oldincludedir='/usr/include'
Martin v. Löwiseba40652007-08-30 20:10:57 +0000885docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
886infodir='${datarootdir}/info'
887htmldir='${docdir}'
888dvidir='${docdir}'
889pdfdir='${docdir}'
890psdir='${docdir}'
891libdir='${exec_prefix}/lib'
892localedir='${datarootdir}/locale'
893mandir='${datarootdir}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000894
Guido van Rossum7f43da71994-08-01 12:15:30 +0000895ac_prev=
Martin v. Löwiseba40652007-08-30 20:10:57 +0000896ac_dashdash=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000897for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000898do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000899 # If the previous option needs an argument, assign it.
900 if test -n "$ac_prev"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +0000901 eval $ac_prev=\$ac_option
Guido van Rossum7f43da71994-08-01 12:15:30 +0000902 ac_prev=
903 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000904 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000905
Martin v. Löwiseba40652007-08-30 20:10:57 +0000906 case $ac_option in
Georg Brandl71f4fbb2011-02-25 11:04:50 +0000907 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
908 *=) ac_optarg= ;;
909 *) ac_optarg=yes ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +0000910 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000911
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000912 # Accept the important Cygnus configure options, so we can diagnose typos.
913
Martin v. Löwiseba40652007-08-30 20:10:57 +0000914 case $ac_dashdash$ac_option in
915 --)
916 ac_dashdash=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000917
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000918 -bindir | --bindir | --bindi | --bind | --bin | --bi)
919 ac_prev=bindir ;;
920 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000921 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000922
923 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000924 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000925 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000926 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000927
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000928 -cache-file | --cache-file | --cache-fil | --cache-fi \
929 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
930 ac_prev=cache_file ;;
931 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
932 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000933 cache_file=$ac_optarg ;;
934
935 --config-cache | -C)
936 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000937
Martin v. Löwiseba40652007-08-30 20:10:57 +0000938 -datadir | --datadir | --datadi | --datad)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000939 ac_prev=datadir ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +0000940 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000941 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000942
Martin v. Löwiseba40652007-08-30 20:10:57 +0000943 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
944 | --dataroo | --dataro | --datar)
945 ac_prev=datarootdir ;;
946 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
947 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
948 datarootdir=$ac_optarg ;;
949
Guido van Rossum7f43da71994-08-01 12:15:30 +0000950 -disable-* | --disable-*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000951 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000952 # Reject names that are not valid shell variable names.
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000953 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Georg Brandl71f4fbb2011-02-25 11:04:50 +0000954 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000955 ac_useropt_orig=$ac_useropt
956 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
957 case $ac_user_opts in
958 *"
959"enable_$ac_useropt"
960"*) ;;
961 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
962 ac_unrecognized_sep=', ';;
963 esac
964 eval enable_$ac_useropt=no ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +0000965
966 -docdir | --docdir | --docdi | --doc | --do)
967 ac_prev=docdir ;;
968 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
969 docdir=$ac_optarg ;;
970
971 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
972 ac_prev=dvidir ;;
973 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
974 dvidir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000975
976 -enable-* | --enable-*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000977 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000978 # Reject names that are not valid shell variable names.
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000979 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Georg Brandl71f4fbb2011-02-25 11:04:50 +0000980 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000981 ac_useropt_orig=$ac_useropt
982 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
983 case $ac_user_opts in
984 *"
985"enable_$ac_useropt"
986"*) ;;
987 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
988 ac_unrecognized_sep=', ';;
989 esac
990 eval enable_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000991
Guido van Rossum7f43da71994-08-01 12:15:30 +0000992 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
993 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
994 | --exec | --exe | --ex)
995 ac_prev=exec_prefix ;;
996 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
997 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
998 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000999 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001000
1001 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001002 # Obsolete; use --with-gas.
1003 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001004
Martin v. Löwis11437992002-04-12 09:54:03 +00001005 -help | --help | --hel | --he | -h)
1006 ac_init_help=long ;;
1007 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1008 ac_init_help=recursive ;;
1009 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1010 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001011
1012 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +00001013 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001014 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001015 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001016
Martin v. Löwiseba40652007-08-30 20:10:57 +00001017 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1018 ac_prev=htmldir ;;
1019 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1020 | --ht=*)
1021 htmldir=$ac_optarg ;;
1022
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001023 -includedir | --includedir | --includedi | --included | --include \
1024 | --includ | --inclu | --incl | --inc)
1025 ac_prev=includedir ;;
1026 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1027 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001028 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001029
1030 -infodir | --infodir | --infodi | --infod | --info | --inf)
1031 ac_prev=infodir ;;
1032 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001033 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001034
1035 -libdir | --libdir | --libdi | --libd)
1036 ac_prev=libdir ;;
1037 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001038 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001039
1040 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1041 | --libexe | --libex | --libe)
1042 ac_prev=libexecdir ;;
1043 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1044 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001045 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001046
Martin v. Löwiseba40652007-08-30 20:10:57 +00001047 -localedir | --localedir | --localedi | --localed | --locale)
1048 ac_prev=localedir ;;
1049 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1050 localedir=$ac_optarg ;;
1051
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001052 -localstatedir | --localstatedir | --localstatedi | --localstated \
Martin v. Löwiseba40652007-08-30 20:10:57 +00001053 | --localstate | --localstat | --localsta | --localst | --locals)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001054 ac_prev=localstatedir ;;
1055 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Martin v. Löwiseba40652007-08-30 20:10:57 +00001056 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001057 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001058
1059 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1060 ac_prev=mandir ;;
1061 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001062 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001063
Guido van Rossum7f43da71994-08-01 12:15:30 +00001064 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001065 # Obsolete; use --without-fp.
1066 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001067
1068 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +00001069 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +00001070 no_create=yes ;;
1071
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001072 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1073 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1074 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001075
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001076 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1077 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1078 | --oldin | --oldi | --old | --ol | --o)
1079 ac_prev=oldincludedir ;;
1080 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1081 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1082 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001083 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001084
Guido van Rossum7f43da71994-08-01 12:15:30 +00001085 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1086 ac_prev=prefix ;;
1087 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001088 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001089
1090 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1091 | --program-pre | --program-pr | --program-p)
1092 ac_prev=program_prefix ;;
1093 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1094 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001095 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001096
1097 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1098 | --program-suf | --program-su | --program-s)
1099 ac_prev=program_suffix ;;
1100 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1101 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001102 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001103
1104 -program-transform-name | --program-transform-name \
1105 | --program-transform-nam | --program-transform-na \
1106 | --program-transform-n | --program-transform- \
1107 | --program-transform | --program-transfor \
1108 | --program-transfo | --program-transf \
1109 | --program-trans | --program-tran \
1110 | --progr-tra | --program-tr | --program-t)
1111 ac_prev=program_transform_name ;;
1112 -program-transform-name=* | --program-transform-name=* \
1113 | --program-transform-nam=* | --program-transform-na=* \
1114 | --program-transform-n=* | --program-transform-=* \
1115 | --program-transform=* | --program-transfor=* \
1116 | --program-transfo=* | --program-transf=* \
1117 | --program-trans=* | --program-tran=* \
1118 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001119 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001120
Martin v. Löwiseba40652007-08-30 20:10:57 +00001121 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1122 ac_prev=pdfdir ;;
1123 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1124 pdfdir=$ac_optarg ;;
1125
1126 -psdir | --psdir | --psdi | --psd | --ps)
1127 ac_prev=psdir ;;
1128 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1129 psdir=$ac_optarg ;;
1130
Guido van Rossum7f43da71994-08-01 12:15:30 +00001131 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1132 | -silent | --silent | --silen | --sile | --sil)
1133 silent=yes ;;
1134
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001135 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1136 ac_prev=sbindir ;;
1137 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1138 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001139 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001140
1141 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1142 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1143 | --sharedst | --shareds | --shared | --share | --shar \
1144 | --sha | --sh)
1145 ac_prev=sharedstatedir ;;
1146 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1147 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1148 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1149 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001150 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001151
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001152 -site | --site | --sit)
1153 ac_prev=site ;;
1154 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001155 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001156
Guido van Rossum7f43da71994-08-01 12:15:30 +00001157 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1158 ac_prev=srcdir ;;
1159 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001160 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001161
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001162 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1163 | --syscon | --sysco | --sysc | --sys | --sy)
1164 ac_prev=sysconfdir ;;
1165 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1166 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001167 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001168
Guido van Rossum7f43da71994-08-01 12:15:30 +00001169 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +00001170 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001171 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001172 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001173
1174 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1175 verbose=yes ;;
1176
Martin v. Löwis11437992002-04-12 09:54:03 +00001177 -version | --version | --versio | --versi | --vers | -V)
1178 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001179
1180 -with-* | --with-*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001181 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001182 # Reject names that are not valid shell variable names.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001183 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001184 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001185 ac_useropt_orig=$ac_useropt
1186 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1187 case $ac_user_opts in
1188 *"
1189"with_$ac_useropt"
1190"*) ;;
1191 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1192 ac_unrecognized_sep=', ';;
1193 esac
1194 eval with_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001195
1196 -without-* | --without-*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001197 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001198 # Reject names that are not valid shell variable names.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001199 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001200 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001201 ac_useropt_orig=$ac_useropt
1202 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1203 case $ac_user_opts in
1204 *"
1205"with_$ac_useropt"
1206"*) ;;
1207 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1208 ac_unrecognized_sep=', ';;
1209 esac
1210 eval with_$ac_useropt=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001211
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001212 --x)
1213 # Obsolete; use --with-x.
1214 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001215
1216 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1217 | --x-incl | --x-inc | --x-in | --x-i)
1218 ac_prev=x_includes ;;
1219 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1220 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001221 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001222
1223 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1224 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1225 ac_prev=x_libraries ;;
1226 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1227 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001228 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001229
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001230 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1231Try \`$0 --help' for more information"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001232 ;;
1233
Martin v. Löwis11437992002-04-12 09:54:03 +00001234 *=*)
1235 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1236 # Reject names that are not valid shell variable names.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001237 case $ac_envvar in #(
1238 '' | [0-9]* | *[!_$as_cr_alnum]* )
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001239 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001240 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00001241 eval $ac_envvar=\$ac_optarg
Martin v. Löwis11437992002-04-12 09:54:03 +00001242 export $ac_envvar ;;
1243
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001244 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001245 # FIXME: should be removed in autoconf 3.0.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001246 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001247 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001248 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
Matthias Klose3cef2a92012-03-14 23:39:33 +01001249 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001250 ;;
1251
1252 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00001253done
1254
Guido van Rossum7f43da71994-08-01 12:15:30 +00001255if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001256 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001257 as_fn_error $? "missing argument to $ac_option"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001258fi
1259
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001260if test -n "$ac_unrecognized_opts"; then
1261 case $enable_option_checking in
1262 no) ;;
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001263 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001264 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1265 esac
1266fi
1267
1268# Check all directory arguments for consistency.
Martin v. Löwiseba40652007-08-30 20:10:57 +00001269for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1270 datadir sysconfdir sharedstatedir localstatedir includedir \
1271 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
INADA Naoki6a04ef72017-03-29 01:50:48 +09001272 libdir localedir mandir
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001273do
Martin v. Löwiseba40652007-08-30 20:10:57 +00001274 eval ac_val=\$$ac_var
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001275 # Remove trailing slashes.
1276 case $ac_val in
1277 */ )
1278 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1279 eval $ac_var=\$ac_val;;
1280 esac
1281 # Be sure to have absolute directory names.
Martin v. Löwis11437992002-04-12 09:54:03 +00001282 case $ac_val in
Martin v. Löwiseba40652007-08-30 20:10:57 +00001283 [\\/$]* | ?:[\\/]* ) continue;;
1284 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001285 esac
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001286 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
Martin v. Löwis11437992002-04-12 09:54:03 +00001287done
Guido van Rossum627b2d71993-12-24 10:39:16 +00001288
Martin v. Löwis11437992002-04-12 09:54:03 +00001289# There might be people who depend on the old broken behavior: `$host'
1290# used to hold the argument of --host etc.
1291# FIXME: To remove some day.
1292build=$build_alias
1293host=$host_alias
1294target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +00001295
Martin v. Löwis11437992002-04-12 09:54:03 +00001296# FIXME: To remove some day.
1297if test "x$host_alias" != x; then
1298 if test "x$build_alias" = x; then
1299 cross_compiling=maybe
Martin v. Löwis11437992002-04-12 09:54:03 +00001300 elif test "x$build_alias" != "x$host_alias"; then
1301 cross_compiling=yes
1302 fi
1303fi
1304
1305ac_tool_prefix=
1306test -n "$host_alias" && ac_tool_prefix=$host_alias-
1307
1308test "$silent" = yes && exec 6>/dev/null
1309
Guido van Rossum627b2d71993-12-24 10:39:16 +00001310
Martin v. Löwiseba40652007-08-30 20:10:57 +00001311ac_pwd=`pwd` && test -n "$ac_pwd" &&
1312ac_ls_di=`ls -di .` &&
1313ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001314 as_fn_error $? "working directory cannot be determined"
Martin v. Löwiseba40652007-08-30 20:10:57 +00001315test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001316 as_fn_error $? "pwd does not report name of working directory"
Martin v. Löwiseba40652007-08-30 20:10:57 +00001317
1318
Guido van Rossum627b2d71993-12-24 10:39:16 +00001319# Find the source files, if location was not specified.
1320if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001321 ac_srcdir_defaulted=yes
Martin v. Löwiseba40652007-08-30 20:10:57 +00001322 # Try the directory containing this script, then the parent directory.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001323 ac_confdir=`$as_dirname -- "$as_myself" ||
1324$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1325 X"$as_myself" : 'X\(//\)[^/]' \| \
1326 X"$as_myself" : 'X\(//\)$' \| \
1327 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1328$as_echo X"$as_myself" |
Martin v. Löwiseba40652007-08-30 20:10:57 +00001329 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1330 s//\1/
1331 q
1332 }
1333 /^X\(\/\/\)[^/].*/{
1334 s//\1/
1335 q
1336 }
1337 /^X\(\/\/\)$/{
1338 s//\1/
1339 q
1340 }
1341 /^X\(\/\).*/{
1342 s//\1/
1343 q
1344 }
1345 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001346 srcdir=$ac_confdir
Martin v. Löwiseba40652007-08-30 20:10:57 +00001347 if test ! -r "$srcdir/$ac_unique_file"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001348 srcdir=..
1349 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001350else
1351 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001352fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00001353if test ! -r "$srcdir/$ac_unique_file"; then
1354 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001355 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
Brett Cannon19fab762007-06-02 03:02:29 +00001356fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00001357ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1358ac_abs_confdir=`(
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001359 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
Martin v. Löwiseba40652007-08-30 20:10:57 +00001360 pwd)`
1361# When building in place, set srcdir=.
1362if test "$ac_abs_confdir" = "$ac_pwd"; then
1363 srcdir=.
1364fi
1365# Remove unnecessary trailing slashes from srcdir.
1366# Double slashes in file names in object file debugging info
1367# mess up M-x gdb in Emacs.
1368case $srcdir in
1369*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1370esac
1371for ac_var in $ac_precious_vars; do
1372 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1373 eval ac_env_${ac_var}_value=\$${ac_var}
1374 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1375 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1376done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001377
Martin v. Löwis11437992002-04-12 09:54:03 +00001378#
1379# Report the --help message.
1380#
1381if test "$ac_init_help" = "long"; then
1382 # Omit some internal or obsolete options to make the list less imposing.
1383 # This message is too long to be a string in the A/UX 3.1 sh.
1384 cat <<_ACEOF
Martin v. Löwis174440b2008-10-03 08:59:41 +00001385\`configure' configures python 2.7 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +00001386
1387Usage: $0 [OPTION]... [VAR=VALUE]...
1388
1389To assign environment variables (e.g., CC, CFLAGS...), specify them as
1390VAR=VALUE. See below for descriptions of some of the useful variables.
1391
1392Defaults for the options are specified in brackets.
1393
1394Configuration:
1395 -h, --help display this help and exit
1396 --help=short display options specific to this package
1397 --help=recursive display the short help of all the included packages
1398 -V, --version display version information and exit
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001399 -q, --quiet, --silent do not print \`checking ...' messages
Martin v. Löwis11437992002-04-12 09:54:03 +00001400 --cache-file=FILE cache test results in FILE [disabled]
1401 -C, --config-cache alias for \`--cache-file=config.cache'
1402 -n, --no-create do not create output files
1403 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1404
Martin v. Löwis11437992002-04-12 09:54:03 +00001405Installation directories:
1406 --prefix=PREFIX install architecture-independent files in PREFIX
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001407 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001408 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001409 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +00001410
1411By default, \`make install' will install all the files in
1412\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1413an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1414for instance \`--prefix=\$HOME'.
1415
1416For better control, use the options below.
1417
1418Fine tuning of the installation directories:
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001419 --bindir=DIR user executables [EPREFIX/bin]
1420 --sbindir=DIR system admin executables [EPREFIX/sbin]
1421 --libexecdir=DIR program executables [EPREFIX/libexec]
1422 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1423 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1424 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1425 --libdir=DIR object code libraries [EPREFIX/lib]
1426 --includedir=DIR C header files [PREFIX/include]
1427 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1428 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1429 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1430 --infodir=DIR info documentation [DATAROOTDIR/info]
1431 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1432 --mandir=DIR man documentation [DATAROOTDIR/man]
1433 --docdir=DIR documentation root [DATAROOTDIR/doc/python]
1434 --htmldir=DIR html documentation [DOCDIR]
1435 --dvidir=DIR dvi documentation [DOCDIR]
1436 --pdfdir=DIR pdf documentation [DOCDIR]
1437 --psdir=DIR ps documentation [DOCDIR]
Martin v. Löwis11437992002-04-12 09:54:03 +00001438_ACEOF
1439
1440 cat <<\_ACEOF
doko@python.orgd65e2ba2013-01-31 23:52:03 +01001441
1442System types:
1443 --build=BUILD configure for building on BUILD [guessed]
1444 --host=HOST cross-compile to build programs to run on HOST [BUILD]
Gregory P. Smith794b2912016-09-08 00:07:40 -07001445 --target=TARGET configure for building compilers for TARGET [HOST]
Martin v. Löwis11437992002-04-12 09:54:03 +00001446_ACEOF
1447fi
1448
1449if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +00001450 case $ac_init_help in
Martin v. Löwis174440b2008-10-03 08:59:41 +00001451 short | recursive ) echo "Configuration of python 2.7:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +00001452 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001453 cat <<\_ACEOF
1454
1455Optional Features:
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001456 --disable-option-checking ignore unrecognized --enable/--with options
Martin v. Löwis11437992002-04-12 09:54:03 +00001457 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1458 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Brett Cannon91a1dec2008-02-13 19:15:44 +00001459 --enable-universalsdk[=SDKDIR]
Ned Deilyee8e4b62018-04-14 10:37:28 -04001460 Build fat binary against Mac OS X SDK
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001461 --enable-framework[=INSTALLDIR]
1462 Build (MacOSX|Darwin) framework
1463 --enable-shared disable/enable building shared python library
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00001464 --enable-profiling enable C-level code profiling
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)b9999152016-11-20 21:19:36 +00001465 --enable-optimizations Enable expensive optimizations (PGO, maybe LTO,
1466 etc). Disabled by default.
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001467 --enable-toolbox-glue disable/enable MacOSX glue code for extensions
1468 --enable-ipv6 Enable ipv6 (with ipv4) support
1469 --disable-ipv6 Disable ipv6 support
Mark Dickinsonefc82f72009-03-20 15:51:55 +00001470 --enable-big-digits[=BITS]
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001471 use big digits for Python longs [[BITS=30]]
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001472 --enable-unicode[=ucs[24]]
Benjamin Peterson66556b02010-05-25 02:23:32 +00001473 Enable Unicode strings (default is ucs2)
Martin v. Löwis11437992002-04-12 09:54:03 +00001474
1475Optional Packages:
1476 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1477 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Ronald Oussoren5640ce22008-06-05 12:58:24 +00001478 --with-universal-archs=ARCH
1479 select architectures for universal build ("32-bit",
Ned Deilyee8e4b62018-04-14 10:37:28 -04001480 "64-bit", "3-way", "intel", "intel-32", "intel-64",
1481 or "all")
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00001482 --with-framework-name=FRAMEWORK
1483 specify an alternate name of the framework built
1484 with --enable-framework
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001485 --without-gcc never use gcc
Zachary Ware6ed42ea2015-12-21 11:43:03 -06001486 --with-icc build with icc
Martin v. Löwis0f48d982006-04-14 14:34:26 +00001487 --with-cxx-main=<compiler>
1488 compile main() and link python executable with C++
1489 compiler
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001490 --with-suffix=.exe set executable suffix
1491 --with-pydebug build with Py_DEBUG defined
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)c543a0f2016-06-02 23:44:40 +00001492 --with-lto Enable Link Time Optimization in PGO builds.
1493 Disabled by default.
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001494 --with-libs='lib1 ...' link against additional libs
Benjamin Peterson2c196742009-12-31 03:17:18 +00001495 --with-system-expat build pyexpat module using an installed expat
1496 library
Martin v. Löwis9176fc12006-04-11 11:12:43 +00001497 --with-system-ffi build _ctypes module using an installed ffi library
Ned Deilya2a9f572013-10-25 00:30:10 -07001498 --with-tcltk-includes='-I...'
1499 override search for Tcl and Tk include files
1500 --with-tcltk-libs='-L...'
1501 override search for Tcl and Tk libs
Benjamin Peterson867475c2009-04-29 20:36:25 +00001502 --with-dbmliborder=db1:db2:...
1503 order to check db backends for dbm. Valid value is a
1504 colon separated string with the backend names
1505 `ndbm', `gdbm' and `bdb'.
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001506 --with-signal-module disable/enable signal module
1507 --with-dec-threads use DEC Alpha/OSF1 thread-safe libraries
1508 --with(out)-threads[=DIRECTORY]
1509 disable/enable thread support
1510 --with(out)-thread[=DIRECTORY]
1511 deprecated; use --with(out)-threads
1512 --with-pth use GNU pth threading libraries
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001513 --with(out)-doc-strings disable/enable documentation strings
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00001514 --with(out)-tsc enable/disable timestamp counter profile
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001515 --with(out)-pymalloc disable/enable specialized mallocs
Benjamin Peterson91c12eb2009-12-03 02:52:39 +00001516 --with-valgrind Enable Valgrind support
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001517 --with-wctype-functions use wctype.h functions
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001518 --with-fpectl enable SIGFPE catching
1519 --with-libm=STRING math library
1520 --with-libc=STRING C library
Benjamin Peterson2c992a02015-05-28 12:45:31 -05001521 --with(out)-computed-gotos
1522 Use computed gotos in evaluation loop (enabled by
1523 default on supported compilers)
Ned Deily3f1d0b32014-11-20 02:11:03 -08001524 --with(out)-ensurepip=[=OPTION]
1525 "install" or "upgrade" using bundled pip, default is
1526 "no"
Martin v. Löwis11437992002-04-12 09:54:03 +00001527
1528Some influential environment variables:
1529 CC C compiler command
1530 CFLAGS C compiler flags
1531 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1532 nonstandard directory <lib dir>
Martin v. Löwiseba40652007-08-30 20:10:57 +00001533 LIBS libraries to pass to the linker, e.g. -l<library>
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001534 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
Martin v. Löwiseba40652007-08-30 20:10:57 +00001535 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001536 CPP C preprocessor
Benjamin Peterson64e8f6e2014-12-15 00:00:23 -05001537 PKG_CONFIG path to pkg-config utility
1538 PKG_CONFIG_PATH
1539 directories to add to pkg-config's search path
1540 PKG_CONFIG_LIBDIR
1541 path overriding pkg-config's built-in search path
Martin v. Löwis11437992002-04-12 09:54:03 +00001542
1543Use these variables to override the choices made by `configure' or to help
1544it to find libraries and programs with nonstandard names/locations.
1545
Benjamin Petersoncc8929b2016-08-03 22:01:32 -07001546Report bugs to <https://bugs.python.org/>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001547_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00001548ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001549fi
1550
1551if test "$ac_init_help" = "recursive"; then
1552 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001553 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001554 test -d "$ac_dir" ||
1555 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1556 continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001557 ac_builddir=.
1558
Martin v. Löwiseba40652007-08-30 20:10:57 +00001559case "$ac_dir" in
1560.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1561*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001562 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Martin v. Löwiseba40652007-08-30 20:10:57 +00001563 # A ".." for each directory in $ac_dir_suffix.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001564 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Martin v. Löwiseba40652007-08-30 20:10:57 +00001565 case $ac_top_builddir_sub in
1566 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1567 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1568 esac ;;
1569esac
1570ac_abs_top_builddir=$ac_pwd
1571ac_abs_builddir=$ac_pwd$ac_dir_suffix
1572# for backward compatibility:
1573ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001574
1575case $srcdir in
Martin v. Löwiseba40652007-08-30 20:10:57 +00001576 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001577 ac_srcdir=.
Martin v. Löwiseba40652007-08-30 20:10:57 +00001578 ac_top_srcdir=$ac_top_builddir_sub
1579 ac_abs_top_srcdir=$ac_pwd ;;
1580 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001581 ac_srcdir=$srcdir$ac_dir_suffix;
Martin v. Löwiseba40652007-08-30 20:10:57 +00001582 ac_top_srcdir=$srcdir
1583 ac_abs_top_srcdir=$srcdir ;;
1584 *) # Relative name.
1585 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1586 ac_top_srcdir=$ac_top_build_prefix$srcdir
1587 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001588esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00001589ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001590
Martin v. Löwiseba40652007-08-30 20:10:57 +00001591 cd "$ac_dir" || { ac_status=$?; continue; }
1592 # Check for guested configure.
1593 if test -f "$ac_srcdir/configure.gnu"; then
1594 echo &&
1595 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1596 elif test -f "$ac_srcdir/configure"; then
1597 echo &&
1598 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001599 else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001600 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Martin v. Löwiseba40652007-08-30 20:10:57 +00001601 fi || ac_status=$?
1602 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001603 done
1604fi
1605
Martin v. Löwiseba40652007-08-30 20:10:57 +00001606test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001607if $ac_init_version; then
1608 cat <<\_ACEOF
Martin v. Löwis174440b2008-10-03 08:59:41 +00001609python configure 2.7
Charles-François Natalibe2b9072013-01-08 19:47:00 +01001610generated by GNU Autoconf 2.69
Martin v. Löwis11437992002-04-12 09:54:03 +00001611
Charles-François Natalibe2b9072013-01-08 19:47:00 +01001612Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001613This configure script is free software; the Free Software Foundation
1614gives unlimited permission to copy, distribute and modify it.
1615_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00001616 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001617fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001618
1619## ------------------------ ##
1620## Autoconf initialization. ##
1621## ------------------------ ##
1622
1623# ac_fn_c_try_compile LINENO
1624# --------------------------
1625# Try to compile conftest.$ac_ext, and return whether this succeeded.
1626ac_fn_c_try_compile ()
1627{
1628 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1629 rm -f conftest.$ac_objext
1630 if { { ac_try="$ac_compile"
1631case "(($ac_try" in
1632 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1633 *) ac_try_echo=$ac_try;;
1634esac
1635eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1636$as_echo "$ac_try_echo"; } >&5
1637 (eval "$ac_compile") 2>conftest.err
1638 ac_status=$?
1639 if test -s conftest.err; then
1640 grep -v '^ *+' conftest.err >conftest.er1
1641 cat conftest.er1 >&5
1642 mv -f conftest.er1 conftest.err
1643 fi
1644 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1645 test $ac_status = 0; } && {
1646 test -z "$ac_c_werror_flag" ||
1647 test ! -s conftest.err
1648 } && test -s conftest.$ac_objext; then :
1649 ac_retval=0
1650else
1651 $as_echo "$as_me: failed program was:" >&5
1652sed 's/^/| /' conftest.$ac_ext >&5
1653
1654 ac_retval=1
1655fi
Matthias Klose3cef2a92012-03-14 23:39:33 +01001656 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001657 as_fn_set_status $ac_retval
1658
1659} # ac_fn_c_try_compile
1660
1661# ac_fn_c_try_cpp LINENO
1662# ----------------------
1663# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1664ac_fn_c_try_cpp ()
1665{
1666 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1667 if { { ac_try="$ac_cpp conftest.$ac_ext"
1668case "(($ac_try" in
1669 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1670 *) ac_try_echo=$ac_try;;
1671esac
1672eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1673$as_echo "$ac_try_echo"; } >&5
1674 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1675 ac_status=$?
1676 if test -s conftest.err; then
1677 grep -v '^ *+' conftest.err >conftest.er1
1678 cat conftest.er1 >&5
1679 mv -f conftest.er1 conftest.err
1680 fi
1681 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001682 test $ac_status = 0; } > conftest.i && {
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001683 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1684 test ! -s conftest.err
1685 }; then :
1686 ac_retval=0
1687else
1688 $as_echo "$as_me: failed program was:" >&5
1689sed 's/^/| /' conftest.$ac_ext >&5
1690
1691 ac_retval=1
1692fi
Matthias Klose3cef2a92012-03-14 23:39:33 +01001693 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001694 as_fn_set_status $ac_retval
1695
1696} # ac_fn_c_try_cpp
1697
1698# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1699# -------------------------------------------------------
1700# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1701# the include files in INCLUDES and setting the cache variable VAR
1702# accordingly.
1703ac_fn_c_check_header_mongrel ()
1704{
1705 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Matthias Klose3cef2a92012-03-14 23:39:33 +01001706 if eval \${$3+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001707 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1708$as_echo_n "checking for $2... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01001709if eval \${$3+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001710 $as_echo_n "(cached) " >&6
1711fi
1712eval ac_res=\$$3
1713 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1714$as_echo "$ac_res" >&6; }
1715else
1716 # Is the header compilable?
1717{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1718$as_echo_n "checking $2 usability... " >&6; }
1719cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1720/* end confdefs.h. */
1721$4
1722#include <$2>
1723_ACEOF
1724if ac_fn_c_try_compile "$LINENO"; then :
1725 ac_header_compiler=yes
1726else
1727 ac_header_compiler=no
1728fi
1729rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1730{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1731$as_echo "$ac_header_compiler" >&6; }
1732
1733# Is the header present?
1734{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1735$as_echo_n "checking $2 presence... " >&6; }
1736cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1737/* end confdefs.h. */
1738#include <$2>
1739_ACEOF
1740if ac_fn_c_try_cpp "$LINENO"; then :
1741 ac_header_preproc=yes
1742else
1743 ac_header_preproc=no
1744fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001745rm -f conftest.err conftest.i conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001746{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1747$as_echo "$ac_header_preproc" >&6; }
1748
1749# So? What about this header?
1750case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1751 yes:no: )
1752 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1753$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1754 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1755$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1756 ;;
1757 no:yes:* )
1758 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1759$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1760 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1761$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1762 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1763$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1764 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1765$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1766 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1767$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
Benjamin Petersoncc8929b2016-08-03 22:01:32 -07001768( $as_echo "## --------------------------------------- ##
1769## Report this to https://bugs.python.org/ ##
1770## --------------------------------------- ##"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001771 ) | sed "s/^/$as_me: WARNING: /" >&2
1772 ;;
1773esac
1774 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1775$as_echo_n "checking for $2... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01001776if eval \${$3+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001777 $as_echo_n "(cached) " >&6
1778else
1779 eval "$3=\$ac_header_compiler"
1780fi
1781eval ac_res=\$$3
1782 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1783$as_echo "$ac_res" >&6; }
1784fi
Matthias Klose3cef2a92012-03-14 23:39:33 +01001785 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001786
1787} # ac_fn_c_check_header_mongrel
1788
1789# ac_fn_c_try_run LINENO
1790# ----------------------
1791# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1792# that executables *can* be run.
1793ac_fn_c_try_run ()
1794{
1795 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1796 if { { ac_try="$ac_link"
1797case "(($ac_try" in
1798 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1799 *) ac_try_echo=$ac_try;;
1800esac
1801eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1802$as_echo "$ac_try_echo"; } >&5
1803 (eval "$ac_link") 2>&5
1804 ac_status=$?
1805 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1806 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1807 { { case "(($ac_try" in
1808 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1809 *) ac_try_echo=$ac_try;;
1810esac
1811eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1812$as_echo "$ac_try_echo"; } >&5
1813 (eval "$ac_try") 2>&5
1814 ac_status=$?
1815 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1816 test $ac_status = 0; }; }; then :
1817 ac_retval=0
1818else
1819 $as_echo "$as_me: program exited with status $ac_status" >&5
1820 $as_echo "$as_me: failed program was:" >&5
1821sed 's/^/| /' conftest.$ac_ext >&5
1822
1823 ac_retval=$ac_status
1824fi
1825 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Matthias Klose3cef2a92012-03-14 23:39:33 +01001826 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001827 as_fn_set_status $ac_retval
1828
1829} # ac_fn_c_try_run
1830
1831# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1832# -------------------------------------------------------
1833# Tests whether HEADER exists and can be compiled using the include files in
1834# INCLUDES, setting the cache variable VAR accordingly.
1835ac_fn_c_check_header_compile ()
1836{
1837 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1838 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1839$as_echo_n "checking for $2... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01001840if eval \${$3+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001841 $as_echo_n "(cached) " >&6
1842else
1843 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1844/* end confdefs.h. */
1845$4
1846#include <$2>
1847_ACEOF
1848if ac_fn_c_try_compile "$LINENO"; then :
1849 eval "$3=yes"
1850else
1851 eval "$3=no"
1852fi
1853rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1854fi
1855eval ac_res=\$$3
1856 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1857$as_echo "$ac_res" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01001858 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001859
1860} # ac_fn_c_check_header_compile
1861
1862# ac_fn_c_try_link LINENO
1863# -----------------------
1864# Try to link conftest.$ac_ext, and return whether this succeeded.
1865ac_fn_c_try_link ()
1866{
1867 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1868 rm -f conftest.$ac_objext conftest$ac_exeext
1869 if { { ac_try="$ac_link"
1870case "(($ac_try" in
1871 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1872 *) ac_try_echo=$ac_try;;
1873esac
1874eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1875$as_echo "$ac_try_echo"; } >&5
1876 (eval "$ac_link") 2>conftest.err
1877 ac_status=$?
1878 if test -s conftest.err; then
1879 grep -v '^ *+' conftest.err >conftest.er1
1880 cat conftest.er1 >&5
1881 mv -f conftest.er1 conftest.err
1882 fi
1883 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1884 test $ac_status = 0; } && {
1885 test -z "$ac_c_werror_flag" ||
1886 test ! -s conftest.err
1887 } && test -s conftest$ac_exeext && {
1888 test "$cross_compiling" = yes ||
Charles-François Natalibe2b9072013-01-08 19:47:00 +01001889 test -x conftest$ac_exeext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001890 }; then :
1891 ac_retval=0
1892else
1893 $as_echo "$as_me: failed program was:" >&5
1894sed 's/^/| /' conftest.$ac_ext >&5
1895
1896 ac_retval=1
1897fi
1898 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1899 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1900 # interfere with the next link command; also delete a directory that is
1901 # left behind by Apple's compiler. We do this before executing the actions.
1902 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Matthias Klose3cef2a92012-03-14 23:39:33 +01001903 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001904 as_fn_set_status $ac_retval
1905
1906} # ac_fn_c_try_link
1907
1908# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
1909# -------------------------------------------
1910# Tests whether TYPE exists after having included INCLUDES, setting cache
1911# variable VAR accordingly.
1912ac_fn_c_check_type ()
1913{
1914 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1915 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1916$as_echo_n "checking for $2... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01001917if eval \${$3+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001918 $as_echo_n "(cached) " >&6
1919else
1920 eval "$3=no"
1921 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1922/* end confdefs.h. */
1923$4
1924int
1925main ()
1926{
1927if (sizeof ($2))
1928 return 0;
1929 ;
1930 return 0;
1931}
1932_ACEOF
1933if ac_fn_c_try_compile "$LINENO"; then :
1934 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1935/* end confdefs.h. */
1936$4
1937int
1938main ()
1939{
1940if (sizeof (($2)))
1941 return 0;
1942 ;
1943 return 0;
1944}
1945_ACEOF
1946if ac_fn_c_try_compile "$LINENO"; then :
1947
1948else
1949 eval "$3=yes"
1950fi
1951rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1952fi
1953rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1954fi
1955eval ac_res=\$$3
1956 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1957$as_echo "$ac_res" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01001958 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001959
1960} # ac_fn_c_check_type
1961
1962# ac_fn_c_find_uintX_t LINENO BITS VAR
1963# ------------------------------------
1964# Finds an unsigned integer type with width BITS, setting cache variable VAR
1965# accordingly.
1966ac_fn_c_find_uintX_t ()
1967{
1968 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1969 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uint$2_t" >&5
1970$as_echo_n "checking for uint$2_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01001971if eval \${$3+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001972 $as_echo_n "(cached) " >&6
1973else
1974 eval "$3=no"
1975 # Order is important - never check a type that is potentially smaller
1976 # than half of the expected target width.
1977 for ac_type in uint$2_t 'unsigned int' 'unsigned long int' \
1978 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
1979 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1980/* end confdefs.h. */
1981$ac_includes_default
1982int
1983main ()
1984{
1985static int test_array [1 - 2 * !((($ac_type) -1 >> ($2 / 2 - 1)) >> ($2 / 2 - 1) == 3)];
Charles-François Natalibe2b9072013-01-08 19:47:00 +01001986test_array [0] = 0;
1987return test_array [0];
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001988
1989 ;
1990 return 0;
1991}
1992_ACEOF
1993if ac_fn_c_try_compile "$LINENO"; then :
1994 case $ac_type in #(
1995 uint$2_t) :
1996 eval "$3=yes" ;; #(
1997 *) :
1998 eval "$3=\$ac_type" ;;
1999esac
2000fi
2001rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002002 if eval test \"x\$"$3"\" = x"no"; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002003
2004else
2005 break
2006fi
2007 done
2008fi
2009eval ac_res=\$$3
2010 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2011$as_echo "$ac_res" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01002012 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002013
2014} # ac_fn_c_find_uintX_t
2015
2016# ac_fn_c_find_intX_t LINENO BITS VAR
2017# -----------------------------------
2018# Finds a signed integer type with width BITS, setting cache variable VAR
2019# accordingly.
2020ac_fn_c_find_intX_t ()
2021{
2022 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2023 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for int$2_t" >&5
2024$as_echo_n "checking for int$2_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01002025if eval \${$3+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002026 $as_echo_n "(cached) " >&6
2027else
2028 eval "$3=no"
2029 # Order is important - never check a type that is potentially smaller
2030 # than half of the expected target width.
2031 for ac_type in int$2_t 'int' 'long int' \
2032 'long long int' 'short int' 'signed char'; do
2033 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2034/* end confdefs.h. */
2035$ac_includes_default
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002036 enum { N = $2 / 2 - 1 };
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002037int
2038main ()
2039{
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002040static 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 +01002041test_array [0] = 0;
2042return test_array [0];
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002043
2044 ;
2045 return 0;
2046}
2047_ACEOF
2048if ac_fn_c_try_compile "$LINENO"; then :
2049 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2050/* end confdefs.h. */
2051$ac_includes_default
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002052 enum { N = $2 / 2 - 1 };
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002053int
2054main ()
2055{
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002056static int test_array [1 - 2 * !(($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002057 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 2))];
Charles-François Natalibe2b9072013-01-08 19:47:00 +01002058test_array [0] = 0;
2059return test_array [0];
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002060
2061 ;
2062 return 0;
2063}
2064_ACEOF
2065if ac_fn_c_try_compile "$LINENO"; then :
2066
2067else
2068 case $ac_type in #(
2069 int$2_t) :
2070 eval "$3=yes" ;; #(
2071 *) :
2072 eval "$3=\$ac_type" ;;
2073esac
2074fi
2075rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2076fi
2077rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002078 if eval test \"x\$"$3"\" = x"no"; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002079
2080else
2081 break
2082fi
2083 done
2084fi
2085eval ac_res=\$$3
2086 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2087$as_echo "$ac_res" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01002088 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002089
2090} # ac_fn_c_find_intX_t
2091
2092# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2093# --------------------------------------------
2094# Tries to find the compile-time value of EXPR in a program that includes
2095# INCLUDES, setting VAR accordingly. Returns whether the value could be
2096# computed
2097ac_fn_c_compute_int ()
2098{
2099 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2100 if test "$cross_compiling" = yes; then
2101 # Depending upon the size, compute the lo and hi bounds.
2102cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2103/* end confdefs.h. */
2104$4
2105int
2106main ()
2107{
2108static int test_array [1 - 2 * !(($2) >= 0)];
Charles-François Natalibe2b9072013-01-08 19:47:00 +01002109test_array [0] = 0;
2110return test_array [0];
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002111
2112 ;
2113 return 0;
2114}
2115_ACEOF
2116if ac_fn_c_try_compile "$LINENO"; then :
2117 ac_lo=0 ac_mid=0
2118 while :; do
2119 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2120/* end confdefs.h. */
2121$4
2122int
2123main ()
2124{
2125static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Charles-François Natalibe2b9072013-01-08 19:47:00 +01002126test_array [0] = 0;
2127return test_array [0];
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002128
2129 ;
2130 return 0;
2131}
2132_ACEOF
2133if ac_fn_c_try_compile "$LINENO"; then :
2134 ac_hi=$ac_mid; break
2135else
2136 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2137 if test $ac_lo -le $ac_mid; then
2138 ac_lo= ac_hi=
2139 break
2140 fi
2141 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2142fi
2143rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2144 done
2145else
2146 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2147/* end confdefs.h. */
2148$4
2149int
2150main ()
2151{
2152static int test_array [1 - 2 * !(($2) < 0)];
Charles-François Natalibe2b9072013-01-08 19:47:00 +01002153test_array [0] = 0;
2154return test_array [0];
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002155
2156 ;
2157 return 0;
2158}
2159_ACEOF
2160if ac_fn_c_try_compile "$LINENO"; then :
2161 ac_hi=-1 ac_mid=-1
2162 while :; do
2163 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2164/* end confdefs.h. */
2165$4
2166int
2167main ()
2168{
2169static int test_array [1 - 2 * !(($2) >= $ac_mid)];
Charles-François Natalibe2b9072013-01-08 19:47:00 +01002170test_array [0] = 0;
2171return test_array [0];
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002172
2173 ;
2174 return 0;
2175}
2176_ACEOF
2177if ac_fn_c_try_compile "$LINENO"; then :
2178 ac_lo=$ac_mid; break
2179else
2180 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2181 if test $ac_mid -le $ac_hi; then
2182 ac_lo= ac_hi=
2183 break
2184 fi
2185 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2186fi
2187rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2188 done
2189else
2190 ac_lo= ac_hi=
2191fi
2192rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2193fi
2194rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2195# Binary search between lo and hi bounds.
2196while test "x$ac_lo" != "x$ac_hi"; do
2197 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2198 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2199/* end confdefs.h. */
2200$4
2201int
2202main ()
2203{
2204static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Charles-François Natalibe2b9072013-01-08 19:47:00 +01002205test_array [0] = 0;
2206return test_array [0];
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002207
2208 ;
2209 return 0;
2210}
2211_ACEOF
2212if ac_fn_c_try_compile "$LINENO"; then :
2213 ac_hi=$ac_mid
2214else
2215 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2216fi
2217rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2218done
2219case $ac_lo in #((
2220?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2221'') ac_retval=1 ;;
2222esac
2223 else
2224 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2225/* end confdefs.h. */
2226$4
2227static long int longval () { return $2; }
2228static unsigned long int ulongval () { return $2; }
2229#include <stdio.h>
2230#include <stdlib.h>
2231int
2232main ()
2233{
2234
2235 FILE *f = fopen ("conftest.val", "w");
2236 if (! f)
2237 return 1;
2238 if (($2) < 0)
2239 {
2240 long int i = longval ();
2241 if (i != ($2))
2242 return 1;
2243 fprintf (f, "%ld", i);
2244 }
2245 else
2246 {
2247 unsigned long int i = ulongval ();
2248 if (i != ($2))
2249 return 1;
2250 fprintf (f, "%lu", i);
2251 }
2252 /* Do not output a trailing newline, as this causes \r\n confusion
2253 on some platforms. */
2254 return ferror (f) || fclose (f) != 0;
2255
2256 ;
2257 return 0;
2258}
2259_ACEOF
2260if ac_fn_c_try_run "$LINENO"; then :
2261 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2262else
2263 ac_retval=1
2264fi
2265rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2266 conftest.$ac_objext conftest.beam conftest.$ac_ext
2267rm -f conftest.val
2268
2269 fi
Matthias Klose3cef2a92012-03-14 23:39:33 +01002270 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002271 as_fn_set_status $ac_retval
2272
2273} # ac_fn_c_compute_int
2274
2275# ac_fn_c_check_func LINENO FUNC VAR
2276# ----------------------------------
2277# Tests whether FUNC exists, setting the cache variable VAR accordingly
2278ac_fn_c_check_func ()
2279{
2280 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2281 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2282$as_echo_n "checking for $2... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01002283if eval \${$3+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002284 $as_echo_n "(cached) " >&6
2285else
2286 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2287/* end confdefs.h. */
2288/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2289 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2290#define $2 innocuous_$2
2291
2292/* System header to define __stub macros and hopefully few prototypes,
2293 which can conflict with char $2 (); below.
2294 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2295 <limits.h> exists even on freestanding compilers. */
2296
2297#ifdef __STDC__
2298# include <limits.h>
2299#else
2300# include <assert.h>
2301#endif
2302
2303#undef $2
2304
2305/* Override any GCC internal prototype to avoid an error.
2306 Use char because int might match the return type of a GCC
2307 builtin and then its argument prototype would still apply. */
2308#ifdef __cplusplus
2309extern "C"
2310#endif
2311char $2 ();
2312/* The GNU C library defines this for functions which it implements
2313 to always fail with ENOSYS. Some functions are actually named
2314 something starting with __ and the normal name is an alias. */
2315#if defined __stub_$2 || defined __stub___$2
2316choke me
2317#endif
2318
2319int
2320main ()
2321{
2322return $2 ();
2323 ;
2324 return 0;
2325}
2326_ACEOF
2327if ac_fn_c_try_link "$LINENO"; then :
2328 eval "$3=yes"
2329else
2330 eval "$3=no"
2331fi
2332rm -f core conftest.err conftest.$ac_objext \
2333 conftest$ac_exeext conftest.$ac_ext
2334fi
2335eval ac_res=\$$3
2336 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2337$as_echo "$ac_res" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01002338 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002339
2340} # ac_fn_c_check_func
2341
2342# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2343# ----------------------------------------------------
2344# Tries to find if the field MEMBER exists in type AGGR, after including
2345# INCLUDES, setting cache variable VAR accordingly.
2346ac_fn_c_check_member ()
2347{
2348 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2349 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2350$as_echo_n "checking for $2.$3... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01002351if eval \${$4+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002352 $as_echo_n "(cached) " >&6
2353else
2354 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2355/* end confdefs.h. */
2356$5
2357int
2358main ()
2359{
2360static $2 ac_aggr;
2361if (ac_aggr.$3)
2362return 0;
2363 ;
2364 return 0;
2365}
2366_ACEOF
2367if ac_fn_c_try_compile "$LINENO"; then :
2368 eval "$4=yes"
2369else
2370 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2371/* end confdefs.h. */
2372$5
2373int
2374main ()
2375{
2376static $2 ac_aggr;
2377if (sizeof ac_aggr.$3)
2378return 0;
2379 ;
2380 return 0;
2381}
2382_ACEOF
2383if ac_fn_c_try_compile "$LINENO"; then :
2384 eval "$4=yes"
2385else
2386 eval "$4=no"
2387fi
2388rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2389fi
2390rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2391fi
2392eval ac_res=\$$4
2393 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2394$as_echo "$ac_res" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01002395 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002396
2397} # ac_fn_c_check_member
2398
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002399# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2400# ---------------------------------------------
2401# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2402# accordingly.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002403ac_fn_c_check_decl ()
2404{
2405 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002406 as_decl_name=`echo $2|sed 's/ *(.*//'`
2407 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2408 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2409$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01002410if eval \${$3+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002411 $as_echo_n "(cached) " >&6
2412else
2413 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2414/* end confdefs.h. */
2415$4
2416int
2417main ()
2418{
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002419#ifndef $as_decl_name
2420#ifdef __cplusplus
2421 (void) $as_decl_use;
2422#else
2423 (void) $as_decl_name;
2424#endif
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002425#endif
2426
2427 ;
2428 return 0;
2429}
2430_ACEOF
2431if ac_fn_c_try_compile "$LINENO"; then :
2432 eval "$3=yes"
2433else
2434 eval "$3=no"
2435fi
2436rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2437fi
2438eval ac_res=\$$3
2439 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2440$as_echo "$ac_res" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01002441 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002442
2443} # ac_fn_c_check_decl
Martin v. Löwiseba40652007-08-30 20:10:57 +00002444cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00002445This file contains any messages produced by compilers while
2446running configure, to aid debugging if configure makes a mistake.
2447
Martin v. Löwis174440b2008-10-03 08:59:41 +00002448It was created by python $as_me 2.7, which was
Charles-François Natalibe2b9072013-01-08 19:47:00 +01002449generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00002450
2451 $ $0 $@
2452
2453_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00002454exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00002455{
2456cat <<_ASUNAME
2457## --------- ##
2458## Platform. ##
2459## --------- ##
2460
2461hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2462uname -m = `(uname -m) 2>/dev/null || echo unknown`
2463uname -r = `(uname -r) 2>/dev/null || echo unknown`
2464uname -s = `(uname -s) 2>/dev/null || echo unknown`
2465uname -v = `(uname -v) 2>/dev/null || echo unknown`
2466
2467/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2468/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2469
2470/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2471/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2472/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Martin v. Löwiseba40652007-08-30 20:10:57 +00002473/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00002474/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2475/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2476/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2477
2478_ASUNAME
2479
2480as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2481for as_dir in $PATH
2482do
2483 IFS=$as_save_IFS
2484 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002485 $as_echo "PATH: $as_dir"
2486 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002487IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002488
2489} >&5
2490
2491cat >&5 <<_ACEOF
2492
2493
2494## ----------- ##
2495## Core tests. ##
2496## ----------- ##
2497
2498_ACEOF
2499
2500
2501# Keep a trace of the command line.
2502# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00002503# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00002504# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00002505# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00002506ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00002507ac_configure_args0=
2508ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00002509ac_must_keep_next=false
2510for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00002511do
Skip Montanaro6dead952003-09-25 14:50:04 +00002512 for ac_arg
2513 do
2514 case $ac_arg in
2515 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2516 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2517 | -silent | --silent | --silen | --sile | --sil)
2518 continue ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00002519 *\'*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002520 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002521 esac
2522 case $ac_pass in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002523 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002524 2)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002525 as_fn_append ac_configure_args1 " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002526 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002527 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00002528 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00002529 case $ac_arg in
2530 *=* | --config-cache | -C | -disable-* | --disable-* \
2531 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2532 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2533 | -with-* | --with-* | -without-* | --without-* | --x)
2534 case "$ac_configure_args0 " in
2535 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2536 esac
2537 ;;
2538 -* ) ac_must_keep_next=true ;;
2539 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00002540 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002541 as_fn_append ac_configure_args " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002542 ;;
2543 esac
2544 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002545done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002546{ ac_configure_args0=; unset ac_configure_args0;}
2547{ ac_configure_args1=; unset ac_configure_args1;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002548
2549# When interrupted or exit'd, cleanup temporary files, and complete
2550# config.log. We remove comments because anyway the quotes in there
2551# would cause problems or look ugly.
Martin v. Löwiseba40652007-08-30 20:10:57 +00002552# WARNING: Use '\'' to represent an apostrophe within the trap.
2553# 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 +00002554trap 'exit_status=$?
2555 # Save into config.log some information that might help in debugging.
2556 {
2557 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002558
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002559 $as_echo "## ---------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002560## Cache variables. ##
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002561## ---------------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002562 echo
2563 # The following way of writing the cache mishandles newlines in values,
Martin v. Löwiseba40652007-08-30 20:10:57 +00002564(
2565 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2566 eval ac_val=\$$ac_var
2567 case $ac_val in #(
2568 *${as_nl}*)
2569 case $ac_var in #(
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002570 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2571$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00002572 esac
2573 case $ac_var in #(
2574 _ | IFS | as_nl) ;; #(
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002575 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2576 *) { eval $ac_var=; unset $ac_var;} ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00002577 esac ;;
2578 esac
2579 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002580 (set) 2>&1 |
Martin v. Löwiseba40652007-08-30 20:10:57 +00002581 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2582 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00002583 sed -n \
Martin v. Löwiseba40652007-08-30 20:10:57 +00002584 "s/'\''/'\''\\\\'\'''\''/g;
2585 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2586 ;; #(
Skip Montanaro89e975f2007-08-22 19:05:21 +00002587 *)
Martin v. Löwiseba40652007-08-30 20:10:57 +00002588 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaro89e975f2007-08-22 19:05:21 +00002589 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00002590 esac |
2591 sort
2592)
Martin v. Löwis11437992002-04-12 09:54:03 +00002593 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002594
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002595 $as_echo "## ----------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00002596## Output variables. ##
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002597## ----------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002598 echo
2599 for ac_var in $ac_subst_vars
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
2609 if test -n "$ac_subst_files"; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002610 $as_echo "## ------------------- ##
Martin v. Löwiseba40652007-08-30 20:10:57 +00002611## File substitutions. ##
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002612## ------------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002613 echo
2614 for ac_var in $ac_subst_files
2615 do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002616 eval ac_val=\$$ac_var
2617 case $ac_val in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002618 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00002619 esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002620 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002621 done | sort
2622 echo
2623 fi
2624
Martin v. Löwis11437992002-04-12 09:54:03 +00002625 if test -s confdefs.h; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002626 $as_echo "## ----------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002627## confdefs.h. ##
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002628## ----------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002629 echo
Martin v. Löwiseba40652007-08-30 20:10:57 +00002630 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002631 echo
2632 fi
2633 test "$ac_signal" != 0 &&
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002634 $as_echo "$as_me: caught signal $ac_signal"
2635 $as_echo "$as_me: exit $exit_status"
Martin v. Löwis11437992002-04-12 09:54:03 +00002636 } >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00002637 rm -f core *.core core.conftest.* &&
2638 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00002639 exit $exit_status
Martin v. Löwiseba40652007-08-30 20:10:57 +00002640' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00002641for ac_signal in 1 2 13 15; do
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002642 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00002643done
2644ac_signal=0
2645
2646# confdefs.h avoids OS command line length limits that DEFS can exceed.
Martin v. Löwiseba40652007-08-30 20:10:57 +00002647rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002648
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002649$as_echo "/* confdefs.h */" > confdefs.h
2650
Martin v. Löwis11437992002-04-12 09:54:03 +00002651# Predefined preprocessor variables.
2652
2653cat >>confdefs.h <<_ACEOF
2654#define PACKAGE_NAME "$PACKAGE_NAME"
2655_ACEOF
2656
Martin v. Löwis11437992002-04-12 09:54:03 +00002657cat >>confdefs.h <<_ACEOF
2658#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2659_ACEOF
2660
Martin v. Löwis11437992002-04-12 09:54:03 +00002661cat >>confdefs.h <<_ACEOF
2662#define PACKAGE_VERSION "$PACKAGE_VERSION"
2663_ACEOF
2664
Martin v. Löwis11437992002-04-12 09:54:03 +00002665cat >>confdefs.h <<_ACEOF
2666#define PACKAGE_STRING "$PACKAGE_STRING"
2667_ACEOF
2668
Martin v. Löwis11437992002-04-12 09:54:03 +00002669cat >>confdefs.h <<_ACEOF
2670#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2671_ACEOF
2672
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002673cat >>confdefs.h <<_ACEOF
2674#define PACKAGE_URL "$PACKAGE_URL"
2675_ACEOF
2676
Martin v. Löwis11437992002-04-12 09:54:03 +00002677
2678# Let the site file select an alternate cache file if it wants to.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002679# Prefer an explicitly selected file to automatically selected ones.
2680ac_site_file1=NONE
2681ac_site_file2=NONE
Martin v. Löwiseba40652007-08-30 20:10:57 +00002682if test -n "$CONFIG_SITE"; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002683 # We do not want a PATH search for config.site.
2684 case $CONFIG_SITE in #((
2685 -*) ac_site_file1=./$CONFIG_SITE;;
2686 */*) ac_site_file1=$CONFIG_SITE;;
2687 *) ac_site_file1=./$CONFIG_SITE;;
2688 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00002689elif test "x$prefix" != xNONE; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002690 ac_site_file1=$prefix/share/config.site
2691 ac_site_file2=$prefix/etc/config.site
Martin v. Löwiseba40652007-08-30 20:10:57 +00002692else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002693 ac_site_file1=$ac_default_prefix/share/config.site
2694 ac_site_file2=$ac_default_prefix/etc/config.site
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002695fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002696for ac_site_file in "$ac_site_file1" "$ac_site_file2"
Martin v. Löwiseba40652007-08-30 20:10:57 +00002697do
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002698 test "x$ac_site_file" = xNONE && continue
2699 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2700 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2701$as_echo "$as_me: loading site script $ac_site_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002702 sed 's/^/| /' "$ac_site_file" >&5
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002703 . "$ac_site_file" \
2704 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2705$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2706as_fn_error $? "failed to load site script $ac_site_file
Matthias Klose3cef2a92012-03-14 23:39:33 +01002707See \`config.log' for more details" "$LINENO" 5; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002708 fi
2709done
2710
2711if test -r "$cache_file"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002712 # Some versions of bash will fail to source /dev/null (special files
2713 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2714 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2715 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2716$as_echo "$as_me: loading cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002717 case $cache_file in
Martin v. Löwiseba40652007-08-30 20:10:57 +00002718 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2719 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00002720 esac
2721 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002722else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002723 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2724$as_echo "$as_me: creating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002725 >$cache_file
2726fi
2727
2728# Check that the precious variables saved in the cache have kept the same
2729# value.
2730ac_cache_corrupted=false
Martin v. Löwiseba40652007-08-30 20:10:57 +00002731for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00002732 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2733 eval ac_new_set=\$ac_env_${ac_var}_set
Martin v. Löwiseba40652007-08-30 20:10:57 +00002734 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2735 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00002736 case $ac_old_set,$ac_new_set in
2737 set,)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002738 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2739$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 +00002740 ac_cache_corrupted=: ;;
2741 ,set)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002742 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2743$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002744 ac_cache_corrupted=: ;;
2745 ,);;
2746 *)
2747 if test "x$ac_old_val" != "x$ac_new_val"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002748 # differences in whitespace do not lead to failure.
2749 ac_old_val_w=`echo x $ac_old_val`
2750 ac_new_val_w=`echo x $ac_new_val`
2751 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2752 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2753$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2754 ac_cache_corrupted=:
2755 else
2756 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2757$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2758 eval $ac_var=\$ac_old_val
2759 fi
2760 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2761$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2762 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2763$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002764 fi;;
2765 esac
2766 # Pass precious variables to config.status.
2767 if test "$ac_new_set" = set; then
2768 case $ac_new_val in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002769 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002770 *) ac_arg=$ac_var=$ac_new_val ;;
2771 esac
2772 case " $ac_configure_args " in
2773 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002774 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002775 esac
2776 fi
2777done
2778if $ac_cache_corrupted; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002779 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2780$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2781 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2782$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002783 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002784fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002785## -------------------- ##
2786## Main body of script. ##
2787## -------------------- ##
Martin v. Löwiseba40652007-08-30 20:10:57 +00002788
Guido van Rossum7f43da71994-08-01 12:15:30 +00002789ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002790ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00002791ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2792ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2793ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002794
Guido van Rossum627b2d71993-12-24 10:39:16 +00002795
Michael W. Hudson54241132001-12-07 15:38:26 +00002796
Martin v. Löwiseba40652007-08-30 20:10:57 +00002797ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00002798
2799
doko@python.orgd65e2ba2013-01-31 23:52:03 +01002800ac_aux_dir=
2801for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
2802 if test -f "$ac_dir/install-sh"; then
2803 ac_aux_dir=$ac_dir
2804 ac_install_sh="$ac_aux_dir/install-sh -c"
2805 break
2806 elif test -f "$ac_dir/install.sh"; then
2807 ac_aux_dir=$ac_dir
2808 ac_install_sh="$ac_aux_dir/install.sh -c"
2809 break
2810 elif test -f "$ac_dir/shtool"; then
2811 ac_aux_dir=$ac_dir
2812 ac_install_sh="$ac_aux_dir/shtool install -c"
2813 break
2814 fi
2815done
2816if test -z "$ac_aux_dir"; then
2817 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
2818fi
2819
2820# These three variables are undocumented and unsupported,
2821# and are intended to be withdrawn in a future Autoconf release.
2822# They can cause serious problems if a builder's source tree is in a directory
2823# whose full name contains unusual characters.
2824ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
2825ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
2826ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
2827
2828
2829# Make sure we can run config.sub.
2830$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2831 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
2832
2833{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
2834$as_echo_n "checking build system type... " >&6; }
2835if ${ac_cv_build+:} false; then :
2836 $as_echo_n "(cached) " >&6
2837else
2838 ac_build_alias=$build_alias
2839test "x$ac_build_alias" = x &&
2840 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2841test "x$ac_build_alias" = x &&
2842 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
2843ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2844 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
2845
2846fi
2847{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
2848$as_echo "$ac_cv_build" >&6; }
2849case $ac_cv_build in
2850*-*-*) ;;
2851*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
2852esac
2853build=$ac_cv_build
2854ac_save_IFS=$IFS; IFS='-'
2855set x $ac_cv_build
2856shift
2857build_cpu=$1
2858build_vendor=$2
2859shift; shift
2860# Remember, the first character of IFS is used to create $*,
2861# except with old shells:
2862build_os=$*
2863IFS=$ac_save_IFS
2864case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2865
2866
2867{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
2868$as_echo_n "checking host system type... " >&6; }
2869if ${ac_cv_host+:} false; then :
2870 $as_echo_n "(cached) " >&6
2871else
2872 if test "x$host_alias" = x; then
2873 ac_cv_host=$ac_cv_build
2874else
2875 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2876 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
2877fi
2878
2879fi
2880{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
2881$as_echo "$ac_cv_host" >&6; }
2882case $ac_cv_host in
2883*-*-*) ;;
2884*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
2885esac
2886host=$ac_cv_host
2887ac_save_IFS=$IFS; IFS='-'
2888set x $ac_cv_host
2889shift
2890host_cpu=$1
2891host_vendor=$2
2892shift; shift
2893# Remember, the first character of IFS is used to create $*,
2894# except with old shells:
2895host_os=$*
2896IFS=$ac_save_IFS
2897case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
2898
2899
2900
2901
2902
Ned Deily983df862014-08-22 13:30:59 -07002903# pybuilddir.txt will be created by --generate-posix-vars in the Makefile
2904rm -f pybuilddir.txt
2905
Victor Stinner8a19eb22017-05-05 03:14:23 +02002906for ac_prog in python$PACKAGE_VERSION python3 python
2907do
2908 # Extract the first word of "$ac_prog", so it can be a program name with args.
2909set dummy $ac_prog; ac_word=$2
2910{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2911$as_echo_n "checking for $ac_word... " >&6; }
2912if ${ac_cv_prog_PYTHON_FOR_REGEN+:} false; then :
2913 $as_echo_n "(cached) " >&6
2914else
2915 if test -n "$PYTHON_FOR_REGEN"; then
2916 ac_cv_prog_PYTHON_FOR_REGEN="$PYTHON_FOR_REGEN" # Let the user override the test.
2917else
2918as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2919for as_dir in $PATH
2920do
2921 IFS=$as_save_IFS
2922 test -z "$as_dir" && as_dir=.
2923 for ac_exec_ext in '' $ac_executable_extensions; do
2924 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2925 ac_cv_prog_PYTHON_FOR_REGEN="$ac_prog"
2926 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2927 break 2
2928 fi
2929done
2930 done
2931IFS=$as_save_IFS
2932
2933fi
2934fi
2935PYTHON_FOR_REGEN=$ac_cv_prog_PYTHON_FOR_REGEN
2936if test -n "$PYTHON_FOR_REGEN"; then
2937 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON_FOR_REGEN" >&5
2938$as_echo "$PYTHON_FOR_REGEN" >&6; }
2939else
2940 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2941$as_echo "no" >&6; }
2942fi
2943
2944
2945 test -n "$PYTHON_FOR_REGEN" && break
2946done
2947test -n "$PYTHON_FOR_REGEN" || PYTHON_FOR_REGEN="python3"
2948
2949
2950
doko@python.orgd65e2ba2013-01-31 23:52:03 +01002951if test "$cross_compiling" = yes; then
2952 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for python interpreter for cross build" >&5
2953$as_echo_n "checking for python interpreter for cross build... " >&6; }
2954 if test -z "$PYTHON_FOR_BUILD"; then
2955 for interp in python$PACKAGE_VERSION python2 python; do
2956 which $interp >/dev/null 2>&1 || continue
2957 if $interp -c 'import sys;sys.exit(not (sys.version_info[:2] >= (2,7) and sys.version_info[0] < 3))'; then
2958 break
2959 fi
2960 interp=
2961 done
2962 if test x$interp = x; then
2963 as_fn_error $? "python$PACKAGE_VERSION interpreter not found" "$LINENO" 5
2964 fi
2965 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $interp" >&5
2966$as_echo "$interp" >&6; }
Christian Heimesffa70112017-09-05 17:08:45 +02002967 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 +01002968 fi
2969elif test "$cross_compiling" = maybe; then
2970 as_fn_error $? "Cross compiling required --host=HOST-TUPLE and --build=ARCH" "$LINENO" 5
2971else
2972 PYTHON_FOR_BUILD='./$(BUILDPYTHON) -E'
2973fi
2974
2975
Martin v. Löwis11437992002-04-12 09:54:03 +00002976
Georg Brandlbcd64a32009-03-31 21:45:18 +00002977if test "$prefix" != "/"; then
2978 prefix=`echo "$prefix" | sed -e 's/\/$//g'`
2979fi
2980
2981
Martin v. Löwis11437992002-04-12 09:54:03 +00002982
2983
Martin v. Löwis8316feb2003-06-14 07:48:07 +00002984# We don't use PACKAGE_ variables, and they cause conflicts
2985# with other autoconf-based packages that include Python.h
2986grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
2987rm confdefs.h
2988mv confdefs.h.new confdefs.h
2989
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00002990
Martin v. Löwis174440b2008-10-03 08:59:41 +00002991VERSION=2.7
Guido van Rossum1fd74a71997-07-19 19:36:02 +00002992
Martin v. Löwis1142de32002-03-29 16:28:31 +00002993
2994SOVERSION=1.0
2995
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002996# The later defininition of _XOPEN_SOURCE disables certain features
2997# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
2998
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002999$as_echo "#define _GNU_SOURCE 1" >>confdefs.h
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00003000
3001
Martin v. Löwisbcd93962003-05-03 10:32:18 +00003002# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
3003# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
3004# them.
3005
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003006$as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
Martin v. Löwisbcd93962003-05-03 10:32:18 +00003007
3008
Andrew MacIntyreabccf412003-07-02 13:53:25 +00003009# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
3010# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
3011# them.
3012
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003013$as_echo "#define __BSD_VISIBLE 1" >>confdefs.h
Andrew MacIntyreabccf412003-07-02 13:53:25 +00003014
3015
Martin v. Löwisd6320502004-08-12 13:45:08 +00003016# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
3017# u_int on Irix 5.3. Defining _BSD_TYPES brings it back.
3018
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003019$as_echo "#define _BSD_TYPES 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +00003020
3021
Ronald Oussoren5640ce22008-06-05 12:58:24 +00003022# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
3023# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
3024# them.
3025
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003026$as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
Ronald Oussoren5640ce22008-06-05 12:58:24 +00003027
3028
3029
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003030define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00003031
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00003032# Arguments passed to configure.
3033
3034CONFIG_ARGS="$ac_configure_args"
3035
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003036{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-universalsdk" >&5
3037$as_echo_n "checking for --enable-universalsdk... " >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00003038# Check whether --enable-universalsdk was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003039if test "${enable_universalsdk+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00003040 enableval=$enable_universalsdk;
Ronald Oussoren988117f2006-04-29 11:31:35 +00003041 case $enableval in
3042 yes)
Ned Deilyee8e4b62018-04-14 10:37:28 -04003043 # Locate the best usable SDK, see Mac/README.txt for more
3044 # information
3045 enableval="`/usr/bin/xcodebuild -version -sdk macosx Path 2>/dev/null`"
3046 if ! ( echo $enableval | grep -E '\.sdk' 1>/dev/null )
Ronald Oussoren3c0a1262010-01-17 19:27:57 +00003047 then
Ned Deilyee8e4b62018-04-14 10:37:28 -04003048 enableval=/Developer/SDKs/MacOSX10.4u.sdk
3049 if test ! -d "${enableval}"
3050 then
3051 enableval=/
3052 fi
Ronald Oussoren3c0a1262010-01-17 19:27:57 +00003053 fi
Ronald Oussoren988117f2006-04-29 11:31:35 +00003054 ;;
3055 esac
3056 case $enableval in
3057 no)
3058 UNIVERSALSDK=
3059 enable_universalsdk=
3060 ;;
3061 *)
3062 UNIVERSALSDK=$enableval
Ronald Oussoren3c0a1262010-01-17 19:27:57 +00003063 if test ! -d "${UNIVERSALSDK}"
3064 then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00003065 as_fn_error $? "--enable-universalsdk specifies non-existing SDK: ${UNIVERSALSDK}" "$LINENO" 5
Ronald Oussoren3c0a1262010-01-17 19:27:57 +00003066 fi
Ronald Oussoren988117f2006-04-29 11:31:35 +00003067 ;;
3068 esac
3069
Ronald Oussoren3c0a1262010-01-17 19:27:57 +00003070
Ronald Oussoren988117f2006-04-29 11:31:35 +00003071else
3072
3073 UNIVERSALSDK=
3074 enable_universalsdk=
3075
Martin v. Löwiseba40652007-08-30 20:10:57 +00003076fi
Ronald Oussoren988117f2006-04-29 11:31:35 +00003077
Ronald Oussoren3c0a1262010-01-17 19:27:57 +00003078if test -n "${UNIVERSALSDK}"
3079then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003080 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSALSDK}" >&5
3081$as_echo "${UNIVERSALSDK}" >&6; }
Ronald Oussoren3c0a1262010-01-17 19:27:57 +00003082else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003083 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3084$as_echo "no" >&6; }
Ronald Oussoren3c0a1262010-01-17 19:27:57 +00003085fi
Ronald Oussoren988117f2006-04-29 11:31:35 +00003086
Martin v. Löwiseba40652007-08-30 20:10:57 +00003087
Benjamin Peterson0e6ea5d2008-07-16 20:17:04 +00003088
Ned Deily8e60f6e2013-05-30 00:14:29 -07003089ARCH_RUN_32BIT=""
Benjamin Peterson0e6ea5d2008-07-16 20:17:04 +00003090
Ned Deilyee8e4b62018-04-14 10:37:28 -04003091# For backward compatibility reasons we prefer to select '32-bit' if available,
3092# otherwise use 'intel'
Ronald Oussoren5640ce22008-06-05 12:58:24 +00003093UNIVERSAL_ARCHS="32-bit"
Ned Deilyee8e4b62018-04-14 10:37:28 -04003094if test "`uname -s`" = "Darwin"
3095then
3096 if test -n "${UNIVERSALSDK}"
3097 then
3098 if test -z "`/usr/bin/file -L "${UNIVERSALSDK}/usr/lib/libSystem.dylib" | grep ppc`"
3099 then
3100 UNIVERSAL_ARCHS="intel"
3101 fi
3102 fi
3103fi
3104
Ronald Oussoren92919a62009-12-24 13:30:58 +00003105
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003106{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-universal-archs" >&5
3107$as_echo_n "checking for --with-universal-archs... " >&6; }
Ronald Oussoren5640ce22008-06-05 12:58:24 +00003108
3109# Check whether --with-universal-archs was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003110if test "${with_universal_archs+set}" = set; then :
Ronald Oussoren5640ce22008-06-05 12:58:24 +00003111 withval=$with_universal_archs;
Ronald Oussoren5640ce22008-06-05 12:58:24 +00003112 UNIVERSAL_ARCHS="$withval"
Ronald Oussoren5640ce22008-06-05 12:58:24 +00003113
3114fi
3115
Ned Deilyee8e4b62018-04-14 10:37:28 -04003116if test -n "${UNIVERSALSDK}"
3117then
3118 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSAL_ARCHS}" >&5
3119$as_echo "${UNIVERSAL_ARCHS}" >&6; }
3120else
3121 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3122$as_echo "no" >&6; }
3123fi
Ronald Oussoren5640ce22008-06-05 12:58:24 +00003124
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00003125
3126# Check whether --with-framework-name was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003127if test "${with_framework_name+set}" = set; then :
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00003128 withval=$with_framework_name;
Ronald Oussoren9ebd2422009-09-29 13:00:44 +00003129 if test "${enable_framework}"; then
3130 :
3131 else
Georg Brandl71f4fbb2011-02-25 11:04:50 +00003132 as_fn_error $? "--with-framework-name without --enable-framework. See Mac/README" "$LINENO" 5
Ronald Oussoren9ebd2422009-09-29 13:00:44 +00003133 fi
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00003134 PYTHONFRAMEWORK=${withval}
3135 PYTHONFRAMEWORKDIR=${withval}.framework
3136 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
3137
3138else
3139
3140 PYTHONFRAMEWORK=Python
3141 PYTHONFRAMEWORKDIR=Python.framework
3142 PYTHONFRAMEWORKIDENTIFIER=org.python.python
3143
3144fi
3145
Martin v. Löwiseba40652007-08-30 20:10:57 +00003146# Check whether --enable-framework was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003147if test "${enable_framework+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00003148 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00003149 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00003150 yes)
Jack Jansene578a632001-08-15 01:27:14 +00003151 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00003152 esac
3153 case $enableval in
3154 no)
3155 PYTHONFRAMEWORK=
3156 PYTHONFRAMEWORKDIR=no-framework
3157 PYTHONFRAMEWORKPREFIX=
3158 PYTHONFRAMEWORKINSTALLDIR=
Ronald Oussoren567a8ff2006-05-26 11:43:26 +00003159 FRAMEWORKINSTALLFIRST=
3160 FRAMEWORKINSTALLLAST=
Ronald Oussoren5b787322006-06-06 19:50:24 +00003161 FRAMEWORKALTINSTALLFIRST=
3162 FRAMEWORKALTINSTALLLAST=
Ronald Oussoren2db3a8f2006-06-07 19:06:01 +00003163 if test "x${prefix}" = "xNONE"; then
3164 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3165 else
3166 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3167 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00003168 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00003169 ;;
3170 *)
Ronald Oussoren01d149f2010-04-30 11:20:14 +00003171 PYTHONFRAMEWORKPREFIX="${enableval}"
Jack Jansen127e56e2001-09-11 14:41:54 +00003172 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Ronald Oussoren567a8ff2006-05-26 11:43:26 +00003173 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussoren5640ce22008-06-05 12:58:24 +00003174 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure bininstall maninstall"
Ronald Oussoren92919a62009-12-24 13:30:58 +00003175 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
3176 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
Ronald Oussoren01d149f2010-04-30 11:20:14 +00003177 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
Ronald Oussoren5640ce22008-06-05 12:58:24 +00003178
Ronald Oussoren2db3a8f2006-06-07 19:06:01 +00003179 if test "x${prefix}" = "xNONE" ; then
3180 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
Ronald Oussoren01d149f2010-04-30 11:20:14 +00003181
Ronald Oussoren2db3a8f2006-06-07 19:06:01 +00003182 else
3183 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3184 fi
Ronald Oussoren01d149f2010-04-30 11:20:14 +00003185
3186 case "${enableval}" in
3187 /System*)
3188 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3189 if test "${prefix}" = "NONE" ; then
3190 # See below
3191 FRAMEWORKUNIXTOOLSPREFIX="/usr"
3192 fi
3193 ;;
3194
3195 /Library*)
3196 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3197 ;;
3198
3199 */Library/Frameworks)
3200 MDIR="`dirname "${enableval}"`"
3201 MDIR="`dirname "${MDIR}"`"
3202 FRAMEWORKINSTALLAPPSPREFIX="${MDIR}/Applications"
3203
3204 if test "${prefix}" = "NONE"; then
3205 # User hasn't specified the
3206 # --prefix option, but wants to install
3207 # the framework in a non-default location,
3208 # ensure that the compatibility links get
3209 # installed relative to that prefix as well
3210 # instead of in /usr/local.
3211 FRAMEWORKUNIXTOOLSPREFIX="${MDIR}"
3212 fi
3213 ;;
3214
3215 *)
3216 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3217 ;;
3218 esac
3219
Jack Jansen127e56e2001-09-11 14:41:54 +00003220 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Ronald Oussoren836b0392006-05-14 19:56:34 +00003221
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00003222 # Add files for Mac specific code to the list of output
Ronald Oussoren836b0392006-05-14 19:56:34 +00003223 # files:
Martin v. Löwiseba40652007-08-30 20:10:57 +00003224 ac_config_files="$ac_config_files Mac/Makefile"
Ronald Oussoren836b0392006-05-14 19:56:34 +00003225
Martin v. Löwiseba40652007-08-30 20:10:57 +00003226 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Ronald Oussoren836b0392006-05-14 19:56:34 +00003227
Martin v. Löwiseba40652007-08-30 20:10:57 +00003228 ac_config_files="$ac_config_files Mac/IDLE/Makefile"
Ronald Oussoren836b0392006-05-14 19:56:34 +00003229
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00003230 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
3231
3232 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
3233
Jack Jansene578a632001-08-15 01:27:14 +00003234 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003235
Guido van Rossum563e7081996-09-10 18:20:48 +00003236else
Martin v. Löwis11437992002-04-12 09:54:03 +00003237
Jack Jansene578a632001-08-15 01:27:14 +00003238 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00003239 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00003240 PYTHONFRAMEWORKPREFIX=
3241 PYTHONFRAMEWORKINSTALLDIR=
Ronald Oussoren567a8ff2006-05-26 11:43:26 +00003242 FRAMEWORKINSTALLFIRST=
3243 FRAMEWORKINSTALLLAST=
Ronald Oussoren5b787322006-06-06 19:50:24 +00003244 FRAMEWORKALTINSTALLFIRST=
3245 FRAMEWORKALTINSTALLLAST=
Ronald Oussoren2db3a8f2006-06-07 19:06:01 +00003246 if test "x${prefix}" = "xNONE" ; then
3247 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3248 else
3249 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3250 fi
Jack Jansene578a632001-08-15 01:27:14 +00003251 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003252
Ronald Oussoren5640ce22008-06-05 12:58:24 +00003253
Martin v. Löwiseba40652007-08-30 20:10:57 +00003254fi
3255
Michael W. Hudson54241132001-12-07 15:38:26 +00003256
3257
3258
3259
Jack Jansene578a632001-08-15 01:27:14 +00003260
Ronald Oussoren567a8ff2006-05-26 11:43:26 +00003261
3262
Ronald Oussoren5b787322006-06-06 19:50:24 +00003263
3264
3265
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00003266
Ronald Oussoren01d149f2010-04-30 11:20:14 +00003267
Jack Jansene578a632001-08-15 01:27:14 +00003268##AC_ARG_WITH(dyld,
Matthias Klose22520ea2010-05-08 10:14:46 +00003269## AS_HELP_STRING([--with-dyld],
3270## [Use (OpenStep|Rhapsody) dynamic linker]))
Jack Jansene578a632001-08-15 01:27:14 +00003271##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003272# Set name for machine-dependent library files
3273
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003274{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP" >&5
3275$as_echo_n "checking MACHDEP... " >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003276if test -z "$MACHDEP"
3277then
doko@python.orgd65e2ba2013-01-31 23:52:03 +01003278 # avoid using uname for cross builds
3279 if test "$cross_compiling" = yes; then
3280 # ac_sys_system and ac_sys_release are only used for setting
3281 # `define_xopen_source' in the case statement below. For the
3282 # current supported cross builds, this macro is not adjusted.
3283 case "$host" in
3284 *-*-linux*)
3285 ac_sys_system=Linux
3286 ;;
3287 *-*-cygwin*)
3288 ac_sys_system=Cygwin
3289 ;;
3290 *)
3291 # for now, limit cross builds to known configurations
3292 MACHDEP="unknown"
3293 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3294 esac
3295 ac_sys_release=
3296 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003297 ac_sys_system=`uname -s`
Georg Brandlfe18a112009-09-04 07:55:14 +00003298 if test "$ac_sys_system" = "AIX" \
Martin v. Löwis21ee4092002-09-30 16:19:48 +00003299 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00003300 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003301 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003302 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003303 fi
doko@python.orgd65e2ba2013-01-31 23:52:03 +01003304 fi
3305 ac_md_system=`echo $ac_sys_system |
3306 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
3307 ac_md_release=`echo $ac_sys_release |
3308 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
3309 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00003310
doko@python.orgd65e2ba2013-01-31 23:52:03 +01003311 case $MACHDEP in
Victor Stinneracacbaa2011-08-20 14:02:38 +02003312 linux*) MACHDEP="linux2";;
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00003313 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00003314 darwin*) MACHDEP="darwin";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00003315 atheos*) MACHDEP="atheos";;
Martin v. Löwisf3322282003-07-13 09:46:13 +00003316 irix646) MACHDEP="irix6";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00003317 '') MACHDEP="unknown";;
doko@python.orgd65e2ba2013-01-31 23:52:03 +01003318 esac
3319fi
3320
3321
3322if test "$cross_compiling" = yes; then
3323 case "$host" in
3324 *-*-linux*)
3325 case "$host_cpu" in
3326 arm*)
3327 _host_cpu=arm
3328 ;;
3329 *)
3330 _host_cpu=$host_cpu
3331 esac
3332 ;;
3333 *-*-cygwin*)
3334 _host_cpu=
3335 ;;
3336 *)
3337 # for now, limit cross builds to known configurations
3338 MACHDEP="unknown"
3339 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003340 esac
doko@python.orgd65e2ba2013-01-31 23:52:03 +01003341 _PYTHON_HOST_PLATFORM="$MACHDEP${_host_cpu:+-$_host_cpu}"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003342fi
Guido van Rossum91922671997-10-09 20:24:13 +00003343
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003344# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
3345# disable features if it is defined, without any means to access these
3346# features as extensions. For these systems, we skip the definition of
3347# _XOPEN_SOURCE. Before adding a system to the list to gain access to
3348# some feature, make sure there is no alternative way to access this
3349# feature. Also, when using wildcards, make sure you have verified the
3350# need for not defining _XOPEN_SOURCE on all systems matching the
3351# wildcard, and that the wildcard does not include future systems
3352# (which may remove their limitations).
3353case $ac_sys_system/$ac_sys_release in
3354 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
3355 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00003356 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Martin v. Löwis7875ef62010-02-15 21:41:12 +00003357 # In addition, Stefan Krah confirms that issue #1244610 exists through
3358 # OpenBSD 4.6, but is fixed in 4.7.
Charles-François Natali97781b02011-07-22 23:43:42 +02003359 OpenBSD/2.* | OpenBSD/3.* | OpenBSD/4.[0123456])
Martin v. Löwiscb78de62007-12-29 18:49:21 +00003360 define_xopen_source=no
3361 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3362 # also defined. This can be overridden by defining _BSD_SOURCE
3363 # As this has a different meaning on Linux, only define it on OpenBSD
3364
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003365$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Martin v. Löwiscb78de62007-12-29 18:49:21 +00003366
3367 ;;
Charles-François Natali97781b02011-07-22 23:43:42 +02003368 OpenBSD/*)
Martin v. Löwis5e2dd862010-02-15 08:32:00 +00003369 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3370 # also defined. This can be overridden by defining _BSD_SOURCE
3371 # As this has a different meaning on Linux, only define it on OpenBSD
3372
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003373$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Martin v. Löwis5e2dd862010-02-15 08:32:00 +00003374
3375 ;;
Martin v. Löwis4d542ec2006-11-25 15:39:19 +00003376 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
3377 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
3378 # Marc Recht
Benjamin Petersoneac68f42008-11-16 17:54:55 +00003379 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 +00003380 define_xopen_source=no;;
Martin v. Löwisb41afb52010-05-28 15:28:47 +00003381 # From the perspective of Solaris, _XOPEN_SOURCE is not so much a
3382 # request to enable features supported by the standard as a request
3383 # to disable features not supported by the standard. The best way
3384 # for Python to use Solaris is simply to leave _XOPEN_SOURCE out
3385 # entirely and define __EXTENSIONS__ instead.
3386 SunOS/*)
Martin v. Löwisa9d71422003-03-28 18:43:31 +00003387 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003388 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
3389 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00003390 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00003391 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003392 define_xopen_source=no;;
3393 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003394 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003395 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003396 define_xopen_source=no;;
Martin v. Löwisbb86d832008-11-04 20:40:09 +00003397 # On FreeBSD 4, the math functions C89 does not cover are never defined
3398 # with _XOPEN_SOURCE and __BSD_VISIBLE does not re-enable them.
3399 FreeBSD/4.*)
3400 define_xopen_source=no;;
3401 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
3402 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
3403 # identifies itself as Darwin/7.*
3404 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3405 # disables platform specific features beyond repair.
3406 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3407 # has no effect, don't bother defining them
3408 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00003409 define_xopen_source=no;;
Ronald Oussorena55af9a2010-01-17 16:25:57 +00003410 Darwin/1[0-9].*)
3411 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003412 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
3413 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
3414 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00003415 AIX/4)
3416 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003417 AIX/5)
3418 if test `uname -r` -eq 1; then
3419 define_xopen_source=no
3420 fi
3421 ;;
Martin v. Löwis8c255e42008-05-23 15:06:50 +00003422 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
3423 # defining NI_NUMERICHOST.
3424 QNX/6.3.2)
3425 define_xopen_source=no
3426 ;;
Martin v. Löwisa0588362006-04-04 06:03:50 +00003427
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003428esac
3429
3430if test $define_xopen_source = yes
3431then
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003432
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003433$as_echo "#define _XOPEN_SOURCE 600" >>confdefs.h
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003434
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003435
3436 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
3437 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
3438 # several APIs are not declared. Since this is also needed in some
3439 # cases for HP-UX, we define it globally.
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003440
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003441$as_echo "#define _XOPEN_SOURCE_EXTENDED 1" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003442
3443
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003444
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003445$as_echo "#define _POSIX_C_SOURCE 200112L" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003446
3447
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003448fi
3449
Guido van Rossum91922671997-10-09 20:24:13 +00003450#
3451# SGI compilers allow the specification of the both the ABI and the
3452# ISA on the command line. Depending on the values of these switches,
Martin Panterb1d867f2016-05-26 05:28:50 +00003453# different and often incompatible code will be generated.
Guido van Rossum91922671997-10-09 20:24:13 +00003454#
3455# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
3456# thus supply support for various ABI/ISA combinations. The MACHDEP
3457# variable is also adjusted.
3458#
3459
3460if test ! -z "$SGI_ABI"
3461then
3462 CC="cc $SGI_ABI"
3463 LDFLAGS="$SGI_ABI $LDFLAGS"
3464 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
3465fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003466{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP" >&5
3467$as_echo "$MACHDEP" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003468
doko@ubuntu.coma50b0de2015-04-13 21:55:59 +02003469
3470PLATDIR=plat-$MACHDEP
3471
Jack Jansen83f898c2002-12-30 22:23:40 +00003472# And add extra plat-mac for darwin
3473
Jack Jansen7b59b422003-03-17 15:44:10 +00003474
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003475{ $as_echo "$as_me:${as_lineno-$LINENO}: checking EXTRAPLATDIR" >&5
3476$as_echo_n "checking EXTRAPLATDIR... " >&6; }
Jack Jansen83f898c2002-12-30 22:23:40 +00003477if test -z "$EXTRAPLATDIR"
3478then
3479 case $MACHDEP in
Jack Jansen7b59b422003-03-17 15:44:10 +00003480 darwin)
3481 EXTRAPLATDIR="\$(PLATMACDIRS)"
3482 EXTRAMACHDEPPATH="\$(PLATMACPATH)"
3483 ;;
3484 *)
3485 EXTRAPLATDIR=""
3486 EXTRAMACHDEPPATH=""
3487 ;;
Jack Jansen83f898c2002-12-30 22:23:40 +00003488 esac
3489fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003490{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXTRAPLATDIR" >&5
3491$as_echo "$EXTRAPLATDIR" >&6; }
Jack Jansen83f898c2002-12-30 22:23:40 +00003492
Jack Jansen6b08a402004-06-03 12:41:45 +00003493# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
3494# it may influence the way we can build extensions, so distutils
3495# needs to check it
3496
Ronald Oussoren988117f2006-04-29 11:31:35 +00003497
Jack Jansen6b08a402004-06-03 12:41:45 +00003498CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Ronald Oussoren988117f2006-04-29 11:31:35 +00003499EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00003500
Guido van Rossum627b2d71993-12-24 10:39:16 +00003501# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00003502
3503# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
3504# for debug/optimization stuff. BASECFLAGS is for flags that are required
3505# just to get things to compile and link. Users are free to override OPT
3506# when running configure or make. The build should not break if they do.
3507# BASECFLAGS should generally not be messed with, however.
3508
3509# XXX shouldn't some/most/all of this code be merged with the stuff later
3510# on that fiddles with OPT and BASECFLAGS?
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003511{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --without-gcc" >&5
3512$as_echo_n "checking for --without-gcc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003513
Martin v. Löwiseba40652007-08-30 20:10:57 +00003514# Check whether --with-gcc was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003515if test "${with_gcc+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00003516 withval=$with_gcc;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003517 case $withval in
Mark Dickinson04b27232009-01-04 12:29:36 +00003518 no) CC=${CC:-cc}
Guido van Rossumda88dad1995-01-26 00:46:29 +00003519 without_gcc=yes;;
3520 yes) CC=gcc
3521 without_gcc=no;;
3522 *) CC=$withval
3523 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003524 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00003525else
Martin v. Löwis11437992002-04-12 09:54:03 +00003526
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003527 case $ac_sys_system in
Antoine Pitrou285cd162010-09-21 15:23:17 +00003528 AIX*) CC=${CC:-xlc_r}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003529 without_gcc=;;
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003530 BeOS*)
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003531 case $BE_HOST_CPU in
3532 ppc)
Fred Drake5790be12000-10-09 17:06:13 +00003533 CC=mwcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003534 without_gcc=yes
Skip Montanarodecc6a42003-01-01 20:07:49 +00003535 BASECFLAGS="$BASECFLAGS -export pragma"
3536 OPT="$OPT -O"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003537 LDFLAGS="$LDFLAGS -nodup"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003538 ;;
3539 x86)
Fred Drake5790be12000-10-09 17:06:13 +00003540 CC=gcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003541 without_gcc=no
Skip Montanarodecc6a42003-01-01 20:07:49 +00003542 OPT="$OPT -O"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003543 ;;
3544 *)
Georg Brandl71f4fbb2011-02-25 11:04:50 +00003545 as_fn_error $? "Unknown BeOS platform \"$BE_HOST_CPU\"" "$LINENO" 5
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003546 ;;
3547 esac
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003548 AR="\$(srcdir)/Modules/ar_beos"
3549 RANLIB=:
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003550 ;;
Martin v. Löwis130fb172001-07-19 11:00:41 +00003551 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00003552 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00003553fi
3554
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003555{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $without_gcc" >&5
3556$as_echo "$without_gcc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003557
Zachary Ware6ed42ea2015-12-21 11:43:03 -06003558{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-icc" >&5
3559$as_echo_n "checking for --with-icc... " >&6; }
3560
3561# Check whether --with-icc was given.
3562if test "${with_icc+set}" = set; then :
3563 withval=$with_icc;
3564 case $withval in
3565 no) CC=${CC:-cc}
3566 with_icc=no;;
3567 yes) CC=icc
3568 CXX=icpc
3569 with_icc=yes;;
3570 *) CC=$withval
3571 with_icc=$withval;;
3572 esac
3573else
3574
3575 with_icc=no
3576fi
3577
3578{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_icc" >&5
3579$as_echo "$with_icc" >&6; }
3580
Guido van Rossum8b131c51995-03-09 14:10:13 +00003581# If the user switches compilers, we can't believe the cache
3582if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
3583then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00003584 as_fn_error $? "cached CC is different -- throw away $cache_file
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003585(it is also a good idea to do 'make clean' before compiling)" "$LINENO" 5
Guido van Rossum8b131c51995-03-09 14:10:13 +00003586fi
3587
Trent Nelson15daa352012-12-13 06:46:39 +00003588if test "$MACHDEP" = "irix6" && test "$CC" != "gcc"; then
3589 # Normally, MIPSpro CC treats #error directives as warnings, which means
3590 # a successful exit code is returned (0). This is a problem because IRIX
3591 # has a bunch of system headers with this guard at the top:
3592 #
3593 # #ifndef __c99
3594 # #error This header file is to be used only for c99 mode compilations
3595 # #else
3596 #
3597 # When autoconf tests for such a header, like stdint.h, this happens:
3598 #
3599 # configure:4619: cc -c conftest.c >&5
3600 # cc-1035 cc: WARNING File = /usr/include/stdint.h, Line = 5
3601 # #error directive: This header file is to be used only for c99 mode
3602 # compilations
3603 #
3604 # #error This header file is to be used only for c99 mode compilations
3605 # ^
3606 #
3607 # configure:4619: $? = 0
3608 # configure:4619: result: yes
3609 #
3610 # Therefore, we use `-diag_error 1035` to have the compiler treat the
3611 # warning as an error, which causes cc to return a non-zero result,
3612 # which autoconf can interpret correctly.
3613 CFLAGS="$CFLAGS -diag_error 1035"
3614 # Whilst we're here, we might as well make sure CXX defaults to something
3615 # sensible if we're not using gcc.
3616 if test -z "$CXX"; then
3617 CXX="CC"
3618 fi
3619fi
3620
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00003621# If the user set CFLAGS, use this instead of the automatically
3622# determined setting
3623preset_cflags="$CFLAGS"
Martin v. Löwis11437992002-04-12 09:54:03 +00003624ac_ext=c
3625ac_cpp='$CPP $CPPFLAGS'
3626ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3627ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3628ac_compiler_gnu=$ac_cv_c_compiler_gnu
3629if test -n "$ac_tool_prefix"; then
3630 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3631set dummy ${ac_tool_prefix}gcc; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003632{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3633$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01003634if ${ac_cv_prog_CC+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003635 $as_echo_n "(cached) " >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003636else
3637 if test -n "$CC"; then
3638 ac_cv_prog_CC="$CC" # Let the user override the test.
3639else
Martin v. Löwis11437992002-04-12 09:54:03 +00003640as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3641for as_dir in $PATH
3642do
3643 IFS=$as_save_IFS
3644 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003645 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01003646 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003647 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003648 $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 +00003649 break 2
3650 fi
3651done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003652 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003653IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003654
Jack Jansendd19cf82001-12-06 22:36:17 +00003655fi
3656fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003657CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00003658if test -n "$CC"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003659 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3660$as_echo "$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003661else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003662 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3663$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003664fi
3665
Martin v. Löwiseba40652007-08-30 20:10:57 +00003666
Martin v. Löwis11437992002-04-12 09:54:03 +00003667fi
3668if test -z "$ac_cv_prog_CC"; then
3669 ac_ct_CC=$CC
3670 # Extract the first word of "gcc", so it can be a program name with args.
3671set dummy gcc; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003672{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3673$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01003674if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003675 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003676else
3677 if test -n "$ac_ct_CC"; then
3678 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3679else
3680as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3681for as_dir in $PATH
3682do
3683 IFS=$as_save_IFS
3684 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003685 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01003686 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003687 ac_cv_prog_ac_ct_CC="gcc"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003688 $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 +00003689 break 2
3690 fi
3691done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003692 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003693IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003694
3695fi
3696fi
3697ac_ct_CC=$ac_cv_prog_ac_ct_CC
3698if test -n "$ac_ct_CC"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003699 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3700$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003701else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003702 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3703$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003704fi
3705
Martin v. Löwiseba40652007-08-30 20:10:57 +00003706 if test "x$ac_ct_CC" = x; then
3707 CC=""
3708 else
3709 case $cross_compiling:$ac_tool_warned in
3710yes:)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003711{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3712$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00003713ac_tool_warned=yes ;;
3714esac
3715 CC=$ac_ct_CC
3716 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003717else
3718 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00003719fi
3720
Jack Jansendd19cf82001-12-06 22:36:17 +00003721if test -z "$CC"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00003722 if test -n "$ac_tool_prefix"; then
3723 # 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 +00003724set dummy ${ac_tool_prefix}cc; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003725{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3726$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01003727if ${ac_cv_prog_CC+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003728 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00003729else
3730 if test -n "$CC"; then
3731 ac_cv_prog_CC="$CC" # Let the user override the test.
3732else
Martin v. Löwis11437992002-04-12 09:54:03 +00003733as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3734for as_dir in $PATH
3735do
3736 IFS=$as_save_IFS
3737 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003738 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01003739 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003740 ac_cv_prog_CC="${ac_tool_prefix}cc"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003741 $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 +00003742 break 2
3743 fi
3744done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003745 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003746IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003747
3748fi
3749fi
3750CC=$ac_cv_prog_CC
3751if test -n "$CC"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003752 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3753$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003754else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003755 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3756$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003757fi
3758
Martin v. Löwiseba40652007-08-30 20:10:57 +00003759
Martin v. Löwis11437992002-04-12 09:54:03 +00003760 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003761fi
3762if test -z "$CC"; then
3763 # Extract the first word of "cc", so it can be a program name with args.
3764set dummy cc; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003765{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3766$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01003767if ${ac_cv_prog_CC+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003768 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003769else
3770 if test -n "$CC"; then
3771 ac_cv_prog_CC="$CC" # Let the user override the test.
3772else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003773 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003774as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3775for as_dir in $PATH
3776do
3777 IFS=$as_save_IFS
3778 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003779 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01003780 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003781 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3782 ac_prog_rejected=yes
3783 continue
3784 fi
3785 ac_cv_prog_CC="cc"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003786 $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 +00003787 break 2
3788 fi
3789done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003790 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003791IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003792
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003793if test $ac_prog_rejected = yes; then
3794 # We found a bogon in the path, so make sure we never use it.
3795 set dummy $ac_cv_prog_CC
3796 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00003797 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003798 # We chose a different compiler from the bogus one.
3799 # However, it has the same basename, so the bogon will be chosen
3800 # first if we set CC to just the basename; use the full file name.
3801 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00003802 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003803 fi
3804fi
3805fi
3806fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003807CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003808if test -n "$CC"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003809 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3810$as_echo "$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003811else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003812 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3813$as_echo "no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003814fi
3815
Martin v. Löwiseba40652007-08-30 20:10:57 +00003816
Martin v. Löwis11437992002-04-12 09:54:03 +00003817fi
3818if test -z "$CC"; then
3819 if test -n "$ac_tool_prefix"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00003820 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003821 do
3822 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3823set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003824{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3825$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01003826if ${ac_cv_prog_CC+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003827 $as_echo_n "(cached) " >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003828else
3829 if test -n "$CC"; then
3830 ac_cv_prog_CC="$CC" # Let the user override the test.
3831else
Martin v. Löwis11437992002-04-12 09:54:03 +00003832as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3833for as_dir in $PATH
3834do
3835 IFS=$as_save_IFS
3836 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003837 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01003838 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003839 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003840 $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 +00003841 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00003842 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003843done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003844 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003845IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003846
3847fi
3848fi
3849CC=$ac_cv_prog_CC
3850if test -n "$CC"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003851 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3852$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003853else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003854 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3855$as_echo "no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003856fi
3857
Martin v. Löwiseba40652007-08-30 20:10:57 +00003858
Martin v. Löwis11437992002-04-12 09:54:03 +00003859 test -n "$CC" && break
3860 done
3861fi
3862if test -z "$CC"; then
3863 ac_ct_CC=$CC
Martin v. Löwiseba40652007-08-30 20:10:57 +00003864 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003865do
3866 # Extract the first word of "$ac_prog", so it can be a program name with args.
3867set dummy $ac_prog; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003868{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3869$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01003870if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003871 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003872else
3873 if test -n "$ac_ct_CC"; then
3874 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3875else
3876as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3877for as_dir in $PATH
3878do
3879 IFS=$as_save_IFS
3880 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003881 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01003882 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003883 ac_cv_prog_ac_ct_CC="$ac_prog"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003884 $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 +00003885 break 2
3886 fi
3887done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003888 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003889IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00003890
Martin v. Löwis11437992002-04-12 09:54:03 +00003891fi
3892fi
3893ac_ct_CC=$ac_cv_prog_ac_ct_CC
3894if test -n "$ac_ct_CC"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003895 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3896$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003897else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003898 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3899$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003900fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003901
Martin v. Löwiseba40652007-08-30 20:10:57 +00003902
Martin v. Löwis11437992002-04-12 09:54:03 +00003903 test -n "$ac_ct_CC" && break
3904done
Michael W. Hudson54241132001-12-07 15:38:26 +00003905
Martin v. Löwiseba40652007-08-30 20:10:57 +00003906 if test "x$ac_ct_CC" = x; then
3907 CC=""
3908 else
3909 case $cross_compiling:$ac_tool_warned in
3910yes:)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003911{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3912$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00003913ac_tool_warned=yes ;;
3914esac
3915 CC=$ac_ct_CC
3916 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003917fi
3918
3919fi
3920
3921
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003922test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3923$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00003924as_fn_error $? "no acceptable C compiler found in \$PATH
Matthias Klose3cef2a92012-03-14 23:39:33 +01003925See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003926
3927# Provide some information about the compiler.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003928$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3929set X $ac_compile
3930ac_compiler=$2
3931for ac_option in --version -v -V -qversion; do
3932 { { ac_try="$ac_compiler $ac_option >&5"
Martin v. Löwiseba40652007-08-30 20:10:57 +00003933case "(($ac_try" in
3934 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3935 *) ac_try_echo=$ac_try;;
3936esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003937eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3938$as_echo "$ac_try_echo"; } >&5
3939 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003940 ac_status=$?
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003941 if test -s conftest.err; then
3942 sed '10a\
3943... rest of stderr output deleted ...
3944 10q' conftest.err >conftest.er1
3945 cat conftest.er1 >&5
3946 fi
3947 rm -f conftest.er1 conftest.err
3948 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3949 test $ac_status = 0; }
3950done
Martin v. Löwis11437992002-04-12 09:54:03 +00003951
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003952cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003953/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00003954
Martin v. Löwis11437992002-04-12 09:54:03 +00003955int
3956main ()
3957{
3958
3959 ;
3960 return 0;
3961}
3962_ACEOF
3963ac_clean_files_save=$ac_clean_files
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003964ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00003965# Try to create an executable without -o first, disregard a.out.
3966# It will help us diagnose broken compilers, and finding out an intuition
3967# of exeext.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003968{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3969$as_echo_n "checking whether the C compiler works... " >&6; }
3970ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3971
3972# The possible output files:
3973ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3974
Martin v. Löwiseba40652007-08-30 20:10:57 +00003975ac_rmfiles=
3976for ac_file in $ac_files
3977do
3978 case $ac_file in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003979 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00003980 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3981 esac
3982done
3983rm -f $ac_rmfiles
3984
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003985if { { ac_try="$ac_link_default"
Martin v. Löwiseba40652007-08-30 20:10:57 +00003986case "(($ac_try" in
3987 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3988 *) ac_try_echo=$ac_try;;
3989esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003990eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3991$as_echo "$ac_try_echo"; } >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003992 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003993 ac_status=$?
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003994 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3995 test $ac_status = 0; }; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00003996 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3997# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3998# in a Makefile. We should not override ac_cv_exeext if it was cached,
3999# so that the user can short-circuit this test for compilers unknown to
4000# Autoconf.
4001for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00004002do
4003 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00004004 case $ac_file in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004005 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
Skip Montanarof0d5f792004-08-15 14:08:23 +00004006 ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004007 [ab].out )
Skip Montanarof0d5f792004-08-15 14:08:23 +00004008 # We found the default executable, but exeext='' is most
4009 # certainly right.
4010 break;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004011 *.* )
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004012 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
Martin v. Löwiseba40652007-08-30 20:10:57 +00004013 then :; else
4014 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4015 fi
4016 # We set ac_cv_exeext here because the later test for it is not
4017 # safe: cross compilers may not add the suffix if given an `-o'
4018 # argument, so we may need to know it at that point already.
4019 # Even if this section looks crufty: it has the advantage of
4020 # actually working.
Skip Montanarof0d5f792004-08-15 14:08:23 +00004021 break;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004022 * )
Skip Montanarof0d5f792004-08-15 14:08:23 +00004023 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004024 esac
4025done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004026test "$ac_cv_exeext" = no && ac_cv_exeext=
4027
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004028else
Martin v. Löwiseba40652007-08-30 20:10:57 +00004029 ac_file=''
4030fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004031if test -z "$ac_file"; then :
4032 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4033$as_echo "no" >&6; }
4034$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004035sed 's/^/| /' conftest.$ac_ext >&5
4036
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004037{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4038$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004039as_fn_error 77 "C compiler cannot create executables
Matthias Klose3cef2a92012-03-14 23:39:33 +01004040See \`config.log' for more details" "$LINENO" 5; }
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004041else
4042 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4043$as_echo "yes" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004044fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004045{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
4046$as_echo_n "checking for C compiler default output file name... " >&6; }
4047{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
4048$as_echo "$ac_file" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004049ac_exeext=$ac_cv_exeext
Michael W. Hudson54241132001-12-07 15:38:26 +00004050
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004051rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
Martin v. Löwis11437992002-04-12 09:54:03 +00004052ac_clean_files=$ac_clean_files_save
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004053{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
4054$as_echo_n "checking for suffix of executables... " >&6; }
4055if { { ac_try="$ac_link"
Martin v. Löwiseba40652007-08-30 20:10:57 +00004056case "(($ac_try" in
4057 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4058 *) ac_try_echo=$ac_try;;
4059esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004060eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4061$as_echo "$ac_try_echo"; } >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00004062 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004063 ac_status=$?
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004064 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4065 test $ac_status = 0; }; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004066 # If both `conftest.exe' and `conftest' are `present' (well, observable)
4067# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
4068# work properly (i.e., refer to `conftest.exe'), while it won't with
4069# `rm'.
Skip Montanaro6dead952003-09-25 14:50:04 +00004070for ac_file in conftest.exe conftest conftest.*; do
4071 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00004072 case $ac_file in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004073 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004074 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
Skip Montanarof0d5f792004-08-15 14:08:23 +00004075 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004076 * ) break;;
4077 esac
4078done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004079else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004080 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4081$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004082as_fn_error $? "cannot compute suffix of executables: cannot compile and link
Matthias Klose3cef2a92012-03-14 23:39:33 +01004083See \`config.log' for more details" "$LINENO" 5; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004084fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004085rm -f conftest conftest$ac_cv_exeext
4086{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
4087$as_echo "$ac_cv_exeext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004088
4089rm -f conftest.$ac_ext
4090EXEEXT=$ac_cv_exeext
4091ac_exeext=$EXEEXT
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004092cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4093/* end confdefs.h. */
4094#include <stdio.h>
4095int
4096main ()
4097{
4098FILE *f = fopen ("conftest.out", "w");
4099 return ferror (f) || fclose (f) != 0;
4100
4101 ;
4102 return 0;
4103}
Skip Montanaro6dead952003-09-25 14:50:04 +00004104_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004105ac_clean_files="$ac_clean_files conftest.out"
4106# Check that the compiler produces executables we can run. If not, either
4107# the compiler is broken, or we cross compile.
4108{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
4109$as_echo_n "checking whether we are cross compiling... " >&6; }
4110if test "$cross_compiling" != yes; then
4111 { { ac_try="$ac_link"
4112case "(($ac_try" in
4113 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4114 *) ac_try_echo=$ac_try;;
4115esac
4116eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4117$as_echo "$ac_try_echo"; } >&5
4118 (eval "$ac_link") 2>&5
4119 ac_status=$?
4120 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4121 test $ac_status = 0; }
4122 if { ac_try='./conftest$ac_cv_exeext'
4123 { { case "(($ac_try" in
4124 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4125 *) ac_try_echo=$ac_try;;
4126esac
4127eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4128$as_echo "$ac_try_echo"; } >&5
4129 (eval "$ac_try") 2>&5
4130 ac_status=$?
4131 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4132 test $ac_status = 0; }; }; then
4133 cross_compiling=no
4134 else
4135 if test "$cross_compiling" = maybe; then
4136 cross_compiling=yes
4137 else
4138 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4139$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004140as_fn_error $? "cannot run C compiled programs.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004141If you meant to cross compile, use \`--host'.
Matthias Klose3cef2a92012-03-14 23:39:33 +01004142See \`config.log' for more details" "$LINENO" 5; }
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004143 fi
4144 fi
4145fi
4146{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
4147$as_echo "$cross_compiling" >&6; }
4148
4149rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
4150ac_clean_files=$ac_clean_files_save
4151{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
4152$as_echo_n "checking for suffix of object files... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01004153if ${ac_cv_objext+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004154 $as_echo_n "(cached) " >&6
4155else
4156 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004157/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004158
Martin v. Löwis11437992002-04-12 09:54:03 +00004159int
4160main ()
4161{
4162
4163 ;
4164 return 0;
4165}
4166_ACEOF
4167rm -f conftest.o conftest.obj
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004168if { { ac_try="$ac_compile"
Martin v. Löwiseba40652007-08-30 20:10:57 +00004169case "(($ac_try" in
4170 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4171 *) ac_try_echo=$ac_try;;
4172esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004173eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4174$as_echo "$ac_try_echo"; } >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00004175 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004176 ac_status=$?
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004177 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4178 test $ac_status = 0; }; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00004179 for ac_file in conftest.o conftest.obj conftest.*; do
4180 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00004181 case $ac_file in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004182 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004183 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4184 break;;
4185 esac
4186done
4187else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004188 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004189sed 's/^/| /' conftest.$ac_ext >&5
4190
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004191{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4192$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004193as_fn_error $? "cannot compute suffix of object files: cannot compile
Matthias Klose3cef2a92012-03-14 23:39:33 +01004194See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004195fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004196rm -f conftest.$ac_cv_objext conftest.$ac_ext
4197fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004198{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4199$as_echo "$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004200OBJEXT=$ac_cv_objext
4201ac_objext=$OBJEXT
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004202{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4203$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01004204if ${ac_cv_c_compiler_gnu+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004205 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004206else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004207 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004208/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004209
Martin v. Löwis11437992002-04-12 09:54:03 +00004210int
4211main ()
4212{
4213#ifndef __GNUC__
4214 choke me
4215#endif
4216
4217 ;
4218 return 0;
4219}
4220_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004221if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004222 ac_compiler_gnu=yes
4223else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004224 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00004225fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004226rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004227ac_cv_c_compiler_gnu=$ac_compiler_gnu
4228
4229fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004230{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4231$as_echo "$ac_cv_c_compiler_gnu" >&6; }
4232if test $ac_compiler_gnu = yes; then
4233 GCC=yes
4234else
4235 GCC=
4236fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004237ac_test_CFLAGS=${CFLAGS+set}
4238ac_save_CFLAGS=$CFLAGS
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004239{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4240$as_echo_n "checking whether $CC accepts -g... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01004241if ${ac_cv_prog_cc_g+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004242 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004243else
Martin v. Löwiseba40652007-08-30 20:10:57 +00004244 ac_save_c_werror_flag=$ac_c_werror_flag
4245 ac_c_werror_flag=yes
4246 ac_cv_prog_cc_g=no
4247 CFLAGS="-g"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004248 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004249/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004250
Martin v. Löwis11437992002-04-12 09:54:03 +00004251int
4252main ()
4253{
4254
4255 ;
4256 return 0;
4257}
4258_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004259if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumf78abae1997-01-21 22:02:36 +00004260 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004261else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004262 CFLAGS=""
4263 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +00004264/* end confdefs.h. */
4265
4266int
4267main ()
4268{
4269
4270 ;
4271 return 0;
4272}
4273_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004274if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00004275
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004276else
4277 ac_c_werror_flag=$ac_save_c_werror_flag
Martin v. Löwiseba40652007-08-30 20:10:57 +00004278 CFLAGS="-g"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004279 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +00004280/* end confdefs.h. */
4281
4282int
4283main ()
4284{
4285
4286 ;
4287 return 0;
4288}
4289_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004290if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00004291 ac_cv_prog_cc_g=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004292fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004293rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004294fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004295rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4296fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004297rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4298 ac_c_werror_flag=$ac_save_c_werror_flag
4299fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004300{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4301$as_echo "$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004302if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004303 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004304elif test $ac_cv_prog_cc_g = yes; then
4305 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00004306 CFLAGS="-g -O2"
4307 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004308 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004309 fi
4310else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004311 if test "$GCC" = yes; then
4312 CFLAGS="-O2"
4313 else
4314 CFLAGS=
4315 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004316fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004317{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4318$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01004319if ${ac_cv_prog_cc_c89+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004320 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004321else
Martin v. Löwiseba40652007-08-30 20:10:57 +00004322 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00004323ac_save_CC=$CC
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004324cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004325/* end confdefs.h. */
4326#include <stdarg.h>
4327#include <stdio.h>
Charles-François Natalibe2b9072013-01-08 19:47:00 +01004328struct stat;
Skip Montanaro6dead952003-09-25 14:50:04 +00004329/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4330struct buf { int x; };
4331FILE * (*rcsopen) (struct buf *, struct stat *, int);
4332static char *e (p, i)
4333 char **p;
4334 int i;
4335{
4336 return p[i];
4337}
4338static char *f (char * (*g) (char **, int), char **p, ...)
4339{
4340 char *s;
4341 va_list v;
4342 va_start (v,p);
4343 s = g (p, va_arg (v,int));
4344 va_end (v);
4345 return s;
4346}
Skip Montanarof0d5f792004-08-15 14:08:23 +00004347
4348/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
4349 function prototypes and stuff, but not '\xHH' hex character constants.
4350 These don't provoke an error unfortunately, instead are silently treated
Martin v. Löwiseba40652007-08-30 20:10:57 +00004351 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00004352 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
4353 array size at least. It's necessary to write '\x00'==0 to get something
Martin v. Löwiseba40652007-08-30 20:10:57 +00004354 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00004355int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4356
Martin v. Löwiseba40652007-08-30 20:10:57 +00004357/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4358 inside strings and character constants. */
4359#define FOO(x) 'x'
4360int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4361
Skip Montanaro6dead952003-09-25 14:50:04 +00004362int test (int i, double x);
4363struct s1 {int (*f) (int a);};
4364struct s2 {int (*f) (double a);};
4365int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4366int argc;
4367char **argv;
4368int
4369main ()
4370{
4371return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4372 ;
4373 return 0;
4374}
4375_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00004376for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4377 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00004378do
4379 CC="$ac_save_CC $ac_arg"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004380 if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00004381 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00004382fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004383rm -f core conftest.err conftest.$ac_objext
4384 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00004385done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004386rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004387CC=$ac_save_CC
4388
4389fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004390# AC_CACHE_VAL
4391case "x$ac_cv_prog_cc_c89" in
4392 x)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004393 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4394$as_echo "none needed" >&6; } ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00004395 xno)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004396 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4397$as_echo "unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004398 *)
Martin v. Löwiseba40652007-08-30 20:10:57 +00004399 CC="$CC $ac_cv_prog_cc_c89"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004400 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4401$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004402esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004403if test "x$ac_cv_prog_cc_c89" != xno; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004404
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004405fi
Skip Montanaro6dead952003-09-25 14:50:04 +00004406
Martin v. Löwis11437992002-04-12 09:54:03 +00004407ac_ext=c
4408ac_cpp='$CPP $CPPFLAGS'
4409ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4410ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4411ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004412
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00004413if test ! -z "$preset_cflags"
4414then
4415 CFLAGS=$preset_cflags
4416fi
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004417
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004418
4419
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004420{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-cxx-main=<compiler>" >&5
4421$as_echo_n "checking for --with-cxx-main=<compiler>... " >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004422
Martin v. Löwiseba40652007-08-30 20:10:57 +00004423# Check whether --with-cxx_main was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004424if test "${with_cxx_main+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00004425 withval=$with_cxx_main;
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004426
4427 case $withval in
4428 no) with_cxx_main=no
4429 MAINCC='$(CC)';;
4430 yes) with_cxx_main=yes
4431 MAINCC='$(CXX)';;
4432 *) with_cxx_main=yes
4433 MAINCC=$withval
4434 if test -z "$CXX"
4435 then
4436 CXX=$withval
4437 fi;;
4438 esac
4439else
4440
4441 with_cxx_main=no
4442 MAINCC='$(CC)'
4443
Martin v. Löwiseba40652007-08-30 20:10:57 +00004444fi
4445
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004446{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_cxx_main" >&5
4447$as_echo "$with_cxx_main" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004448
4449preset_cxx="$CXX"
4450if test -z "$CXX"
4451then
4452 case "$CC" in
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004453 gcc) if test -n "$ac_tool_prefix"; then
4454 # Extract the first word of "${ac_tool_prefix}g++", so it can be a program name with args.
4455set dummy ${ac_tool_prefix}g++; ac_word=$2
4456{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4457$as_echo_n "checking for $ac_word... " >&6; }
4458if ${ac_cv_path_CXX+:} false; then :
4459 $as_echo_n "(cached) " >&6
4460else
4461 case $CXX in
4462 [\\/]* | ?:[\\/]*)
4463 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4464 ;;
4465 *)
4466 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4467for as_dir in notfound
4468do
4469 IFS=$as_save_IFS
4470 test -z "$as_dir" && as_dir=.
4471 for ac_exec_ext in '' $ac_executable_extensions; do
4472 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4473 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4474 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4475 break 2
4476 fi
4477done
4478 done
4479IFS=$as_save_IFS
4480
4481 ;;
4482esac
4483fi
4484CXX=$ac_cv_path_CXX
4485if test -n "$CXX"; then
4486 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4487$as_echo "$CXX" >&6; }
4488else
4489 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4490$as_echo "no" >&6; }
4491fi
4492
4493
4494fi
4495if test -z "$ac_cv_path_CXX"; then
4496 ac_pt_CXX=$CXX
4497 # Extract the first word of "g++", so it can be a program name with args.
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004498set dummy g++; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004499{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4500$as_echo_n "checking for $ac_word... " >&6; }
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004501if ${ac_cv_path_ac_pt_CXX+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004502 $as_echo_n "(cached) " >&6
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004503else
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004504 case $ac_pt_CXX in
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004505 [\\/]* | ?:[\\/]*)
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004506 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 +00004507 ;;
4508 *)
4509 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4510for as_dir in notfound
4511do
4512 IFS=$as_save_IFS
4513 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004514 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01004515 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004516 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004517 $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 +00004518 break 2
4519 fi
4520done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004521 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004522IFS=$as_save_IFS
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004523
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004524 ;;
4525esac
4526fi
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004527ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4528if test -n "$ac_pt_CXX"; then
4529 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4530$as_echo "$ac_pt_CXX" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00004531else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004532 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4533$as_echo "no" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00004534fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004535
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004536 if test "x$ac_pt_CXX" = x; then
4537 CXX="g++"
4538 else
4539 case $cross_compiling:$ac_tool_warned in
4540yes:)
4541{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4542$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4543ac_tool_warned=yes ;;
4544esac
4545 CXX=$ac_pt_CXX
4546 fi
4547else
4548 CXX="$ac_cv_path_CXX"
4549fi
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004550 ;;
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004551 cc) if test -n "$ac_tool_prefix"; then
4552 # Extract the first word of "${ac_tool_prefix}c++", so it can be a program name with args.
4553set dummy ${ac_tool_prefix}c++; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004554{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4555$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01004556if ${ac_cv_path_CXX+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004557 $as_echo_n "(cached) " >&6
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004558else
4559 case $CXX in
4560 [\\/]* | ?:[\\/]*)
4561 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4562 ;;
4563 *)
4564 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4565for as_dir in notfound
4566do
4567 IFS=$as_save_IFS
4568 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004569 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01004570 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004571 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004572 $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 +00004573 break 2
4574 fi
4575done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004576 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004577IFS=$as_save_IFS
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004578
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004579 ;;
4580esac
4581fi
4582CXX=$ac_cv_path_CXX
Skip Montanaro89e975f2007-08-22 19:05:21 +00004583if test -n "$CXX"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004584 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4585$as_echo "$CXX" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00004586else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004587 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4588$as_echo "no" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00004589fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004590
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004591
4592fi
4593if test -z "$ac_cv_path_CXX"; then
4594 ac_pt_CXX=$CXX
4595 # Extract the first word of "c++", so it can be a program name with args.
4596set dummy c++; ac_word=$2
4597{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4598$as_echo_n "checking for $ac_word... " >&6; }
4599if ${ac_cv_path_ac_pt_CXX+:} false; then :
4600 $as_echo_n "(cached) " >&6
4601else
4602 case $ac_pt_CXX in
4603 [\\/]* | ?:[\\/]*)
4604 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4605 ;;
4606 *)
4607 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4608for as_dir in notfound
4609do
4610 IFS=$as_save_IFS
4611 test -z "$as_dir" && as_dir=.
4612 for ac_exec_ext in '' $ac_executable_extensions; do
4613 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4614 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4615 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4616 break 2
4617 fi
4618done
4619 done
4620IFS=$as_save_IFS
4621
4622 ;;
4623esac
4624fi
4625ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4626if test -n "$ac_pt_CXX"; then
4627 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4628$as_echo "$ac_pt_CXX" >&6; }
4629else
4630 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4631$as_echo "no" >&6; }
4632fi
4633
4634 if test "x$ac_pt_CXX" = x; then
4635 CXX="c++"
4636 else
4637 case $cross_compiling:$ac_tool_warned in
4638yes:)
4639{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4640$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4641ac_tool_warned=yes ;;
4642esac
4643 CXX=$ac_pt_CXX
4644 fi
4645else
4646 CXX="$ac_cv_path_CXX"
4647fi
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004648 ;;
4649 esac
4650 if test "$CXX" = "notfound"
4651 then
4652 CXX=""
4653 fi
4654fi
4655if test -z "$CXX"
4656then
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004657 if test -n "$ac_tool_prefix"; then
4658 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
4659 do
4660 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4661set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004662{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4663$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01004664if ${ac_cv_prog_CXX+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004665 $as_echo_n "(cached) " >&6
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004666else
4667 if test -n "$CXX"; then
4668 ac_cv_prog_CXX="$CXX" # Let the user override the test.
4669else
4670as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4671for as_dir in $PATH
4672do
4673 IFS=$as_save_IFS
4674 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004675 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01004676 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004677 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004678 $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 +00004679 break 2
4680 fi
4681done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004682 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004683IFS=$as_save_IFS
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004684
4685fi
4686fi
4687CXX=$ac_cv_prog_CXX
4688if test -n "$CXX"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004689 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4690$as_echo "$CXX" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004691else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004692 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4693$as_echo "no" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004694fi
4695
Martin v. Löwiseba40652007-08-30 20:10:57 +00004696
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004697 test -n "$CXX" && break
4698 done
4699fi
4700if test -z "$CXX"; then
4701 ac_ct_CXX=$CXX
4702 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
4703do
4704 # Extract the first word of "$ac_prog", so it can be a program name with args.
4705set dummy $ac_prog; ac_word=$2
4706{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4707$as_echo_n "checking for $ac_word... " >&6; }
4708if ${ac_cv_prog_ac_ct_CXX+:} false; then :
4709 $as_echo_n "(cached) " >&6
4710else
4711 if test -n "$ac_ct_CXX"; then
4712 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
4713else
4714as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4715for as_dir in $PATH
4716do
4717 IFS=$as_save_IFS
4718 test -z "$as_dir" && as_dir=.
4719 for ac_exec_ext in '' $ac_executable_extensions; do
4720 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4721 ac_cv_prog_ac_ct_CXX="$ac_prog"
4722 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4723 break 2
4724 fi
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004725done
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004726 done
4727IFS=$as_save_IFS
4728
4729fi
4730fi
4731ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
4732if test -n "$ac_ct_CXX"; then
4733 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
4734$as_echo "$ac_ct_CXX" >&6; }
4735else
4736 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4737$as_echo "no" >&6; }
4738fi
4739
4740
4741 test -n "$ac_ct_CXX" && break
4742done
4743
4744 if test "x$ac_ct_CXX" = x; then
4745 CXX="notfound"
4746 else
4747 case $cross_compiling:$ac_tool_warned in
4748yes:)
4749{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4750$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4751ac_tool_warned=yes ;;
4752esac
4753 CXX=$ac_ct_CXX
4754 fi
4755fi
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004756
4757 if test "$CXX" = "notfound"
4758 then
4759 CXX=""
4760 fi
4761fi
4762if test "$preset_cxx" != "$CXX"
4763then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004764 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004765
4766 By default, distutils will build C++ extension modules with \"$CXX\".
4767 If this is not intended, then set CXX on the configure command line.
4768 " >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004769$as_echo "$as_me: WARNING:
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004770
4771 By default, distutils will build C++ extension modules with \"$CXX\".
4772 If this is not intended, then set CXX on the configure command line.
4773 " >&2;}
4774fi
4775
doko@python.org4e63fbe2013-01-25 13:08:27 +01004776MULTIARCH=$($CC --print-multiarch 2>/dev/null)
4777
4778
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004779
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004780# checks for UNIX variants that set C preprocessor variables
Martin v. Löwis11437992002-04-12 09:54:03 +00004781
4782ac_ext=c
4783ac_cpp='$CPP $CPPFLAGS'
4784ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4785ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4786ac_compiler_gnu=$ac_cv_c_compiler_gnu
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004787{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4788$as_echo_n "checking how to run the C preprocessor... " >&6; }
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004789# On Suns, sometimes $CPP names a directory.
4790if test -n "$CPP" && test -d "$CPP"; then
4791 CPP=
4792fi
4793if test -z "$CPP"; then
Matthias Klose3cef2a92012-03-14 23:39:33 +01004794 if ${ac_cv_prog_CPP+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004795 $as_echo_n "(cached) " >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004796else
Martin v. Löwis11437992002-04-12 09:54:03 +00004797 # Double quotes because CPP needs to be expanded
4798 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4799 do
4800 ac_preproc_ok=false
4801for ac_c_preproc_warn_flag in '' yes
4802do
4803 # Use a header file that comes with gcc, so configuring glibc
4804 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00004805 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4806 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004807 # On the NeXT, cc -E runs the code through the compiler's parser,
Martin v. Löwis11437992002-04-12 09:54:03 +00004808 # not just through cpp. "Syntax error" is here to catch this case.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004809 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004810/* end confdefs.h. */
4811#ifdef __STDC__
4812# include <limits.h>
4813#else
4814# include <assert.h>
4815#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00004816 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00004817_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004818if ac_fn_c_try_cpp "$LINENO"; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004819
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004820else
Martin v. Löwis11437992002-04-12 09:54:03 +00004821 # Broken: fails on valid input.
4822continue
Jack Jansendd19cf82001-12-06 22:36:17 +00004823fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004824rm -f conftest.err conftest.i conftest.$ac_ext
Jack Jansendd19cf82001-12-06 22:36:17 +00004825
Martin v. Löwiseba40652007-08-30 20:10:57 +00004826 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00004827 # can be detected and how.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004828 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004829/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004830#include <ac_nonexistent.h>
4831_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004832if ac_fn_c_try_cpp "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004833 # Broken: success on invalid input.
4834continue
4835else
Martin v. Löwis11437992002-04-12 09:54:03 +00004836 # Passes both tests.
4837ac_preproc_ok=:
4838break
4839fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004840rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004841
4842done
4843# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004844rm -f conftest.i conftest.err conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004845if $ac_preproc_ok; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004846 break
4847fi
4848
4849 done
4850 ac_cv_prog_CPP=$CPP
4851
4852fi
4853 CPP=$ac_cv_prog_CPP
4854else
4855 ac_cv_prog_CPP=$CPP
4856fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004857{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4858$as_echo "$CPP" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004859ac_preproc_ok=false
4860for ac_c_preproc_warn_flag in '' yes
4861do
4862 # Use a header file that comes with gcc, so configuring glibc
4863 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00004864 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4865 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis11437992002-04-12 09:54:03 +00004866 # On the NeXT, cc -E runs the code through the compiler's parser,
4867 # not just through cpp. "Syntax error" is here to catch this case.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004868 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004869/* end confdefs.h. */
4870#ifdef __STDC__
4871# include <limits.h>
4872#else
4873# include <assert.h>
4874#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00004875 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00004876_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004877if ac_fn_c_try_cpp "$LINENO"; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004878
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004879else
Martin v. Löwis11437992002-04-12 09:54:03 +00004880 # Broken: fails on valid input.
4881continue
4882fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004883rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004884
Martin v. Löwiseba40652007-08-30 20:10:57 +00004885 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00004886 # can be detected and how.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004887 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004888/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004889#include <ac_nonexistent.h>
4890_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004891if ac_fn_c_try_cpp "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004892 # Broken: success on invalid input.
4893continue
4894else
Martin v. Löwis11437992002-04-12 09:54:03 +00004895 # Passes both tests.
4896ac_preproc_ok=:
4897break
4898fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004899rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004900
4901done
4902# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004903rm -f conftest.i conftest.err conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004904if $ac_preproc_ok; then :
4905
Martin v. Löwis11437992002-04-12 09:54:03 +00004906else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004907 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4908$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004909as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
Matthias Klose3cef2a92012-03-14 23:39:33 +01004910See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004911fi
4912
4913ac_ext=c
4914ac_cpp='$CPP $CPPFLAGS'
4915ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4916ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4917ac_compiler_gnu=$ac_cv_c_compiler_gnu
4918
4919
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004920{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4921$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01004922if ${ac_cv_path_GREP+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004923 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004924else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004925 if test -z "$GREP"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00004926 ac_path_GREP_found=false
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004927 # Loop through the user's path and test for each of PROGNAME-LIST
4928 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwiseba40652007-08-30 20:10:57 +00004929for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4930do
4931 IFS=$as_save_IFS
4932 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004933 for ac_prog in grep ggrep; do
4934 for ac_exec_ext in '' $ac_executable_extensions; do
4935 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
Charles-François Natalibe2b9072013-01-08 19:47:00 +01004936 as_fn_executable_p "$ac_path_GREP" || continue
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004937# Check for GNU ac_path_GREP and select it if it is found.
Martin v. Löwiseba40652007-08-30 20:10:57 +00004938 # Check for GNU $ac_path_GREP
4939case `"$ac_path_GREP" --version 2>&1` in
4940*GNU*)
4941 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4942*)
4943 ac_count=0
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004944 $as_echo_n 0123456789 >"conftest.in"
Martin v. Löwiseba40652007-08-30 20:10:57 +00004945 while :
4946 do
4947 cat "conftest.in" "conftest.in" >"conftest.tmp"
4948 mv "conftest.tmp" "conftest.in"
4949 cp "conftest.in" "conftest.nl"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004950 $as_echo 'GREP' >> "conftest.nl"
Martin v. Löwiseba40652007-08-30 20:10:57 +00004951 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4952 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004953 as_fn_arith $ac_count + 1 && ac_count=$as_val
Martin v. Löwiseba40652007-08-30 20:10:57 +00004954 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4955 # Best one so far, save it but keep looking for a better one
4956 ac_cv_path_GREP="$ac_path_GREP"
4957 ac_path_GREP_max=$ac_count
Skip Montanaro6dead952003-09-25 14:50:04 +00004958 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004959 # 10*(2^10) chars as input seems more than enough
4960 test $ac_count -gt 10 && break
4961 done
4962 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4963esac
4964
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004965 $ac_path_GREP_found && break 3
4966 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004967 done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004968 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004969IFS=$as_save_IFS
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004970 if test -z "$ac_cv_path_GREP"; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004971 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 +00004972 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004973else
4974 ac_cv_path_GREP=$GREP
4975fi
4976
Martin v. Löwiseba40652007-08-30 20:10:57 +00004977fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004978{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4979$as_echo "$ac_cv_path_GREP" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00004980 GREP="$ac_cv_path_GREP"
4981
4982
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004983{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
4984$as_echo_n "checking for egrep... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01004985if ${ac_cv_path_EGREP+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004986 $as_echo_n "(cached) " >&6
Martin v. Löwiseba40652007-08-30 20:10:57 +00004987else
4988 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
4989 then ac_cv_path_EGREP="$GREP -E"
4990 else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004991 if test -z "$EGREP"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00004992 ac_path_EGREP_found=false
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004993 # Loop through the user's path and test for each of PROGNAME-LIST
4994 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwiseba40652007-08-30 20:10:57 +00004995for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4996do
4997 IFS=$as_save_IFS
4998 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004999 for ac_prog in egrep; do
5000 for ac_exec_ext in '' $ac_executable_extensions; do
5001 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
Charles-François Natalibe2b9072013-01-08 19:47:00 +01005002 as_fn_executable_p "$ac_path_EGREP" || continue
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005003# Check for GNU ac_path_EGREP and select it if it is found.
Martin v. Löwiseba40652007-08-30 20:10:57 +00005004 # Check for GNU $ac_path_EGREP
5005case `"$ac_path_EGREP" --version 2>&1` in
5006*GNU*)
5007 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
5008*)
5009 ac_count=0
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005010 $as_echo_n 0123456789 >"conftest.in"
Martin v. Löwiseba40652007-08-30 20:10:57 +00005011 while :
5012 do
5013 cat "conftest.in" "conftest.in" >"conftest.tmp"
5014 mv "conftest.tmp" "conftest.in"
5015 cp "conftest.in" "conftest.nl"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005016 $as_echo 'EGREP' >> "conftest.nl"
Martin v. Löwiseba40652007-08-30 20:10:57 +00005017 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5018 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005019 as_fn_arith $ac_count + 1 && ac_count=$as_val
Martin v. Löwiseba40652007-08-30 20:10:57 +00005020 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
5021 # Best one so far, save it but keep looking for a better one
5022 ac_cv_path_EGREP="$ac_path_EGREP"
5023 ac_path_EGREP_max=$ac_count
5024 fi
5025 # 10*(2^10) chars as input seems more than enough
5026 test $ac_count -gt 10 && break
5027 done
5028 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5029esac
5030
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005031 $ac_path_EGREP_found && break 3
5032 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00005033 done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005034 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00005035IFS=$as_save_IFS
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005036 if test -z "$ac_cv_path_EGREP"; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00005037 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 +00005038 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005039else
5040 ac_cv_path_EGREP=$EGREP
5041fi
5042
Martin v. Löwiseba40652007-08-30 20:10:57 +00005043 fi
5044fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005045{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
5046$as_echo "$ac_cv_path_EGREP" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00005047 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00005048
5049
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005050{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
5051$as_echo_n "checking for ANSI C header files... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01005052if ${ac_cv_header_stdc+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005053 $as_echo_n "(cached) " >&6
5054else
5055 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitrouf2caeed2009-05-24 20:23:57 +00005056/* end confdefs.h. */
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005057#include <stdlib.h>
5058#include <stdarg.h>
5059#include <string.h>
5060#include <float.h>
5061
5062int
5063main ()
5064{
5065
5066 ;
5067 return 0;
5068}
5069_ACEOF
5070if ac_fn_c_try_compile "$LINENO"; then :
5071 ac_cv_header_stdc=yes
5072else
5073 ac_cv_header_stdc=no
5074fi
5075rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5076
5077if test $ac_cv_header_stdc = yes; then
5078 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5079 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5080/* end confdefs.h. */
5081#include <string.h>
Antoine Pitrouf2caeed2009-05-24 20:23:57 +00005082
Antoine Pitrouf2caeed2009-05-24 20:23:57 +00005083_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005084if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005085 $EGREP "memchr" >/dev/null 2>&1; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005086
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005087else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005088 ac_cv_header_stdc=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005089fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00005090rm -f conftest*
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005091
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005092fi
5093
5094if test $ac_cv_header_stdc = yes; then
5095 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5096 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5097/* end confdefs.h. */
5098#include <stdlib.h>
5099
5100_ACEOF
5101if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5102 $EGREP "free" >/dev/null 2>&1; then :
5103
5104else
5105 ac_cv_header_stdc=no
5106fi
5107rm -f conftest*
5108
5109fi
5110
5111if test $ac_cv_header_stdc = yes; then
5112 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5113 if test "$cross_compiling" = yes; then :
5114 :
5115else
5116 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5117/* end confdefs.h. */
5118#include <ctype.h>
5119#include <stdlib.h>
5120#if ((' ' & 0x0FF) == 0x020)
5121# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5122# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5123#else
5124# define ISLOWER(c) \
5125 (('a' <= (c) && (c) <= 'i') \
5126 || ('j' <= (c) && (c) <= 'r') \
5127 || ('s' <= (c) && (c) <= 'z'))
5128# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5129#endif
5130
5131#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5132int
5133main ()
5134{
5135 int i;
5136 for (i = 0; i < 256; i++)
5137 if (XOR (islower (i), ISLOWER (i))
5138 || toupper (i) != TOUPPER (i))
5139 return 2;
5140 return 0;
5141}
5142_ACEOF
5143if ac_fn_c_try_run "$LINENO"; then :
5144
5145else
5146 ac_cv_header_stdc=no
5147fi
5148rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5149 conftest.$ac_objext conftest.beam conftest.$ac_ext
5150fi
5151
5152fi
5153fi
5154{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
5155$as_echo "$ac_cv_header_stdc" >&6; }
5156if test $ac_cv_header_stdc = yes; then
5157
5158$as_echo "#define STDC_HEADERS 1" >>confdefs.h
5159
5160fi
5161
5162# On IRIX 5.3, sys/types and inttypes.h are conflicting.
5163for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
5164 inttypes.h stdint.h unistd.h
5165do :
5166 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
5167ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
5168"
Georg Brandl71f4fbb2011-02-25 11:04:50 +00005169if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005170 cat >>confdefs.h <<_ACEOF
5171#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
5172_ACEOF
5173
5174fi
5175
5176done
5177
5178
5179
5180 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 +01005181if test "x$ac_cv_header_minix_config_h" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005182 MINIX=yes
5183else
5184 MINIX=
5185fi
5186
5187
5188 if test "$MINIX" = yes; then
5189
5190$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
5191
5192
5193$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
5194
5195
5196$as_echo "#define _MINIX 1" >>confdefs.h
5197
5198 fi
5199
5200
5201 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
5202$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01005203if ${ac_cv_safe_to_define___extensions__+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005204 $as_echo_n "(cached) " >&6
5205else
5206 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5207/* end confdefs.h. */
5208
Charles-François Natalibe2b9072013-01-08 19:47:00 +01005209# define __EXTENSIONS__ 1
5210 $ac_includes_default
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005211int
5212main ()
5213{
5214
5215 ;
5216 return 0;
5217}
5218_ACEOF
5219if ac_fn_c_try_compile "$LINENO"; then :
5220 ac_cv_safe_to_define___extensions__=yes
5221else
5222 ac_cv_safe_to_define___extensions__=no
5223fi
5224rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5225fi
5226{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
5227$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
5228 test $ac_cv_safe_to_define___extensions__ = yes &&
5229 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
5230
5231 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
5232
5233 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
5234
5235 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
5236
5237 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
5238
5239
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005240
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005241# Check for unsupported systems
5242case $ac_sys_system/$ac_sys_release in
5243atheos*|Linux*/1*)
5244 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
5245 echo See README for details.
5246 exit 1;;
5247esac
5248
5249
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005250{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-suffix" >&5
5251$as_echo_n "checking for --with-suffix... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005252
5253# Check whether --with-suffix was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005254if test "${with_suffix+set}" = set; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005255 withval=$with_suffix;
5256 case $withval in
5257 no) EXEEXT=;;
5258 yes) EXEEXT=.exe;;
5259 *) EXEEXT=$withval;;
5260 esac
5261fi
5262
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005263{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXEEXT" >&5
5264$as_echo "$EXEEXT" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005265
5266# Test whether we're running on a non-case-sensitive system, in which
5267# case we give a warning if no ext is given
5268
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005269{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for case-insensitive build directory" >&5
5270$as_echo_n "checking for case-insensitive build directory... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005271if test ! -d CaseSensitiveTestDir; then
5272mkdir CaseSensitiveTestDir
5273fi
5274
5275if test -d casesensitivetestdir
5276then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005277 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5278$as_echo "yes" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005279 BUILDEXEEXT=.exe
5280else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005281 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5282$as_echo "no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005283 BUILDEXEEXT=$EXEEXT
5284fi
5285rmdir CaseSensitiveTestDir
5286
5287case $MACHDEP in
5288bsdos*)
5289 case $CC in
5290 gcc) CC="$CC -D_HAVE_BSDI";;
5291 esac;;
5292esac
5293
5294case $ac_sys_system in
5295hp*|HP*)
5296 case $CC in
5297 cc|*/cc) CC="$CC -Ae";;
5298 esac;;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005299SunOS*)
5300 # Some functions have a prototype only with that define, e.g. confstr
5301
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005302$as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005303
5304 ;;
5305esac
5306
5307
5308
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005309{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBRARY" >&5
5310$as_echo_n "checking LIBRARY... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005311if test -z "$LIBRARY"
5312then
5313 LIBRARY='libpython$(VERSION).a'
5314fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005315{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBRARY" >&5
5316$as_echo "$LIBRARY" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005317
5318# LDLIBRARY is the name of the library to link against (as opposed to the
5319# name of the library into which to insert object files). BLDLIBRARY is also
5320# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
5321# is blank as the main program is not linked directly against LDLIBRARY.
5322# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
5323# systems without shared libraries, LDLIBRARY is the same as LIBRARY
5324# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
5325# DLLLIBRARY is the shared (i.e., DLL) library.
5326#
5327# RUNSHARED is used to run shared python without installed libraries
5328#
5329# INSTSONAME is the name of the shared library that will be use to install
5330# on the system - some systems like version suffix, others don't
5331
5332
5333
5334
5335
5336
5337LDLIBRARY="$LIBRARY"
5338BLDLIBRARY='$(LDLIBRARY)'
5339INSTSONAME='$(LDLIBRARY)'
5340DLLLIBRARY=''
5341LDLIBRARYDIR=''
5342RUNSHARED=''
5343
5344# LINKCC is the command that links the python executable -- default is $(CC).
5345# If CXX is set, and if it is needed to link a main function that was
5346# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
5347# python might then depend on the C++ runtime
5348# This is altered for AIX in order to build the export list before
5349# linking.
5350
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005351{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKCC" >&5
5352$as_echo_n "checking LINKCC... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005353if test -z "$LINKCC"
5354then
5355 LINKCC='$(PURIFY) $(MAINCC)'
5356 case $ac_sys_system in
5357 AIX*)
5358 exp_extra="\"\""
5359 if test $ac_sys_release -ge 5 -o \
5360 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
5361 exp_extra="."
5362 fi
5363 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005364 QNX*)
5365 # qcc must be used because the other compilers do not
5366 # support -N.
5367 LINKCC=qcc;;
5368 esac
5369fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005370{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKCC" >&5
5371$as_echo "$LINKCC" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005372
5373# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
5374# make sure we default having it set to "no": this is used by
5375# distutils.unixccompiler to know if it should add --enable-new-dtags
5376# to linker command lines, and failing to detect GNU ld simply results
5377# in the same bahaviour as before.
5378
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005379{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
5380$as_echo_n "checking for GNU ld... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005381ac_prog=ld
5382if test "$GCC" = yes; then
5383 ac_prog=`$CC -print-prog-name=ld`
5384fi
5385case `"$ac_prog" -V 2>&1 < /dev/null` in
5386 *GNU*)
5387 GNULD=yes;;
5388 *)
5389 GNULD=no;;
5390esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005391{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNULD" >&5
5392$as_echo "$GNULD" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005393
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005394{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-shared" >&5
5395$as_echo_n "checking for --enable-shared... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005396# Check whether --enable-shared was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005397if test "${enable_shared+set}" = set; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005398 enableval=$enable_shared;
5399fi
5400
5401
5402if test -z "$enable_shared"
5403then
5404 case $ac_sys_system in
5405 CYGWIN* | atheos*)
5406 enable_shared="yes";;
5407 *)
5408 enable_shared="no";;
5409 esac
5410fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005411{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
5412$as_echo "$enable_shared" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005413
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005414{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-profiling" >&5
5415$as_echo_n "checking for --enable-profiling... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005416# Check whether --enable-profiling was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005417if test "${enable_profiling+set}" = set; then :
doko@python.orgd65e2ba2013-01-31 23:52:03 +01005418 enableval=$enable_profiling;
5419fi
5420
5421if test "x$enable_profiling" = xyes; then
5422 ac_save_cc="$CC"
Benjamin Petersonb9be7bb2013-03-26 08:55:37 -04005423 CC="$CC -pg"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005424 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005425/* end confdefs.h. */
5426int main() { return 0; }
5427_ACEOF
doko@python.orgd65e2ba2013-01-31 23:52:03 +01005428if ac_fn_c_try_link "$LINENO"; then :
5429
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005430else
doko@python.orgd65e2ba2013-01-31 23:52:03 +01005431 enable_profiling=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005432fi
doko@python.orgd65e2ba2013-01-31 23:52:03 +01005433rm -f core conftest.err conftest.$ac_objext \
5434 conftest$ac_exeext conftest.$ac_ext
5435 CC="$ac_save_cc"
5436else
5437 enable_profiling=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005438fi
doko@python.orgd65e2ba2013-01-31 23:52:03 +01005439{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_profiling" >&5
5440$as_echo "$enable_profiling" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005441
doko@python.orgd65e2ba2013-01-31 23:52:03 +01005442if test "x$enable_profiling" = xyes; then
5443 BASECFLAGS="-pg $BASECFLAGS"
5444 LDFLAGS="-pg $LDFLAGS"
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005445fi
5446
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005447{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDLIBRARY" >&5
5448$as_echo_n "checking LDLIBRARY... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005449
5450# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
5451# library that we build, but we do not want to link against it (we
5452# will find it with a -framework option). For this reason there is an
5453# extra variable BLDLIBRARY against which Python and the extension
5454# modules are linked, BLDLIBRARY. This is normally the same as
5455# LDLIBRARY, but empty for MacOSX framework builds.
5456if test "$enable_framework"
5457then
5458 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
doko@ubuntu.com9ba90c92014-05-07 04:41:26 +02005459 RUNSHARED=DYLD_FRAMEWORK_PATH=`pwd`${DYLD_FRAMEWORK_PATH:+:${DYLD_FRAMEWORK_PATH}}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005460 BLDLIBRARY=''
5461else
5462 BLDLIBRARY='$(LDLIBRARY)'
5463fi
5464
5465# Other platforms follow
5466if test $enable_shared = "yes"; then
5467
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005468$as_echo "#define Py_ENABLE_SHARED 1" >>confdefs.h
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005469
5470 case $ac_sys_system in
5471 BeOS*)
5472 LDLIBRARY='libpython$(VERSION).so'
5473 ;;
5474 CYGWIN*)
5475 LDLIBRARY='libpython$(VERSION).dll.a'
5476 DLLLIBRARY='libpython$(VERSION).dll'
5477 ;;
5478 SunOS*)
5479 LDLIBRARY='libpython$(VERSION).so'
5480 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(VERSION)'
doko@ubuntu.com9ba90c92014-05-07 04:41:26 +02005481 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005482 INSTSONAME="$LDLIBRARY".$SOVERSION
5483 ;;
Charles-François Natali3de8c732011-07-24 22:33:35 +02005484 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*|OpenBSD*)
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005485 LDLIBRARY='libpython$(VERSION).so'
5486 BLDLIBRARY='-L. -lpython$(VERSION)'
doko@ubuntu.com9ba90c92014-05-07 04:41:26 +02005487 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005488 case $ac_sys_system in
5489 FreeBSD*)
5490 SOVERSION=`echo $SOVERSION|cut -d "." -f 1`
5491 ;;
5492 esac
5493 INSTSONAME="$LDLIBRARY".$SOVERSION
5494 ;;
5495 hp*|HP*)
5496 case `uname -m` in
5497 ia64)
5498 LDLIBRARY='libpython$(VERSION).so'
5499 ;;
5500 *)
5501 LDLIBRARY='libpython$(VERSION).sl'
5502 ;;
5503 esac
5504 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(VERSION)'
doko@ubuntu.com9ba90c92014-05-07 04:41:26 +02005505 RUNSHARED=SHLIB_PATH=`pwd`${SHLIB_PATH:+:${SHLIB_PATH}}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005506 ;;
5507 OSF*)
5508 LDLIBRARY='libpython$(VERSION).so'
5509 BLDLIBRARY='-rpath $(LIBDIR) -L. -lpython$(VERSION)'
doko@ubuntu.com9ba90c92014-05-07 04:41:26 +02005510 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005511 ;;
5512 atheos*)
5513 LDLIBRARY='libpython$(VERSION).so'
5514 BLDLIBRARY='-L. -lpython$(VERSION)'
5515 RUNSHARED=DLL_PATH=`pwd`:${DLL_PATH:-/atheos/sys/libs:/atheos/autolnk/lib}
5516 ;;
5517 Darwin*)
5518 LDLIBRARY='libpython$(VERSION).dylib'
5519 BLDLIBRARY='-L. -lpython$(VERSION)'
doko@ubuntu.com9ba90c92014-05-07 04:41:26 +02005520 RUNSHARED=DYLD_LIBRARY_PATH=`pwd`${DYLD_LIBRARY_PATH:+:${DYLD_LIBRARY_PATH}}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005521 ;;
Antoine Pitrouaabdceb2010-09-10 20:03:17 +00005522 AIX*)
5523 LDLIBRARY='libpython$(VERSION).so'
doko@ubuntu.com9ba90c92014-05-07 04:41:26 +02005524 RUNSHARED=LIBPATH=`pwd`${LIBPATH:+:${LIBPATH}}
Antoine Pitrouaabdceb2010-09-10 20:03:17 +00005525 ;;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005526
5527 esac
5528else # shared is disabled
5529 case $ac_sys_system in
5530 CYGWIN*)
5531 BLDLIBRARY='$(LIBRARY)'
5532 LDLIBRARY='libpython$(VERSION).dll.a'
5533 ;;
5534 esac
5535fi
5536
doko@python.orgd65e2ba2013-01-31 23:52:03 +01005537if test "$cross_compiling" = yes; then
5538 RUNSHARED=
5539fi
5540
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005541{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDLIBRARY" >&5
5542$as_echo "$LDLIBRARY" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005543
5544if test -n "$ac_tool_prefix"; then
5545 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
5546set dummy ${ac_tool_prefix}ranlib; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005547{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5548$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01005549if ${ac_cv_prog_RANLIB+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005550 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005551else
5552 if test -n "$RANLIB"; then
5553 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
5554else
5555as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5556for as_dir in $PATH
5557do
5558 IFS=$as_save_IFS
5559 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005560 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01005561 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005562 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005563 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005564 break 2
5565 fi
5566done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005567 done
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005568IFS=$as_save_IFS
5569
5570fi
5571fi
5572RANLIB=$ac_cv_prog_RANLIB
5573if test -n "$RANLIB"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005574 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
5575$as_echo "$RANLIB" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005576else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005577 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5578$as_echo "no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005579fi
5580
5581
5582fi
5583if test -z "$ac_cv_prog_RANLIB"; then
5584 ac_ct_RANLIB=$RANLIB
5585 # Extract the first word of "ranlib", so it can be a program name with args.
5586set dummy ranlib; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005587{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5588$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01005589if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005590 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005591else
5592 if test -n "$ac_ct_RANLIB"; then
5593 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
5594else
5595as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5596for as_dir in $PATH
5597do
5598 IFS=$as_save_IFS
5599 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005600 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01005601 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005602 ac_cv_prog_ac_ct_RANLIB="ranlib"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005603 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005604 break 2
5605 fi
5606done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005607 done
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005608IFS=$as_save_IFS
5609
5610fi
5611fi
5612ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
5613if test -n "$ac_ct_RANLIB"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005614 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
5615$as_echo "$ac_ct_RANLIB" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005616else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005617 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5618$as_echo "no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005619fi
5620
5621 if test "x$ac_ct_RANLIB" = x; then
5622 RANLIB=":"
5623 else
5624 case $cross_compiling:$ac_tool_warned in
5625yes:)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005626{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5627$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005628ac_tool_warned=yes ;;
5629esac
5630 RANLIB=$ac_ct_RANLIB
5631 fi
5632else
5633 RANLIB="$ac_cv_prog_RANLIB"
5634fi
5635
5636
doko@python.orgd65e2ba2013-01-31 23:52:03 +01005637if test -n "$ac_tool_prefix"; then
5638 for ac_prog in ar aal
5639 do
5640 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5641set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005642{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5643$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01005644if ${ac_cv_prog_AR+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005645 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005646else
5647 if test -n "$AR"; then
5648 ac_cv_prog_AR="$AR" # Let the user override the test.
5649else
5650as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5651for as_dir in $PATH
5652do
5653 IFS=$as_save_IFS
5654 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005655 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01005656 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@python.orgd65e2ba2013-01-31 23:52:03 +01005657 ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005658 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005659 break 2
5660 fi
5661done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005662 done
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005663IFS=$as_save_IFS
5664
5665fi
5666fi
5667AR=$ac_cv_prog_AR
5668if test -n "$AR"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005669 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
5670$as_echo "$AR" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005671else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005672 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5673$as_echo "no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005674fi
5675
5676
doko@python.orgd65e2ba2013-01-31 23:52:03 +01005677 test -n "$AR" && break
5678 done
5679fi
5680if test -z "$AR"; then
5681 ac_ct_AR=$AR
5682 for ac_prog in ar aal
5683do
5684 # Extract the first word of "$ac_prog", so it can be a program name with args.
5685set dummy $ac_prog; ac_word=$2
5686{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5687$as_echo_n "checking for $ac_word... " >&6; }
5688if ${ac_cv_prog_ac_ct_AR+:} false; then :
5689 $as_echo_n "(cached) " >&6
5690else
5691 if test -n "$ac_ct_AR"; then
5692 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
5693else
5694as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5695for as_dir in $PATH
5696do
5697 IFS=$as_save_IFS
5698 test -z "$as_dir" && as_dir=.
5699 for ac_exec_ext in '' $ac_executable_extensions; do
5700 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5701 ac_cv_prog_ac_ct_AR="$ac_prog"
5702 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5703 break 2
5704 fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005705done
doko@python.orgd65e2ba2013-01-31 23:52:03 +01005706 done
5707IFS=$as_save_IFS
5708
5709fi
5710fi
5711ac_ct_AR=$ac_cv_prog_ac_ct_AR
5712if test -n "$ac_ct_AR"; then
5713 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
5714$as_echo "$ac_ct_AR" >&6; }
5715else
5716 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5717$as_echo "no" >&6; }
5718fi
5719
5720
5721 test -n "$ac_ct_AR" && break
5722done
5723
5724 if test "x$ac_ct_AR" = x; then
5725 AR="ar"
5726 else
5727 case $cross_compiling:$ac_tool_warned in
5728yes:)
5729{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5730$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5731ac_tool_warned=yes ;;
5732esac
5733 AR=$ac_ct_AR
5734 fi
5735fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005736
5737
5738# tweak ARFLAGS only if the user didn't set it on the command line
5739
5740if test -z "$ARFLAGS"
5741then
5742 ARFLAGS="rc"
5743fi
5744
5745
Victor Stinner2c7085f2017-05-02 16:55:50 +02005746
5747
5748
Victor Stinnerdf569252017-05-03 00:05:45 +02005749if test -e $srcdir/.git
Victor Stinner2c7085f2017-05-02 16:55:50 +02005750then
5751# Extract the first word of "git", so it can be a program name with args.
5752set dummy git; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005753{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5754$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinner2c7085f2017-05-02 16:55:50 +02005755if ${ac_cv_prog_HAS_GIT+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005756 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005757else
Victor Stinner2c7085f2017-05-02 16:55:50 +02005758 if test -n "$HAS_GIT"; then
5759 ac_cv_prog_HAS_GIT="$HAS_GIT" # Let the user override the test.
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005760else
5761as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5762for as_dir in $PATH
5763do
5764 IFS=$as_save_IFS
5765 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005766 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01005767 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Victor Stinner2c7085f2017-05-02 16:55:50 +02005768 ac_cv_prog_HAS_GIT="found"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005769 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005770 break 2
5771 fi
5772done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005773 done
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005774IFS=$as_save_IFS
5775
Victor Stinner2c7085f2017-05-02 16:55:50 +02005776 test -z "$ac_cv_prog_HAS_GIT" && ac_cv_prog_HAS_GIT="not-found"
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005777fi
5778fi
Victor Stinner2c7085f2017-05-02 16:55:50 +02005779HAS_GIT=$ac_cv_prog_HAS_GIT
5780if test -n "$HAS_GIT"; then
5781 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAS_GIT" >&5
5782$as_echo "$HAS_GIT" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005783else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005784 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5785$as_echo "no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005786fi
5787
5788
Victor Stinner2c7085f2017-05-02 16:55:50 +02005789else
5790HAS_GIT=no-repository
5791fi
5792if test $HAS_GIT = found
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005793then
Victor Stinner2c7085f2017-05-02 16:55:50 +02005794 GITVERSION="git -C \$(srcdir) rev-parse --short HEAD"
5795 GITTAG="git -C \$(srcdir) describe --all --always --dirty"
5796 GITBRANCH="git -C \$(srcdir) name-rev --name-only HEAD"
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005797else
Victor Stinner2c7085f2017-05-02 16:55:50 +02005798 GITVERSION=""
5799 GITTAG=""
5800 GITBRANCH=""
Georg Brandl3a5508e2011-03-06 10:42:21 +01005801fi
5802
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005803case $MACHDEP in
5804bsdos*|hp*|HP*)
5805 # install -d does not work on BSDI or HP-UX
5806 if test -z "$INSTALL"
5807 then
5808 INSTALL="${srcdir}/install-sh -c"
5809 fi
5810esac
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005811# Find a good install program. We prefer a C program (faster),
5812# so one script is as good as another. But avoid the broken or
5813# incompatible versions:
5814# SysV /etc/install, /usr/sbin/install
5815# SunOS /usr/etc/install
5816# IRIX /sbin/install
5817# AIX /bin/install
5818# AmigaOS /C/install, which installs bootblocks on floppy discs
5819# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
5820# AFS /usr/afsws/bin/install, which mishandles nonexistent args
5821# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
5822# OS/2's system install, which has a completely different semantic
5823# ./install, which can be erroneously created by make from ./install.sh.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005824# Reject install programs that cannot install multiple files.
5825{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
5826$as_echo_n "checking for a BSD-compatible install... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005827if test -z "$INSTALL"; then
Matthias Klose3cef2a92012-03-14 23:39:33 +01005828if ${ac_cv_path_install+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005829 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005830else
5831 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5832for as_dir in $PATH
5833do
5834 IFS=$as_save_IFS
5835 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005836 # Account for people who put trailing slashes in PATH elements.
5837case $as_dir/ in #((
5838 ./ | .// | /[cC]/* | \
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005839 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005840 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005841 /usr/ucb/* ) ;;
5842 *)
5843 # OSF1 and SCO ODT 3.0 have their own names for install.
5844 # Don't use installbsd from OSF since it installs stuff as root
5845 # by default.
5846 for ac_prog in ginstall scoinst install; do
5847 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01005848 if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005849 if test $ac_prog = install &&
5850 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
5851 # AIX install. It has an incompatible calling convention.
5852 :
5853 elif test $ac_prog = install &&
5854 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
5855 # program-specific install script used by HP pwplus--don't use.
5856 :
5857 else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005858 rm -rf conftest.one conftest.two conftest.dir
5859 echo one > conftest.one
5860 echo two > conftest.two
5861 mkdir conftest.dir
5862 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
5863 test -s conftest.one && test -s conftest.two &&
5864 test -s conftest.dir/conftest.one &&
5865 test -s conftest.dir/conftest.two
5866 then
5867 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
5868 break 3
5869 fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005870 fi
5871 fi
5872 done
5873 done
5874 ;;
5875esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005876
5877 done
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005878IFS=$as_save_IFS
5879
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005880rm -rf conftest.one conftest.two conftest.dir
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005881
5882fi
5883 if test "${ac_cv_path_install+set}" = set; then
5884 INSTALL=$ac_cv_path_install
5885 else
5886 # As a last resort, use the slow shell script. Don't cache a
5887 # value for INSTALL within a source directory, because that will
5888 # break other packages using the cache if that directory is
5889 # removed, or if the value is a relative name.
5890 INSTALL=$ac_install_sh
5891 fi
5892fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005893{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
5894$as_echo "$INSTALL" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005895
5896# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
5897# It thinks the first close brace ends the variable substitution.
5898test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
5899
5900test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
5901
5902test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
5903
Trent Nelsonf6407a12012-08-30 14:56:13 +00005904{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
5905$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
5906if test -z "$MKDIR_P"; then
5907 if ${ac_cv_path_mkdir+:} false; then :
5908 $as_echo_n "(cached) " >&6
5909else
5910 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5911for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
5912do
5913 IFS=$as_save_IFS
5914 test -z "$as_dir" && as_dir=.
5915 for ac_prog in mkdir gmkdir; do
5916 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01005917 as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
Trent Nelsonf6407a12012-08-30 14:56:13 +00005918 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
5919 'mkdir (GNU coreutils) '* | \
5920 'mkdir (coreutils) '* | \
5921 'mkdir (fileutils) '4.1*)
5922 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
5923 break 3;;
5924 esac
5925 done
5926 done
5927 done
5928IFS=$as_save_IFS
5929
5930fi
5931
5932 test -d ./--version && rmdir ./--version
5933 if test "${ac_cv_path_mkdir+set}" = set; then
5934 MKDIR_P="$ac_cv_path_mkdir -p"
5935 else
5936 # As a last resort, use the slow shell script. Don't cache a
5937 # value for MKDIR_P within a source directory, because that will
5938 # break other packages using the cache if that directory is
5939 # removed, or if the value is a relative name.
5940 MKDIR_P="$ac_install_sh -d"
5941 fi
5942fi
5943{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
5944$as_echo "$MKDIR_P" >&6; }
5945
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005946
5947# Not every filesystem supports hard links
5948
5949if test -z "$LN" ; then
5950 case $ac_sys_system in
5951 BeOS*) LN="ln -s";;
5952 CYGWIN*) LN="ln -s";;
5953 atheos*) LN="ln -s";;
5954 *) LN=ln;;
5955 esac
5956fi
5957
5958# Check for --with-pydebug
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005959{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pydebug" >&5
5960$as_echo_n "checking for --with-pydebug... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005961
5962# Check whether --with-pydebug was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005963if test "${with_pydebug+set}" = set; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005964 withval=$with_pydebug;
5965if test "$withval" != no
5966then
5967
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005968$as_echo "#define Py_DEBUG 1" >>confdefs.h
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005969
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005970 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5971$as_echo "yes" >&6; };
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005972 Py_DEBUG='true'
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005973else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5974$as_echo "no" >&6; }; Py_DEBUG='false'
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005975fi
5976else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005977 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5978$as_echo "no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005979fi
5980
5981
5982# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
5983# merged with this chunk of code?
5984
5985# Optimizer/debugger flags
5986# ------------------------
5987# (The following bit of code is complicated enough - please keep things
5988# indented properly. Just pretend you're editing Python code. ;-)
5989
5990# There are two parallel sets of case statements below, one that checks to
5991# see if OPT was set and one that does BASECFLAGS setting based upon
5992# compiler and platform. BASECFLAGS tweaks need to be made even if the
5993# user set OPT.
5994
5995# tweak OPT based on compiler and platform, only if the user didn't set
5996# it on the command line
5997
Benjamin Petersond4b721b2010-03-23 20:58:37 +00005998if test "${OPT-unset}" = "unset"
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005999then
6000 case $GCC in
6001 yes)
6002 if test "$CC" != 'g++' ; then
6003 STRICT_PROTO="-Wstrict-prototypes"
6004 fi
6005 # For gcc 4.x we need to use -fwrapv so lets check if its supported
6006 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
6007 WRAP="-fwrapv"
6008 fi
Stefan Krah503e5e12011-09-14 15:19:42 +02006009
6010 # Clang also needs -fwrapv
Stefan Krah2bc1e8f2011-12-08 22:26:06 +01006011 case $CC in
6012 *clang*) WRAP="-fwrapv"
6013 ;;
6014 esac
Stefan Krah503e5e12011-09-14 15:19:42 +02006015
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006016 case $ac_cv_prog_cc_g in
6017 yes)
6018 if test "$Py_DEBUG" = 'true' ; then
6019 # Optimization messes up debuggers, so turn it off for
6020 # debug builds.
Mark Dickinsond2f3e3f2010-05-05 22:23:58 +00006021 OPT="-g -O0 -Wall $STRICT_PROTO"
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006022 else
6023 OPT="-g $WRAP -O3 -Wall $STRICT_PROTO"
6024 fi
6025 ;;
6026 *)
6027 OPT="-O3 -Wall $STRICT_PROTO"
6028 ;;
6029 esac
6030 case $ac_sys_system in
6031 SCO_SV*) OPT="$OPT -m486 -DSCO5"
6032 ;;
6033 esac
6034 ;;
6035
6036 *)
6037 OPT="-O"
6038 ;;
6039 esac
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006040fi
6041
6042
6043
6044# The -arch flags for universal builds on OSX
6045UNIVERSAL_ARCH_FLAGS=
6046
6047
6048# tweak BASECFLAGS based on compiler and platform
6049case $GCC in
6050yes)
6051 # Python violates C99 rules, by casting between incompatible
6052 # pointer types. GCC may generate bad code as a result of that,
6053 # so use -fno-strict-aliasing if supported.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006054 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -fno-strict-aliasing" >&5
6055$as_echo_n "checking whether $CC accepts -fno-strict-aliasing... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006056 ac_save_cc="$CC"
6057 CC="$CC -fno-strict-aliasing"
Matthias Klose3cef2a92012-03-14 23:39:33 +01006058 if ${ac_cv_no_strict_aliasing_ok+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006059 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00006060else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006061 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006062/* end confdefs.h. */
Gregory P. Smith373469a2009-11-01 21:03:38 +00006063
6064int
6065main ()
6066{
Mark Dickinson5e13e292010-05-11 08:55:06 +00006067
Gregory P. Smith373469a2009-11-01 21:03:38 +00006068 ;
6069 return 0;
6070}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006071_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006072if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006073 ac_cv_no_strict_aliasing_ok=yes
6074else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006075 ac_cv_no_strict_aliasing_ok=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006076fi
Gregory P. Smith373469a2009-11-01 21:03:38 +00006077rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00006078fi
6079
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006080 CC="$ac_save_cc"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006081 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_no_strict_aliasing_ok" >&5
6082$as_echo "$ac_cv_no_strict_aliasing_ok" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006083 if test $ac_cv_no_strict_aliasing_ok = yes
6084 then
6085 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
6086 fi
6087
6088 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
6089 # support. Without this, treatment of subnormals doesn't follow
6090 # the standard.
doko@python.orgd65e2ba2013-01-31 23:52:03 +01006091 case $host in
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006092 alpha*)
6093 BASECFLAGS="$BASECFLAGS -mieee"
6094 ;;
6095 esac
6096
6097 case $ac_sys_system in
6098 SCO_SV*)
6099 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
6100 ;;
Ned Deilyee8e4b62018-04-14 10:37:28 -04006101 # is there any other compiler on Darwin besides gcc?
6102 Darwin*)
6103 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
6104 # used to be here, but non-Apple gcc doesn't accept them.
6105 if test "${CC}" = gcc
6106 then
6107 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which compiler should be used" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006108$as_echo_n "checking which compiler should be used... " >&6; }
Ned Deilyee8e4b62018-04-14 10:37:28 -04006109 case "${UNIVERSALSDK}" in
6110 */MacOSX10.4u.sdk)
6111 # Build using 10.4 SDK, force usage of gcc when the
6112 # compiler is gcc, otherwise the user will get very
6113 # confusing error messages when building on OSX 10.6
6114 CC=gcc-4.0
6115 CPP=cpp-4.0
6116 ;;
6117 esac
6118 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006119$as_echo "$CC" >&6; }
Ned Deilyee8e4b62018-04-14 10:37:28 -04006120 fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006121
Ned Deilyee8e4b62018-04-14 10:37:28 -04006122 if test "${enable_universalsdk}"
6123 then
6124 case "$UNIVERSAL_ARCHS" in
6125 32-bit)
6126 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
6127 LIPO_32BIT_FLAGS=""
6128 ARCH_RUN_32BIT=""
6129 ;;
6130 64-bit)
6131 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
6132 LIPO_32BIT_FLAGS=""
6133 ARCH_RUN_32BIT=""
6134 ;;
6135 all)
6136 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
6137 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
6138 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
6139 ;;
6140 intel)
6141 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
6142 LIPO_32BIT_FLAGS="-extract i386"
6143 ARCH_RUN_32BIT="/usr/bin/arch -i386"
6144 ;;
6145 intel-32)
6146 UNIVERSAL_ARCH_FLAGS="-arch i386"
6147 LIPO_32BIT_FLAGS=""
6148 ARCH_RUN_32BIT=""
6149 ;;
6150 intel-64)
6151 UNIVERSAL_ARCH_FLAGS="-arch x86_64"
6152 LIPO_32BIT_FLAGS=""
6153 ARCH_RUN_32BIT=""
6154 ;;
6155 3-way)
6156 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
6157 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
6158 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
6159 ;;
6160 *)
6161 as_fn_error $? "proper usage is --with-universal-arch=32-bit|64-bit|all|intel|3-way" "$LINENO" 5
6162 ;;
6163 esac
Ronald Oussoren23d92532009-09-07 06:12:00 +00006164
Ned Deilyee8e4b62018-04-14 10:37:28 -04006165 if test "${UNIVERSALSDK}" != "/"
6166 then
6167 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
6168 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
6169 CPPFLAGS="-isysroot ${UNIVERSALSDK} ${CPPFLAGS}"
6170 else
6171 CFLAGS="${UNIVERSAL_ARCH_FLAGS} ${CFLAGS}"
6172 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} ${LDFLAGS}"
6173 fi
6174 fi
Ronald Oussoren23d92532009-09-07 06:12:00 +00006175
Ned Deilyee8e4b62018-04-14 10:37:28 -04006176 # Calculate an appropriate deployment target for this build:
6177 # The deployment target value is used explicitly to enable certain
6178 # features are enabled (such as builtin libedit support for readline)
6179 # through the use of Apple's Availability Macros and is used as a
6180 # component of the string returned by distutils.get_platform().
6181 #
6182 # Use the value from:
6183 # 1. the MACOSX_DEPLOYMENT_TARGET environment variable if specified
6184 # 2. the operating system version of the build machine if >= 10.6
6185 # 3. If running on OS X 10.3 through 10.5, use the legacy tests
6186 # below to pick either 10.3, 10.4, or 10.5 as the target.
6187 # 4. If we are running on OS X 10.2 or earlier, good luck!
Ronald Oussoren23d92532009-09-07 06:12:00 +00006188
Ned Deilyee8e4b62018-04-14 10:37:28 -04006189 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which MACOSX_DEPLOYMENT_TARGET to use" >&5
6190$as_echo_n "checking which MACOSX_DEPLOYMENT_TARGET to use... " >&6; }
6191 cur_target_major=`sw_vers -productVersion | \
6192 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
6193 cur_target_minor=`sw_vers -productVersion | \
6194 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
6195 cur_target="${cur_target_major}.${cur_target_minor}"
6196 if test ${cur_target_major} -eq 10 && \
6197 test ${cur_target_minor} -ge 3 && \
6198 test ${cur_target_minor} -le 5
6199 then
6200 # OS X 10.3 through 10.5
6201 cur_target=10.3
6202 if test ${enable_universalsdk}
6203 then
6204 case "$UNIVERSAL_ARCHS" in
6205 all|3-way|intel|64-bit)
6206 # These configurations were first supported in 10.5
6207 cur_target='10.5'
6208 ;;
6209 esac
6210 else
6211 if test `/usr/bin/arch` = "i386"
6212 then
6213 # 10.4 was the first release to support Intel archs
6214 cur_target="10.4"
6215 fi
6216 fi
6217 fi
6218 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006219
Ned Deilyee8e4b62018-04-14 10:37:28 -04006220 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
6221 # environment with a value that is the same as what we'll use
6222 # in the Makefile to ensure that we'll get the same compiler
6223 # environment during configure and build time.
6224 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
6225 export MACOSX_DEPLOYMENT_TARGET
6226 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
6227 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACOSX_DEPLOYMENT_TARGET" >&5
6228$as_echo "$MACOSX_DEPLOYMENT_TARGET" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006229
Ned Deilyee8e4b62018-04-14 10:37:28 -04006230 # end of Darwin* tests
6231 ;;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006232 OSF*)
6233 BASECFLAGS="$BASECFLAGS -mieee"
6234 ;;
6235 esac
6236 ;;
6237
6238*)
6239 case $ac_sys_system in
6240 OpenUNIX*|UnixWare*)
6241 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
6242 ;;
6243 OSF*)
6244 BASECFLAGS="$BASECFLAGS -ieee -std"
6245 ;;
6246 SCO_SV*)
6247 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
6248 ;;
6249 esac
6250 ;;
6251esac
6252
Zachary Ware6ed42ea2015-12-21 11:43:03 -06006253# ICC needs -fp-model strict or floats behave badly
6254case "$CC" in
6255*icc*)
6256 BASECFLAGS="$BASECFLAGS -fp-model strict"
6257 ;;
6258esac
6259
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006260if test "$Py_DEBUG" = 'true'; then
6261 :
6262else
6263 OPT="-DNDEBUG $OPT"
6264fi
6265
6266if test "$ac_arch_flags"
6267then
6268 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
6269fi
6270
6271# disable check for icc since it seems to pass, but generates a warning
6272if test "$CC" = icc
6273then
6274 ac_cv_opt_olimit_ok=no
6275fi
6276
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006277{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -OPT:Olimit=0" >&5
6278$as_echo_n "checking whether $CC accepts -OPT:Olimit=0... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01006279if ${ac_cv_opt_olimit_ok+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006280 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006281else
6282 ac_save_cc="$CC"
6283CC="$CC -OPT:Olimit=0"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006284cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006285/* end confdefs.h. */
Gregory P. Smith373469a2009-11-01 21:03:38 +00006286
6287int
6288main ()
6289{
Mark Dickinson5e13e292010-05-11 08:55:06 +00006290
Gregory P. Smith373469a2009-11-01 21:03:38 +00006291 ;
6292 return 0;
6293}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006294_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006295if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006296 ac_cv_opt_olimit_ok=yes
6297else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006298 ac_cv_opt_olimit_ok=no
Matthias Klosec511b472010-05-08 11:01:39 +00006299
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006300fi
Gregory P. Smith373469a2009-11-01 21:03:38 +00006301rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006302CC="$ac_save_cc"
6303fi
6304
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006305{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_opt_olimit_ok" >&5
6306$as_echo "$ac_cv_opt_olimit_ok" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006307if test $ac_cv_opt_olimit_ok = yes; then
6308 case $ac_sys_system in
6309 # XXX is this branch needed? On MacOSX 10.2.2 the result of the
6310 # olimit_ok test is "no". Is it "yes" in some other Darwin-esque
6311 # environment?
6312 Darwin*)
6313 ;;
Trent Nelson34562e12012-10-17 18:01:12 -04006314 # XXX thankfully this useless troublemaker of a flag has been
6315 # eradicated in the 3.x line. For now, make sure it isn't picked
6316 # up by any of our other platforms that use CC.
6317 AIX*|SunOS*|HP-UX*|IRIX*)
6318 ;;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006319 *)
6320 BASECFLAGS="$BASECFLAGS -OPT:Olimit=0"
6321 ;;
6322 esac
6323else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006324 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Olimit 1500" >&5
6325$as_echo_n "checking whether $CC accepts -Olimit 1500... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01006326 if ${ac_cv_olimit_ok+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006327 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006328else
6329 ac_save_cc="$CC"
6330 CC="$CC -Olimit 1500"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006331 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006332/* end confdefs.h. */
Gregory P. Smith373469a2009-11-01 21:03:38 +00006333
6334int
6335main ()
6336{
Mark Dickinson5e13e292010-05-11 08:55:06 +00006337
Gregory P. Smith373469a2009-11-01 21:03:38 +00006338 ;
6339 return 0;
6340}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006341_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006342if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006343 ac_cv_olimit_ok=yes
6344else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006345 ac_cv_olimit_ok=no
Matthias Klosec511b472010-05-08 11:01:39 +00006346
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006347fi
Gregory P. Smith373469a2009-11-01 21:03:38 +00006348rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006349 CC="$ac_save_cc"
6350fi
6351
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006352 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_olimit_ok" >&5
6353$as_echo "$ac_cv_olimit_ok" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006354 if test $ac_cv_olimit_ok = yes; then
Stefan Krah67473262012-11-29 00:17:05 +01006355 case $ac_sys_system in
6356 # Issue #16534: On HP-UX ac_cv_olimit_ok=yes is a false positive.
6357 HP-UX*)
6358 ;;
6359 *)
6360 BASECFLAGS="$BASECFLAGS -Olimit 1500"
6361 ;;
6362 esac
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006363 fi
6364fi
6365
6366# Check whether GCC supports PyArg_ParseTuple format
6367if test "$GCC" = "yes"
6368then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006369 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc supports ParseTuple __format__" >&5
6370$as_echo_n "checking whether gcc supports ParseTuple __format__... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006371 save_CFLAGS=$CFLAGS
Benjamin Petersonc8759662013-05-11 13:00:05 -05006372 CFLAGS="$CFLAGS -Werror -Wformat"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006373 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006374/* end confdefs.h. */
6375
6376 void f(char*,...)__attribute((format(PyArg_ParseTuple, 1, 2)));
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006377int
6378main ()
6379{
6380
6381 ;
6382 return 0;
6383}
Matthias Klosec511b472010-05-08 11:01:39 +00006384
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006385_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006386if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006387
Matthias Klosec511b472010-05-08 11:01:39 +00006388
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006389$as_echo "#define HAVE_ATTRIBUTE_FORMAT_PARSETUPLE 1" >>confdefs.h
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006390
Matthias Klosec511b472010-05-08 11:01:39 +00006391 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006392$as_echo "yes" >&6; }
Matthias Klosec511b472010-05-08 11:01:39 +00006393
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006394else
Matthias Klosec511b472010-05-08 11:01:39 +00006395
6396 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006397$as_echo "no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006398
6399fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006400rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6401 CFLAGS=$save_CFLAGS
6402fi
6403
Brett Cannon4ff151a2015-09-18 15:09:42 -07006404
Gregory P. Smith6d8fdfc2016-09-07 23:28:23 -07006405# Enable optimization flags
6406
6407
6408Py_OPT='false'
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)b9999152016-11-20 21:19:36 +00006409{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-optimizations" >&5
6410$as_echo_n "checking for --enable-optimizations... " >&6; }
6411# Check whether --enable-optimizations was given.
6412if test "${enable_optimizations+set}" = set; then :
6413 enableval=$enable_optimizations;
INADA Naoki6a04ef72017-03-29 01:50:48 +09006414if test "$enableval" != no
Gregory P. Smith6d8fdfc2016-09-07 23:28:23 -07006415then
6416 Py_OPT='true'
6417 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6418$as_echo "yes" >&6; };
6419else
6420 Py_OPT='false'
6421 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6422$as_echo "no" >&6; };
6423fi
6424else
6425 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6426$as_echo "no" >&6; }
6427fi
6428
6429if test "$Py_OPT" = 'true' ; then
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)9cbfa792016-09-08 22:44:44 +00006430 # Intentionally not forcing Py_LTO='true' here. Too many toolchains do not
6431 # compile working code using it and both test_distutils and test_gdb are
6432 # broken when you do managed to get a toolchain that works with it. People
6433 # who want LTO need to use --with-lto themselves.
Gregory P. Smith6d8fdfc2016-09-07 23:28:23 -07006434 DEF_MAKE_ALL_RULE="profile-opt"
Gregory P. Smith794b2912016-09-08 00:07:40 -07006435 REQUIRE_PGO="yes"
Gregory P. Smith6d8fdfc2016-09-07 23:28:23 -07006436 DEF_MAKE_RULE="build_all"
6437else
6438 DEF_MAKE_ALL_RULE="build_all"
Gregory P. Smith794b2912016-09-08 00:07:40 -07006439 REQUIRE_PGO="no"
Gregory P. Smith6d8fdfc2016-09-07 23:28:23 -07006440 DEF_MAKE_RULE="all"
6441fi
6442
6443
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)c543a0f2016-06-02 23:44:40 +00006444# Enable LTO flags
6445
6446{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-lto" >&5
6447$as_echo_n "checking for --with-lto... " >&6; }
6448
6449# Check whether --with-lto was given.
6450if test "${with_lto+set}" = set; then :
6451 withval=$with_lto;
6452if test "$withval" != no
6453then
6454 Py_LTO='true'
6455 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6456$as_echo "yes" >&6; };
6457else
6458 Py_LTO='false'
6459 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6460$as_echo "no" >&6; };
6461fi
6462else
6463 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6464$as_echo "no" >&6; }
6465fi
6466
6467if test "$Py_LTO" = 'true' ; then
6468 case $CC in
6469 *clang*)
6470 # Any changes made here should be reflected in the GCC+Darwin case below
6471 LTOFLAGS="-flto"
6472 ;;
6473 *gcc*)
6474 case $ac_sys_system in
6475 Darwin*)
6476 LTOFLAGS="-flto"
6477 ;;
6478 *)
6479 LTOFLAGS="-flto -fuse-linker-plugin -ffat-lto-objects -flto-partition=none"
6480 ;;
6481 esac
6482 ;;
6483 esac
6484fi
6485
6486
Brett Cannon4ff151a2015-09-18 15:09:42 -07006487# Enable PGO flags.
Zachary Ware6ed42ea2015-12-21 11:43:03 -06006488
6489
6490
6491
6492
Gregory P. Smith794b2912016-09-08 00:07:40 -07006493# Make this work on systems where llvm tools are not installed with their
6494# normal names in the default $PATH (ie: Ubuntu). They exist under the
6495# non-suffixed name in their versioned llvm directory.
6496llvm_bin_dir=''
6497llvm_path="${PATH}"
6498if test "${CC}" = "clang"
6499then
6500 clang_bin=`which clang`
6501 # Some systems install clang elsewhere as a symlink to the real path
6502 # which is where the related llvm tools are located.
6503 if test -L "${clang_bin}"
6504 then
6505 clang_dir=`dirname "${clang_bin}"`
6506 clang_bin=`readlink "${clang_bin}"`
6507 llvm_bin_dir="${clang_dir}/"`dirname "${clang_bin}"`
6508 llvm_path="${llvm_path}${PATH_SEPARATOR}${llvm_bin_dir}"
6509 fi
6510fi
Zachary Ware6ed42ea2015-12-21 11:43:03 -06006511
Gregory P. Smith794b2912016-09-08 00:07:40 -07006512{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
6513$as_echo_n "checking target system type... " >&6; }
6514if ${ac_cv_target+:} false; then :
Brett Cannon4ff151a2015-09-18 15:09:42 -07006515 $as_echo_n "(cached) " >&6
6516else
Gregory P. Smith794b2912016-09-08 00:07:40 -07006517 if test "x$target_alias" = x; then
6518 ac_cv_target=$ac_cv_host
Brett Cannon4ff151a2015-09-18 15:09:42 -07006519else
Gregory P. Smith794b2912016-09-08 00:07:40 -07006520 ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
6521 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
6522fi
6523
6524fi
6525{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
6526$as_echo "$ac_cv_target" >&6; }
6527case $ac_cv_target in
6528*-*-*) ;;
6529*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
6530esac
6531target=$ac_cv_target
6532ac_save_IFS=$IFS; IFS='-'
6533set x $ac_cv_target
6534shift
6535target_cpu=$1
6536target_vendor=$2
6537shift; shift
6538# Remember, the first character of IFS is used to create $*,
6539# except with old shells:
6540target_os=$*
6541IFS=$ac_save_IFS
6542case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
6543
6544
6545# The aliases save the names the user supplied, while $host etc.
6546# will get canonicalized.
6547test -n "$target_alias" &&
6548 test "$program_prefix$program_suffix$program_transform_name" = \
6549 NONENONEs,x,x, &&
6550 program_prefix=${target_alias}-
6551# Extract the first word of "$target_alias-llvm-profdata", so it can be a program name with args.
6552set dummy $target_alias-llvm-profdata; ac_word=$2
6553{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6554$as_echo_n "checking for $ac_word... " >&6; }
6555if ${ac_cv_path_LLVM_PROFDATA+:} false; then :
6556 $as_echo_n "(cached) " >&6
6557else
6558 case $LLVM_PROFDATA in
6559 [\\/]* | ?:[\\/]*)
6560 ac_cv_path_LLVM_PROFDATA="$LLVM_PROFDATA" # Let the user override the test with a path.
6561 ;;
6562 *)
6563 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6564for as_dir in ${llvm_path}
Brett Cannon4ff151a2015-09-18 15:09:42 -07006565do
6566 IFS=$as_save_IFS
6567 test -z "$as_dir" && as_dir=.
6568 for ac_exec_ext in '' $ac_executable_extensions; do
6569 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Gregory P. Smith794b2912016-09-08 00:07:40 -07006570 ac_cv_path_LLVM_PROFDATA="$as_dir/$ac_word$ac_exec_ext"
Brett Cannon4ff151a2015-09-18 15:09:42 -07006571 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6572 break 2
6573 fi
6574done
6575 done
6576IFS=$as_save_IFS
6577
Gregory P. Smith794b2912016-09-08 00:07:40 -07006578 ;;
6579esac
Brett Cannon4ff151a2015-09-18 15:09:42 -07006580fi
Gregory P. Smith794b2912016-09-08 00:07:40 -07006581LLVM_PROFDATA=$ac_cv_path_LLVM_PROFDATA
6582if test -n "$LLVM_PROFDATA"; then
6583 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_PROFDATA" >&5
6584$as_echo "$LLVM_PROFDATA" >&6; }
Brett Cannon4ff151a2015-09-18 15:09:42 -07006585else
6586 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6587$as_echo "no" >&6; }
6588fi
6589
6590
Gregory P. Smith794b2912016-09-08 00:07:40 -07006591if test -z "$ac_cv_path_LLVM_PROFDATA"; then
6592 if test "$build" = "$target"; then
6593 ac_pt_LLVM_PROFDATA=$LLVM_PROFDATA
6594 # Extract the first word of "llvm-profdata", so it can be a program name with args.
6595set dummy llvm-profdata; ac_word=$2
6596{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6597$as_echo_n "checking for $ac_word... " >&6; }
6598if ${ac_cv_path_ac_pt_LLVM_PROFDATA+:} false; then :
6599 $as_echo_n "(cached) " >&6
6600else
6601 case $ac_pt_LLVM_PROFDATA in
6602 [\\/]* | ?:[\\/]*)
6603 ac_cv_path_ac_pt_LLVM_PROFDATA="$ac_pt_LLVM_PROFDATA" # Let the user override the test with a path.
6604 ;;
6605 *)
6606 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6607for as_dir in ${llvm_path}
6608do
6609 IFS=$as_save_IFS
6610 test -z "$as_dir" && as_dir=.
6611 for ac_exec_ext in '' $ac_executable_extensions; do
6612 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6613 ac_cv_path_ac_pt_LLVM_PROFDATA="$as_dir/$ac_word$ac_exec_ext"
6614 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6615 break 2
6616 fi
6617done
6618 done
6619IFS=$as_save_IFS
6620
6621 test -z "$ac_cv_path_ac_pt_LLVM_PROFDATA" && ac_cv_path_ac_pt_LLVM_PROFDATA="''"
6622 ;;
6623esac
6624fi
6625ac_pt_LLVM_PROFDATA=$ac_cv_path_ac_pt_LLVM_PROFDATA
6626if test -n "$ac_pt_LLVM_PROFDATA"; then
6627 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_LLVM_PROFDATA" >&5
6628$as_echo "$ac_pt_LLVM_PROFDATA" >&6; }
6629else
6630 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6631$as_echo "no" >&6; }
6632fi
6633
6634 LLVM_PROFDATA=$ac_pt_LLVM_PROFDATA
6635 else
6636 LLVM_PROFDATA="''"
6637 fi
6638else
6639 LLVM_PROFDATA="$ac_cv_path_LLVM_PROFDATA"
6640fi
6641
6642
6643if test -n "${LLVM_PROFDATA}" -a -x "${LLVM_PROFDATA}"
6644then
6645 LLVM_PROF_FOUND="found"
6646else
6647 LLVM_PROF_FOUND="not-found"
6648fi
6649if test "$ac_sys_system" = "Darwin" -a "${LLVM_PROF_FOUND}" = "not-found"
6650then
6651 found_llvm_profdata=`/usr/bin/xcrun -find llvm-profdata 2>/dev/null`
6652 if test -n "${found_llvm_profdata}"
6653 then
6654 # llvm-profdata isn't directly in $PATH in some cases.
6655 # https://apple.stackexchange.com/questions/197053/
6656 LLVM_PROFDATA='/usr/bin/xcrun llvm-profdata'
6657 LLVM_PROF_FOUND=found
6658 { $as_echo "$as_me:${as_lineno-$LINENO}: llvm-profdata found via xcrun: ${LLVM_PROFDATA}" >&5
6659$as_echo "$as_me: llvm-profdata found via xcrun: ${LLVM_PROFDATA}" >&6;}
6660 fi
6661fi
Brett Cannon4ff151a2015-09-18 15:09:42 -07006662LLVM_PROF_ERR=no
6663case $CC in
6664 *clang*)
6665 # Any changes made here should be reflected in the GCC+Darwin case below
6666 PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
6667 PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd"
Gregory P. Smith794b2912016-09-08 00:07:40 -07006668 LLVM_PROF_MERGER="${LLVM_PROFDATA} merge -output=code.profclangd *.profclangr"
Brett Cannon4ff151a2015-09-18 15:09:42 -07006669 LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"code-%p.profclangr\""
6670 if test $LLVM_PROF_FOUND = not-found
6671 then
6672 LLVM_PROF_ERR=yes
Gregory P. Smith794b2912016-09-08 00:07:40 -07006673 if test "${REQUIRE_PGO}" = "yes"
6674 then
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)b9999152016-11-20 21:19:36 +00006675 as_fn_error $? "llvm-profdata is required for a --enable-optimizations build but could not be found." "$LINENO" 5
Gregory P. Smith794b2912016-09-08 00:07:40 -07006676 fi
Brett Cannon4ff151a2015-09-18 15:09:42 -07006677 fi
6678 ;;
6679 *gcc*)
6680 case $ac_sys_system in
6681 Darwin*)
6682 PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
6683 PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd"
Gregory P. Smith794b2912016-09-08 00:07:40 -07006684 LLVM_PROF_MERGER="${LLVM_PROFDATA} merge -output=code.profclangd *.profclangr"
Brett Cannon4ff151a2015-09-18 15:09:42 -07006685 LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"code-%p.profclangr\""
Gregory P. Smith794b2912016-09-08 00:07:40 -07006686 if test "${LLVM_PROF_FOUND}" = "not-found"
Brett Cannon4ff151a2015-09-18 15:09:42 -07006687 then
6688 LLVM_PROF_ERR=yes
Gregory P. Smith794b2912016-09-08 00:07:40 -07006689 if test "${REQUIRE_PGO}" = "yes"
6690 then
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)b9999152016-11-20 21:19:36 +00006691 as_fn_error $? "llvm-profdata is required for a --enable-optimizations build but could not be found." "$LINENO" 5
Gregory P. Smith794b2912016-09-08 00:07:40 -07006692 fi
Brett Cannon4ff151a2015-09-18 15:09:42 -07006693 fi
6694 ;;
6695 *)
6696 PGO_PROF_GEN_FLAG="-fprofile-generate"
6697 PGO_PROF_USE_FLAG="-fprofile-use -fprofile-correction"
6698 LLVM_PROF_MERGER="true"
6699 LLVM_PROF_FILE=""
6700 ;;
6701 esac
6702 ;;
Zachary Ware6ed42ea2015-12-21 11:43:03 -06006703 *icc*)
6704 PGO_PROF_GEN_FLAG="-prof-gen"
6705 PGO_PROF_USE_FLAG="-prof-use"
6706 LLVM_PROF_MERGER="true"
6707 LLVM_PROF_FILE=""
6708 ;;
Brett Cannon4ff151a2015-09-18 15:09:42 -07006709esac
6710
6711
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006712# On some compilers, pthreads are available without further options
6713# (e.g. MacOS X). On some of these systems, the compiler will not
6714# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
6715# So we have to see first whether pthreads are available without
6716# options before we can check whether -Kpthread improves anything.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006717{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads are available without options" >&5
6718$as_echo_n "checking whether pthreads are available without options... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01006719if ${ac_cv_pthread_is_default+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006720 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006721else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006722 if test "$cross_compiling" = yes; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006723 ac_cv_pthread_is_default=no
6724else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006725 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006726/* end confdefs.h. */
6727
Stefan Krahae66ca62012-11-22 22:36:57 +01006728#include <stdio.h>
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006729#include <pthread.h>
6730
6731void* routine(void* p){return NULL;}
6732
6733int main(){
6734 pthread_t p;
6735 if(pthread_create(&p,NULL,routine,NULL)!=0)
6736 return 1;
6737 (void)pthread_detach(p);
6738 return 0;
6739}
6740
6741_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006742if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006743
6744 ac_cv_pthread_is_default=yes
6745 ac_cv_kthread=no
6746 ac_cv_pthread=no
6747
6748else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006749 ac_cv_pthread_is_default=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006750fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006751rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6752 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006753fi
6754
6755
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006756fi
6757
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006758{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_is_default" >&5
6759$as_echo "$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006760
6761
6762if test $ac_cv_pthread_is_default = yes
6763then
6764 ac_cv_kpthread=no
6765else
6766# -Kpthread, if available, provides the right #defines
6767# and linker options to make pthread_create available
6768# Some compilers won't report that they do not support -Kpthread,
6769# so we need to run a program to see whether it really made the
6770# function available.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006771{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kpthread" >&5
6772$as_echo_n "checking whether $CC accepts -Kpthread... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01006773if ${ac_cv_kpthread+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006774 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006775else
6776 ac_save_cc="$CC"
6777CC="$CC -Kpthread"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006778if test "$cross_compiling" = yes; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006779 ac_cv_kpthread=no
6780else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006781 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006782/* end confdefs.h. */
6783
Stefan Krahae66ca62012-11-22 22:36:57 +01006784#include <stdio.h>
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006785#include <pthread.h>
6786
6787void* routine(void* p){return NULL;}
6788
6789int main(){
6790 pthread_t p;
6791 if(pthread_create(&p,NULL,routine,NULL)!=0)
6792 return 1;
6793 (void)pthread_detach(p);
6794 return 0;
6795}
6796
6797_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006798if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006799 ac_cv_kpthread=yes
6800else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006801 ac_cv_kpthread=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006802fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006803rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6804 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006805fi
6806
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006807CC="$ac_save_cc"
6808fi
6809
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006810{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kpthread" >&5
6811$as_echo "$ac_cv_kpthread" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006812fi
6813
6814if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
6815then
6816# -Kthread, if available, provides the right #defines
6817# and linker options to make pthread_create available
6818# Some compilers won't report that they do not support -Kthread,
6819# so we need to run a program to see whether it really made the
6820# function available.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006821{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kthread" >&5
6822$as_echo_n "checking whether $CC accepts -Kthread... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01006823if ${ac_cv_kthread+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006824 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006825else
6826 ac_save_cc="$CC"
6827CC="$CC -Kthread"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006828if test "$cross_compiling" = yes; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006829 ac_cv_kthread=no
6830else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006831 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006832/* end confdefs.h. */
6833
Stefan Krahae66ca62012-11-22 22:36:57 +01006834#include <stdio.h>
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006835#include <pthread.h>
6836
6837void* routine(void* p){return NULL;}
6838
6839int main(){
6840 pthread_t p;
6841 if(pthread_create(&p,NULL,routine,NULL)!=0)
6842 return 1;
6843 (void)pthread_detach(p);
6844 return 0;
6845}
6846
6847_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006848if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006849 ac_cv_kthread=yes
6850else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006851 ac_cv_kthread=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006852fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006853rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6854 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006855fi
6856
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006857CC="$ac_save_cc"
6858fi
6859
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006860{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kthread" >&5
6861$as_echo "$ac_cv_kthread" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006862fi
6863
6864if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
6865then
6866# -pthread, if available, provides the right #defines
6867# and linker options to make pthread_create available
6868# Some compilers won't report that they do not support -pthread,
6869# so we need to run a program to see whether it really made the
6870# function available.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006871{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -pthread" >&5
6872$as_echo_n "checking whether $CC accepts -pthread... " >&6; }
doko@python.orgfa3f9a32013-01-25 15:32:31 +01006873if ${ac_cv_pthread+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006874 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006875else
6876 ac_save_cc="$CC"
6877CC="$CC -pthread"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006878if test "$cross_compiling" = yes; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006879 ac_cv_pthread=no
6880else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006881 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006882/* end confdefs.h. */
6883
Stefan Krahae66ca62012-11-22 22:36:57 +01006884#include <stdio.h>
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006885#include <pthread.h>
6886
6887void* routine(void* p){return NULL;}
6888
6889int main(){
6890 pthread_t p;
6891 if(pthread_create(&p,NULL,routine,NULL)!=0)
6892 return 1;
6893 (void)pthread_detach(p);
6894 return 0;
6895}
6896
6897_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006898if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006899 ac_cv_pthread=yes
6900else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006901 ac_cv_pthread=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006902fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006903rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6904 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006905fi
6906
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006907CC="$ac_save_cc"
6908fi
6909
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006910{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread" >&5
6911$as_echo "$ac_cv_pthread" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006912fi
6913
6914# If we have set a CC compiler flag for thread support then
6915# check if it works for CXX, too.
6916ac_cv_cxx_thread=no
6917if test ! -z "$CXX"
6918then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006919{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX also accepts flags for thread support" >&5
6920$as_echo_n "checking whether $CXX also accepts flags for thread support... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006921ac_save_cxx="$CXX"
6922
6923if test "$ac_cv_kpthread" = "yes"
6924then
6925 CXX="$CXX -Kpthread"
6926 ac_cv_cxx_thread=yes
6927elif test "$ac_cv_kthread" = "yes"
6928then
6929 CXX="$CXX -Kthread"
6930 ac_cv_cxx_thread=yes
6931elif test "$ac_cv_pthread" = "yes"
6932then
6933 CXX="$CXX -pthread"
6934 ac_cv_cxx_thread=yes
6935fi
6936
6937if test $ac_cv_cxx_thread = yes
6938then
6939 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
6940 $CXX -c conftest.$ac_ext 2>&5
6941 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
6942 && test -s conftest$ac_exeext && ./conftest$ac_exeext
6943 then
6944 ac_cv_cxx_thread=yes
6945 else
6946 ac_cv_cxx_thread=no
6947 fi
6948 rm -fr conftest*
6949fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006950{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_thread" >&5
6951$as_echo "$ac_cv_cxx_thread" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006952fi
6953CXX="$ac_save_cxx"
6954
6955
6956# checks for header files
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006957{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
6958$as_echo_n "checking for ANSI C header files... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01006959if ${ac_cv_header_stdc+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006960 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006961else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006962 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006963/* end confdefs.h. */
6964#include <stdlib.h>
6965#include <stdarg.h>
6966#include <string.h>
6967#include <float.h>
6968
6969int
6970main ()
6971{
6972
6973 ;
6974 return 0;
6975}
6976_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006977if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006978 ac_cv_header_stdc=yes
6979else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006980 ac_cv_header_stdc=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006981fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006982rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6983
6984if test $ac_cv_header_stdc = yes; then
6985 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006986 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006987/* end confdefs.h. */
6988#include <string.h>
6989
6990_ACEOF
6991if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006992 $EGREP "memchr" >/dev/null 2>&1; then :
6993
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006994else
6995 ac_cv_header_stdc=no
6996fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00006997rm -f conftest*
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006998
6999fi
7000
7001if test $ac_cv_header_stdc = yes; then
7002 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007003 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00007004/* end confdefs.h. */
7005#include <stdlib.h>
7006
7007_ACEOF
7008if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007009 $EGREP "free" >/dev/null 2>&1; then :
7010
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00007011else
7012 ac_cv_header_stdc=no
7013fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00007014rm -f conftest*
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00007015
7016fi
7017
7018if test $ac_cv_header_stdc = yes; then
7019 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007020 if test "$cross_compiling" = yes; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00007021 :
7022else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007023 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00007024/* end confdefs.h. */
7025#include <ctype.h>
7026#include <stdlib.h>
7027#if ((' ' & 0x0FF) == 0x020)
7028# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
7029# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
7030#else
7031# define ISLOWER(c) \
7032 (('a' <= (c) && (c) <= 'i') \
7033 || ('j' <= (c) && (c) <= 'r') \
7034 || ('s' <= (c) && (c) <= 'z'))
7035# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
7036#endif
7037
7038#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
7039int
7040main ()
7041{
7042 int i;
7043 for (i = 0; i < 256; i++)
7044 if (XOR (islower (i), ISLOWER (i))
7045 || toupper (i) != TOUPPER (i))
7046 return 2;
7047 return 0;
7048}
7049_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007050if ac_fn_c_try_run "$LINENO"; then :
7051
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00007052else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007053 ac_cv_header_stdc=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00007054fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007055rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7056 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00007057fi
7058
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00007059fi
7060fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007061{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
7062$as_echo "$ac_cv_header_stdc" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00007063if test $ac_cv_header_stdc = yes; then
7064
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007065$as_echo "#define STDC_HEADERS 1" >>confdefs.h
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00007066
7067fi
7068
Miss Islington (bot)6ccdad72018-01-24 01:51:39 -08007069for ac_header in asm/types.h crypt.h conio.h direct.h dlfcn.h errno.h \
Martin v. Löwis0e8bd7e2006-06-10 12:23:46 +00007070fcntl.h grp.h \
doko@ubuntu.comf27ec3e2014-04-17 20:11:19 +02007071ieeefp.h io.h langinfo.h libintl.h poll.h process.h pthread.h \
Martin v. Löwis40e9aed2006-10-02 15:20:37 +00007072shadow.h signal.h stdint.h stropts.h termios.h thread.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00007073unistd.h utime.h \
Christian Heimes0e9ab5f2008-03-21 23:49:44 +00007074sys/audioio.h sys/bsdtty.h sys/epoll.h sys/event.h sys/file.h sys/loadavg.h \
7075sys/lock.h sys/mkdev.h sys/modem.h \
Benjamin Peterson6b1c9092016-12-19 23:54:25 -08007076sys/param.h sys/poll.h sys/random.h sys/select.h sys/socket.h sys/statvfs.h sys/stat.h \
Martin v. Löwis8c255e42008-05-23 15:06:50 +00007077sys/termio.h sys/time.h \
Martin v. Löwis0e8bd7e2006-06-10 12:23:46 +00007078sys/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 +00007079sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Christian Heimesffa70112017-09-05 17:08:45 +02007080bluetooth/bluetooth.h linux/tipc.h spawn.h util.h alloca.h sys/sysmacros.h
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007081do :
7082 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7083ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007084if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007085 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007086#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00007087_ACEOF
7088
7089fi
7090
Guido van Rossum627b2d71993-12-24 10:39:16 +00007091done
7092
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007093ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00007094for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007095 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
7096{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
7097$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007098if eval \${$as_ac_Header+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007099 $as_echo_n "(cached) " >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00007100else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007101 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007102/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007103#include <sys/types.h>
7104#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00007105
Martin v. Löwis11437992002-04-12 09:54:03 +00007106int
7107main ()
7108{
7109if ((DIR *) 0)
7110return 0;
7111 ;
7112 return 0;
7113}
7114_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007115if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007116 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00007117else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007118 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007119fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007120rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00007121fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007122eval ac_res=\$$as_ac_Header
7123 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
7124$as_echo "$ac_res" >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007125if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007126 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007127#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00007128_ACEOF
7129
7130ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00007131fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007132
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007133done
7134# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
7135if test $ac_header_dirent = dirent.h; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007136 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
7137$as_echo_n "checking for library containing opendir... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007138if ${ac_cv_search_opendir+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007139 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007140else
Martin v. Löwis11437992002-04-12 09:54:03 +00007141 ac_func_search_save_LIBS=$LIBS
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007142cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007143/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007144
Martin v. Löwiseba40652007-08-30 20:10:57 +00007145/* Override any GCC internal prototype to avoid an error.
7146 Use char because int might match the return type of a GCC
7147 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007148#ifdef __cplusplus
7149extern "C"
7150#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007151char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007152int
7153main ()
7154{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007155return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007156 ;
7157 return 0;
7158}
7159_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00007160for ac_lib in '' dir; do
7161 if test -z "$ac_lib"; then
7162 ac_res="none required"
7163 else
7164 ac_res=-l$ac_lib
Skip Montanaro89e975f2007-08-22 19:05:21 +00007165 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Martin v. Löwiseba40652007-08-30 20:10:57 +00007166 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007167 if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00007168 ac_cv_search_opendir=$ac_res
Brett Cannon19fab762007-06-02 03:02:29 +00007169fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007170rm -f core conftest.err conftest.$ac_objext \
7171 conftest$ac_exeext
Matthias Klose3cef2a92012-03-14 23:39:33 +01007172 if ${ac_cv_search_opendir+:} false; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00007173 break
Skip Montanaro89e975f2007-08-22 19:05:21 +00007174fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007175done
Matthias Klose3cef2a92012-03-14 23:39:33 +01007176if ${ac_cv_search_opendir+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007177
Martin v. Löwiseba40652007-08-30 20:10:57 +00007178else
7179 ac_cv_search_opendir=no
7180fi
7181rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007182LIBS=$ac_func_search_save_LIBS
7183fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007184{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
7185$as_echo "$ac_cv_search_opendir" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007186ac_res=$ac_cv_search_opendir
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007187if test "$ac_res" != no; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00007188 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00007189
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007190fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007191
Michael W. Hudson54241132001-12-07 15:38:26 +00007192else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007193 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
7194$as_echo_n "checking for library containing opendir... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007195if ${ac_cv_search_opendir+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007196 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007197else
7198 ac_func_search_save_LIBS=$LIBS
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007199cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007200/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007201
Martin v. Löwiseba40652007-08-30 20:10:57 +00007202/* Override any GCC internal prototype to avoid an error.
7203 Use char because int might match the return type of a GCC
7204 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007205#ifdef __cplusplus
7206extern "C"
7207#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007208char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007209int
7210main ()
7211{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007212return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007213 ;
7214 return 0;
7215}
7216_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00007217for ac_lib in '' x; do
7218 if test -z "$ac_lib"; then
7219 ac_res="none required"
7220 else
7221 ac_res=-l$ac_lib
Skip Montanaro89e975f2007-08-22 19:05:21 +00007222 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Martin v. Löwiseba40652007-08-30 20:10:57 +00007223 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007224 if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00007225 ac_cv_search_opendir=$ac_res
Brett Cannon19fab762007-06-02 03:02:29 +00007226fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007227rm -f core conftest.err conftest.$ac_objext \
7228 conftest$ac_exeext
Matthias Klose3cef2a92012-03-14 23:39:33 +01007229 if ${ac_cv_search_opendir+:} false; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00007230 break
Skip Montanaro89e975f2007-08-22 19:05:21 +00007231fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007232done
Matthias Klose3cef2a92012-03-14 23:39:33 +01007233if ${ac_cv_search_opendir+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007234
Martin v. Löwiseba40652007-08-30 20:10:57 +00007235else
7236 ac_cv_search_opendir=no
7237fi
7238rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007239LIBS=$ac_func_search_save_LIBS
7240fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007241{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
7242$as_echo "$ac_cv_search_opendir" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007243ac_res=$ac_cv_search_opendir
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007244if test "$ac_res" != no; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00007245 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00007246
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007247fi
7248
7249fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00007250
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007251{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5
7252$as_echo_n "checking whether sys/types.h defines makedev... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007253if ${ac_cv_header_sys_types_h_makedev+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007254 $as_echo_n "(cached) " >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007255else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007256 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007257/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007258#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007259int
7260main ()
7261{
7262return makedev(0, 0);
7263 ;
7264 return 0;
7265}
7266_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007267if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007268 ac_cv_header_sys_types_h_makedev=yes
7269else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007270 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007271fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007272rm -f core conftest.err conftest.$ac_objext \
7273 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007274
7275fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007276{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_types_h_makedev" >&5
7277$as_echo "$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007278
7279if test $ac_cv_header_sys_types_h_makedev = no; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007280ac_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 +01007281if test "x$ac_cv_header_sys_mkdev_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007282
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007283$as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007284
7285fi
7286
7287
7288
7289 if test $ac_cv_header_sys_mkdev_h = no; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007290 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 +01007291if test "x$ac_cv_header_sys_sysmacros_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007292
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007293$as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007294
7295fi
7296
7297
7298 fi
7299fi
7300
Michael W. Hudson54241132001-12-07 15:38:26 +00007301
Martin v. Löwis11017b12006-01-14 18:12:57 +00007302# On Linux, netlink.h requires asm/types.h
Martin v. Löwis11017b12006-01-14 18:12:57 +00007303for ac_header in linux/netlink.h
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007304do :
7305 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 +00007306#ifdef HAVE_ASM_TYPES_H
7307#include <asm/types.h>
7308#endif
7309#ifdef HAVE_SYS_SOCKET_H
7310#include <sys/socket.h>
7311#endif
7312
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007313"
Matthias Klose3cef2a92012-03-14 23:39:33 +01007314if test "x$ac_cv_header_linux_netlink_h" = xyes; then :
Martin v. Löwis11017b12006-01-14 18:12:57 +00007315 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007316#define HAVE_LINUX_NETLINK_H 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00007317_ACEOF
7318
7319fi
7320
7321done
7322
7323
Guido van Rossum627b2d71993-12-24 10:39:16 +00007324# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00007325was_it_defined=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007326{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_t in time.h" >&5
7327$as_echo_n "checking for clock_t in time.h... " >&6; }
7328cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007329/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007330#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007331
7332_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007333if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007334 $EGREP "clock_t" >/dev/null 2>&1; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +00007335 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00007336else
Martin v. Löwis11437992002-04-12 09:54:03 +00007337
7338
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007339$as_echo "#define clock_t long" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00007340
Martin v. Löwisc45929e2002-04-06 10:10:49 +00007341
Guido van Rossum627b2d71993-12-24 10:39:16 +00007342fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00007343rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00007344
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007345{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
7346$as_echo "$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00007347
Neal Norwitz11690112002-07-30 01:08:28 +00007348# Check whether using makedev requires defining _OSF_SOURCE
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007349{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for makedev" >&5
7350$as_echo_n "checking for makedev... " >&6; }
7351cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007352/* end confdefs.h. */
Jesus Cea616de772010-04-28 10:32:30 +00007353
7354#if defined(MAJOR_IN_MKDEV)
7355#include <sys/mkdev.h>
7356#elif defined(MAJOR_IN_SYSMACROS)
7357#include <sys/sysmacros.h>
7358#else
Neal Norwitz6eb37f02003-02-23 23:28:15 +00007359#include <sys/types.h>
Jesus Cea616de772010-04-28 10:32:30 +00007360#endif
Neal Norwitz11690112002-07-30 01:08:28 +00007361int
7362main ()
7363{
7364 makedev(0, 0)
7365 ;
7366 return 0;
7367}
7368_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007369if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00007370 ac_cv_has_makedev=yes
7371else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007372 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00007373fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007374rm -f core conftest.err conftest.$ac_objext \
7375 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00007376if test "$ac_cv_has_makedev" = "no"; then
7377 # we didn't link, try if _OSF_SOURCE will allow us to link
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007378 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007379/* end confdefs.h. */
Neal Norwitz11690112002-07-30 01:08:28 +00007380
Neal Norwitz6eb37f02003-02-23 23:28:15 +00007381#define _OSF_SOURCE 1
7382#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00007383
Neal Norwitz11690112002-07-30 01:08:28 +00007384int
7385main ()
7386{
7387 makedev(0, 0)
7388 ;
7389 return 0;
7390}
7391_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007392if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00007393 ac_cv_has_makedev=yes
7394else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007395 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00007396fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007397rm -f core conftest.err conftest.$ac_objext \
7398 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00007399 if test "$ac_cv_has_makedev" = "yes"; then
7400
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007401$as_echo "#define _OSF_SOURCE 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00007402
7403 fi
7404fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007405{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_makedev" >&5
7406$as_echo "$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00007407if test "$ac_cv_has_makedev" = "yes"; then
7408
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007409$as_echo "#define HAVE_MAKEDEV 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00007410
7411fi
7412
Martin v. Löwis399a6892002-10-04 10:22:02 +00007413# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
7414# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
7415# defined, but the compiler does not support pragma redefine_extname,
7416# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
7417# structures (such as rlimit64) without declaring them. As a
7418# work-around, disable LFS on such configurations
7419
7420use_lfs=yes
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007421{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Solaris LFS bug" >&5
7422$as_echo_n "checking Solaris LFS bug... " >&6; }
7423cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007424/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00007425
7426#define _LARGEFILE_SOURCE 1
7427#define _FILE_OFFSET_BITS 64
7428#include <sys/resource.h>
7429
Martin v. Löwis399a6892002-10-04 10:22:02 +00007430int
7431main ()
7432{
7433struct rlimit foo;
7434 ;
7435 return 0;
7436}
7437_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007438if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis399a6892002-10-04 10:22:02 +00007439 sol_lfs_bug=no
7440else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007441 sol_lfs_bug=yes
Martin v. Löwis399a6892002-10-04 10:22:02 +00007442fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007443rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007444{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $sol_lfs_bug" >&5
7445$as_echo "$sol_lfs_bug" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00007446if test "$sol_lfs_bug" = "yes"; then
7447 use_lfs=no
7448fi
7449
7450if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00007451# Two defines needed to enable largefile support on various platforms
7452# These may affect some typedefs
Georg Brandl94800df2011-02-25 11:09:02 +00007453case $ac_sys_system/$ac_sys_release in
7454AIX*)
7455
7456$as_echo "#define _LARGE_FILES 1" >>confdefs.h
7457
7458 ;;
7459esac
Guido van Rossum810cc512001-09-09 23:51:39 +00007460
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007461$as_echo "#define _LARGEFILE_SOURCE 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007462
7463
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007464$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
Guido van Rossum810cc512001-09-09 23:51:39 +00007465
Martin v. Löwis399a6892002-10-04 10:22:02 +00007466fi
Michael W. Hudson54241132001-12-07 15:38:26 +00007467
Guido van Rossum84e7b241996-08-19 21:59:00 +00007468# Add some code to confdefs.h so that the test for off_t works on SCO
7469cat >> confdefs.h <<\EOF
7470#if defined(SCO_DS)
7471#undef _OFF_T
7472#endif
7473EOF
7474
Guido van Rossumef2255b2000-03-10 22:30:29 +00007475# Type availability checks
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007476ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
Matthias Klose3cef2a92012-03-14 23:39:33 +01007477if test "x$ac_cv_type_mode_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007478
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007479else
Martin v. Löwis11437992002-04-12 09:54:03 +00007480
7481cat >>confdefs.h <<_ACEOF
7482#define mode_t int
7483_ACEOF
7484
7485fi
7486
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007487ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
Matthias Klose3cef2a92012-03-14 23:39:33 +01007488if test "x$ac_cv_type_off_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007489
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007490else
Martin v. Löwis11437992002-04-12 09:54:03 +00007491
7492cat >>confdefs.h <<_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00007493#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00007494_ACEOF
7495
7496fi
7497
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007498ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
Matthias Klose3cef2a92012-03-14 23:39:33 +01007499if test "x$ac_cv_type_pid_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007500
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007501else
Martin v. Löwis11437992002-04-12 09:54:03 +00007502
7503cat >>confdefs.h <<_ACEOF
7504#define pid_t int
7505_ACEOF
7506
7507fi
7508
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00007509
Martin v. Löwis11437992002-04-12 09:54:03 +00007510cat >>confdefs.h <<_ACEOF
Matthias Klosecbf54b12010-05-08 11:04:18 +00007511#define RETSIGTYPE void
Martin v. Löwis11437992002-04-12 09:54:03 +00007512_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00007513
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007514ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
Matthias Klose3cef2a92012-03-14 23:39:33 +01007515if test "x$ac_cv_type_size_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007516
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007517else
Martin v. Löwis11437992002-04-12 09:54:03 +00007518
7519cat >>confdefs.h <<_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00007520#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00007521_ACEOF
7522
7523fi
7524
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007525{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
7526$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007527if ${ac_cv_type_uid_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007528 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007529else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007530 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007531/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007532#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007533
7534_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007535if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007536 $EGREP "uid_t" >/dev/null 2>&1; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007537 ac_cv_type_uid_t=yes
7538else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007539 ac_cv_type_uid_t=no
7540fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00007541rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00007542
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007543fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007544{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
7545$as_echo "$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00007546if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007547
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007548$as_echo "#define uid_t int" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007549
7550
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007551$as_echo "#define gid_t int" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007552
7553fi
7554
Mark Dickinson17c50cd2012-12-02 13:13:56 +00007555
7556# There are two separate checks for each of the exact-width integer types we
7557# need. First we check whether the type is available using the usual
7558# AC_CHECK_TYPE macro with the default includes (which includes <inttypes.h>
7559# and <stdint.h> where available). We then also use the special type checks of
7560# the form AC_TYPE_UINT32_T, which in the case that uint32_t is not available
7561# directly, #define's uint32_t to be a suitable type.
7562
7563ac_fn_c_check_type "$LINENO" "uint32_t" "ac_cv_type_uint32_t" "$ac_includes_default"
7564if test "x$ac_cv_type_uint32_t" = xyes; then :
7565
7566$as_echo "#define HAVE_UINT32_T 1" >>confdefs.h
7567
7568fi
7569
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007570ac_fn_c_find_uintX_t "$LINENO" "32" "ac_cv_c_uint32_t"
7571case $ac_cv_c_uint32_t in #(
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007572 no|yes) ;; #(
7573 *)
7574
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007575$as_echo "#define _UINT32_T 1" >>confdefs.h
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007576
7577
7578cat >>confdefs.h <<_ACEOF
7579#define uint32_t $ac_cv_c_uint32_t
7580_ACEOF
7581;;
7582 esac
7583
Mark Dickinson17c50cd2012-12-02 13:13:56 +00007584
7585ac_fn_c_check_type "$LINENO" "uint64_t" "ac_cv_type_uint64_t" "$ac_includes_default"
7586if test "x$ac_cv_type_uint64_t" = xyes; then :
7587
7588$as_echo "#define HAVE_UINT64_T 1" >>confdefs.h
7589
7590fi
7591
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007592ac_fn_c_find_uintX_t "$LINENO" "64" "ac_cv_c_uint64_t"
7593case $ac_cv_c_uint64_t in #(
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007594 no|yes) ;; #(
7595 *)
7596
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007597$as_echo "#define _UINT64_T 1" >>confdefs.h
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007598
7599
7600cat >>confdefs.h <<_ACEOF
7601#define uint64_t $ac_cv_c_uint64_t
7602_ACEOF
7603;;
7604 esac
7605
Mark Dickinson17c50cd2012-12-02 13:13:56 +00007606
7607ac_fn_c_check_type "$LINENO" "int32_t" "ac_cv_type_int32_t" "$ac_includes_default"
7608if test "x$ac_cv_type_int32_t" = xyes; then :
7609
7610$as_echo "#define HAVE_INT32_T 1" >>confdefs.h
7611
7612fi
7613
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007614ac_fn_c_find_intX_t "$LINENO" "32" "ac_cv_c_int32_t"
7615case $ac_cv_c_int32_t in #(
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007616 no|yes) ;; #(
7617 *)
7618
7619cat >>confdefs.h <<_ACEOF
7620#define int32_t $ac_cv_c_int32_t
7621_ACEOF
7622;;
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007623esac
7624
Mark Dickinson17c50cd2012-12-02 13:13:56 +00007625
7626ac_fn_c_check_type "$LINENO" "int64_t" "ac_cv_type_int64_t" "$ac_includes_default"
7627if test "x$ac_cv_type_int64_t" = xyes; then :
7628
7629$as_echo "#define HAVE_INT64_T 1" >>confdefs.h
7630
7631fi
7632
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007633ac_fn_c_find_intX_t "$LINENO" "64" "ac_cv_c_int64_t"
7634case $ac_cv_c_int64_t in #(
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007635 no|yes) ;; #(
7636 *)
7637
7638cat >>confdefs.h <<_ACEOF
7639#define int64_t $ac_cv_c_int64_t
7640_ACEOF
7641;;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00007642esac
Martin v. Löwis18e16552006-02-15 17:27:45 +00007643
Mark Dickinson17c50cd2012-12-02 13:13:56 +00007644
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007645ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
Matthias Klose3cef2a92012-03-14 23:39:33 +01007646if test "x$ac_cv_type_ssize_t" = xyes; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00007647
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007648$as_echo "#define HAVE_SSIZE_T 1" >>confdefs.h
Martin v. Löwis18e16552006-02-15 17:27:45 +00007649
7650fi
7651
Jack Jansendd19cf82001-12-06 22:36:17 +00007652
Michael W. Hudson54241132001-12-07 15:38:26 +00007653# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00007654# ANSI C requires sizeof(char) == 1, so no need to check it
Martin v. Löwiseba40652007-08-30 20:10:57 +00007655# The cast to long int works around a bug in the HP C Compiler
7656# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7657# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7658# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007659{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
7660$as_echo_n "checking size of int... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007661if ${ac_cv_sizeof_int+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007662 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007663else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007664 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 +00007665
Martin v. Löwis11437992002-04-12 09:54:03 +00007666else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007667 if test "$ac_cv_type_int" = yes; then
7668 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7669$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007670as_fn_error 77 "cannot compute sizeof (int)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007671See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007672 else
7673 ac_cv_sizeof_int=0
7674 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007675fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007676
Martin v. Löwis11437992002-04-12 09:54:03 +00007677fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007678{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
7679$as_echo "$ac_cv_sizeof_int" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007680
7681
7682
Martin v. Löwis11437992002-04-12 09:54:03 +00007683cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007684#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00007685_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007686
7687
Martin v. Löwiseba40652007-08-30 20:10:57 +00007688# The cast to long int works around a bug in the HP C Compiler
7689# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7690# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7691# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007692{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
7693$as_echo_n "checking size of long... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007694if ${ac_cv_sizeof_long+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007695 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007696else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007697 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 +00007698
Martin v. Löwis11437992002-04-12 09:54:03 +00007699else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007700 if test "$ac_cv_type_long" = yes; then
7701 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7702$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007703as_fn_error 77 "cannot compute sizeof (long)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007704See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007705 else
7706 ac_cv_sizeof_long=0
7707 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007708fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007709
Martin v. Löwis11437992002-04-12 09:54:03 +00007710fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007711{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
7712$as_echo "$ac_cv_sizeof_long" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007713
7714
7715
Martin v. Löwis11437992002-04-12 09:54:03 +00007716cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007717#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00007718_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007719
7720
Martin v. Löwiseba40652007-08-30 20:10:57 +00007721# The cast to long int works around a bug in the HP C Compiler
7722# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7723# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7724# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007725{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
7726$as_echo_n "checking size of void *... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007727if ${ac_cv_sizeof_void_p+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007728 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007729else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007730 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 +00007731
Martin v. Löwis11437992002-04-12 09:54:03 +00007732else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007733 if test "$ac_cv_type_void_p" = yes; then
7734 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7735$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007736as_fn_error 77 "cannot compute sizeof (void *)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007737See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007738 else
7739 ac_cv_sizeof_void_p=0
7740 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007741fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007742
Martin v. Löwis11437992002-04-12 09:54:03 +00007743fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007744{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
7745$as_echo "$ac_cv_sizeof_void_p" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007746
7747
7748
Martin v. Löwis11437992002-04-12 09:54:03 +00007749cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00007750#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00007751_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00007752
7753
Martin v. Löwiseba40652007-08-30 20:10:57 +00007754# The cast to long int works around a bug in the HP C Compiler
7755# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7756# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7757# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007758{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
7759$as_echo_n "checking size of short... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007760if ${ac_cv_sizeof_short+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007761 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007762else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007763 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 +00007764
Martin v. Löwis11437992002-04-12 09:54:03 +00007765else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007766 if test "$ac_cv_type_short" = yes; then
7767 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7768$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007769as_fn_error 77 "cannot compute sizeof (short)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007770See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007771 else
7772 ac_cv_sizeof_short=0
7773 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007774fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007775
Martin v. Löwis11437992002-04-12 09:54:03 +00007776fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007777{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
7778$as_echo "$ac_cv_sizeof_short" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007779
7780
7781
Martin v. Löwis11437992002-04-12 09:54:03 +00007782cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007783#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00007784_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007785
7786
Martin v. Löwiseba40652007-08-30 20:10:57 +00007787# The cast to long int works around a bug in the HP C Compiler
7788# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7789# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7790# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007791{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of float" >&5
7792$as_echo_n "checking size of float... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007793if ${ac_cv_sizeof_float+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007794 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007795else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007796 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 +00007797
Martin v. Löwis11437992002-04-12 09:54:03 +00007798else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007799 if test "$ac_cv_type_float" = yes; then
7800 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7801$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007802as_fn_error 77 "cannot compute sizeof (float)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007803See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007804 else
7805 ac_cv_sizeof_float=0
7806 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007807fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007808
Martin v. Löwis11437992002-04-12 09:54:03 +00007809fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007810{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_float" >&5
7811$as_echo "$ac_cv_sizeof_float" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007812
7813
7814
Martin v. Löwis11437992002-04-12 09:54:03 +00007815cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007816#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00007817_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007818
7819
Martin v. Löwiseba40652007-08-30 20:10:57 +00007820# The cast to long int works around a bug in the HP C Compiler
7821# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7822# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7823# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007824{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of double" >&5
7825$as_echo_n "checking size of double... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007826if ${ac_cv_sizeof_double+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007827 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007828else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007829 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 +00007830
Martin v. Löwis11437992002-04-12 09:54:03 +00007831else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007832 if test "$ac_cv_type_double" = yes; then
7833 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7834$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007835as_fn_error 77 "cannot compute sizeof (double)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007836See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007837 else
7838 ac_cv_sizeof_double=0
7839 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007840fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007841
Martin v. Löwis11437992002-04-12 09:54:03 +00007842fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007843{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5
7844$as_echo "$ac_cv_sizeof_double" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007845
7846
7847
Martin v. Löwis11437992002-04-12 09:54:03 +00007848cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007849#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00007850_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007851
7852
Martin v. Löwiseba40652007-08-30 20:10:57 +00007853# The cast to long int works around a bug in the HP C Compiler
7854# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7855# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7856# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007857{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of fpos_t" >&5
7858$as_echo_n "checking size of fpos_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007859if ${ac_cv_sizeof_fpos_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007860 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007861else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007862 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 +00007863
Martin v. Löwis11437992002-04-12 09:54:03 +00007864else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007865 if test "$ac_cv_type_fpos_t" = yes; then
7866 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7867$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007868as_fn_error 77 "cannot compute sizeof (fpos_t)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007869See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007870 else
7871 ac_cv_sizeof_fpos_t=0
7872 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007873fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007874
Martin v. Löwis11437992002-04-12 09:54:03 +00007875fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007876{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_fpos_t" >&5
7877$as_echo "$ac_cv_sizeof_fpos_t" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007878
7879
7880
Martin v. Löwis11437992002-04-12 09:54:03 +00007881cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007882#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007883_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007884
Michael W. Hudson54241132001-12-07 15:38:26 +00007885
Martin v. Löwiseba40652007-08-30 20:10:57 +00007886# The cast to long int works around a bug in the HP C Compiler
7887# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7888# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7889# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007890{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
7891$as_echo_n "checking size of size_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007892if ${ac_cv_sizeof_size_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007893 $as_echo_n "(cached) " >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00007894else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007895 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 +00007896
Martin v. Löwis18e16552006-02-15 17:27:45 +00007897else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007898 if test "$ac_cv_type_size_t" = yes; then
7899 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7900$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007901as_fn_error 77 "cannot compute sizeof (size_t)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007902See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007903 else
7904 ac_cv_sizeof_size_t=0
7905 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +00007906fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007907
Martin v. Löwis18e16552006-02-15 17:27:45 +00007908fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007909{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
7910$as_echo "$ac_cv_sizeof_size_t" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007911
7912
7913
Martin v. Löwis18e16552006-02-15 17:27:45 +00007914cat >>confdefs.h <<_ACEOF
7915#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
7916_ACEOF
7917
7918
Christian Heimes951cc0f2008-01-31 23:08:23 +00007919# The cast to long int works around a bug in the HP C Compiler
7920# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7921# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7922# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007923{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pid_t" >&5
7924$as_echo_n "checking size of pid_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007925if ${ac_cv_sizeof_pid_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007926 $as_echo_n "(cached) " >&6
Christian Heimes951cc0f2008-01-31 23:08:23 +00007927else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007928 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 +00007929
Christian Heimes951cc0f2008-01-31 23:08:23 +00007930else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007931 if test "$ac_cv_type_pid_t" = yes; then
7932 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7933$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007934as_fn_error 77 "cannot compute sizeof (pid_t)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007935See \`config.log' for more details" "$LINENO" 5; }
Christian Heimes951cc0f2008-01-31 23:08:23 +00007936 else
7937 ac_cv_sizeof_pid_t=0
7938 fi
7939fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007940
Christian Heimes951cc0f2008-01-31 23:08:23 +00007941fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007942{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pid_t" >&5
7943$as_echo "$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes951cc0f2008-01-31 23:08:23 +00007944
7945
7946
7947cat >>confdefs.h <<_ACEOF
7948#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
7949_ACEOF
7950
7951
Michael W. Hudson54241132001-12-07 15:38:26 +00007952
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007953{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support" >&5
7954$as_echo_n "checking for long long support... " >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007955have_long_long=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007956cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007957/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007958
Martin v. Löwis11437992002-04-12 09:54:03 +00007959int
7960main ()
7961{
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007962long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007963 ;
7964 return 0;
7965}
7966_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007967if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007968
7969
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007970$as_echo "#define HAVE_LONG_LONG 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007971
Martin v. Löwisc45929e2002-04-06 10:10:49 +00007972 have_long_long=yes
7973
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007974fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007975rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007976{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_long" >&5
7977$as_echo "$have_long_long" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +00007978if test "$have_long_long" = yes ; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00007979# The cast to long int works around a bug in the HP C Compiler
7980# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7981# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7982# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007983{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
7984$as_echo_n "checking size of long long... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007985if ${ac_cv_sizeof_long_long+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007986 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007987else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007988 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 +00007989
Martin v. Löwis11437992002-04-12 09:54:03 +00007990else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007991 if test "$ac_cv_type_long_long" = yes; then
7992 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7993$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007994as_fn_error 77 "cannot compute sizeof (long long)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007995See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007996 else
7997 ac_cv_sizeof_long_long=0
7998 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007999fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008000
Martin v. Löwis11437992002-04-12 09:54:03 +00008001fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008002{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
8003$as_echo "$ac_cv_sizeof_long_long" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008004
8005
8006
Martin v. Löwis11437992002-04-12 09:54:03 +00008007cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008008#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +00008009_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008010
Michael W. Hudson54241132001-12-07 15:38:26 +00008011
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008012fi
8013
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008014{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support" >&5
8015$as_echo_n "checking for long double support... " >&6; }
Mark Dickinsondc1688a2008-06-27 22:20:14 +00008016have_long_double=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008017cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsondc1688a2008-06-27 22:20:14 +00008018/* end confdefs.h. */
8019
8020int
8021main ()
8022{
Matthias Klosec511b472010-05-08 11:01:39 +00008023long double x; x = (long double)0;
Mark Dickinsondc1688a2008-06-27 22:20:14 +00008024 ;
8025 return 0;
8026}
8027_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008028if ac_fn_c_try_compile "$LINENO"; then :
Mark Dickinsondc1688a2008-06-27 22:20:14 +00008029
8030
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008031$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
Mark Dickinsondc1688a2008-06-27 22:20:14 +00008032
8033 have_long_double=yes
8034
Mark Dickinsondc1688a2008-06-27 22:20:14 +00008035fi
Mark Dickinsondc1688a2008-06-27 22:20:14 +00008036rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008037{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_double" >&5
8038$as_echo "$have_long_double" >&6; }
Mark Dickinsondc1688a2008-06-27 22:20:14 +00008039if test "$have_long_double" = yes ; then
Mark Dickinsondc1688a2008-06-27 22:20:14 +00008040# The cast to long int works around a bug in the HP C Compiler
8041# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8042# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8043# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008044{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long double" >&5
8045$as_echo_n "checking size of long double... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008046if ${ac_cv_sizeof_long_double+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008047 $as_echo_n "(cached) " >&6
Mark Dickinsondc1688a2008-06-27 22:20:14 +00008048else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008049 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 +00008050
Mark Dickinsondc1688a2008-06-27 22:20:14 +00008051else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008052 if test "$ac_cv_type_long_double" = yes; then
8053 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8054$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00008055as_fn_error 77 "cannot compute sizeof (long double)
Matthias Klose3cef2a92012-03-14 23:39:33 +01008056See \`config.log' for more details" "$LINENO" 5; }
Mark Dickinsondc1688a2008-06-27 22:20:14 +00008057 else
8058 ac_cv_sizeof_long_double=0
8059 fi
8060fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008061
Mark Dickinsondc1688a2008-06-27 22:20:14 +00008062fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008063{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double" >&5
8064$as_echo "$ac_cv_sizeof_long_double" >&6; }
Mark Dickinsondc1688a2008-06-27 22:20:14 +00008065
8066
8067
8068cat >>confdefs.h <<_ACEOF
8069#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
8070_ACEOF
8071
8072
8073fi
8074
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008075{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _Bool support" >&5
8076$as_echo_n "checking for _Bool support... " >&6; }
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00008077have_c99_bool=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008078cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00008079/* end confdefs.h. */
8080
8081int
8082main ()
8083{
8084_Bool x; x = (_Bool)0;
8085 ;
8086 return 0;
8087}
8088_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008089if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00008090
8091
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008092$as_echo "#define HAVE_C99_BOOL 1" >>confdefs.h
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00008093
8094 have_c99_bool=yes
8095
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00008096fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008097rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008098{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_c99_bool" >&5
8099$as_echo "$have_c99_bool" >&6; }
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00008100if test "$have_c99_bool" = yes ; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00008101# The cast to long int works around a bug in the HP C Compiler
8102# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8103# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8104# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008105{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of _Bool" >&5
8106$as_echo_n "checking size of _Bool... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008107if ${ac_cv_sizeof__Bool+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008108 $as_echo_n "(cached) " >&6
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00008109else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008110 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 +00008111
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00008112else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008113 if test "$ac_cv_type__Bool" = yes; then
8114 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8115$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00008116as_fn_error 77 "cannot compute sizeof (_Bool)
Matthias Klose3cef2a92012-03-14 23:39:33 +01008117See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008118 else
8119 ac_cv_sizeof__Bool=0
8120 fi
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00008121fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008122
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00008123fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008124{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof__Bool" >&5
8125$as_echo "$ac_cv_sizeof__Bool" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008126
8127
8128
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00008129cat >>confdefs.h <<_ACEOF
8130#define SIZEOF__BOOL $ac_cv_sizeof__Bool
8131_ACEOF
8132
8133
8134fi
8135
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008136ac_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 +00008137 #include <stdint.h>
8138 #endif
Antoine Pitrou7be5a652010-10-10 08:14:41 +00008139 #ifdef HAVE_INTTYPES_H
8140 #include <inttypes.h>
8141 #endif
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008142"
Matthias Klose3cef2a92012-03-14 23:39:33 +01008143if test "x$ac_cv_type_uintptr_t" = xyes; then :
Martin v. Löwisebe26702006-10-02 14:55:51 +00008144
8145cat >>confdefs.h <<_ACEOF
8146#define HAVE_UINTPTR_T 1
8147_ACEOF
8148
Martin v. Löwiseba40652007-08-30 20:10:57 +00008149# The cast to long int works around a bug in the HP C Compiler
8150# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8151# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8152# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008153{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of uintptr_t" >&5
8154$as_echo_n "checking size of uintptr_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008155if ${ac_cv_sizeof_uintptr_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008156 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008157else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008158 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 +00008159
Martin v. Löwis11437992002-04-12 09:54:03 +00008160else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008161 if test "$ac_cv_type_uintptr_t" = yes; then
8162 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8163$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00008164as_fn_error 77 "cannot compute sizeof (uintptr_t)
Matthias Klose3cef2a92012-03-14 23:39:33 +01008165See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008166 else
8167 ac_cv_sizeof_uintptr_t=0
8168 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008169fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008170
Martin v. Löwis11437992002-04-12 09:54:03 +00008171fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008172{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uintptr_t" >&5
8173$as_echo "$ac_cv_sizeof_uintptr_t" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008174
8175
8176
Martin v. Löwis11437992002-04-12 09:54:03 +00008177cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008178#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008179_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008180
Michael W. Hudson54241132001-12-07 15:38:26 +00008181
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008182fi
8183
Martin v. Löwisebe26702006-10-02 14:55:51 +00008184
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008185# The cast to long int works around a bug in the HP C Compiler
8186# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8187# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8188# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008189{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
8190$as_echo_n "checking size of off_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008191if ${ac_cv_sizeof_off_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008192 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008193else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008194 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008195#ifdef HAVE_SYS_TYPES_H
8196#include <sys/types.h>
8197#endif
8198
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008199"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008200
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008201else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008202 if test "$ac_cv_type_off_t" = yes; then
8203 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8204$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00008205as_fn_error 77 "cannot compute sizeof (off_t)
Matthias Klose3cef2a92012-03-14 23:39:33 +01008206See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008207 else
8208 ac_cv_sizeof_off_t=0
8209 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008210fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008211
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008212fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008213{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
8214$as_echo "$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008215
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008216
8217
Martin v. Löwis11437992002-04-12 09:54:03 +00008218cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008219#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008220_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008221
Michael W. Hudson54241132001-12-07 15:38:26 +00008222
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008223
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008224{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable large file support" >&5
8225$as_echo_n "checking whether to enable large file support... " >&6; }
Mark Dickinson0ef0b912009-12-31 21:11:48 +00008226if test "$have_long_long" = yes
8227then
8228if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +00008229 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008230
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008231$as_echo "#define HAVE_LARGEFILE_SUPPORT 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008232
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008233 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8234$as_echo "yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008235else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008236 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8237$as_echo "no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008238fi
Mark Dickinson0ef0b912009-12-31 21:11:48 +00008239else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008240 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8241$as_echo "no" >&6; }
Mark Dickinson0ef0b912009-12-31 21:11:48 +00008242fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008243
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008244# The cast to long int works around a bug in the HP C Compiler
8245# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8246# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8247# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008248{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
8249$as_echo_n "checking size of time_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008250if ${ac_cv_sizeof_time_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008251 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008252else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008253 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008254#ifdef HAVE_SYS_TYPES_H
8255#include <sys/types.h>
8256#endif
8257#ifdef HAVE_TIME_H
8258#include <time.h>
8259#endif
8260
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008261"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008262
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008263else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008264 if test "$ac_cv_type_time_t" = yes; then
8265 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8266$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00008267as_fn_error 77 "cannot compute sizeof (time_t)
Matthias Klose3cef2a92012-03-14 23:39:33 +01008268See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008269 else
8270 ac_cv_sizeof_time_t=0
8271 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008272fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008273
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008274fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008275{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
8276$as_echo "$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008277
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008278
8279
Martin v. Löwis11437992002-04-12 09:54:03 +00008280cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008281#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008282_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008283
Michael W. Hudson54241132001-12-07 15:38:26 +00008284
8285
Trent Mick635f6fb2000-08-23 21:33:05 +00008286# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008287ac_save_cc="$CC"
8288if test "$ac_cv_kpthread" = "yes"
8289then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00008290elif test "$ac_cv_kthread" = "yes"
8291then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008292elif test "$ac_cv_pthread" = "yes"
8293then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008294fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008295{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_t" >&5
8296$as_echo_n "checking for pthread_t... " >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00008297have_pthread_t=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008298cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008299/* end confdefs.h. */
Matthias Klosec511b472010-05-08 11:01:39 +00008300
8301 #include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008302int
8303main ()
8304{
Guido van Rossum12580492000-09-24 16:47:19 +00008305pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008306 ;
8307 return 0;
8308}
Matthias Klosec511b472010-05-08 11:01:39 +00008309
Martin v. Löwis11437992002-04-12 09:54:03 +00008310_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008311if ac_fn_c_try_compile "$LINENO"; then :
Trent Mick635f6fb2000-08-23 21:33:05 +00008312 have_pthread_t=yes
Trent Mick635f6fb2000-08-23 21:33:05 +00008313fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008314rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008315{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_pthread_t" >&5
8316$as_echo "$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00008317if test "$have_pthread_t" = yes ; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008318 # The cast to long int works around a bug in the HP C Compiler
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008319# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8320# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8321# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008322{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
8323$as_echo_n "checking size of pthread_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008324if ${ac_cv_sizeof_pthread_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008325 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008326else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008327 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t" "
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008328#ifdef HAVE_PTHREAD_H
8329#include <pthread.h>
8330#endif
8331
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008332"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008333
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008334else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008335 if test "$ac_cv_type_pthread_t" = yes; then
8336 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8337$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00008338as_fn_error 77 "cannot compute sizeof (pthread_t)
Matthias Klose3cef2a92012-03-14 23:39:33 +01008339See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008340 else
8341 ac_cv_sizeof_pthread_t=0
8342 fi
Trent Mick635f6fb2000-08-23 21:33:05 +00008343fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008344
Trent Mick635f6fb2000-08-23 21:33:05 +00008345fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008346{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
8347$as_echo "$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008348
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008349
8350
Martin v. Löwis11437992002-04-12 09:54:03 +00008351cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00008352#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008353_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00008354
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008355
Trent Mick635f6fb2000-08-23 21:33:05 +00008356fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008357CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00008358
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008359{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-toolbox-glue" >&5
8360$as_echo_n "checking for --enable-toolbox-glue... " >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008361# Check whether --enable-toolbox-glue was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008362if test "${enable_toolbox_glue+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00008363 enableval=$enable_toolbox_glue;
8364fi
Jack Jansene578a632001-08-15 01:27:14 +00008365
8366
8367if test -z "$enable_toolbox_glue"
Martin v. Löwis11437992002-04-12 09:54:03 +00008368then
Jack Jansene578a632001-08-15 01:27:14 +00008369 case $ac_sys_system/$ac_sys_release in
8370 Darwin/*)
8371 enable_toolbox_glue="yes";;
8372 *)
8373 enable_toolbox_glue="no";;
8374 esac
8375fi
8376case "$enable_toolbox_glue" in
8377yes)
Jack Jansene578a632001-08-15 01:27:14 +00008378 extra_machdep_objs="Python/mactoolboxglue.o"
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00008379 extra_undefs="-u _PyMac_Error"
Martin v. Löwis11437992002-04-12 09:54:03 +00008380
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008381$as_echo "#define USE_TOOLBOX_OBJECT_GLUE 1" >>confdefs.h
Jack Jansene578a632001-08-15 01:27:14 +00008382
8383 ;;
8384*)
Jack Jansene578a632001-08-15 01:27:14 +00008385 extra_machdep_objs=""
Jack Jansen591cbed2001-08-15 13:55:15 +00008386 extra_undefs=""
Jack Jansene578a632001-08-15 01:27:14 +00008387 ;;
8388esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008389{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_toolbox_glue" >&5
8390$as_echo "$enable_toolbox_glue" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00008391
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008392
Ronald Oussoren0d236eb2008-06-06 21:31:33 +00008393
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008394case $ac_sys_system/$ac_sys_release in
Anthony Baxter82201742006-04-09 15:07:40 +00008395 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008396 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
8397 ;;
8398 Darwin/*)
8399 OTHER_LIBTOOL_OPT=""
8400 ;;
8401esac
8402
8403
Ronald Oussoren25967582009-09-06 10:00:26 +00008404
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008405case $ac_sys_system/$ac_sys_release in
Anthony Baxter82201742006-04-09 15:07:40 +00008406 Darwin/[01567]\..*)
Ronald Oussoren988117f2006-04-29 11:31:35 +00008407 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
8408 if test "${enable_universalsdk}"; then
8409 :
8410 else
Ronald Oussorenbc0e83c2010-02-11 13:26:54 +00008411 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Ronald Oussoren988117f2006-04-29 11:31:35 +00008412 fi
Jack Jansenb36687a2004-07-16 08:43:47 +00008413 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00008414 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00008415 Darwin/*)
Ronald Oussorena55af9a2010-01-17 16:25:57 +00008416 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008417 if test ${gcc_version} '<' 4.0
8418 then
8419 LIBTOOL_CRUFT="-lcc_dynamic"
8420 else
8421 LIBTOOL_CRUFT=""
8422 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008423 if test "$cross_compiling" = yes; then :
Ronald Oussoren23d92532009-09-07 06:12:00 +00008424 ac_osx_32bit=yes
Ronald Oussoren25967582009-09-06 10:00:26 +00008425else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008426 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren25967582009-09-06 10:00:26 +00008427/* end confdefs.h. */
Ronald Oussoren23d92532009-09-07 06:12:00 +00008428
Ronald Oussoren25967582009-09-06 10:00:26 +00008429 #include <unistd.h>
8430 int main(int argc, char*argv[])
8431 {
8432 if (sizeof(long) == 4) {
8433 return 0;
8434 } else {
8435 return 1;
8436 }
Ronald Oussoren84ddd722009-09-08 07:17:10 +00008437 }
Ronald Oussoren23d92532009-09-07 06:12:00 +00008438
Ronald Oussoren25967582009-09-06 10:00:26 +00008439_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008440if ac_fn_c_try_run "$LINENO"; then :
Ronald Oussoren25967582009-09-06 10:00:26 +00008441 ac_osx_32bit=yes
8442else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008443 ac_osx_32bit=no
Ronald Oussoren25967582009-09-06 10:00:26 +00008444fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008445rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8446 conftest.$ac_objext conftest.beam conftest.$ac_ext
Ronald Oussoren25967582009-09-06 10:00:26 +00008447fi
8448
8449
Ronald Oussoren25967582009-09-06 10:00:26 +00008450 if test "${ac_osx_32bit}" = "yes"; then
Ronald Oussorenbc0e83c2010-02-11 13:26:54 +00008451 case `/usr/bin/arch` in
Ronald Oussoren25967582009-09-06 10:00:26 +00008452 i386)
8453 MACOSX_DEFAULT_ARCH="i386"
8454 ;;
8455 ppc)
8456 MACOSX_DEFAULT_ARCH="ppc"
8457 ;;
8458 *)
Georg Brandl71f4fbb2011-02-25 11:04:50 +00008459 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren25967582009-09-06 10:00:26 +00008460 ;;
8461 esac
8462 else
Ronald Oussorenbc0e83c2010-02-11 13:26:54 +00008463 case `/usr/bin/arch` in
Ronald Oussoren25967582009-09-06 10:00:26 +00008464 i386)
8465 MACOSX_DEFAULT_ARCH="x86_64"
8466 ;;
8467 ppc)
8468 MACOSX_DEFAULT_ARCH="ppc64"
8469 ;;
8470 *)
Georg Brandl71f4fbb2011-02-25 11:04:50 +00008471 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren25967582009-09-06 10:00:26 +00008472 ;;
8473 esac
8474
Ronald Oussoren25967582009-09-06 10:00:26 +00008475 fi
8476
8477 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +00008478 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00008479 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008480esac
8481
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008482{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-framework" >&5
8483$as_echo_n "checking for --enable-framework... " >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00008484if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008485then
Skip Montanarodecc6a42003-01-01 20:07:49 +00008486 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00008487 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00008488 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008489
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008490$as_echo "#define WITH_NEXT_FRAMEWORK 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008491
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008492 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8493$as_echo "yes" >&6; }
Ronald Oussoren450d5612009-06-08 21:12:41 +00008494 if test $enable_shared = "yes"
8495 then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00008496 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 +00008497 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008498else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008499 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8500$as_echo "no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008501fi
8502
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008503{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dyld" >&5
8504$as_echo_n "checking for dyld... " >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008505case $ac_sys_system/$ac_sys_release in
8506 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008507
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008508$as_echo "#define WITH_DYLD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008509
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008510 { $as_echo "$as_me:${as_lineno-$LINENO}: result: always on for Darwin" >&5
8511$as_echo "always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008512 ;;
8513 *)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008514 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8515$as_echo "no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00008516 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008517esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008518
Guido van Rossum0a516c91994-09-12 10:58:40 +00008519# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00008520
Michael W. Hudson54241132001-12-07 15:38:26 +00008521
8522
8523
8524
Ronald Oussoren75912852010-04-08 08:13:31 +00008525
Guido van Rossum0a516c91994-09-12 10:58:40 +00008526# SO is the extension of shared libraries `(including the dot!)
Guido van Rossumaef734b2001-01-10 21:09:12 +00008527# -- usually .so, .sl on HP-UX, .dll on Cygwin
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008528{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SO" >&5
8529$as_echo_n "checking SO... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008530if test -z "$SO"
8531then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008532 case $ac_sys_system in
Neal Norwitz58e28882006-05-19 07:00:58 +00008533 hp*|HP*)
8534 case `uname -m` in
8535 ia64) SO=.so;;
8536 *) SO=.sl;;
8537 esac
8538 ;;
Guido van Rossumaef734b2001-01-10 21:09:12 +00008539 CYGWIN*) SO=.dll;;
Guido van Rossum563e7081996-09-10 18:20:48 +00008540 *) SO=.so;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008541 esac
Martin v. Löwis368de8f2003-06-14 14:46:38 +00008542else
8543 # this might also be a termcap variable, see #610332
8544 echo
8545 echo '====================================================================='
8546 echo '+ +'
8547 echo '+ WARNING: You have set SO in your environment. +'
8548 echo '+ Do you really mean to change the extension for shared libraries? +'
8549 echo '+ Continuing in 10 seconds to let you to ponder. +'
8550 echo '+ +'
8551 echo '====================================================================='
8552 sleep 10
Guido van Rossum0a516c91994-09-12 10:58:40 +00008553fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008554{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SO" >&5
8555$as_echo "$SO" >&6; }
Neal Norwitz58e28882006-05-19 07:00:58 +00008556
Ronald Oussoren79f90492009-01-02 10:44:46 +00008557
Neal Norwitz58e28882006-05-19 07:00:58 +00008558cat >>confdefs.h <<_ACEOF
8559#define SHLIB_EXT "$SO"
8560_ACEOF
8561
Guido van Rossum0a516c91994-09-12 10:58:40 +00008562# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +00008563# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008564# (Shared libraries in this instance are shared modules to be loaded into
8565# Python, as opposed to building Python itself as a shared library.)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008566{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDSHARED" >&5
8567$as_echo_n "checking LDSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008568if test -z "$LDSHARED"
8569then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008570 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008571 AIX*)
Martin Panterf75a2eb2016-11-20 09:31:41 +00008572 BLDSHARED="Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +00008573 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008574 ;;
8575 BeOS*)
8576 BLDSHARED="\$(srcdir)/Modules/ld_so_beos $LDLIBRARY"
Guido van Rossumce608b02001-09-28 15:59:38 +00008577 LDSHARED="\$(BINLIBDEST)/config/ld_so_beos \$(LIBDIR)/$LDLIBRARY"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008578 ;;
Guido van Rossum07397971997-04-29 21:49:50 +00008579 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00008580 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +00008581 SunOS/5*)
Ronald Oussoren75912852010-04-08 08:13:31 +00008582 if test "$GCC" = "yes" ; then
8583 LDSHARED='$(CC) -shared'
8584 LDCXXSHARED='$(CXX) -shared'
8585 else
8586 LDSHARED='$(CC) -G'
8587 LDCXXSHARED='$(CXX) -G'
Greg Ward57c9a662000-05-26 12:22:54 +00008588 fi ;;
Thomas Hellerdc96a772008-04-04 10:07:55 +00008589 hp*|HP*)
Ronald Oussoren75912852010-04-08 08:13:31 +00008590 if test "$GCC" = "yes" ; then
8591 LDSHARED='$(CC) -shared'
8592 LDCXXSHARED='$(CXX) -shared'
8593 else
8594 LDSHARED='ld -b'
Thomas Hellerdc96a772008-04-04 10:07:55 +00008595 fi ;;
Guido van Rossumda88dad1995-01-26 00:46:29 +00008596 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
Jack Jansen418c3b12001-11-14 10:59:57 +00008597 Darwin/1.3*)
Stefan Krah3a3e2032010-11-28 15:30:05 +00008598 LDSHARED='$(CC) -bundle'
8599 LDCXXSHARED='$(CXX) -bundle'
Jack Jansena3891ea2001-09-07 14:25:12 +00008600 if test "$enable_framework" ; then
8601 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00008602 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
8603 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Ronald Oussoren75912852010-04-08 08:13:31 +00008604 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00008605 else
8606 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00008607 LDSHARED="$LDSHARED -undefined suppress"
Ronald Oussoren75912852010-04-08 08:13:31 +00008608 LDCXXSHARED="$LDCXXSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00008609 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00008610 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Stefan Krah3a3e2032010-11-28 15:30:05 +00008611 LDSHARED='$(CC) -bundle'
8612 LDCXXSHARED='$(CXX) -bundle'
Jack Jansene578a632001-08-15 01:27:14 +00008613 if test "$enable_framework" ; then
8614 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00008615 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
8616 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Ronald Oussoren75912852010-04-08 08:13:31 +00008617 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00008618 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00008619 # No framework, use the Python app as bundle-loader
8620 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00008621 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Ronald Oussoren75912852010-04-08 08:13:31 +00008622 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008623 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00008624 Darwin/*)
8625 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
8626 # This allows an extension to be used in any Python
Ronald Oussoren38f1b982007-09-02 09:46:07 +00008627
Ned Deilyc40b9032014-06-25 13:48:46 -07008628 dep_target_major=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
8629 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
8630 dep_target_minor=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
8631 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
8632 if test ${dep_target_major} -eq 10 && \
8633 test ${dep_target_minor} -le 2
Jack Jansen6b08a402004-06-03 12:41:45 +00008634 then
Ned Deilyc40b9032014-06-25 13:48:46 -07008635 # building for OS X 10.0 through 10.2
Stefan Krah3a3e2032010-11-28 15:30:05 +00008636 LDSHARED='$(CC) -bundle'
8637 LDCXXSHARED='$(CXX) -bundle'
Jack Jansen6b08a402004-06-03 12:41:45 +00008638 if test "$enable_framework" ; then
8639 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00008640 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
8641 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Ronald Oussoren75912852010-04-08 08:13:31 +00008642 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +00008643 else
8644 # No framework, use the Python app as bundle-loader
8645 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
8646 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Ronald Oussoren75912852010-04-08 08:13:31 +00008647 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Jack Jansen6b08a402004-06-03 12:41:45 +00008648 fi
Ned Deilyc40b9032014-06-25 13:48:46 -07008649 else
8650 # building for OS X 10.3 and later
Ned Deilyc40b9032014-06-25 13:48:46 -07008651 LDSHARED='$(CC) -bundle -undefined dynamic_lookup'
8652 LDCXXSHARED='$(CXX) -bundle -undefined dynamic_lookup'
8653 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +00008654 fi
8655 ;;
Ronald Oussoren75912852010-04-08 08:13:31 +00008656 Linux*|GNU*|QNX*)
8657 LDSHARED='$(CC) -shared'
8658 LDCXXSHARED='$(CXX) -shared';;
8659 BSD/OS*/4*)
8660 LDSHARED="gcc -shared"
8661 LDCXXSHARED="g++ -shared";;
Martin v. Löwis222c5152006-06-03 07:37:13 +00008662 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00008663 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00008664 then
Stefan Krah3a3e2032010-11-28 15:30:05 +00008665 LDSHARED='$(CC) -shared'
8666 LDCXXSHARED='$(CXX) -shared'
Guido van Rossum0286ae82000-08-29 15:06:49 +00008667 else
Stefan Krah3a3e2032010-11-28 15:30:05 +00008668 LDSHARED="ld -Bshareable"
Guido van Rossum0286ae82000-08-29 15:06:49 +00008669 fi;;
Martin v. Löwis222c5152006-06-03 07:37:13 +00008670 OpenBSD*)
8671 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
8672 then
Stefan Krah3a3e2032010-11-28 15:30:05 +00008673 LDSHARED='$(CC) -shared $(CCSHARED)'
8674 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Martin v. Löwis222c5152006-06-03 07:37:13 +00008675 else
8676 case `uname -r` in
8677 [01].* | 2.[0-7] | 2.[0-7].*)
8678 LDSHARED="ld -Bshareable ${LDFLAGS}"
8679 ;;
8680 *)
Stefan Krah3a3e2032010-11-28 15:30:05 +00008681 LDSHARED='$(CC) -shared $(CCSHARED)'
8682 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Martin v. Löwis222c5152006-06-03 07:37:13 +00008683 ;;
8684 esac
8685 fi;;
Ronald Oussoren75912852010-04-08 08:13:31 +00008686 NetBSD*|DragonFly*)
Antoine Pitroucb402772011-01-02 20:51:34 +00008687 LDSHARED='$(CC) -shared'
8688 LDCXXSHARED='$(CXX) -shared';;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00008689 OpenUNIX*|UnixWare*)
Ronald Oussoren75912852010-04-08 08:13:31 +00008690 if test "$GCC" = "yes" ; then
8691 LDSHARED='$(CC) -shared'
8692 LDCXXSHARED='$(CXX) -shared'
8693 else
8694 LDSHARED='$(CC) -G'
8695 LDCXXSHARED='$(CXX) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00008696 fi;;
Ronald Oussoren75912852010-04-08 08:13:31 +00008697 SCO_SV*)
8698 LDSHARED='$(CC) -Wl,-G,-Bexport'
8699 LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
8700 CYGWIN*)
8701 LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
8702 LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
8703 atheos*)
8704 LDSHARED="gcc -shared"
8705 LDCXXSHARED="g++ -shared";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008706 *) LDSHARED="ld";;
8707 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008708fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008709{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDSHARED" >&5
8710$as_echo "$LDSHARED" >&6; }
Ronald Oussoren75912852010-04-08 08:13:31 +00008711LDCXXSHARED=${LDCXXSHARED-$LDSHARED}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008712BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00008713# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008714# library (module) -- this is only needed for a few systems
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008715{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CCSHARED" >&5
8716$as_echo_n "checking CCSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008717if test -z "$CCSHARED"
8718then
Guido van Rossum07397971997-04-29 21:49:50 +00008719 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00008720 SunOS*) if test "$GCC" = yes;
Martin v. Löwiseb623572007-03-12 10:50:39 +00008721 then CCSHARED="-fPIC";
8722 elif test `uname -p` = sparc;
8723 then CCSHARED="-xcode=pic32";
8724 else CCSHARED="-Kpic";
8725 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00008726 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00008727 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00008728 else CCSHARED="+z";
8729 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008730 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00008731 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00008732 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00008733 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00008734 if test "$GCC" = "yes"
8735 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008736 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00008737 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00008738 SCO_SV*)
8739 if test "$GCC" = "yes"
8740 then CCSHARED="-fPIC"
8741 else CCSHARED="-Kpic -belf"
8742 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008743 IRIX*/6*) case $CC in
8744 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00008745 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008746 esac;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008747 atheos*) CCSHARED="-fPIC";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008748 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008749fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008750{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCSHARED" >&5
8751$as_echo "$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008752# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008753# the python executable -- this is only needed for a few systems
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008754{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKFORSHARED" >&5
8755$as_echo_n "checking LINKFORSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008756if test -z "$LINKFORSHARED"
8757then
Guido van Rossum07397971997-04-29 21:49:50 +00008758 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008759 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008760 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00008761 LINKFORSHARED="-Wl,-E -Wl,+s";;
8762# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00008763 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008764 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008765 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00008766 Darwin/*)
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00008767 # -u _PyMac_Error is needed to pull in the mac toolbox glue,
8768 # which is
Jack Jansene578a632001-08-15 01:27:14 +00008769 # not used by the core itself but which needs to be in the core so
8770 # that dynamically loaded extension modules have access to it.
Jack Jansen97e3f002003-02-23 22:59:01 +00008771 # -prebind is no longer used, because it actually seems to give a
8772 # slowdown in stead of a speedup, maybe due to the large number of
8773 # dynamic loads Python does.
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00008774
8775 LINKFORSHARED="$extra_undefs"
Jack Jansene578a632001-08-15 01:27:14 +00008776 if test "$enable_framework"
8777 then
Jack Jansenda49e192005-01-07 13:08:22 +00008778 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00008779 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00008780 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00008781 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00008782 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00008783 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00008784 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +00008785 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
8786 then
8787 LINKFORSHARED="-Wl,--export-dynamic"
8788 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008789 SunOS/5*) case $CC in
8790 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00008791 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00008792 then
8793 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008794 fi;;
8795 esac;;
Jason Tishler30765592003-09-04 11:04:06 +00008796 CYGWIN*)
8797 if test $enable_shared = "no"
8798 then
8799 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
8800 fi;;
Martin v. Löwis8c255e42008-05-23 15:06:50 +00008801 QNX*)
8802 # -Wl,-E causes the symbols to be added to the dynamic
8803 # symbol table so that they can be found when a module
8804 # is loaded. -N 2048K causes the stack size to be set
8805 # to 2048 kilobytes so that the stack doesn't overflow
8806 # when running test_compile.py.
8807 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008808 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008809fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008810{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKFORSHARED" >&5
8811$as_echo "$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008812
Michael W. Hudson54241132001-12-07 15:38:26 +00008813
Ronald Oussoren0d236eb2008-06-06 21:31:33 +00008814
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008815{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAGSFORSHARED" >&5
8816$as_echo_n "checking CFLAGSFORSHARED... " >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00008817if test ! "$LIBRARY" = "$LDLIBRARY"
8818then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00008819 case $ac_sys_system in
8820 CYGWIN*)
8821 # Cygwin needs CCSHARED when building extension DLLs
8822 # but not when building the interpreter DLL.
8823 CFLAGSFORSHARED='';;
8824 *)
8825 CFLAGSFORSHARED='$(CCSHARED)'
8826 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00008827fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008828{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CFLAGSFORSHARED" >&5
8829$as_echo "$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00008830
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008831# SHLIBS are libraries (except -lc and -lm) to link to the python shared
8832# library (with --enable-shared).
8833# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00008834# symbols, this must be set to $(LIBS) (expanded by make). We do this even
8835# if it is not required, since it creates a dependency of the shared library
8836# to LIBS. This, in turn, means that applications linking the shared libpython
8837# don't need to link LIBS explicitly. The default should be only changed
8838# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008839
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008840{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SHLIBS" >&5
8841$as_echo_n "checking SHLIBS... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008842case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008843 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00008844 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008845esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008846{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIBS" >&5
8847$as_echo "$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008848
8849
Guido van Rossum627b2d71993-12-24 10:39:16 +00008850# checks for libraries
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008851{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
8852$as_echo_n "checking for dlopen in -ldl... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008853if ${ac_cv_lib_dl_dlopen+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008854 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008855else
Martin v. Löwis11437992002-04-12 09:54:03 +00008856 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008857LIBS="-ldl $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008858cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008859/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008860
Martin v. Löwiseba40652007-08-30 20:10:57 +00008861/* Override any GCC internal prototype to avoid an error.
8862 Use char because int might match the return type of a GCC
8863 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008864#ifdef __cplusplus
8865extern "C"
8866#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008867char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008868int
8869main ()
8870{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008871return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008872 ;
8873 return 0;
8874}
8875_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008876if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008877 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008878else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008879 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008880fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008881rm -f core conftest.err conftest.$ac_objext \
8882 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008883LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00008884fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008885{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
8886$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008887if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008888 cat >>confdefs.h <<_ACEOF
8889#define HAVE_LIBDL 1
8890_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00008891
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008892 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00008893
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008894fi
8895 # Dynamic linking for SunOS/Solaris and SYSV
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008896{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
8897$as_echo_n "checking for shl_load in -ldld... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008898if ${ac_cv_lib_dld_shl_load+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008899 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008900else
Martin v. Löwis11437992002-04-12 09:54:03 +00008901 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008902LIBS="-ldld $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008903cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008904/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008905
Martin v. Löwiseba40652007-08-30 20:10:57 +00008906/* Override any GCC internal prototype to avoid an error.
8907 Use char because int might match the return type of a GCC
8908 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008909#ifdef __cplusplus
8910extern "C"
8911#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008912char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008913int
8914main ()
8915{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008916return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008917 ;
8918 return 0;
8919}
8920_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008921if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008922 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008923else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008924 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008925fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008926rm -f core conftest.err conftest.$ac_objext \
8927 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008928LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00008929fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008930{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
8931$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008932if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008933 cat >>confdefs.h <<_ACEOF
8934#define HAVE_LIBDLD 1
8935_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00008936
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008937 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008938
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008939fi
8940 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +00008941
Ronald Oussoren79f90492009-01-02 10:44:46 +00008942# only check for sem_init if thread support is requested
Martin v. Löwis519adae2003-09-20 10:47:47 +00008943if test "$with_threads" = "yes" -o -z "$with_threads"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008944 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
8945$as_echo_n "checking for library containing sem_init... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008946if ${ac_cv_search_sem_init+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008947 $as_echo_n "(cached) " >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00008948else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00008949 ac_func_search_save_LIBS=$LIBS
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008950cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008951/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008952
Martin v. Löwiseba40652007-08-30 20:10:57 +00008953/* Override any GCC internal prototype to avoid an error.
8954 Use char because int might match the return type of a GCC
8955 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008956#ifdef __cplusplus
8957extern "C"
8958#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008959char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008960int
8961main ()
8962{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008963return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008964 ;
8965 return 0;
8966}
8967_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00008968for ac_lib in '' pthread rt posix4; do
8969 if test -z "$ac_lib"; then
8970 ac_res="none required"
8971 else
8972 ac_res=-l$ac_lib
Skip Montanaro89e975f2007-08-22 19:05:21 +00008973 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Martin v. Löwiseba40652007-08-30 20:10:57 +00008974 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008975 if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00008976 ac_cv_search_sem_init=$ac_res
Brett Cannon19fab762007-06-02 03:02:29 +00008977fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008978rm -f core conftest.err conftest.$ac_objext \
8979 conftest$ac_exeext
Matthias Klose3cef2a92012-03-14 23:39:33 +01008980 if ${ac_cv_search_sem_init+:} false; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00008981 break
Skip Montanaro89e975f2007-08-22 19:05:21 +00008982fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008983done
Matthias Klose3cef2a92012-03-14 23:39:33 +01008984if ${ac_cv_search_sem_init+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008985
Martin v. Löwiseba40652007-08-30 20:10:57 +00008986else
8987 ac_cv_search_sem_init=no
8988fi
8989rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00008990LIBS=$ac_func_search_save_LIBS
8991fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008992{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
8993$as_echo "$ac_cv_search_sem_init" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008994ac_res=$ac_cv_search_sem_init
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008995if test "$ac_res" != no; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00008996 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00008997
Martin v. Löwis41933dd2002-03-21 15:10:58 +00008998fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +00008999 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +00009000 # posix4 on Solaris 2.6
9001 # pthread (first!) on Linux
9002fi
9003
Martin v. Löwis19d17342003-06-14 21:03:05 +00009004# check if we need libintl for locale functions
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009005{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for textdomain in -lintl" >&5
9006$as_echo_n "checking for textdomain in -lintl... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009007if ${ac_cv_lib_intl_textdomain+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009008 $as_echo_n "(cached) " >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +00009009else
9010 ac_check_lib_save_LIBS=$LIBS
9011LIBS="-lintl $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009012cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009013/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00009014
Martin v. Löwiseba40652007-08-30 20:10:57 +00009015/* Override any GCC internal prototype to avoid an error.
9016 Use char because int might match the return type of a GCC
9017 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00009018#ifdef __cplusplus
9019extern "C"
9020#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +00009021char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00009022int
9023main ()
9024{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009025return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00009026 ;
9027 return 0;
9028}
9029_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009030if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00009031 ac_cv_lib_intl_textdomain=yes
9032else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009033 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +00009034fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009035rm -f core conftest.err conftest.$ac_objext \
9036 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +00009037LIBS=$ac_check_lib_save_LIBS
9038fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009039{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_textdomain" >&5
9040$as_echo "$ac_cv_lib_intl_textdomain" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009041if test "x$ac_cv_lib_intl_textdomain" = xyes; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00009042
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009043$as_echo "#define WITH_LIBINTL 1" >>confdefs.h
Martin v. Löwis19d17342003-06-14 21:03:05 +00009044
9045fi
9046
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009047
9048# checks for system dependent C++ extensions support
9049case "$ac_sys_system" in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009050 AIX*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for genuine AIX C++ extensions support" >&5
9051$as_echo_n "checking for genuine AIX C++ extensions support... " >&6; }
9052 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009053/* end confdefs.h. */
Matthias Klosec511b472010-05-08 11:01:39 +00009054
Georg Brandl94800df2011-02-25 11:09:02 +00009055 #include <load.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009056int
9057main ()
9058{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009059loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00009060 ;
9061 return 0;
9062}
Matthias Klosec511b472010-05-08 11:01:39 +00009063
Martin v. Löwis11437992002-04-12 09:54:03 +00009064_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009065if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009066
Matthias Klosec511b472010-05-08 11:01:39 +00009067
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009068$as_echo "#define AIX_GENUINE_CPLUSPLUS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009069
Matthias Klosec511b472010-05-08 11:01:39 +00009070 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009071$as_echo "yes" >&6; }
Matthias Klosec511b472010-05-08 11:01:39 +00009072
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009073else
Matthias Klosec511b472010-05-08 11:01:39 +00009074
9075 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009076$as_echo "no" >&6; }
Matthias Klosec511b472010-05-08 11:01:39 +00009077
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009078fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009079rm -f core conftest.err conftest.$ac_objext \
9080 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009081 *) ;;
9082esac
9083
Guido van Rossum70c7f481998-03-26 18:44:10 +00009084# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009085# BeOS' sockets are stashed in libnet.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009086{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_open in -lnsl" >&5
9087$as_echo_n "checking for t_open in -lnsl... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009088if ${ac_cv_lib_nsl_t_open+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009089 $as_echo_n "(cached) " >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009090else
Martin v. Löwis11437992002-04-12 09:54:03 +00009091 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009092LIBS="-lnsl $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009093cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009094/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009095
Martin v. Löwiseba40652007-08-30 20:10:57 +00009096/* Override any GCC internal prototype to avoid an error.
9097 Use char because int might match the return type of a GCC
9098 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009099#ifdef __cplusplus
9100extern "C"
9101#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009102char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009103int
9104main ()
9105{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009106return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009107 ;
9108 return 0;
9109}
9110_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009111if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009112 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009113else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009114 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009115fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009116rm -f core conftest.err conftest.$ac_objext \
9117 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009118LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009119fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009120{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_t_open" >&5
9121$as_echo "$ac_cv_lib_nsl_t_open" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009122if test "x$ac_cv_lib_nsl_t_open" = xyes; then :
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009123 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009124fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00009125 # SVR4
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009126{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
9127$as_echo_n "checking for socket in -lsocket... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009128if ${ac_cv_lib_socket_socket+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009129 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009130else
Martin v. Löwis11437992002-04-12 09:54:03 +00009131 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009132LIBS="-lsocket $LIBS $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009133cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009134/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009135
Martin v. Löwiseba40652007-08-30 20:10:57 +00009136/* Override any GCC internal prototype to avoid an error.
9137 Use char because int might match the return type of a GCC
9138 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009139#ifdef __cplusplus
9140extern "C"
9141#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009142char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009143int
9144main ()
9145{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009146return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009147 ;
9148 return 0;
9149}
9150_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009151if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009152 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009153else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009154 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009155fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009156rm -f core conftest.err conftest.$ac_objext \
9157 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009158LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009159fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009160{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
9161$as_echo "$ac_cv_lib_socket_socket" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009162if test "x$ac_cv_lib_socket_socket" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +00009163 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +00009164fi
9165 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +00009166
Jeremy Hyltoncb25d5e2000-07-27 21:23:28 +00009167case "$ac_sys_system" in
9168BeOS*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009169{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lnet" >&5
9170$as_echo_n "checking for socket in -lnet... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009171if ${ac_cv_lib_net_socket+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009172 $as_echo_n "(cached) " >&6
Guido van Rossumad678af1998-10-02 14:42:15 +00009173else
Martin v. Löwis11437992002-04-12 09:54:03 +00009174 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +00009175LIBS="-lnet $LIBS $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009176cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009177/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009178
Martin v. Löwiseba40652007-08-30 20:10:57 +00009179/* Override any GCC internal prototype to avoid an error.
9180 Use char because int might match the return type of a GCC
9181 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009182#ifdef __cplusplus
9183extern "C"
9184#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009185char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009186int
9187main ()
9188{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009189return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009190 ;
9191 return 0;
9192}
9193_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009194if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009195 ac_cv_lib_net_socket=yes
Guido van Rossumad678af1998-10-02 14:42:15 +00009196else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009197 ac_cv_lib_net_socket=no
Guido van Rossumad678af1998-10-02 14:42:15 +00009198fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009199rm -f core conftest.err conftest.$ac_objext \
9200 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009201LIBS=$ac_check_lib_save_LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +00009202fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009203{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_net_socket" >&5
9204$as_echo "$ac_cv_lib_net_socket" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009205if test "x$ac_cv_lib_net_socket" = xyes; then :
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009206 LIBS="-lnet $LIBS"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009207fi
9208 # BeOS
9209;;
9210esac
Guido van Rossum70c7f481998-03-26 18:44:10 +00009211
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009212{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libs" >&5
9213$as_echo_n "checking for --with-libs... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009214
Martin v. Löwiseba40652007-08-30 20:10:57 +00009215# Check whether --with-libs was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009216if test "${with_libs+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00009217 withval=$with_libs;
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009218{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9219$as_echo "$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +00009220LIBS="$withval $LIBS"
9221
9222else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009223 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9224$as_echo "no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009225fi
9226
Guido van Rossum7f43da71994-08-01 12:15:30 +00009227
Benjamin Peterson64e8f6e2014-12-15 00:00:23 -05009228
9229
9230
9231
9232
9233
9234
9235if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
9236 if test -n "$ac_tool_prefix"; then
Benjamin Peterson1c335e62010-01-01 15:16:29 +00009237 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
9238set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009239{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9240$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009241if ${ac_cv_path_PKG_CONFIG+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009242 $as_echo_n "(cached) " >&6
Benjamin Peterson1c335e62010-01-01 15:16:29 +00009243else
9244 case $PKG_CONFIG in
9245 [\\/]* | ?:[\\/]*)
9246 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
9247 ;;
9248 *)
9249 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9250for as_dir in $PATH
9251do
9252 IFS=$as_save_IFS
9253 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009254 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01009255 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Benjamin Peterson1c335e62010-01-01 15:16:29 +00009256 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009257 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Peterson1c335e62010-01-01 15:16:29 +00009258 break 2
9259 fi
9260done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009261 done
Benjamin Peterson1c335e62010-01-01 15:16:29 +00009262IFS=$as_save_IFS
9263
9264 ;;
9265esac
9266fi
9267PKG_CONFIG=$ac_cv_path_PKG_CONFIG
9268if test -n "$PKG_CONFIG"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009269 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
9270$as_echo "$PKG_CONFIG" >&6; }
Benjamin Peterson1c335e62010-01-01 15:16:29 +00009271else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009272 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9273$as_echo "no" >&6; }
Benjamin Peterson1c335e62010-01-01 15:16:29 +00009274fi
9275
9276
9277fi
9278if test -z "$ac_cv_path_PKG_CONFIG"; then
9279 ac_pt_PKG_CONFIG=$PKG_CONFIG
9280 # Extract the first word of "pkg-config", so it can be a program name with args.
9281set dummy pkg-config; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009282{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9283$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009284if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009285 $as_echo_n "(cached) " >&6
Benjamin Peterson1c335e62010-01-01 15:16:29 +00009286else
9287 case $ac_pt_PKG_CONFIG in
9288 [\\/]* | ?:[\\/]*)
9289 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
9290 ;;
9291 *)
9292 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9293for as_dir in $PATH
9294do
9295 IFS=$as_save_IFS
9296 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009297 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01009298 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Benjamin Peterson1c335e62010-01-01 15:16:29 +00009299 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009300 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Peterson1c335e62010-01-01 15:16:29 +00009301 break 2
9302 fi
9303done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009304 done
Benjamin Peterson1c335e62010-01-01 15:16:29 +00009305IFS=$as_save_IFS
9306
9307 ;;
9308esac
9309fi
9310ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
9311if test -n "$ac_pt_PKG_CONFIG"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009312 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
9313$as_echo "$ac_pt_PKG_CONFIG" >&6; }
Benjamin Peterson1c335e62010-01-01 15:16:29 +00009314else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009315 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9316$as_echo "no" >&6; }
Benjamin Peterson1c335e62010-01-01 15:16:29 +00009317fi
9318
9319 if test "x$ac_pt_PKG_CONFIG" = x; then
9320 PKG_CONFIG=""
9321 else
9322 case $cross_compiling:$ac_tool_warned in
9323yes:)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009324{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9325$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Benjamin Peterson1c335e62010-01-01 15:16:29 +00009326ac_tool_warned=yes ;;
9327esac
9328 PKG_CONFIG=$ac_pt_PKG_CONFIG
9329 fi
9330else
9331 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
9332fi
9333
Benjamin Peterson64e8f6e2014-12-15 00:00:23 -05009334fi
9335if test -n "$PKG_CONFIG"; then
9336 _pkg_min_version=0.9.0
9337 { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
9338$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
9339 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
9340 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9341$as_echo "yes" >&6; }
9342 else
9343 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9344$as_echo "no" >&6; }
9345 PKG_CONFIG=""
9346 fi
9347fi
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00009348
9349# Check for use of the system expat library
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009350{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-expat" >&5
9351$as_echo_n "checking for --with-system-expat... " >&6; }
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00009352
9353# Check whether --with-system_expat was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009354if test "${with_system_expat+set}" = set; then :
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00009355 withval=$with_system_expat;
Benjamin Petersonf2d1b2a2010-10-31 16:53:53 +00009356else
9357 with_system_expat="no"
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00009358fi
9359
9360
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009361{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_expat" >&5
9362$as_echo "$with_system_expat" >&6; }
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00009363
9364# Check for use of the system libffi library
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009365{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-ffi" >&5
9366$as_echo_n "checking for --with-system-ffi... " >&6; }
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00009367
9368# Check whether --with-system_ffi was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009369if test "${with_system_ffi+set}" = set; then :
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00009370 withval=$with_system_ffi;
Benjamin Petersonf2d1b2a2010-10-31 16:53:53 +00009371else
9372 with_system_ffi="no"
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00009373fi
9374
9375
9376if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
Benjamin Peterson1c335e62010-01-01 15:16:29 +00009377 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
9378else
9379 LIBFFI_INCLUDEDIR=""
9380fi
9381
9382
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009383{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_ffi" >&5
9384$as_echo "$with_system_ffi" >&6; }
Martin v. Löwis9176fc12006-04-11 11:12:43 +00009385
Ned Deilya2a9f572013-10-25 00:30:10 -07009386# Check for --with-tcltk-includes=path and --with-tcltk-libs=path
9387
9388
9389{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-includes" >&5
9390$as_echo_n "checking for --with-tcltk-includes... " >&6; }
9391
9392# Check whether --with-tcltk-includes was given.
9393if test "${with_tcltk_includes+set}" = set; then :
9394 withval=$with_tcltk_includes;
9395else
9396 with_tcltk_includes="default"
9397fi
9398
9399{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_includes" >&5
9400$as_echo "$with_tcltk_includes" >&6; }
9401{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-libs" >&5
9402$as_echo_n "checking for --with-tcltk-libs... " >&6; }
9403
9404# Check whether --with-tcltk-libs was given.
9405if test "${with_tcltk_libs+set}" = set; then :
9406 withval=$with_tcltk_libs;
9407else
9408 with_tcltk_libs="default"
9409fi
9410
9411{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_libs" >&5
9412$as_echo "$with_tcltk_libs" >&6; }
9413if test "x$with_tcltk_includes" = xdefault || test "x$with_tcltk_libs" = xdefault
9414then
9415 if test "x$with_tcltk_includes" != "x$with_tcltk_libs"
9416 then
9417 as_fn_error $? "use both --with-tcltk-includes='...' and --with-tcltk-libs='...' or neither" "$LINENO" 5
9418 fi
9419 TCLTK_INCLUDES=""
9420 TCLTK_LIBS=""
9421else
9422 TCLTK_INCLUDES="$with_tcltk_includes"
9423 TCLTK_LIBS="$with_tcltk_libs"
9424fi
9425
Benjamin Peterson867475c2009-04-29 20:36:25 +00009426# Check for --with-dbmliborder
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009427{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dbmliborder" >&5
9428$as_echo_n "checking for --with-dbmliborder... " >&6; }
Benjamin Peterson867475c2009-04-29 20:36:25 +00009429
9430# Check whether --with-dbmliborder was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009431if test "${with_dbmliborder+set}" = set; then :
Benjamin Peterson867475c2009-04-29 20:36:25 +00009432 withval=$with_dbmliborder;
9433if test x$with_dbmliborder = xyes
9434then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00009435as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Benjamin Peterson867475c2009-04-29 20:36:25 +00009436else
9437 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
9438 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
9439 then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00009440 as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Benjamin Peterson867475c2009-04-29 20:36:25 +00009441 fi
9442 done
9443fi
9444fi
9445
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009446{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dbmliborder" >&5
9447$as_echo "$with_dbmliborder" >&6; }
Benjamin Peterson867475c2009-04-29 20:36:25 +00009448
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00009449# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009450
9451
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009452{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-signal-module" >&5
9453$as_echo_n "checking for --with-signal-module... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009454
Martin v. Löwiseba40652007-08-30 20:10:57 +00009455# Check whether --with-signal-module was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009456if test "${with_signal_module+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00009457 withval=$with_signal_module;
9458fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009459
9460
9461if test -z "$with_signal_module"
9462then with_signal_module="yes"
9463fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009464{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_signal_module" >&5
9465$as_echo "$with_signal_module" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009466
9467if test "${with_signal_module}" = "yes"; then
9468 USE_SIGNAL_MODULE=""
9469 SIGNAL_OBJS=""
9470else
9471 USE_SIGNAL_MODULE="#"
9472 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
9473fi
9474
Guido van Rossum3d15bd82001-01-10 18:53:48 +00009475# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +00009476
Barry Warsawc0d24d82000-06-29 16:12:00 +00009477USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +00009478
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009479{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dec-threads" >&5
9480$as_echo_n "checking for --with-dec-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009481
Guido van Rossumec2f0731997-01-22 20:54:01 +00009482
Martin v. Löwiseba40652007-08-30 20:10:57 +00009483# Check whether --with-dec-threads was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009484if test "${with_dec_threads+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00009485 withval=$with_dec_threads;
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009486{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9487$as_echo "$withval" >&6; }
Guido van Rossumec2f0731997-01-22 20:54:01 +00009488LDLAST=-threads
Guido van Rossumf78abae1997-01-21 22:02:36 +00009489if test "${with_thread+set}" != set; then
Guido van Rossumec2f0731997-01-22 20:54:01 +00009490 with_thread="$withval";
Guido van Rossumf78abae1997-01-21 22:02:36 +00009491fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00009492else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009493 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9494$as_echo "no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009495fi
9496
Martin v. Löwis11437992002-04-12 09:54:03 +00009497
9498# Templates for things AC_DEFINEd more than once.
9499# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +00009500
9501
Martin v. Löwis11437992002-04-12 09:54:03 +00009502
9503
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009504{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-threads" >&5
9505$as_echo_n "checking for --with-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009506
Martin v. Löwiseba40652007-08-30 20:10:57 +00009507# Check whether --with-threads was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009508if test "${with_threads+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00009509 withval=$with_threads;
9510fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00009511
9512
Barry Warsawc0d24d82000-06-29 16:12:00 +00009513# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +00009514
Martin v. Löwiseba40652007-08-30 20:10:57 +00009515# Check whether --with-thread was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009516if test "${with_thread+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00009517 withval=$with_thread; with_threads=$with_thread
9518fi
9519
Barry Warsawc0d24d82000-06-29 16:12:00 +00009520
9521if test -z "$with_threads"
9522then with_threads="yes"
9523fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009524{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_threads" >&5
9525$as_echo "$with_threads" >&6; }
Barry Warsawc0d24d82000-06-29 16:12:00 +00009526
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009527
Barry Warsawc0d24d82000-06-29 16:12:00 +00009528if test "$with_threads" = "no"
9529then
9530 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009531elif test "$ac_cv_pthread_is_default" = yes
9532then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009533 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009534
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009535 # Defining _REENTRANT on system with POSIX threads should not hurt.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009536 $as_echo "#define _REENTRANT 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009537
9538 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +00009539 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009540elif test "$ac_cv_kpthread" = "yes"
9541then
9542 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00009543 if test "$ac_cv_cxx_thread" = "yes"; then
9544 CXX="$CXX -Kpthread"
9545 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009546 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum2242f2f2001-04-11 20:58:20 +00009547
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009548 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009549 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00009550elif test "$ac_cv_kthread" = "yes"
9551then
9552 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00009553 if test "$ac_cv_cxx_thread" = "yes"; then
9554 CXX="$CXX -Kthread"
9555 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009556 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis5f433f02003-05-05 05:05:30 +00009557
9558 posix_threads=yes
9559 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009560elif test "$ac_cv_pthread" = "yes"
9561then
9562 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00009563 if test "$ac_cv_cxx_thread" = "yes"; then
9564 CXX="$CXX -pthread"
9565 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009566 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009567
9568 posix_threads=yes
9569 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009570else
9571 if test ! -z "$with_threads" -a -d "$with_threads"
9572 then LDFLAGS="$LDFLAGS -L$with_threads"
9573 fi
9574 if test ! -z "$withval" -a -d "$withval"
9575 then LDFLAGS="$LDFLAGS -L$withval"
9576 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009577
9578 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +00009579 # define _POSIX_THREADS in unistd.h. Some apparently don't
9580 # (e.g. gnu pth with pthread emulation)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009581 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _POSIX_THREADS in unistd.h" >&5
9582$as_echo_n "checking for _POSIX_THREADS in unistd.h... " >&6; }
9583 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009584/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +00009585
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009586#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +00009587#ifdef _POSIX_THREADS
9588yes
9589#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009590
9591_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009592if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009593 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009594 unistd_defines_pthreads=yes
9595else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009596 unistd_defines_pthreads=no
9597fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00009598rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009599
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009600 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $unistd_defines_pthreads" >&5
9601$as_echo "$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009602
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009603 $as_echo "#define _REENTRANT 1" >>confdefs.h
Guido van Rossum9caf77a1996-08-01 00:52:26 +00009604
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009605 ac_fn_c_check_header_mongrel "$LINENO" "cthreads.h" "ac_cv_header_cthreads_h" "$ac_includes_default"
Matthias Klose3cef2a92012-03-14 23:39:33 +01009606if test "x$ac_cv_header_cthreads_h" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009607 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +00009608
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009609 $as_echo "#define C_THREADS 1" >>confdefs.h
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009610
Martin v. Löwis11437992002-04-12 09:54:03 +00009611
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009612$as_echo "#define HURD_C_THREADS 1" >>confdefs.h
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009613
9614 LIBS="$LIBS -lthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009615 THREADOBJ="Python/thread.o"
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009616else
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009617
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009618 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 +01009619if test "x$ac_cv_header_mach_cthreads_h" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009620 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +00009621
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009622 $as_echo "#define C_THREADS 1" >>confdefs.h
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009623
Martin v. Löwis11437992002-04-12 09:54:03 +00009624
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009625$as_echo "#define MACH_C_THREADS 1" >>confdefs.h
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009626
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009627 THREADOBJ="Python/thread.o"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009628else
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009629
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009630 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pth" >&5
9631$as_echo_n "checking for --with-pth... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009632
Martin v. Löwiseba40652007-08-30 20:10:57 +00009633# Check whether --with-pth was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009634if test "${with_pth+set}" = set; then :
9635 withval=$with_pth; { $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9636$as_echo "$withval" >&6; }
9637 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009638
9639
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009640$as_echo "#define HAVE_PTH 1" >>confdefs.h
Guido van Rossum9e8181b2000-09-19 00:46:46 +00009641
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00009642 LIBS="-lpth $LIBS"
9643 THREADOBJ="Python/thread.o"
Guido van Rossum9e8181b2000-09-19 00:46:46 +00009644else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009645 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9646$as_echo "no" >&6; }
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009647
9648 # Just looking for pthread_create in libpthread is not enough:
9649 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
9650 # So we really have to include pthread.h, and then link.
9651 _libs=$LIBS
9652 LIBS="$LIBS -lpthread"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009653 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
9654$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
9655 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009656/* end confdefs.h. */
Stefan Krahae66ca62012-11-22 22:36:57 +01009657
9658#include <stdio.h>
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009659#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +00009660
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009661void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +00009662int
9663main ()
9664{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009665
9666pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +00009667 ;
9668 return 0;
9669}
9670_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009671if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009672
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009673 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9674$as_echo "yes" >&6; }
9675 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum02a1c402000-02-25 19:26:31 +00009676
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009677 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009678 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +00009679else
Martin v. Löwis11437992002-04-12 09:54:03 +00009680
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009681 LIBS=$_libs
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009682 ac_fn_c_check_func "$LINENO" "pthread_detach" "ac_cv_func_pthread_detach"
Matthias Klose3cef2a92012-03-14 23:39:33 +01009683if test "x$ac_cv_func_pthread_detach" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009684 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumad678af1998-10-02 14:42:15 +00009685
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009686 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009687 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +00009688else
Guido van Rossumad678af1998-10-02 14:42:15 +00009689
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009690 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 +01009691if test "x$ac_cv_header_atheos_threads_h" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009692 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009693
9694
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009695$as_echo "#define ATHEOS_THREADS 1" >>confdefs.h
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009696
9697 THREADOBJ="Python/thread.o"
9698else
9699
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009700 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 +01009701if test "x$ac_cv_header_kernel_OS_h" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009702 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009703
9704
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009705$as_echo "#define BEOS_THREADS 1" >>confdefs.h
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009706
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009707 THREADOBJ="Python/thread.o"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009708else
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009709
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009710 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5
9711$as_echo_n "checking for pthread_create in -lpthreads... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009712if ${ac_cv_lib_pthreads_pthread_create+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009713 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009714else
Martin v. Löwis11437992002-04-12 09:54:03 +00009715 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009716LIBS="-lpthreads $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009717cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009718/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009719
Martin v. Löwiseba40652007-08-30 20:10:57 +00009720/* Override any GCC internal prototype to avoid an error.
9721 Use char because int might match the return type of a GCC
9722 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009723#ifdef __cplusplus
9724extern "C"
9725#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009726char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009727int
9728main ()
9729{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009730return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009731 ;
9732 return 0;
9733}
9734_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009735if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009736 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +00009737else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009738 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +00009739fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009740rm -f core conftest.err conftest.$ac_objext \
9741 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009742LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00009743fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009744{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5
9745$as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009746if test "x$ac_cv_lib_pthreads_pthread_create" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009747 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Greg Steinadf63d62000-07-05 10:38:09 +00009748
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009749 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00009750 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009751 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +00009752else
Greg Steinadf63d62000-07-05 10:38:09 +00009753
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009754 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5
9755$as_echo_n "checking for pthread_create in -lc_r... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009756if ${ac_cv_lib_c_r_pthread_create+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009757 $as_echo_n "(cached) " >&6
Greg Steinadf63d62000-07-05 10:38:09 +00009758else
Martin v. Löwis11437992002-04-12 09:54:03 +00009759 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00009760LIBS="-lc_r $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009761cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009762/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009763
Martin v. Löwiseba40652007-08-30 20:10:57 +00009764/* Override any GCC internal prototype to avoid an error.
9765 Use char because int might match the return type of a GCC
9766 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009767#ifdef __cplusplus
9768extern "C"
9769#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009770char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009771int
9772main ()
9773{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009774return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009775 ;
9776 return 0;
9777}
9778_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009779if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009780 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +00009781else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009782 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +00009783fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009784rm -f core conftest.err conftest.$ac_objext \
9785 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009786LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +00009787fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009788{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5
9789$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009790if test "x$ac_cv_lib_c_r_pthread_create" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009791 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum49545951997-12-02 19:28:29 +00009792
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009793 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00009794 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009795 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +00009796else
Guido van Rossum07bd90e2000-05-08 13:41:38 +00009797
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009798 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_create_system in -lpthread" >&5
9799$as_echo_n "checking for __pthread_create_system in -lpthread... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009800if ${ac_cv_lib_pthread___pthread_create_system+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009801 $as_echo_n "(cached) " >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009802else
Martin v. Löwis11437992002-04-12 09:54:03 +00009803 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009804LIBS="-lpthread $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009805cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009806/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009807
Martin v. Löwiseba40652007-08-30 20:10:57 +00009808/* Override any GCC internal prototype to avoid an error.
9809 Use char because int might match the return type of a GCC
9810 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009811#ifdef __cplusplus
9812extern "C"
9813#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009814char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009815int
9816main ()
9817{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009818return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009819 ;
9820 return 0;
9821}
9822_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009823if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009824 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009825else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009826 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009827fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009828rm -f core conftest.err conftest.$ac_objext \
9829 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009830LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009831fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009832{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_create_system" >&5
9833$as_echo "$ac_cv_lib_pthread___pthread_create_system" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009834if test "x$ac_cv_lib_pthread___pthread_create_system" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009835 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009836
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009837 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00009838 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009839 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009840else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009841
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009842 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lcma" >&5
9843$as_echo_n "checking for pthread_create in -lcma... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009844if ${ac_cv_lib_cma_pthread_create+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009845 $as_echo_n "(cached) " >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +00009846else
Martin v. Löwis11437992002-04-12 09:54:03 +00009847 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00009848LIBS="-lcma $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009849cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009850/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009851
Martin v. Löwiseba40652007-08-30 20:10:57 +00009852/* Override any GCC internal prototype to avoid an error.
9853 Use char because int might match the return type of a GCC
9854 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009855#ifdef __cplusplus
9856extern "C"
9857#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009858char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009859int
9860main ()
9861{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009862return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009863 ;
9864 return 0;
9865}
9866_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009867if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009868 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +00009869else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009870 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +00009871fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009872rm -f core conftest.err conftest.$ac_objext \
9873 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009874LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00009875fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009876{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cma_pthread_create" >&5
9877$as_echo "$ac_cv_lib_cma_pthread_create" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009878if test "x$ac_cv_lib_cma_pthread_create" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009879 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumb93a8621998-05-07 13:27:32 +00009880
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009881 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00009882 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009883 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +00009884else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +00009885
Martin v. Löwis130fb172001-07-19 11:00:41 +00009886 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +00009887fi
9888
Guido van Rossum627b2d71993-12-24 10:39:16 +00009889
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009890fi
9891
Guido van Rossum0be3e491997-05-22 20:33:33 +00009892fi
9893
Guido van Rossum49545951997-12-02 19:28:29 +00009894fi
9895
Guido van Rossumb93a8621998-05-07 13:27:32 +00009896fi
9897
Guido van Rossum07bd90e2000-05-08 13:41:38 +00009898
Michael W. Hudson54241132001-12-07 15:38:26 +00009899fi
9900
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009901
9902fi
9903
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009904fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009905rm -f core conftest.err conftest.$ac_objext \
9906 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009907fi
9908
Martin v. Löwis11437992002-04-12 09:54:03 +00009909fi
9910
9911
9912fi
9913
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009914
Michael W. Hudson54241132001-12-07 15:38:26 +00009915
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009916 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usconfig in -lmpc" >&5
9917$as_echo_n "checking for usconfig in -lmpc... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009918if ${ac_cv_lib_mpc_usconfig+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009919 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009920else
Martin v. Löwis11437992002-04-12 09:54:03 +00009921 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009922LIBS="-lmpc $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009923cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009924/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009925
Martin v. Löwiseba40652007-08-30 20:10:57 +00009926/* Override any GCC internal prototype to avoid an error.
9927 Use char because int might match the return type of a GCC
9928 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009929#ifdef __cplusplus
9930extern "C"
9931#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009932char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009933int
9934main ()
9935{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009936return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009937 ;
9938 return 0;
9939}
9940_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009941if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009942 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009943else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009944 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009945fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009946rm -f core conftest.err conftest.$ac_objext \
9947 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009948LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009949fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009950{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpc_usconfig" >&5
9951$as_echo "$ac_cv_lib_mpc_usconfig" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009952if test "x$ac_cv_lib_mpc_usconfig" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009953 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00009954
Martin v. Löwis130fb172001-07-19 11:00:41 +00009955 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009956 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009957 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +00009958fi
9959
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00009960
Neal Norwitza978ab02002-11-02 16:58:05 +00009961 if test "$posix_threads" != "yes"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009962 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thr_create in -lthread" >&5
9963$as_echo_n "checking for thr_create in -lthread... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009964if ${ac_cv_lib_thread_thr_create+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009965 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009966else
Martin v. Löwis11437992002-04-12 09:54:03 +00009967 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009968LIBS="-lthread $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009969cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009970/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009971
Martin v. Löwiseba40652007-08-30 20:10:57 +00009972/* Override any GCC internal prototype to avoid an error.
9973 Use char because int might match the return type of a GCC
9974 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009975#ifdef __cplusplus
9976extern "C"
9977#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009978char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009979int
9980main ()
9981{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009982return thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009983 ;
9984 return 0;
9985}
9986_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009987if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009988 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009989else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009990 ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009991fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009992rm -f core conftest.err conftest.$ac_objext \
9993 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009994LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009995fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009996{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_thread_thr_create" >&5
9997$as_echo "$ac_cv_lib_thread_thr_create" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009998if test "x$ac_cv_lib_thread_thr_create" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009999 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000010000
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010001 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010002 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010003 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000010004fi
10005
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010006 fi
Michael W. Hudson54241132001-12-07 15:38:26 +000010007
Martin v. Löwis130fb172001-07-19 11:00:41 +000010008 if test "$USE_THREAD_MODULE" != "#"
10009 then
10010 # If the above checks didn't disable threads, (at least) OSF1
10011 # needs this '-threads' argument during linking.
10012 case $ac_sys_system in
10013 OSF1) LDLAST=-threads;;
10014 esac
Jeremy Hylton1a2ca862000-10-16 16:59:12 +000010015 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010016fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010017
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010018if test "$posix_threads" = "yes"; then
10019 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010020
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010021$as_echo "#define _POSIX_THREADS 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010022
10023 fi
10024
10025 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
10026 case $ac_sys_system/$ac_sys_release in
Charles-François Natali4929eb92011-07-21 19:41:04 +020010027 SunOS/5.6)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010028$as_echo "#define HAVE_PTHREAD_DESTRUCTOR 1" >>confdefs.h
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010029
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010030 ;;
10031 SunOS/5.8)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010032$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010033
10034 ;;
Charles-François Natali4929eb92011-07-21 19:41:04 +020010035 AIX/*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010036$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Christian Heimescba36bb2008-01-30 22:54:18 +000010037
10038 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010039 esac
10040
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010041 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
10042$as_echo_n "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010043 if ${ac_cv_pthread_system_supported+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010044 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010045else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010046 if test "$cross_compiling" = yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010047 ac_cv_pthread_system_supported=no
10048else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010049 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010050/* end confdefs.h. */
Stefan Krahae66ca62012-11-22 22:36:57 +010010051
10052 #include <stdio.h>
10053 #include <pthread.h>
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010054 void *foo(void *parm) {
10055 return NULL;
10056 }
10057 main() {
10058 pthread_attr_t attr;
10059 pthread_t id;
10060 if (pthread_attr_init(&attr)) exit(-1);
10061 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
10062 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
10063 exit(0);
10064 }
10065_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010066if ac_fn_c_try_run "$LINENO"; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010067 ac_cv_pthread_system_supported=yes
10068else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010069 ac_cv_pthread_system_supported=no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010070fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010071rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10072 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010073fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010074
Martin v. Löwiseba40652007-08-30 20:10:57 +000010075
Guido van Rossum627b2d71993-12-24 10:39:16 +000010076fi
10077
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010078 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_system_supported" >&5
10079$as_echo "$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010080 if test "$ac_cv_pthread_system_supported" = "yes"; then
10081
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010082$as_echo "#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010083
10084 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010085 for ac_func in pthread_sigmask
10086do :
10087 ac_fn_c_check_func "$LINENO" "pthread_sigmask" "ac_cv_func_pthread_sigmask"
Matthias Klose3cef2a92012-03-14 23:39:33 +010010088if test "x$ac_cv_func_pthread_sigmask" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010089 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010090#define HAVE_PTHREAD_SIGMASK 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010091_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +000010092 case $ac_sys_system in
10093 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010094
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010095$as_echo "#define HAVE_BROKEN_PTHREAD_SIGMASK 1" >>confdefs.h
Jason Tishlerfac083d2003-07-22 15:20:49 +000010096
10097 ;;
10098 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010099fi
10100done
10101
Christian Heimes0d604cf2013-08-21 13:26:05 +020010102 for ac_func in pthread_atfork
10103do :
10104 ac_fn_c_check_func "$LINENO" "pthread_atfork" "ac_cv_func_pthread_atfork"
10105if test "x$ac_cv_func_pthread_atfork" = xyes; then :
10106 cat >>confdefs.h <<_ACEOF
10107#define HAVE_PTHREAD_ATFORK 1
10108_ACEOF
10109
10110fi
10111done
10112
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010113fi
10114
10115
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010116# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000010117
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010118{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if --enable-ipv6 is specified" >&5
10119$as_echo_n "checking if --enable-ipv6 is specified... " >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000010120# Check whether --enable-ipv6 was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010121if test "${enable_ipv6+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +000010122 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010123 no)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010124 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10125$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010126 ipv6=no
10127 ;;
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010128 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10129$as_echo "yes" >&6; }
10130 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010131
10132 ipv6=yes
10133 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010134 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010135else
Martin v. Löwis11437992002-04-12 09:54:03 +000010136
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010137 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010138/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010139 /* AF_INET6 available check */
10140#include <sys/types.h>
10141#include <sys/socket.h>
Charles-François Natalibe2b9072013-01-08 19:47:00 +010010142int
10143main ()
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010144{
Charles-François Natalibe2b9072013-01-08 19:47:00 +010010145int domain = AF_INET6;
10146 ;
10147 return 0;
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010148}
Martin v. Löwis11437992002-04-12 09:54:03 +000010149_ACEOF
Charles-François Natalibe2b9072013-01-08 19:47:00 +010010150if ac_fn_c_try_compile "$LINENO"; then :
Matthias Klosec511b472010-05-08 11:01:39 +000010151
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010152 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10153$as_echo "yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010154 ipv6=yes
Matthias Klosec511b472010-05-08 11:01:39 +000010155
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010156else
Matthias Klosec511b472010-05-08 11:01:39 +000010157
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010158 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10159$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010160 ipv6=no
Matthias Klosec511b472010-05-08 11:01:39 +000010161
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010162fi
Charles-François Natalibe2b9072013-01-08 19:47:00 +010010163rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010164
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010165if test "$ipv6" = "yes"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010166 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RFC2553 API is available" >&5
10167$as_echo_n "checking if RFC2553 API is available... " >&6; }
10168 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010169/* end confdefs.h. */
Matthias Klosec511b472010-05-08 11:01:39 +000010170
10171 #include <sys/types.h>
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010172#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010173int
10174main ()
10175{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010176struct sockaddr_in6 x;
Matthias Klosec511b472010-05-08 11:01:39 +000010177 x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000010178 ;
10179 return 0;
10180}
Matthias Klosec511b472010-05-08 11:01:39 +000010181
Martin v. Löwis11437992002-04-12 09:54:03 +000010182_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010183if ac_fn_c_try_compile "$LINENO"; then :
Matthias Klosec511b472010-05-08 11:01:39 +000010184
10185 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010186$as_echo "yes" >&6; }
Matthias Klosec511b472010-05-08 11:01:39 +000010187 ipv6=yes
10188
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010189else
Matthias Klosec511b472010-05-08 11:01:39 +000010190
10191 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010192$as_echo "no" >&6; }
Matthias Klosec511b472010-05-08 11:01:39 +000010193 ipv6=no
10194
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010195fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010196rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010197fi
10198
10199if test "$ipv6" = "yes"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010200 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010201
10202fi
10203
Martin v. Löwiseba40652007-08-30 20:10:57 +000010204fi
10205
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010206
10207ipv6type=unknown
10208ipv6lib=none
10209ipv6trylibc=no
10210
10211if test "$ipv6" = "yes"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010212 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5
10213$as_echo_n "checking ipv6 stack type... " >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +000010214 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
10215 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010216 case $i in
10217 inria)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010218 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010219/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010220
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010221#include <netinet/in.h>
10222#ifdef IPV6_INRIA_VERSION
10223yes
10224#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010225_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010226if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010227 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010228 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010229fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +000010230rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010231
10232 ;;
10233 kame)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010234 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010235/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010236
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010237#include <netinet/in.h>
10238#ifdef __KAME__
10239yes
10240#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010241_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010242if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010243 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010244 ipv6type=$i;
10245 ipv6lib=inet6
10246 ipv6libdir=/usr/local/v6/lib
10247 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010248fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +000010249rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010250
10251 ;;
10252 linux-glibc)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010253 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010254/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010255
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010256#include <features.h>
10257#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
10258yes
10259#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010260_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010261if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010262 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010263 ipv6type=$i;
10264 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010265fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +000010266rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010267
10268 ;;
10269 linux-inet6)
10270 if test -d /usr/inet6; then
10271 ipv6type=$i
10272 ipv6lib=inet6
10273 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000010274 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010275 fi
10276 ;;
10277 solaris)
10278 if test -f /etc/netconfig; then
Antoine Pitrou31e85952011-01-03 18:57:14 +000010279 if $GREP -q tcp6 /etc/netconfig; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010280 ipv6type=$i
10281 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010282 fi
10283 fi
10284 ;;
10285 toshiba)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010286 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010287/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010288
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010289#include <sys/param.h>
10290#ifdef _TOSHIBA_INET6
10291yes
10292#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010293_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010294if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010295 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010296 ipv6type=$i;
10297 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010298 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010299fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +000010300rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010301
10302 ;;
10303 v6d)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010304 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010305/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010306
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010307#include </usr/local/v6/include/sys/v6config.h>
10308#ifdef __V6D__
10309yes
10310#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010311_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010312if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010313 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010314 ipv6type=$i;
10315 ipv6lib=v6;
10316 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000010317 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010318fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +000010319rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010320
10321 ;;
10322 zeta)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010323 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010324/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010325
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010326#include <sys/param.h>
10327#ifdef _ZETA_MINAMI_INET6
10328yes
10329#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010330_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010331if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010332 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010333 ipv6type=$i;
10334 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010335 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010336fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +000010337rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010338
10339 ;;
10340 esac
10341 if test "$ipv6type" != "unknown"; then
10342 break
10343 fi
10344 done
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010345 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5
10346$as_echo "$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010347fi
10348
10349if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
10350 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
10351 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
10352 echo "using lib$ipv6lib"
10353 else
10354 if test $ipv6trylibc = "yes"; then
10355 echo "using libc"
10356 else
10357 echo 'Fatal: no $ipv6lib library found. cannot continue.'
10358 echo "You need to fetch lib$ipv6lib.a from appropriate"
10359 echo 'ipv6 kit and compile beforehand.'
10360 exit 1
10361 fi
10362 fi
10363fi
10364
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010365{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for OSX 10.5 SDK or later" >&5
10366$as_echo_n "checking for OSX 10.5 SDK or later... " >&6; }
10367cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000010368/* end confdefs.h. */
Matthias Klosec511b472010-05-08 11:01:39 +000010369
10370 #include <Carbon/Carbon.h>
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000010371int
10372main ()
10373{
10374FSIORefNum fRef = 0
10375 ;
10376 return 0;
10377}
Mark Dickinson0712b562010-05-08 19:13:21 +000010378
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000010379_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010380if ac_fn_c_try_compile "$LINENO"; then :
Matthias Klosec511b472010-05-08 11:01:39 +000010381
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000010382
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010383$as_echo "#define HAVE_OSX105_SDK 1" >>confdefs.h
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000010384
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010385 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10386$as_echo "yes" >&6; }
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000010387
Mark Dickinson0712b562010-05-08 19:13:21 +000010388else
10389
10390 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10391$as_echo "no" >&6; }
10392
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000010393fi
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000010394rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10395
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010396# Check for --with-doc-strings
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010397{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-doc-strings" >&5
10398$as_echo_n "checking for --with-doc-strings... " >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010399
Martin v. Löwiseba40652007-08-30 20:10:57 +000010400# Check whether --with-doc-strings was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010401if test "${with_doc_strings+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +000010402 withval=$with_doc_strings;
10403fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010404
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010405
10406if test -z "$with_doc_strings"
10407then with_doc_strings="yes"
10408fi
10409if test "$with_doc_strings" != "no"
10410then
10411
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010412$as_echo "#define WITH_DOC_STRINGS 1" >>confdefs.h
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010413
10414fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010415{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_doc_strings" >&5
10416$as_echo "$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010417
Neil Schemenauera35c6882001-02-27 04:45:05 +000010418# Check for Python-specific malloc support
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010419{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tsc" >&5
10420$as_echo_n "checking for --with-tsc... " >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010421
Martin v. Löwiseba40652007-08-30 20:10:57 +000010422# Check whether --with-tsc was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010423if test "${with_tsc+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +000010424 withval=$with_tsc;
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010425if test "$withval" != no
10426then
10427
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010428$as_echo "#define WITH_TSC 1" >>confdefs.h
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010429
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010430 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10431$as_echo "yes" >&6; }
10432else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10433$as_echo "no" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010434fi
10435else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010436 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10437$as_echo "no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000010438fi
10439
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010440
10441# Check for Python-specific malloc support
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010442{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pymalloc" >&5
10443$as_echo_n "checking for --with-pymalloc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010444
Martin v. Löwiseba40652007-08-30 20:10:57 +000010445# Check whether --with-pymalloc was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010446if test "${with_pymalloc+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +000010447 withval=$with_pymalloc;
10448fi
Michael W. Hudson54241132001-12-07 15:38:26 +000010449
Neil Schemenauera35c6882001-02-27 04:45:05 +000010450
Neil Schemenauer16c22972002-03-22 15:34:49 +000010451if test -z "$with_pymalloc"
10452then with_pymalloc="yes"
10453fi
10454if test "$with_pymalloc" != "no"
10455then
Martin v. Löwis11437992002-04-12 09:54:03 +000010456
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010457$as_echo "#define WITH_PYMALLOC 1" >>confdefs.h
Neil Schemenauer16c22972002-03-22 15:34:49 +000010458
10459fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010460{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pymalloc" >&5
10461$as_echo "$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +000010462
Benjamin Peterson91c12eb2009-12-03 02:52:39 +000010463# Check for Valgrind support
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010464{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-valgrind" >&5
10465$as_echo_n "checking for --with-valgrind... " >&6; }
Benjamin Peterson91c12eb2009-12-03 02:52:39 +000010466
10467# Check whether --with-valgrind was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010468if test "${with_valgrind+set}" = set; then :
Benjamin Peterson91c12eb2009-12-03 02:52:39 +000010469 withval=$with_valgrind;
10470else
10471 with_valgrind=no
10472fi
10473
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010474{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_valgrind" >&5
10475$as_echo "$with_valgrind" >&6; }
Benjamin Peterson91c12eb2009-12-03 02:52:39 +000010476if test "$with_valgrind" != no; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010477 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 +010010478if test "x$ac_cv_header_valgrind_valgrind_h" = xyes; then :
Benjamin Peterson91c12eb2009-12-03 02:52:39 +000010479
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010480$as_echo "#define WITH_VALGRIND 1" >>confdefs.h
Benjamin Peterson91c12eb2009-12-03 02:52:39 +000010481
10482else
Georg Brandl71f4fbb2011-02-25 11:04:50 +000010483 as_fn_error $? "Valgrind support requested but headers not available" "$LINENO" 5
Benjamin Peterson91c12eb2009-12-03 02:52:39 +000010484
10485fi
10486
10487
10488fi
10489
Barry Warsawef82cd72000-06-30 16:21:01 +000010490# Check for --with-wctype-functions
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010491{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-wctype-functions" >&5
10492$as_echo_n "checking for --with-wctype-functions... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010493
Martin v. Löwiseba40652007-08-30 20:10:57 +000010494# Check whether --with-wctype-functions was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010495if test "${with_wctype_functions+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +000010496 withval=$with_wctype_functions;
Barry Warsawef82cd72000-06-30 16:21:01 +000010497if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000010498then
10499
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010500$as_echo "#define WANT_WCTYPE_FUNCTIONS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000010501
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010502 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10503$as_echo "yes" >&6; }
10504else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10505$as_echo "no" >&6; }
Barry Warsawef82cd72000-06-30 16:21:01 +000010506fi
10507else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010508 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10509$as_echo "no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000010510fi
10511
Barry Warsawef82cd72000-06-30 16:21:01 +000010512
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010513# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000010514
Guido van Rossum98935bf2001-09-05 19:13:16 +000010515DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000010516
Guido van Rossume97ee181999-12-20 21:27:22 +000010517# the dlopen() function means we might want to use dynload_shlib.o. some
10518# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +000010519for ac_func in dlopen
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010520do :
10521 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
Matthias Klose3cef2a92012-03-14 23:39:33 +010010522if test "x$ac_cv_func_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010523 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010524#define HAVE_DLOPEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010525_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000010526
Guido van Rossume97ee181999-12-20 21:27:22 +000010527fi
Thomas Wouters3a584202000-08-05 23:28:51 +000010528done
Guido van Rossume97ee181999-12-20 21:27:22 +000010529
Michael W. Hudson54241132001-12-07 15:38:26 +000010530
Guido van Rossume97ee181999-12-20 21:27:22 +000010531# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
10532# loading of modules.
10533
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010534{ $as_echo "$as_me:${as_lineno-$LINENO}: checking DYNLOADFILE" >&5
10535$as_echo_n "checking DYNLOADFILE... " >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000010536if test -z "$DYNLOADFILE"
10537then
10538 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000010539 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
10540 if test "$ac_cv_func_dlopen" = yes
10541 then DYNLOADFILE="dynload_shlib.o"
10542 else DYNLOADFILE="dynload_aix.o"
10543 fi
10544 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000010545 BeOS*) DYNLOADFILE="dynload_beos.o";;
10546 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Anthony Baxter82201742006-04-09 15:07:40 +000010547 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
10548 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010549 atheos*) DYNLOADFILE="dynload_atheos.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000010550 *)
10551 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
10552 # out any dynamic loading
10553 if test "$ac_cv_func_dlopen" = yes
10554 then DYNLOADFILE="dynload_shlib.o"
10555 else DYNLOADFILE="dynload_stub.o"
10556 fi
10557 ;;
10558 esac
10559fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010560{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DYNLOADFILE" >&5
10561$as_echo "$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000010562if test "$DYNLOADFILE" != "dynload_stub.o"
10563then
Martin v. Löwis11437992002-04-12 09:54:03 +000010564
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010565$as_echo "#define HAVE_DYNAMIC_LOADING 1" >>confdefs.h
Guido van Rossume97ee181999-12-20 21:27:22 +000010566
10567fi
10568
Neil Schemenauer4e425612001-06-19 15:44:15 +000010569# MACHDEP_OBJS can be set to platform-specific object files needed by Python
10570
Michael W. Hudson54241132001-12-07 15:38:26 +000010571
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010572{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP_OBJS" >&5
10573$as_echo_n "checking MACHDEP_OBJS... " >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000010574if test -z "$MACHDEP_OBJS"
10575then
Jack Jansene578a632001-08-15 01:27:14 +000010576 MACHDEP_OBJS=$extra_machdep_objs
10577else
10578 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000010579fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010580{ $as_echo "$as_me:${as_lineno-$LINENO}: result: MACHDEP_OBJS" >&5
10581$as_echo "MACHDEP_OBJS" >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000010582
Guido van Rossum627b2d71993-12-24 10:39:16 +000010583# checks for library functions
Martin v. Löwisaef18b12008-03-24 13:31:16 +000010584for ac_func in alarm setitimer getitimer bind_textdomain_codeset chown \
10585 clock confstr ctermid execv fchmod fchown fork fpathconf ftime ftruncate \
doko@ubuntu.coma50b0de2015-04-13 21:55:59 +020010586 gai_strerror getgroups getlogin getloadavg getpeername getpgid getpid \
10587 getentropy \
Martin v. Löwis50ea4562009-11-27 13:56:01 +000010588 getpriority getresuid getresgid getpwent getspnam getspent getsid getwd \
Benjamin Petersond16e01c2014-02-04 10:20:26 -050010589 initgroups kill killpg lchmod lchown lstat mkfifo mknod mktime mmap \
Martin v. Löwisa5f09072002-10-11 05:37:59 +000010590 mremap nice pathconf pause plock poll pthread_init \
Guido van Rossum162e38c2003-02-19 15:25:10 +000010591 putenv readlink realpath \
Jesse Noller355b1262009-04-02 00:03:28 +000010592 select sem_open sem_timedwait sem_getvalue sem_unlink setegid seteuid \
10593 setgid \
Martin v. Löwis4daacb12003-03-28 18:37:01 +000010594 setlocale setregid setreuid setsid setpgid setpgrp setuid setvbuf snprintf \
Martin v. Löwis50ea4562009-11-27 13:56:01 +000010595 setlocale setregid setreuid setresuid setresgid \
10596 setsid setpgid setpgrp setuid setvbuf snprintf \
Skip Montanaro7e11a012004-02-07 12:55:46 +000010597 sigaction siginterrupt sigrelse strftime \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000010598 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Neal Norwitz05a45592006-03-20 06:30:08 +000010599 truncate uname unsetenv utimes waitpid wait3 wait4 wcscoll _getpty
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010600do :
10601 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10602ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Georg Brandl71f4fbb2011-02-25 11:04:50 +000010603if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010604 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010605#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010606_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000010607
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010608fi
10609done
10610
Michael W. Hudson54241132001-12-07 15:38:26 +000010611
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010612# For some functions, having a definition is not sufficient, since
10613# we want to take their address.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010614{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chroot" >&5
10615$as_echo_n "checking for chroot... " >&6; }
10616cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010617/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010618#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010619int
10620main ()
10621{
10622void *x=chroot
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öwisc8ad7cc2002-11-11 13:23:45 +000010628
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010629$as_echo "#define HAVE_CHROOT 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +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öwisc8ad7cc2002-11-11 13:23:45 +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öwisc8ad7cc2002-11-11 13:23:45 +000010636
10637fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010638rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010639{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for link" >&5
10640$as_echo_n "checking for link... " >&6; }
10641cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010642/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010643#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010644int
10645main ()
10646{
10647void *x=link
10648 ;
10649 return 0;
10650}
10651_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010652if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010653
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010654$as_echo "#define HAVE_LINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010655
Matthias Klosec511b472010-05-08 11:01:39 +000010656 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010657$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010658else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010659 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10660$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010661
10662fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010663rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010664{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for symlink" >&5
10665$as_echo_n "checking for symlink... " >&6; }
10666cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010667/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010668#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010669int
10670main ()
10671{
10672void *x=symlink
10673 ;
10674 return 0;
10675}
10676_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010677if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010678
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010679$as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010680
Matthias Klosec511b472010-05-08 11:01:39 +000010681 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010682$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010683else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010684 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10685$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010686
10687fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010688rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010689{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fchdir" >&5
10690$as_echo_n "checking for fchdir... " >&6; }
10691cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010692/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010693#include <unistd.h>
10694int
10695main ()
10696{
10697void *x=fchdir
10698 ;
10699 return 0;
10700}
10701_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010702if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010703
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010704$as_echo "#define HAVE_FCHDIR 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010705
Matthias Klosec511b472010-05-08 11:01:39 +000010706 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010707$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010708else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010709 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10710$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010711
10712fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010713rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010714{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fsync" >&5
10715$as_echo_n "checking for fsync... " >&6; }
10716cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010717/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010718#include <unistd.h>
10719int
10720main ()
10721{
10722void *x=fsync
10723 ;
10724 return 0;
10725}
10726_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010727if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010728
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010729$as_echo "#define HAVE_FSYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010730
Matthias Klosec511b472010-05-08 11:01:39 +000010731 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010732$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010733else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010734 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10735$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010736
10737fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010738rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010739{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fdatasync" >&5
10740$as_echo_n "checking for fdatasync... " >&6; }
10741cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010742/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010743#include <unistd.h>
10744int
10745main ()
10746{
10747void *x=fdatasync
10748 ;
10749 return 0;
10750}
10751_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010752if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010753
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010754$as_echo "#define HAVE_FDATASYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010755
Matthias Klosec511b472010-05-08 11:01:39 +000010756 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010757$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010758else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010759 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10760$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010761
10762fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010763rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010764{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll" >&5
10765$as_echo_n "checking for epoll... " >&6; }
10766cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000010767/* end confdefs.h. */
10768#include <sys/epoll.h>
10769int
10770main ()
10771{
10772void *x=epoll_create
10773 ;
10774 return 0;
10775}
10776_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010777if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010778
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010779$as_echo "#define HAVE_EPOLL 1" >>confdefs.h
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000010780
Matthias Klosec511b472010-05-08 11:01:39 +000010781 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010782$as_echo "yes" >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000010783else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010784 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10785$as_echo "no" >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000010786
10787fi
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000010788rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010789{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kqueue" >&5
10790$as_echo_n "checking for kqueue... " >&6; }
10791cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000010792/* end confdefs.h. */
10793
10794#include <sys/types.h>
10795#include <sys/event.h>
10796
10797int
10798main ()
10799{
10800int x=kqueue()
10801 ;
10802 return 0;
10803}
10804_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010805if ac_fn_c_try_compile "$LINENO"; then :
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000010806
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010807$as_echo "#define HAVE_KQUEUE 1" >>confdefs.h
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000010808
Matthias Klosec511b472010-05-08 11:01:39 +000010809 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010810$as_echo "yes" >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000010811else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010812 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10813$as_echo "no" >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000010814
10815fi
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000010816rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000010817# On some systems (eg. FreeBSD 5), we would find a definition of the
10818# functions ctermid_r, setgroups in the library, but no prototype
10819# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
10820# address to avoid compiler warnings and potential miscompilations
10821# because of the missing prototypes.
10822
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010823{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ctermid_r" >&5
10824$as_echo_n "checking for ctermid_r... " >&6; }
10825cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010826/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000010827
Martin v. Löwisd5843682002-11-21 20:41:28 +000010828#include <stdio.h>
10829
Martin v. Löwisd5843682002-11-21 20:41:28 +000010830int
10831main ()
10832{
10833void* p = ctermid_r
10834 ;
10835 return 0;
10836}
10837_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010838if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000010839
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010840$as_echo "#define HAVE_CTERMID_R 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000010841
Matthias Klosec511b472010-05-08 11:01:39 +000010842 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010843$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010844else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010845 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10846$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010847
10848fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010849rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10850
Antoine Pitroub170f172010-09-10 18:47:36 +000010851{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock declaration" >&5
10852$as_echo_n "checking for flock declaration... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010853if ${ac_cv_flock_decl+:} false; then :
Antoine Pitroub170f172010-09-10 18:47:36 +000010854 $as_echo_n "(cached) " >&6
10855else
10856 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010857/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010858#include <sys/file.h>
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010859int
10860main ()
10861{
10862void* p = flock
Antoine Pitroub170f172010-09-10 18:47:36 +000010863
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010864 ;
10865 return 0;
10866}
10867_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010868if ac_fn_c_try_compile "$LINENO"; then :
Antoine Pitroub170f172010-09-10 18:47:36 +000010869 ac_cv_flock_decl=yes
10870else
10871 ac_cv_flock_decl=no
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010872
10873fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010874rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitrou85729812010-09-07 14:55:24 +000010875
Antoine Pitroub170f172010-09-10 18:47:36 +000010876fi
10877{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_flock_decl" >&5
10878$as_echo "$ac_cv_flock_decl" >&6; }
10879if test "x${ac_cv_flock_decl}" = xyes; then
10880 for ac_func in flock
10881do :
10882 ac_fn_c_check_func "$LINENO" "flock" "ac_cv_func_flock"
Matthias Klose3cef2a92012-03-14 23:39:33 +010010883if test "x$ac_cv_func_flock" = xyes; then :
Antoine Pitroub170f172010-09-10 18:47:36 +000010884 cat >>confdefs.h <<_ACEOF
10885#define HAVE_FLOCK 1
Antoine Pitrou85729812010-09-07 14:55:24 +000010886_ACEOF
Antoine Pitroub170f172010-09-10 18:47:36 +000010887
Antoine Pitrou85729812010-09-07 14:55:24 +000010888else
Antoine Pitroub170f172010-09-10 18:47:36 +000010889 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock in -lbsd" >&5
Antoine Pitrou85729812010-09-07 14:55:24 +000010890$as_echo_n "checking for flock in -lbsd... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010891if ${ac_cv_lib_bsd_flock+:} false; then :
Antoine Pitrou85729812010-09-07 14:55:24 +000010892 $as_echo_n "(cached) " >&6
10893else
10894 ac_check_lib_save_LIBS=$LIBS
10895LIBS="-lbsd $LIBS"
10896cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10897/* end confdefs.h. */
10898
10899/* Override any GCC internal prototype to avoid an error.
10900 Use char because int might match the return type of a GCC
10901 builtin and then its argument prototype would still apply. */
10902#ifdef __cplusplus
10903extern "C"
10904#endif
10905char flock ();
10906int
10907main ()
10908{
10909return flock ();
10910 ;
10911 return 0;
10912}
10913_ACEOF
10914if ac_fn_c_try_link "$LINENO"; then :
10915 ac_cv_lib_bsd_flock=yes
10916else
10917 ac_cv_lib_bsd_flock=no
10918fi
10919rm -f core conftest.err conftest.$ac_objext \
10920 conftest$ac_exeext conftest.$ac_ext
10921LIBS=$ac_check_lib_save_LIBS
10922fi
10923{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_flock" >&5
10924$as_echo "$ac_cv_lib_bsd_flock" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010925if test "x$ac_cv_lib_bsd_flock" = xyes; then :
Antoine Pitroub170f172010-09-10 18:47:36 +000010926 $as_echo "#define HAVE_FLOCK 1" >>confdefs.h
Antoine Pitrou85729812010-09-07 14:55:24 +000010927
10928
10929$as_echo "#define FLOCK_NEEDS_LIBBSD 1" >>confdefs.h
10930
10931
10932fi
10933
10934
10935fi
Antoine Pitroub170f172010-09-10 18:47:36 +000010936done
10937
Antoine Pitrou85729812010-09-07 14:55:24 +000010938fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010939
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010940{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
10941$as_echo_n "checking for getpagesize... " >&6; }
10942cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010943/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010944
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010945#include <unistd.h>
10946
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010947int
10948main ()
10949{
10950void* p = getpagesize
10951 ;
10952 return 0;
10953}
10954_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010955if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010956
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010957$as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010958
Matthias Klosec511b472010-05-08 11:01:39 +000010959 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010960$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010961else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010962 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10963$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010964
10965fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010966rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010967
Charles-François Natali93a11752011-11-27 13:01:35 +010010968{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken unsetenv" >&5
10969$as_echo_n "checking for broken unsetenv... " >&6; }
10970cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10971/* end confdefs.h. */
10972
10973#include <stdlib.h>
10974
10975int
10976main ()
10977{
10978int res = unsetenv("DUMMY")
10979 ;
10980 return 0;
10981}
10982_ACEOF
10983if ac_fn_c_try_compile "$LINENO"; then :
10984 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10985$as_echo "no" >&6; }
10986else
10987
10988$as_echo "#define HAVE_BROKEN_UNSETENV 1" >>confdefs.h
10989
10990 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10991$as_echo "yes" >&6; }
10992
10993fi
10994rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10995
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010996for ac_prog in true
10997do
10998 # Extract the first word of "$ac_prog", so it can be a program name with args.
10999set dummy $ac_prog; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011000{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11001$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011002if ${ac_cv_prog_TRUE+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011003 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011004else
11005 if test -n "$TRUE"; then
11006 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
11007else
11008as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11009for as_dir in $PATH
11010do
11011 IFS=$as_save_IFS
11012 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011013 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +010011014 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011015 ac_cv_prog_TRUE="$ac_prog"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011016 $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 +000011017 break 2
11018 fi
11019done
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011020 done
Martin v. Löwiseba40652007-08-30 20:10:57 +000011021IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011022
11023fi
11024fi
11025TRUE=$ac_cv_prog_TRUE
11026if test -n "$TRUE"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011027 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TRUE" >&5
11028$as_echo "$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011029else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011030 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11031$as_echo "no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011032fi
11033
Martin v. Löwiseba40652007-08-30 20:10:57 +000011034
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011035 test -n "$TRUE" && break
11036done
11037test -n "$TRUE" || TRUE="/bin/true"
11038
11039
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011040{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lc" >&5
11041$as_echo_n "checking for inet_aton in -lc... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011042if ${ac_cv_lib_c_inet_aton+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011043 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011044else
11045 ac_check_lib_save_LIBS=$LIBS
11046LIBS="-lc $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011047cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011048/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011049
Martin v. Löwiseba40652007-08-30 20:10:57 +000011050/* Override any GCC internal prototype to avoid an error.
11051 Use char because int might match the return type of a GCC
11052 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011053#ifdef __cplusplus
11054extern "C"
11055#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011056char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011057int
11058main ()
11059{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011060return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011061 ;
11062 return 0;
11063}
11064_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011065if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011066 ac_cv_lib_c_inet_aton=yes
11067else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011068 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011069fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011070rm -f core conftest.err conftest.$ac_objext \
11071 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011072LIBS=$ac_check_lib_save_LIBS
11073fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011074{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_inet_aton" >&5
11075$as_echo "$ac_cv_lib_c_inet_aton" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011076if test "x$ac_cv_lib_c_inet_aton" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011077 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011078else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011079 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5
11080$as_echo_n "checking for inet_aton in -lresolv... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011081if ${ac_cv_lib_resolv_inet_aton+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011082 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011083else
11084 ac_check_lib_save_LIBS=$LIBS
11085LIBS="-lresolv $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011086cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011087/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011088
Martin v. Löwiseba40652007-08-30 20:10:57 +000011089/* Override any GCC internal prototype to avoid an error.
11090 Use char because int might match the return type of a GCC
11091 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011092#ifdef __cplusplus
11093extern "C"
11094#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011095char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011096int
11097main ()
11098{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011099return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011100 ;
11101 return 0;
11102}
11103_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011104if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011105 ac_cv_lib_resolv_inet_aton=yes
11106else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011107 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011108fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011109rm -f core conftest.err conftest.$ac_objext \
11110 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011111LIBS=$ac_check_lib_save_LIBS
11112fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011113{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5
11114$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011115if test "x$ac_cv_lib_resolv_inet_aton" = xyes; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011116 cat >>confdefs.h <<_ACEOF
11117#define HAVE_LIBRESOLV 1
11118_ACEOF
11119
11120 LIBS="-lresolv $LIBS"
11121
11122fi
11123
11124
11125fi
11126
11127
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000011128# On Tru64, chflags seems to be present, but calling it will
11129# exit Python
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011130{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chflags" >&5
11131$as_echo_n "checking for chflags... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011132if ${ac_cv_have_chflags+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011133 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011134else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011135 if test "$cross_compiling" = yes; then :
Gregory P. Smith49437c22009-11-02 01:38:35 +000011136 ac_cv_have_chflags=cross
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000011137else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011138 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000011139/* end confdefs.h. */
Ned Deily43e10542011-06-27 23:41:53 -070011140
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000011141#include <sys/stat.h>
11142#include <unistd.h>
11143int main(int argc, char*argv[])
11144{
11145 if(chflags(argv[0], 0) != 0)
11146 return 1;
11147 return 0;
11148}
Ned Deily43e10542011-06-27 23:41:53 -070011149
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000011150_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011151if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011152 ac_cv_have_chflags=yes
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011153else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011154 ac_cv_have_chflags=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011155fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011156rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11157 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +000011158fi
11159
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011160
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011161fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011162{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_chflags" >&5
11163$as_echo "$ac_cv_have_chflags" >&6; }
Gregory P. Smith49437c22009-11-02 01:38:35 +000011164if test "$ac_cv_have_chflags" = cross ; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011165 ac_fn_c_check_func "$LINENO" "chflags" "ac_cv_func_chflags"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011166if test "x$ac_cv_func_chflags" = xyes; then :
Gregory P. Smith49437c22009-11-02 01:38:35 +000011167 ac_cv_have_chflags="yes"
11168else
11169 ac_cv_have_chflags="no"
11170fi
11171
11172fi
11173if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011174
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011175$as_echo "#define HAVE_CHFLAGS 1" >>confdefs.h
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011176
11177fi
11178
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011179{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lchflags" >&5
11180$as_echo_n "checking for lchflags... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011181if ${ac_cv_have_lchflags+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011182 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011183else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011184 if test "$cross_compiling" = yes; then :
Gregory P. Smith49437c22009-11-02 01:38:35 +000011185 ac_cv_have_lchflags=cross
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000011186else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011187 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000011188/* end confdefs.h. */
Ned Deily43e10542011-06-27 23:41:53 -070011189
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000011190#include <sys/stat.h>
11191#include <unistd.h>
11192int main(int argc, char*argv[])
11193{
11194 if(lchflags(argv[0], 0) != 0)
11195 return 1;
11196 return 0;
11197}
Ned Deily43e10542011-06-27 23:41:53 -070011198
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000011199_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011200if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011201 ac_cv_have_lchflags=yes
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011202else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011203 ac_cv_have_lchflags=no
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000011204fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011205rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11206 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011207fi
11208
11209
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011210fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011211{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lchflags" >&5
11212$as_echo "$ac_cv_have_lchflags" >&6; }
Gregory P. Smith49437c22009-11-02 01:38:35 +000011213if test "$ac_cv_have_lchflags" = cross ; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011214 ac_fn_c_check_func "$LINENO" "lchflags" "ac_cv_func_lchflags"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011215if test "x$ac_cv_func_lchflags" = xyes; then :
Gregory P. Smith49437c22009-11-02 01:38:35 +000011216 ac_cv_have_lchflags="yes"
11217else
11218 ac_cv_have_lchflags="no"
11219fi
11220
11221fi
11222if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011223
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011224$as_echo "#define HAVE_LCHFLAGS 1" >>confdefs.h
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011225
11226fi
11227
Ronald Oussorenf8752642006-07-06 10:13:35 +000011228case $ac_sys_system/$ac_sys_release in
11229Darwin/*)
11230 _CUR_CFLAGS="${CFLAGS}"
11231 _CUR_LDFLAGS="${LDFLAGS}"
11232 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
11233 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
11234 ;;
11235esac
11236
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011237{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5
11238$as_echo_n "checking for inflateCopy in -lz... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011239if ${ac_cv_lib_z_inflateCopy+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011240 $as_echo_n "(cached) " >&6
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000011241else
11242 ac_check_lib_save_LIBS=$LIBS
11243LIBS="-lz $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011244cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000011245/* end confdefs.h. */
11246
Martin v. Löwiseba40652007-08-30 20:10:57 +000011247/* Override any GCC internal prototype to avoid an error.
11248 Use char because int might match the return type of a GCC
11249 builtin and then its argument prototype would still apply. */
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000011250#ifdef __cplusplus
11251extern "C"
11252#endif
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000011253char inflateCopy ();
11254int
11255main ()
11256{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011257return inflateCopy ();
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000011258 ;
11259 return 0;
11260}
11261_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011262if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000011263 ac_cv_lib_z_inflateCopy=yes
11264else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011265 ac_cv_lib_z_inflateCopy=no
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000011266fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011267rm -f core conftest.err conftest.$ac_objext \
11268 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000011269LIBS=$ac_check_lib_save_LIBS
11270fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011271{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5
11272$as_echo "$ac_cv_lib_z_inflateCopy" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011273if test "x$ac_cv_lib_z_inflateCopy" = xyes; then :
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000011274
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011275$as_echo "#define HAVE_ZLIB_COPY 1" >>confdefs.h
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000011276
11277fi
11278
11279
Ronald Oussorenf8752642006-07-06 10:13:35 +000011280case $ac_sys_system/$ac_sys_release in
11281Darwin/*)
11282 CFLAGS="${_CUR_CFLAGS}"
11283 LDFLAGS="${_CUR_LDFLAGS}"
11284 ;;
11285esac
11286
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011287{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hstrerror" >&5
11288$as_echo_n "checking for hstrerror... " >&6; }
11289cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011290/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000011291
Martin v. Löwise9416172003-05-03 10:12:45 +000011292#include <netdb.h>
11293
Martin v. Löwise9416172003-05-03 10:12:45 +000011294int
11295main ()
11296{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011297void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000011298 ;
11299 return 0;
11300}
11301_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011302if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000011303
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011304$as_echo "#define HAVE_HSTRERROR 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000011305
Matthias Klosec511b472010-05-08 11:01:39 +000011306 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011307$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011308else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011309 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11310$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011311
11312fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011313rm -f core conftest.err conftest.$ac_objext \
11314 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011315
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011316{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5
11317$as_echo_n "checking for inet_aton... " >&6; }
11318cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011319/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000011320
Martin v. Löwis86d66262006-02-17 08:40:11 +000011321#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000011322#include <sys/socket.h>
11323#include <netinet/in.h>
11324#include <arpa/inet.h>
11325
Martin v. Löwise9416172003-05-03 10:12:45 +000011326int
11327main ()
11328{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011329void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000011330 ;
11331 return 0;
11332}
11333_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011334if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000011335
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011336$as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000011337
Matthias Klosec511b472010-05-08 11:01:39 +000011338 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011339$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011340else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011341 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11342$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011343
11344fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011345rm -f core conftest.err conftest.$ac_objext \
11346 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011347
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011348{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_pton" >&5
11349$as_echo_n "checking for inet_pton... " >&6; }
11350cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011351/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000011352
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000011353#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000011354#include <sys/socket.h>
11355#include <netinet/in.h>
11356#include <arpa/inet.h>
11357
Martin v. Löwise9416172003-05-03 10:12:45 +000011358int
11359main ()
11360{
11361void* p = inet_pton
11362 ;
11363 return 0;
11364}
11365_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011366if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000011367
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011368$as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000011369
Matthias Klosec511b472010-05-08 11:01:39 +000011370 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011371$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011372else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011373 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11374$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011375
11376fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011377rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000011378
Martin v. Löwisd6640d42003-07-06 09:29:52 +000011379# On some systems, setgroups is in unistd.h, on others, in grp.h
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011380{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for setgroups" >&5
11381$as_echo_n "checking for setgroups... " >&6; }
11382cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011383/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000011384
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000011385#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000011386#ifdef HAVE_GRP_H
11387#include <grp.h>
11388#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000011389
Martin v. Löwisd5843682002-11-21 20:41:28 +000011390int
11391main ()
11392{
11393void* p = setgroups
11394 ;
11395 return 0;
11396}
11397_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011398if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000011399
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011400$as_echo "#define HAVE_SETGROUPS 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000011401
Matthias Klosec511b472010-05-08 11:01:39 +000011402 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011403$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011404else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011405 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11406$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011407
11408fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011409rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000011410
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011411# check for openpty and forkpty
11412
11413for ac_func in openpty
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011414do :
11415 ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011416if test "x$ac_cv_func_openpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011417 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011418#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011419_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011420
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011421else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011422 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5
11423$as_echo_n "checking for openpty in -lutil... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011424if ${ac_cv_lib_util_openpty+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011425 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000011426else
Martin v. Löwis11437992002-04-12 09:54:03 +000011427 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011428LIBS="-lutil $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011429cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011430/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011431
Martin v. Löwiseba40652007-08-30 20:10:57 +000011432/* Override any GCC internal prototype to avoid an error.
11433 Use char because int might match the return type of a GCC
11434 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011435#ifdef __cplusplus
11436extern "C"
11437#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011438char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011439int
11440main ()
11441{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011442return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011443 ;
11444 return 0;
11445}
11446_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011447if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011448 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000011449else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011450 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011451fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011452rm -f core conftest.err conftest.$ac_objext \
11453 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011454LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011455fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011456{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5
11457$as_echo "$ac_cv_lib_util_openpty" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011458if test "x$ac_cv_lib_util_openpty" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011459 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000011460 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011461else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011462 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lbsd" >&5
11463$as_echo_n "checking for openpty in -lbsd... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011464if ${ac_cv_lib_bsd_openpty+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011465 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011466else
11467 ac_check_lib_save_LIBS=$LIBS
11468LIBS="-lbsd $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011469cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011470/* end confdefs.h. */
11471
Martin v. Löwiseba40652007-08-30 20:10:57 +000011472/* Override any GCC internal prototype to avoid an error.
11473 Use char because int might match the return type of a GCC
11474 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011475#ifdef __cplusplus
11476extern "C"
11477#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011478char openpty ();
11479int
11480main ()
11481{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011482return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011483 ;
11484 return 0;
11485}
11486_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011487if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011488 ac_cv_lib_bsd_openpty=yes
11489else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011490 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011491fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011492rm -f core conftest.err conftest.$ac_objext \
11493 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011494LIBS=$ac_check_lib_save_LIBS
11495fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011496{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_openpty" >&5
11497$as_echo "$ac_cv_lib_bsd_openpty" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011498if test "x$ac_cv_lib_bsd_openpty" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011499 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011500 LIBS="$LIBS -lbsd"
11501fi
11502
11503
11504fi
11505
Fred Drake8cef4cf2000-06-28 16:40:38 +000011506
11507fi
11508done
11509
11510for ac_func in forkpty
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011511do :
11512 ac_fn_c_check_func "$LINENO" "forkpty" "ac_cv_func_forkpty"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011513if test "x$ac_cv_func_forkpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011514 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011515#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011516_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011517
Fred Drake8cef4cf2000-06-28 16:40:38 +000011518else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011519 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5
11520$as_echo_n "checking for forkpty in -lutil... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011521if ${ac_cv_lib_util_forkpty+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011522 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000011523else
Martin v. Löwis11437992002-04-12 09:54:03 +000011524 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011525LIBS="-lutil $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011526cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011527/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011528
Martin v. Löwiseba40652007-08-30 20:10:57 +000011529/* Override any GCC internal prototype to avoid an error.
11530 Use char because int might match the return type of a GCC
11531 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011532#ifdef __cplusplus
11533extern "C"
11534#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011535char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011536int
11537main ()
11538{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011539return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011540 ;
11541 return 0;
11542}
11543_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011544if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011545 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000011546else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011547 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011548fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011549rm -f core conftest.err conftest.$ac_objext \
11550 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011551LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011552fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011553{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5
11554$as_echo "$ac_cv_lib_util_forkpty" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011555if test "x$ac_cv_lib_util_forkpty" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011556 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000011557 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011558else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011559 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lbsd" >&5
11560$as_echo_n "checking for forkpty in -lbsd... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011561if ${ac_cv_lib_bsd_forkpty+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011562 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011563else
11564 ac_check_lib_save_LIBS=$LIBS
11565LIBS="-lbsd $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011566cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011567/* end confdefs.h. */
11568
Martin v. Löwiseba40652007-08-30 20:10:57 +000011569/* Override any GCC internal prototype to avoid an error.
11570 Use char because int might match the return type of a GCC
11571 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011572#ifdef __cplusplus
11573extern "C"
11574#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011575char forkpty ();
11576int
11577main ()
11578{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011579return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011580 ;
11581 return 0;
11582}
11583_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011584if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011585 ac_cv_lib_bsd_forkpty=yes
11586else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011587 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011588fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011589rm -f core conftest.err conftest.$ac_objext \
11590 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011591LIBS=$ac_check_lib_save_LIBS
11592fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011593{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_forkpty" >&5
11594$as_echo "$ac_cv_lib_bsd_forkpty" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011595if test "x$ac_cv_lib_bsd_forkpty" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011596 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011597 LIBS="$LIBS -lbsd"
11598fi
11599
11600
11601fi
11602
Fred Drake8cef4cf2000-06-28 16:40:38 +000011603
11604fi
11605done
11606
Jack Jansendd19cf82001-12-06 22:36:17 +000011607
Brett Cannonaa5778d2008-03-18 04:09:00 +000011608# Stuff for expat.
Brett Cannonaa5778d2008-03-18 04:09:00 +000011609for ac_func in memmove
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011610do :
11611 ac_fn_c_check_func "$LINENO" "memmove" "ac_cv_func_memmove"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011612if test "x$ac_cv_func_memmove" = xyes; then :
Brett Cannonaa5778d2008-03-18 04:09:00 +000011613 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011614#define HAVE_MEMMOVE 1
Brett Cannonaa5778d2008-03-18 04:09:00 +000011615_ACEOF
11616
11617fi
11618done
11619
11620
Michael W. Hudson54241132001-12-07 15:38:26 +000011621# check for long file support functions
Fred Drake8cef4cf2000-06-28 16:40:38 +000011622for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011623do :
11624 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11625ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Georg Brandl71f4fbb2011-02-25 11:04:50 +000011626if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011627 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011628#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011629_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000011630
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011631fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000011632done
11633
Michael W. Hudson54241132001-12-07 15:38:26 +000011634
Georg Brandl71f4fbb2011-02-25 11:04:50 +000011635ac_fn_c_check_func "$LINENO" "dup2" "ac_cv_func_dup2"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011636if test "x$ac_cv_func_dup2" = xyes; then :
Georg Brandl71f4fbb2011-02-25 11:04:50 +000011637 $as_echo "#define HAVE_DUP2 1" >>confdefs.h
Martin v. Löwis1142de32002-03-29 16:28:31 +000011638
Martin v. Löwis1142de32002-03-29 16:28:31 +000011639else
Martin v. Löwiseba40652007-08-30 20:10:57 +000011640 case " $LIBOBJS " in
Georg Brandl71f4fbb2011-02-25 11:04:50 +000011641 *" dup2.$ac_objext "* ) ;;
11642 *) LIBOBJS="$LIBOBJS dup2.$ac_objext"
Martin v. Löwiseba40652007-08-30 20:10:57 +000011643 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000011644esac
11645
Martin v. Löwis1142de32002-03-29 16:28:31 +000011646fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +000011647
11648ac_fn_c_check_func "$LINENO" "getcwd" "ac_cv_func_getcwd"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011649if test "x$ac_cv_func_getcwd" = xyes; then :
Georg Brandl71f4fbb2011-02-25 11:04:50 +000011650 $as_echo "#define HAVE_GETCWD 1" >>confdefs.h
11651
11652else
11653 case " $LIBOBJS " in
11654 *" getcwd.$ac_objext "* ) ;;
11655 *) LIBOBJS="$LIBOBJS getcwd.$ac_objext"
11656 ;;
11657esac
11658
11659fi
11660
11661ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011662if test "x$ac_cv_func_strdup" = xyes; then :
Georg Brandl71f4fbb2011-02-25 11:04:50 +000011663 $as_echo "#define HAVE_STRDUP 1" >>confdefs.h
11664
11665else
11666 case " $LIBOBJS " in
11667 *" strdup.$ac_objext "* ) ;;
11668 *) LIBOBJS="$LIBOBJS strdup.$ac_objext"
11669 ;;
11670esac
11671
11672fi
Martin v. Löwis1142de32002-03-29 16:28:31 +000011673
11674
11675for ac_func in getpgrp
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011676do :
11677 ac_fn_c_check_func "$LINENO" "getpgrp" "ac_cv_func_getpgrp"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011678if test "x$ac_cv_func_getpgrp" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011679 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011680#define HAVE_GETPGRP 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011681_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011682 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011683/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011684#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011685int
11686main ()
11687{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011688getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000011689 ;
11690 return 0;
11691}
11692_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011693if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011694
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011695$as_echo "#define GETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000011696
Guido van Rossum627b2d71993-12-24 10:39:16 +000011697fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011698rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011699
Guido van Rossum627b2d71993-12-24 10:39:16 +000011700fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011701done
Guido van Rossum627b2d71993-12-24 10:39:16 +000011702
Jack Jansen150753c2003-03-29 22:07:47 +000011703for ac_func in setpgrp
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011704do :
11705 ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011706if test "x$ac_cv_func_setpgrp" = xyes; then :
Jack Jansen150753c2003-03-29 22:07:47 +000011707 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011708#define HAVE_SETPGRP 1
Jack Jansen150753c2003-03-29 22:07:47 +000011709_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011710 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011711/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000011712#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000011713int
11714main ()
11715{
11716setpgrp(0,0);
11717 ;
11718 return 0;
11719}
11720_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011721if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011722
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011723$as_echo "#define SETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000011724
Guido van Rossum8eee56f1994-10-20 22:18:37 +000011725fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011726rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000011727
11728fi
11729done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000011730
Thomas Wouters3a584202000-08-05 23:28:51 +000011731for ac_func in gettimeofday
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011732do :
11733 ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011734if test "x$ac_cv_func_gettimeofday" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011735 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011736#define HAVE_GETTIMEOFDAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011737_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011738 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011739/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000011740#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011741int
11742main ()
11743{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011744gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000011745 ;
11746 return 0;
11747}
11748_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011749if ac_fn_c_try_compile "$LINENO"; then :
11750
Guido van Rossum627b2d71993-12-24 10:39:16 +000011751else
Skip Montanaro6dead952003-09-25 14:50:04 +000011752
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011753$as_echo "#define GETTIMEOFDAY_NO_TZ 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000011754
Martin v. Löwis11437992002-04-12 09:54:03 +000011755
Guido van Rossum627b2d71993-12-24 10:39:16 +000011756fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011757rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011758
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011759fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011760done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011761
Michael W. Hudson54241132001-12-07 15:38:26 +000011762
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011763{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for major" >&5
11764$as_echo_n "checking for major... " >&6; }
11765cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011766/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011767
Neal Norwitz6eb37f02003-02-23 23:28:15 +000011768#if defined(MAJOR_IN_MKDEV)
11769#include <sys/mkdev.h>
11770#elif defined(MAJOR_IN_SYSMACROS)
11771#include <sys/sysmacros.h>
11772#else
11773#include <sys/types.h>
11774#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011775
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011776int
11777main ()
11778{
11779
11780 makedev(major(0),minor(0));
11781
11782 ;
11783 return 0;
11784}
11785_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011786if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011787
11788
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011789$as_echo "#define HAVE_DEVICE_MACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011790
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011791 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11792$as_echo "yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011793
11794else
Skip Montanaro6dead952003-09-25 14:50:04 +000011795
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011796 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11797$as_echo "no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011798
11799fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011800rm -f core conftest.err conftest.$ac_objext \
11801 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000011802
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011803# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000011804# for [no]getaddrinfo in netdb.h.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011805{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
11806$as_echo_n "checking for getaddrinfo... " >&6; }
11807cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011808/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011809
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000011810#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011811#include <sys/socket.h>
11812#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000011813#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011814
Martin v. Löwis11437992002-04-12 09:54:03 +000011815int
11816main ()
11817{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011818getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000011819 ;
11820 return 0;
11821}
11822_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011823if ac_fn_c_try_link "$LINENO"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011824 have_getaddrinfo=yes
11825else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011826 have_getaddrinfo=no
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011827fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011828rm -f core conftest.err conftest.$ac_objext \
11829 conftest$ac_exeext conftest.$ac_ext
11830{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getaddrinfo" >&5
11831$as_echo "$have_getaddrinfo" >&6; }
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011832if test $have_getaddrinfo = yes
11833then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011834 { $as_echo "$as_me:${as_lineno-$LINENO}: checking getaddrinfo bug" >&5
11835$as_echo_n "checking getaddrinfo bug... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011836 if ${ac_cv_buggy_getaddrinfo+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011837 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011838else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011839 if test "$cross_compiling" = yes; then :
doko@python.orgd65e2ba2013-01-31 23:52:03 +010011840
11841if test "${enable_ipv6+set}" = set; then
11842 ac_cv_buggy_getaddrinfo="no -- configured with --(en|dis)able-ipv6"
11843else
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011844 ac_cv_buggy_getaddrinfo=yes
doko@python.orgd65e2ba2013-01-31 23:52:03 +010011845fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011846else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011847 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011848/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011849
Stefan Krah0afe4e42012-11-22 23:56:51 +010011850#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011851#include <sys/types.h>
11852#include <netdb.h>
11853#include <string.h>
11854#include <sys/socket.h>
11855#include <netinet/in.h>
11856
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011857int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011858{
11859 int passive, gaierr, inet4 = 0, inet6 = 0;
11860 struct addrinfo hints, *ai, *aitop;
11861 char straddr[INET6_ADDRSTRLEN], strport[16];
11862
11863 for (passive = 0; passive <= 1; passive++) {
11864 memset(&hints, 0, sizeof(hints));
11865 hints.ai_family = AF_UNSPEC;
11866 hints.ai_flags = passive ? AI_PASSIVE : 0;
11867 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000011868 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011869 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
11870 (void)gai_strerror(gaierr);
11871 goto bad;
11872 }
11873 for (ai = aitop; ai; ai = ai->ai_next) {
11874 if (ai->ai_addr == NULL ||
11875 ai->ai_addrlen == 0 ||
11876 getnameinfo(ai->ai_addr, ai->ai_addrlen,
11877 straddr, sizeof(straddr), strport, sizeof(strport),
11878 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
11879 goto bad;
11880 }
11881 switch (ai->ai_family) {
11882 case AF_INET:
11883 if (strcmp(strport, "54321") != 0) {
11884 goto bad;
11885 }
11886 if (passive) {
11887 if (strcmp(straddr, "0.0.0.0") != 0) {
11888 goto bad;
11889 }
11890 } else {
11891 if (strcmp(straddr, "127.0.0.1") != 0) {
11892 goto bad;
11893 }
11894 }
11895 inet4++;
11896 break;
11897 case AF_INET6:
11898 if (strcmp(strport, "54321") != 0) {
11899 goto bad;
11900 }
11901 if (passive) {
11902 if (strcmp(straddr, "::") != 0) {
11903 goto bad;
11904 }
11905 } else {
11906 if (strcmp(straddr, "::1") != 0) {
11907 goto bad;
11908 }
11909 }
11910 inet6++;
11911 break;
11912 case AF_UNSPEC:
11913 goto bad;
11914 break;
11915 default:
11916 /* another family support? */
11917 break;
11918 }
11919 }
Benjamin Petersond34677c2016-09-06 15:54:24 -070011920 freeaddrinfo(aitop);
11921 aitop = NULL;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011922 }
11923
11924 if (!(inet4 == 0 || inet4 == 2))
11925 goto bad;
11926 if (!(inet6 == 0 || inet6 == 2))
11927 goto bad;
11928
11929 if (aitop)
11930 freeaddrinfo(aitop);
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011931 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011932
11933 bad:
11934 if (aitop)
11935 freeaddrinfo(aitop);
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011936 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011937}
11938
Martin v. Löwis11437992002-04-12 09:54:03 +000011939_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011940if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011941 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011942else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011943 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011944fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011945rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11946 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011947fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011948
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011949fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011950
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011951fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011952
Benjamin Peterson75fed812010-11-01 01:47:19 +000011953{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_buggy_getaddrinfo" >&5
11954$as_echo "$ac_cv_buggy_getaddrinfo" >&6; }
11955
Mark Dickinson0ef0b912009-12-31 21:11:48 +000011956if test $have_getaddrinfo = no -o "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011957then
11958 if test $ipv6 = yes
11959 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011960 echo 'Fatal: You must get working getaddrinfo() function.'
11961 echo ' or you can specify "--disable-ipv6"'.
11962 exit 1
11963 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011964else
Martin v. Löwis11437992002-04-12 09:54:03 +000011965
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011966$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011967
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011968fi
Benjamin Peterson75fed812010-11-01 01:47:19 +000011969
Jack Jansen9a66b6d2001-08-08 13:56:14 +000011970for ac_func in getnameinfo
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011971do :
11972 ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011973if test "x$ac_cv_func_getnameinfo" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011974 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011975#define HAVE_GETNAMEINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011976_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011977
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011978fi
11979done
11980
Michael W. Hudson54241132001-12-07 15:38:26 +000011981
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011982# checks for structures
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011983{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
11984$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011985if ${ac_cv_header_time+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011986 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011987else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011988 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011989/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011990#include <sys/types.h>
11991#include <sys/time.h>
11992#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011993
Martin v. Löwis11437992002-04-12 09:54:03 +000011994int
11995main ()
11996{
11997if ((struct tm *) 0)
11998return 0;
11999 ;
12000 return 0;
12001}
12002_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012003if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012004 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000012005else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012006 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012007fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012008rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012009fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012010{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
12011$as_echo "$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000012012if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012013
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012014$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012015
12016fi
12017
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012018{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
12019$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012020if ${ac_cv_struct_tm+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012021 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012022else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012023 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012024/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012025#include <sys/types.h>
12026#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012027
Martin v. Löwis11437992002-04-12 09:54:03 +000012028int
12029main ()
12030{
Martin v. Löwiseba40652007-08-30 20:10:57 +000012031struct tm tm;
12032 int *p = &tm.tm_sec;
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012033 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000012034 ;
12035 return 0;
12036}
12037_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012038if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012039 ac_cv_struct_tm=time.h
12040else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012041 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012042fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012043rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012044fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012045{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
12046$as_echo "$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000012047if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012048
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012049$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012050
12051fi
12052
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012053ac_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 +000012054#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000012055
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012056"
Matthias Klose3cef2a92012-03-14 23:39:33 +010012057if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012058
12059cat >>confdefs.h <<_ACEOF
12060#define HAVE_STRUCT_TM_TM_ZONE 1
12061_ACEOF
12062
12063
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012064fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012065
Martin v. Löwis11437992002-04-12 09:54:03 +000012066if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
12067
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012068$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012069
12070else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012071 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
12072"
Matthias Klose3cef2a92012-03-14 23:39:33 +010012073if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012074 ac_have_decl=1
Martin v. Löwiseba40652007-08-30 20:10:57 +000012075else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012076 ac_have_decl=0
Martin v. Löwiseba40652007-08-30 20:10:57 +000012077fi
12078
Martin v. Löwiseba40652007-08-30 20:10:57 +000012079cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012080#define HAVE_DECL_TZNAME $ac_have_decl
Martin v. Löwiseba40652007-08-30 20:10:57 +000012081_ACEOF
12082
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012083 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
12084$as_echo_n "checking for tzname... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012085if ${ac_cv_var_tzname+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012086 $as_echo_n "(cached) " >&6
Martin v. Löwiseba40652007-08-30 20:10:57 +000012087else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012088 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012089/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000012090#include <time.h>
Martin v. Löwiseba40652007-08-30 20:10:57 +000012091#if !HAVE_DECL_TZNAME
12092extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000012093#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012094
Martin v. Löwis11437992002-04-12 09:54:03 +000012095int
12096main ()
12097{
Martin v. Löwiseba40652007-08-30 20:10:57 +000012098return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000012099 ;
12100 return 0;
12101}
12102_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012103if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012104 ac_cv_var_tzname=yes
12105else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012106 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012107fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012108rm -f core conftest.err conftest.$ac_objext \
12109 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000012110fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012111{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
12112$as_echo "$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000012113 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012114
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012115$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000012116
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012117 fi
12118fi
12119
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012120ac_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 +010012121if test "x$ac_cv_member_struct_stat_st_rdev" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012122
12123cat >>confdefs.h <<_ACEOF
12124#define HAVE_STRUCT_STAT_ST_RDEV 1
12125_ACEOF
12126
12127
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012128fi
12129
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012130ac_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 +010012131if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000012132
Martin v. Löwis11437992002-04-12 09:54:03 +000012133cat >>confdefs.h <<_ACEOF
12134#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
12135_ACEOF
12136
12137
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012138fi
12139
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012140ac_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 +010012141if test "x$ac_cv_member_struct_stat_st_flags" = xyes; then :
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000012142
12143cat >>confdefs.h <<_ACEOF
12144#define HAVE_STRUCT_STAT_ST_FLAGS 1
12145_ACEOF
12146
12147
12148fi
12149
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012150ac_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 +010012151if test "x$ac_cv_member_struct_stat_st_gen" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000012152
12153cat >>confdefs.h <<_ACEOF
12154#define HAVE_STRUCT_STAT_ST_GEN 1
12155_ACEOF
12156
12157
12158fi
12159
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012160ac_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 +010012161if test "x$ac_cv_member_struct_stat_st_birthtime" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000012162
12163cat >>confdefs.h <<_ACEOF
12164#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
12165_ACEOF
12166
12167
12168fi
12169
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012170ac_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 +010012171if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000012172
Martin v. Löwis11437992002-04-12 09:54:03 +000012173cat >>confdefs.h <<_ACEOF
12174#define HAVE_STRUCT_STAT_ST_BLOCKS 1
12175_ACEOF
12176
12177
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012178fi
12179
Michael W. Hudson54241132001-12-07 15:38:26 +000012180
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012181{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5
12182$as_echo_n "checking for time.h that defines altzone... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012183if ${ac_cv_header_time_altzone+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012184 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012185else
Matthias Klosec511b472010-05-08 11:01:39 +000012186
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012187 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012188/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012189#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012190int
12191main ()
12192{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012193return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000012194 ;
12195 return 0;
12196}
12197_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012198if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012199 ac_cv_header_time_altzone=yes
12200else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012201 ac_cv_header_time_altzone=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012202fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012203rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosec511b472010-05-08 11:01:39 +000012204
Martin v. Löwiseba40652007-08-30 20:10:57 +000012205fi
12206
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012207{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5
12208$as_echo "$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012209if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012210
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012211$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012212
12213fi
12214
Guido van Rossumda88dad1995-01-26 00:46:29 +000012215was_it_defined=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012216{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
12217$as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
12218cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012219/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012220
12221#include <sys/types.h>
12222#include <sys/select.h>
12223#include <sys/time.h>
12224
Martin v. Löwis11437992002-04-12 09:54:03 +000012225int
12226main ()
12227{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012228;
Martin v. Löwis11437992002-04-12 09:54:03 +000012229 ;
12230 return 0;
12231}
12232_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012233if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012234
12235
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012236$as_echo "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012237
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012238 was_it_defined=yes
12239
Martin v. Löwiseba40652007-08-30 20:10:57 +000012240fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012241rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012242{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
12243$as_echo "$was_it_defined" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012244
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012245{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for addrinfo" >&5
12246$as_echo_n "checking for addrinfo... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012247if ${ac_cv_struct_addrinfo+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012248 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012249else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012250 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012251/* end confdefs.h. */
Matthias Klosec511b472010-05-08 11:01:39 +000012252#include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012253int
12254main ()
12255{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012256struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000012257 ;
12258 return 0;
12259}
12260_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012261if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012262 ac_cv_struct_addrinfo=yes
12263else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012264 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012265fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012266rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12267fi
12268
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012269{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5
12270$as_echo "$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012271if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012272
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012273$as_echo "#define HAVE_ADDRINFO 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012274
12275fi
12276
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012277{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5
12278$as_echo_n "checking for sockaddr_storage... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012279if ${ac_cv_struct_sockaddr_storage+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012280 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012281else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012282 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012283/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012284
12285# include <sys/types.h>
12286# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012287int
12288main ()
12289{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012290struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000012291 ;
12292 return 0;
12293}
12294_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012295if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012296 ac_cv_struct_sockaddr_storage=yes
12297else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012298 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012299fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012300rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12301fi
12302
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012303{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5
12304$as_echo "$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012305if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012306
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012307$as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012308
12309fi
12310
Guido van Rossum627b2d71993-12-24 10:39:16 +000012311# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000012312
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012313{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
12314$as_echo_n "checking whether char is unsigned... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012315if ${ac_cv_c_char_unsigned+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012316 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000012317else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012318 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012319/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012320$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000012321int
12322main ()
12323{
12324static int test_array [1 - 2 * !(((char) -1) < 0)];
Charles-François Natalibe2b9072013-01-08 19:47:00 +010012325test_array [0] = 0;
12326return test_array [0];
Martin v. Löwis11437992002-04-12 09:54:03 +000012327
12328 ;
12329 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000012330}
Martin v. Löwis11437992002-04-12 09:54:03 +000012331_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012332if ac_fn_c_try_compile "$LINENO"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000012333 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000012334else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012335 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012336fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012337rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012338fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012339{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
12340$as_echo "$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012341if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012342 $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012343
12344fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000012345
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012346{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
12347$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012348if ${ac_cv_c_const+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012349 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000012350else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012351 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012352/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012353
Martin v. Löwis11437992002-04-12 09:54:03 +000012354int
12355main ()
12356{
Charles-François Natalibe2b9072013-01-08 19:47:00 +010012357
Martin v. Löwis11437992002-04-12 09:54:03 +000012358#ifndef __cplusplus
Charles-François Natalibe2b9072013-01-08 19:47:00 +010012359 /* Ultrix mips cc rejects this sort of thing. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012360 typedef int charset[2];
Charles-François Natalibe2b9072013-01-08 19:47:00 +010012361 const charset cs = { 0, 0 };
Martin v. Löwis11437992002-04-12 09:54:03 +000012362 /* SunOS 4.1.1 cc rejects this. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000012363 char const *const *pcpcc;
12364 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000012365 /* NEC SVR4.0.2 mips cc rejects this. */
12366 struct point {int x, y;};
12367 static struct point const zero = {0,0};
12368 /* AIX XL C 1.02.0.0 rejects this.
12369 It does not let you subtract one const X* pointer from another in
12370 an arm of an if-expression whose if-part is not a constant
12371 expression */
12372 const char *g = "string";
Martin v. Löwiseba40652007-08-30 20:10:57 +000012373 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012374 /* HPUX 7.0 cc rejects these. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000012375 ++pcpcc;
12376 ppc = (char**) pcpcc;
12377 pcpcc = (char const *const *) ppc;
Charles-François Natalibe2b9072013-01-08 19:47:00 +010012378 { /* SCO 3.2v4 cc rejects this sort of thing. */
12379 char tx;
12380 char *t = &tx;
Martin v. Löwis11437992002-04-12 09:54:03 +000012381 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012382
Martin v. Löwis11437992002-04-12 09:54:03 +000012383 *t++ = 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +000012384 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012385 }
12386 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
12387 int x[] = {25, 17};
12388 const int *foo = &x[0];
12389 ++foo;
12390 }
12391 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
12392 typedef const int *iptr;
12393 iptr p = 0;
12394 ++p;
12395 }
Charles-François Natalibe2b9072013-01-08 19:47:00 +010012396 { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
Martin v. Löwis11437992002-04-12 09:54:03 +000012397 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
Charles-François Natalibe2b9072013-01-08 19:47:00 +010012398 struct s { int j; const int *ap[3]; } bx;
12399 struct s *b = &bx; b->j = 5;
Martin v. Löwis11437992002-04-12 09:54:03 +000012400 }
12401 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
12402 const int foo = 10;
Martin v. Löwiseba40652007-08-30 20:10:57 +000012403 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012404 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012405 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000012406#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000012407
Martin v. Löwis11437992002-04-12 09:54:03 +000012408 ;
12409 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000012410}
Martin v. Löwis11437992002-04-12 09:54:03 +000012411_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012412if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012413 ac_cv_c_const=yes
12414else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012415 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012416fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012417rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012418fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012419{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
12420$as_echo "$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012421if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012422
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012423$as_echo "#define const /**/" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012424
12425fi
12426
Michael W. Hudson54241132001-12-07 15:38:26 +000012427
Guido van Rossumda88dad1995-01-26 00:46:29 +000012428works=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012429{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5
12430$as_echo_n "checking for working volatile... " >&6; }
12431cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012432/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000012433
Martin v. Löwis11437992002-04-12 09:54:03 +000012434int
12435main ()
12436{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012437volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012438 ;
12439 return 0;
12440}
12441_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012442if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000012443 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000012444else
Skip Montanaro6dead952003-09-25 14:50:04 +000012445
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012446$as_echo "#define volatile /**/" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000012447
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012448
Guido van Rossum627b2d71993-12-24 10:39:16 +000012449fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012450rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012451{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
12452$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000012453
Guido van Rossumda88dad1995-01-26 00:46:29 +000012454works=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012455{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working signed char" >&5
12456$as_echo_n "checking for working signed char... " >&6; }
12457cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012458/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000012459
Martin v. Löwis11437992002-04-12 09:54:03 +000012460int
12461main ()
12462{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012463signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000012464 ;
12465 return 0;
12466}
12467_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012468if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000012469 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000012470else
Skip Montanaro6dead952003-09-25 14:50:04 +000012471
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012472$as_echo "#define signed /**/" >>confdefs.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000012473
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012474
Guido van Rossum7f43da71994-08-01 12:15:30 +000012475fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012476rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012477{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
12478$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000012479
Guido van Rossumda88dad1995-01-26 00:46:29 +000012480have_prototypes=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012481{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototypes" >&5
12482$as_echo_n "checking for prototypes... " >&6; }
12483cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012484/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012485int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012486int
12487main ()
12488{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012489return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000012490 ;
12491 return 0;
12492}
12493_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012494if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012495
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012496$as_echo "#define HAVE_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012497
Matthias Klosec511b472010-05-08 11:01:39 +000012498 have_prototypes=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000012499fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012500rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012501{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_prototypes" >&5
12502$as_echo "$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012503
Guido van Rossumda88dad1995-01-26 00:46:29 +000012504works=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012505{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for variable length prototypes and stdarg.h" >&5
12506$as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; }
12507cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012508/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012509
12510#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000012511int foo(int x, ...) {
12512 va_list va;
12513 va_start(va, x);
12514 va_arg(va, int);
12515 va_arg(va, char *);
12516 va_arg(va, double);
12517 return 0;
12518}
Guido van Rossum7f43da71994-08-01 12:15:30 +000012519
Martin v. Löwis11437992002-04-12 09:54:03 +000012520int
12521main ()
12522{
Guido van Rossum90eea071996-08-30 20:58:57 +000012523return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000012524 ;
12525 return 0;
12526}
12527_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012528if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012529
12530
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012531$as_echo "#define HAVE_STDARG_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012532
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012533 works=yes
12534
Guido van Rossum627b2d71993-12-24 10:39:16 +000012535fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012536rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012537{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
12538$as_echo "$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012539
Martin v. Löwisd6320502004-08-12 13:45:08 +000012540# check for socketpair
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012541{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair" >&5
12542$as_echo_n "checking for socketpair... " >&6; }
12543cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000012544/* end confdefs.h. */
12545
12546#include <sys/types.h>
12547#include <sys/socket.h>
12548
12549int
12550main ()
12551{
12552void *x=socketpair
12553 ;
12554 return 0;
12555}
12556_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012557if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd6320502004-08-12 13:45:08 +000012558
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012559$as_echo "#define HAVE_SOCKETPAIR 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +000012560
Matthias Klosec511b472010-05-08 11:01:39 +000012561 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012562$as_echo "yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000012563else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012564 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12565$as_echo "no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000012566
12567fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012568rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000012569
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012570# check if sockaddr has sa_len member
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012571{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr has sa_len member" >&5
12572$as_echo_n "checking if sockaddr has sa_len member... " >&6; }
12573cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012574/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012575#include <sys/types.h>
12576#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012577int
12578main ()
12579{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012580struct sockaddr x;
12581x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012582 ;
12583 return 0;
12584}
12585_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012586if ac_fn_c_try_compile "$LINENO"; then :
12587 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12588$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012589
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012590$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012591
12592else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012593 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12594$as_echo "no" >&6; }
Matthias Klosec511b472010-05-08 11:01:39 +000012595
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012596fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012597rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012598
Guido van Rossumda88dad1995-01-26 00:46:29 +000012599va_list_is_array=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012600{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether va_list is an array" >&5
12601$as_echo_n "checking whether va_list is an array... " >&6; }
12602cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012603/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012604
12605#ifdef HAVE_STDARG_PROTOTYPES
12606#include <stdarg.h>
12607#else
12608#include <varargs.h>
12609#endif
12610
Martin v. Löwis11437992002-04-12 09:54:03 +000012611int
12612main ()
12613{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012614va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000012615 ;
12616 return 0;
12617}
12618_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012619if ac_fn_c_try_compile "$LINENO"; then :
12620
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012621else
Skip Montanaro6dead952003-09-25 14:50:04 +000012622
Martin v. Löwis11437992002-04-12 09:54:03 +000012623
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012624$as_echo "#define VA_LIST_IS_ARRAY 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012625
Guido van Rossumda88dad1995-01-26 00:46:29 +000012626 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012627
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012628fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012629rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012630{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $va_list_is_array" >&5
12631$as_echo "$va_list_is_array" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012632
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012633# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000012634
12635
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012636ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r"
Matthias Klose3cef2a92012-03-14 23:39:33 +010012637if test "x$ac_cv_func_gethostbyname_r" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012638
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012639 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000012640
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012641 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 6 args" >&5
12642$as_echo_n "checking gethostbyname_r with 6 args... " >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012643 OLD_CFLAGS=$CFLAGS
12644 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012645 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012646/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012647
12648# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012649
Martin v. Löwis11437992002-04-12 09:54:03 +000012650int
12651main ()
12652{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012653
12654 char *name;
12655 struct hostent *he, *res;
12656 char buffer[2048];
12657 int buflen = 2048;
12658 int h_errnop;
12659
12660 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000012661
12662 ;
12663 return 0;
12664}
12665_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012666if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012667
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012668 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000012669
Martin v. Löwis11437992002-04-12 09:54:03 +000012670
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012671$as_echo "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012672
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012673 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12674$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012675
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012676else
Skip Montanaro6dead952003-09-25 14:50:04 +000012677
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012678 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12679$as_echo "no" >&6; }
12680 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 5 args" >&5
12681$as_echo_n "checking gethostbyname_r with 5 args... " >&6; }
12682 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012683/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012684
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012685# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012686
Martin v. Löwis11437992002-04-12 09:54:03 +000012687int
12688main ()
12689{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012690
12691 char *name;
12692 struct hostent *he;
Matthias Klosec511b472010-05-08 11:01:39 +000012693 char buffer[2048];
12694 int buflen = 2048;
12695 int h_errnop;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012696
Matthias Klosec511b472010-05-08 11:01:39 +000012697 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000012698
12699 ;
12700 return 0;
12701}
12702_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012703if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012704
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012705 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000012706
Martin v. Löwis11437992002-04-12 09:54:03 +000012707
Matthias Klosec511b472010-05-08 11:01:39 +000012708$as_echo "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012709
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012710 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12711$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012712
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012713else
Skip Montanaro6dead952003-09-25 14:50:04 +000012714
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012715 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12716$as_echo "no" >&6; }
Matthias Klosec511b472010-05-08 11:01:39 +000012717 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 3 args" >&5
12718$as_echo_n "checking gethostbyname_r with 3 args... " >&6; }
12719 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12720/* end confdefs.h. */
12721
12722# include <netdb.h>
12723
12724int
12725main ()
12726{
12727
12728 char *name;
12729 struct hostent *he;
12730 struct hostent_data data;
12731
12732 (void) gethostbyname_r(name, he, &data);
12733
12734 ;
12735 return 0;
12736}
12737_ACEOF
12738if ac_fn_c_try_compile "$LINENO"; then :
12739
12740 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
12741
12742
12743$as_echo "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h
12744
12745 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12746$as_echo "yes" >&6; }
12747
12748else
12749
12750 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12751$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012752
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012753fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012754rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012755
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012756fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012757rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012758
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012759fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012760rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012761 CFLAGS=$OLD_CFLAGS
12762
12763else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012764
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012765 for ac_func in gethostbyname
12766do :
12767 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
Matthias Klose3cef2a92012-03-14 23:39:33 +010012768if test "x$ac_cv_func_gethostbyname" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012769 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012770#define HAVE_GETHOSTBYNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012771_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012772
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012773fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012774done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012775
Michael W. Hudson54241132001-12-07 15:38:26 +000012776
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012777fi
12778
Michael W. Hudson54241132001-12-07 15:38:26 +000012779
12780
12781
12782
12783
12784
Guido van Rossum627b2d71993-12-24 10:39:16 +000012785# checks for system services
12786# (none yet)
12787
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012788# Linux requires this for correct f.p. operations
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012789ac_fn_c_check_func "$LINENO" "__fpu_control" "ac_cv_func___fpu_control"
Matthias Klose3cef2a92012-03-14 23:39:33 +010012790if test "x$ac_cv_func___fpu_control" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012791
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000012792else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012793 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5
12794$as_echo_n "checking for __fpu_control in -lieee... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012795if ${ac_cv_lib_ieee___fpu_control+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012796 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012797else
Martin v. Löwis11437992002-04-12 09:54:03 +000012798 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012799LIBS="-lieee $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012800cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012801/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012802
Martin v. Löwiseba40652007-08-30 20:10:57 +000012803/* Override any GCC internal prototype to avoid an error.
12804 Use char because int might match the return type of a GCC
12805 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012806#ifdef __cplusplus
12807extern "C"
12808#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012809char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012810int
12811main ()
12812{
Martin v. Löwiseba40652007-08-30 20:10:57 +000012813return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012814 ;
12815 return 0;
12816}
12817_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012818if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012819 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000012820else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012821 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012822fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012823rm -f core conftest.err conftest.$ac_objext \
12824 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012825LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012826fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012827{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee___fpu_control" >&5
12828$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012829if test "x$ac_cv_lib_ieee___fpu_control" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012830 cat >>confdefs.h <<_ACEOF
12831#define HAVE_LIBIEEE 1
12832_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012833
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012834 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012835
Guido van Rossum627b2d71993-12-24 10:39:16 +000012836fi
12837
Michael W. Hudson54241132001-12-07 15:38:26 +000012838
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000012839fi
12840
Michael W. Hudson54241132001-12-07 15:38:26 +000012841
Guido van Rossum7f253911997-05-09 02:42:48 +000012842# Check for --with-fpectl
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012843{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-fpectl" >&5
12844$as_echo_n "checking for --with-fpectl... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012845
Martin v. Löwiseba40652007-08-30 20:10:57 +000012846# Check whether --with-fpectl was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012847if test "${with_fpectl+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +000012848 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000012849if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000012850then
12851
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012852$as_echo "#define WANT_SIGFPE_HANDLER 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012853
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012854 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12855$as_echo "yes" >&6; }
12856else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12857$as_echo "no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000012858fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000012859else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012860 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12861$as_echo "no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012862fi
12863
Guido van Rossum7f253911997-05-09 02:42:48 +000012864
Guido van Rossum7f43da71994-08-01 12:15:30 +000012865# check for --with-libm=...
12866
Guido van Rossum563e7081996-09-10 18:20:48 +000012867case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000012868Darwin) ;;
Guido van Rossumec95c7b1998-08-04 17:59:56 +000012869BeOS) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000012870*) LIBM=-lm
12871esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012872{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libm=STRING" >&5
12873$as_echo_n "checking for --with-libm=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012874
Martin v. Löwiseba40652007-08-30 20:10:57 +000012875# Check whether --with-libm was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012876if test "${with_libm+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +000012877 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000012878if test "$withval" = no
12879then LIBM=
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012880 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBM empty" >&5
12881$as_echo "force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000012882elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000012883then LIBM=$withval
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012884 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBM=\"$withval\"" >&5
12885$as_echo "set LIBM=\"$withval\"" >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +000012886else as_fn_error $? "proper usage is --with-libm=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000012887fi
Guido van Rossum7f253911997-05-09 02:42:48 +000012888else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012889 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBM=\"$LIBM\"" >&5
12890$as_echo "default LIBM=\"$LIBM\"" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012891fi
12892
Guido van Rossum7f43da71994-08-01 12:15:30 +000012893
12894# check for --with-libc=...
12895
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012896{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libc=STRING" >&5
12897$as_echo_n "checking for --with-libc=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012898
Martin v. Löwiseba40652007-08-30 20:10:57 +000012899# Check whether --with-libc was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012900if test "${with_libc+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +000012901 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000012902if test "$withval" = no
12903then LIBC=
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012904 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBC empty" >&5
12905$as_echo "force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000012906elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000012907then LIBC=$withval
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012908 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBC=\"$withval\"" >&5
12909$as_echo "set LIBC=\"$withval\"" >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +000012910else as_fn_error $? "proper usage is --with-libc=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000012911fi
Guido van Rossum7f253911997-05-09 02:42:48 +000012912else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012913 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBC=\"$LIBC\"" >&5
12914$as_echo "default LIBC=\"$LIBC\"" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012915fi
12916
Guido van Rossum7f43da71994-08-01 12:15:30 +000012917
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012918# **************************************************
12919# * Check for various properties of floating point *
12920# **************************************************
Mark Dickinson265d7382008-04-21 22:32:24 +000012921
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012922{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are little-endian IEEE 754 binary64" >&5
12923$as_echo_n "checking whether C doubles are little-endian IEEE 754 binary64... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012924if ${ac_cv_little_endian_double+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012925 $as_echo_n "(cached) " >&6
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012926else
12927
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012928if test "$cross_compiling" = yes; then :
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012929 ac_cv_little_endian_double=no
12930else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012931 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012932/* end confdefs.h. */
12933
12934#include <string.h>
12935int main() {
12936 double x = 9006104071832581.0;
12937 if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
12938 return 0;
12939 else
12940 return 1;
12941}
12942
12943_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012944if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012945 ac_cv_little_endian_double=yes
12946else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012947 ac_cv_little_endian_double=no
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012948fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012949rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12950 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012951fi
12952
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012953fi
12954
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012955{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_little_endian_double" >&5
12956$as_echo "$ac_cv_little_endian_double" >&6; }
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012957if test "$ac_cv_little_endian_double" = yes
12958then
12959
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012960$as_echo "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012961
12962fi
12963
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012964{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are big-endian IEEE 754 binary64" >&5
12965$as_echo_n "checking whether C doubles are big-endian IEEE 754 binary64... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012966if ${ac_cv_big_endian_double+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012967 $as_echo_n "(cached) " >&6
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012968else
12969
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012970if test "$cross_compiling" = yes; then :
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012971 ac_cv_big_endian_double=no
12972else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012973 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012974/* end confdefs.h. */
12975
12976#include <string.h>
12977int main() {
12978 double x = 9006104071832581.0;
12979 if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
12980 return 0;
12981 else
12982 return 1;
12983}
12984
12985_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012986if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012987 ac_cv_big_endian_double=yes
12988else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012989 ac_cv_big_endian_double=no
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012990fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012991rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12992 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012993fi
12994
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012995fi
12996
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012997{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_big_endian_double" >&5
12998$as_echo "$ac_cv_big_endian_double" >&6; }
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012999if test "$ac_cv_big_endian_double" = yes
13000then
13001
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013002$as_echo "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000013003
13004fi
13005
13006# Some ARM platforms use a mixed-endian representation for doubles.
13007# While Python doesn't currently have full support for these platforms
13008# (see e.g., issue 1762561), we can at least make sure that float <-> string
13009# conversions work.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013010{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5
13011$as_echo_n "checking whether C doubles are ARM mixed-endian IEEE 754 binary64... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013012if ${ac_cv_mixed_endian_double+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013013 $as_echo_n "(cached) " >&6
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000013014else
13015
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013016if test "$cross_compiling" = yes; then :
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000013017 ac_cv_mixed_endian_double=no
13018else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013019 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000013020/* end confdefs.h. */
13021
13022#include <string.h>
13023int main() {
13024 double x = 9006104071832581.0;
13025 if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
13026 return 0;
13027 else
13028 return 1;
13029}
13030
13031_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013032if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000013033 ac_cv_mixed_endian_double=yes
13034else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013035 ac_cv_mixed_endian_double=no
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000013036fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013037rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13038 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000013039fi
13040
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000013041fi
13042
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013043{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mixed_endian_double" >&5
13044$as_echo "$ac_cv_mixed_endian_double" >&6; }
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000013045if test "$ac_cv_mixed_endian_double" = yes
13046then
13047
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013048$as_echo "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000013049
13050fi
13051
13052# The short float repr introduced in Python 3.1 requires the
13053# correctly-rounded string <-> double conversion functions from
13054# Python/dtoa.c, which in turn require that the FPU uses 53-bit
13055# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsona548dee2009-11-15 13:12:43 +000013056# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000013057# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsona548dee2009-11-15 13:12:43 +000013058
13059# This inline assembler syntax may also work for suncc and icc,
13060# so we try it on all platforms.
13061
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013062{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
13063$as_echo_n "checking whether we can use gcc inline assembler to get and set x87 control word... " >&6; }
13064cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000013065/* end confdefs.h. */
13066
13067int
13068main ()
13069{
13070
Mark Dickinsona548dee2009-11-15 13:12:43 +000013071 unsigned short cw;
13072 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
13073 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000013074
13075 ;
13076 return 0;
13077}
13078_ACEOF
Stefan Krah99e36b92015-07-03 15:30:54 +020013079if ac_fn_c_try_link "$LINENO"; then :
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000013080 have_gcc_asm_for_x87=yes
13081else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013082 have_gcc_asm_for_x87=no
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000013083fi
Stefan Krah99e36b92015-07-03 15:30:54 +020013084rm -f core conftest.err conftest.$ac_objext \
13085 conftest$ac_exeext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013086{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x87" >&5
13087$as_echo "$have_gcc_asm_for_x87" >&6; }
Mark Dickinsona548dee2009-11-15 13:12:43 +000013088if test "$have_gcc_asm_for_x87" = yes
13089then
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000013090
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013091$as_echo "#define HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000013092
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000013093fi
Mark Dickinson7a3d8642008-04-22 00:54:27 +000013094
Mark Dickinson04b27232009-01-04 12:29:36 +000013095# Detect whether system arithmetic is subject to x87-style double
13096# rounding issues. The result of this test has little meaning on non
13097# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
13098# mode is round-to-nearest and double rounding issues are present, and
13099# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013100{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x87-style double rounding" >&5
13101$as_echo_n "checking for x87-style double rounding... " >&6; }
Mark Dickinson99abd142009-10-24 13:44:16 +000013102# $BASECFLAGS may affect the result
13103ac_save_cc="$CC"
13104CC="$CC $BASECFLAGS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013105if test "$cross_compiling" = yes; then :
Mark Dickinson04b27232009-01-04 12:29:36 +000013106 ac_cv_x87_double_rounding=no
13107else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013108 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson04b27232009-01-04 12:29:36 +000013109/* end confdefs.h. */
13110
13111#include <stdlib.h>
13112#include <math.h>
13113int main() {
13114 volatile double x, y, z;
13115 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
13116 x = 0.99999999999999989; /* 1-2**-53 */
13117 y = 1./x;
13118 if (y != 1.)
13119 exit(0);
13120 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
13121 x = 1e16;
13122 y = 2.99999;
13123 z = x + y;
13124 if (z != 1e16+4.)
13125 exit(0);
13126 /* both tests show evidence of double rounding */
13127 exit(1);
13128}
13129
13130_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013131if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson04b27232009-01-04 12:29:36 +000013132 ac_cv_x87_double_rounding=no
13133else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013134 ac_cv_x87_double_rounding=yes
Mark Dickinson04b27232009-01-04 12:29:36 +000013135fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013136rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13137 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson04b27232009-01-04 12:29:36 +000013138fi
13139
Mark Dickinson99abd142009-10-24 13:44:16 +000013140CC="$ac_save_cc"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013141{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5
13142$as_echo "$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson04b27232009-01-04 12:29:36 +000013143if test "$ac_cv_x87_double_rounding" = yes
13144then
13145
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013146$as_echo "#define X87_DOUBLE_ROUNDING 1" >>confdefs.h
Mark Dickinson04b27232009-01-04 12:29:36 +000013147
13148fi
13149
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000013150# ************************************
13151# * Check for mathematical functions *
13152# ************************************
13153
13154LIBS_SAVE=$LIBS
13155LIBS="$LIBS $LIBM"
13156
Mark Dickinson265d7382008-04-21 22:32:24 +000013157# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
13158# -0. on some architectures.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013159{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether tanh preserves the sign of zero" >&5
13160$as_echo_n "checking whether tanh preserves the sign of zero... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013161if ${ac_cv_tanh_preserves_zero_sign+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013162 $as_echo_n "(cached) " >&6
Mark Dickinson265d7382008-04-21 22:32:24 +000013163else
13164
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013165if test "$cross_compiling" = yes; then :
Mark Dickinson265d7382008-04-21 22:32:24 +000013166 ac_cv_tanh_preserves_zero_sign=no
13167else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013168 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson265d7382008-04-21 22:32:24 +000013169/* end confdefs.h. */
13170
13171#include <math.h>
Mark Dickinson7a3d8642008-04-22 00:54:27 +000013172#include <stdlib.h>
Mark Dickinson265d7382008-04-21 22:32:24 +000013173int main() {
13174 /* return 0 if either negative zeros don't exist
13175 on this platform or if negative zeros exist
13176 and tanh(-0.) == -0. */
13177 if (atan2(0., -1.) == atan2(-0., -1.) ||
13178 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
13179 else exit(1);
13180}
13181
13182_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013183if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson265d7382008-04-21 22:32:24 +000013184 ac_cv_tanh_preserves_zero_sign=yes
13185else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013186 ac_cv_tanh_preserves_zero_sign=no
Mark Dickinson265d7382008-04-21 22:32:24 +000013187fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013188rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13189 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson265d7382008-04-21 22:32:24 +000013190fi
13191
Mark Dickinson265d7382008-04-21 22:32:24 +000013192fi
13193
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013194{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_tanh_preserves_zero_sign" >&5
13195$as_echo "$ac_cv_tanh_preserves_zero_sign" >&6; }
Mark Dickinson265d7382008-04-21 22:32:24 +000013196if test "$ac_cv_tanh_preserves_zero_sign" = yes
13197then
13198
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013199$as_echo "#define TANH_PRESERVES_ZERO_SIGN 1" >>confdefs.h
Mark Dickinson265d7382008-04-21 22:32:24 +000013200
13201fi
13202
Mark Dickinson65898e02009-09-05 10:27:00 +000013203for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013204do :
13205 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13206ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Georg Brandl71f4fbb2011-02-25 11:04:50 +000013207if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinson65898e02009-09-05 10:27:00 +000013208 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013209#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Mark Dickinson65898e02009-09-05 10:27:00 +000013210_ACEOF
13211
13212fi
13213done
13214
Mark Dickinson65898e02009-09-05 10:27:00 +000013215for ac_func in hypot lgamma log1p round tgamma
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013216do :
13217 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13218ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Georg Brandl71f4fbb2011-02-25 11:04:50 +000013219if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Christian Heimes0a8143f2007-12-18 23:22:54 +000013220 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013221#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Christian Heimes0a8143f2007-12-18 23:22:54 +000013222_ACEOF
13223
13224fi
13225done
13226
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013227ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
13228"
Matthias Klose3cef2a92012-03-14 23:39:33 +010013229if test "x$ac_cv_have_decl_isinf" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013230 ac_have_decl=1
Mark Dickinsond181e3a2009-01-04 13:57:26 +000013231else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013232 ac_have_decl=0
Mark Dickinsond181e3a2009-01-04 13:57:26 +000013233fi
13234
Mark Dickinsond181e3a2009-01-04 13:57:26 +000013235cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013236#define HAVE_DECL_ISINF $ac_have_decl
Mark Dickinsond181e3a2009-01-04 13:57:26 +000013237_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013238ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h>
13239"
Matthias Klose3cef2a92012-03-14 23:39:33 +010013240if test "x$ac_cv_have_decl_isnan" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013241 ac_have_decl=1
Mark Dickinsond181e3a2009-01-04 13:57:26 +000013242else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013243 ac_have_decl=0
Mark Dickinsond181e3a2009-01-04 13:57:26 +000013244fi
Mark Dickinsond181e3a2009-01-04 13:57:26 +000013245
13246cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013247#define HAVE_DECL_ISNAN $ac_have_decl
Mark Dickinsond181e3a2009-01-04 13:57:26 +000013248_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013249ac_fn_c_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include <math.h>
13250"
Matthias Klose3cef2a92012-03-14 23:39:33 +010013251if test "x$ac_cv_have_decl_isfinite" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013252 ac_have_decl=1
Mark Dickinsond181e3a2009-01-04 13:57:26 +000013253else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013254 ac_have_decl=0
Mark Dickinsond181e3a2009-01-04 13:57:26 +000013255fi
Mark Dickinsond181e3a2009-01-04 13:57:26 +000013256
13257cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013258#define HAVE_DECL_ISFINITE $ac_have_decl
Mark Dickinsond181e3a2009-01-04 13:57:26 +000013259_ACEOF
13260
13261
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000013262LIBS=$LIBS_SAVE
13263
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013264# For multiprocessing module, check that sem_open
13265# actually works. For FreeBSD versions <= 7.2,
13266# the kernel module that provides POSIX semaphores
13267# isn't loaded by default, so an attempt to call
13268# sem_open results in a 'Signal 12' error.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013269{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX semaphores are enabled" >&5
13270$as_echo_n "checking whether POSIX semaphores are enabled... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013271if ${ac_cv_posix_semaphores_enabled+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013272 $as_echo_n "(cached) " >&6
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013273else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013274 if test "$cross_compiling" = yes; then :
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013275 ac_cv_posix_semaphores_enabled=yes
13276else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013277 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013278/* end confdefs.h. */
13279
13280#include <unistd.h>
13281#include <fcntl.h>
13282#include <stdio.h>
13283#include <semaphore.h>
13284#include <sys/stat.h>
13285
13286int main(void) {
13287 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
13288 if (a == SEM_FAILED) {
13289 perror("sem_open");
13290 return 1;
13291 }
13292 sem_close(a);
Mark Dickinson59dc89e2009-12-13 21:06:06 +000013293 sem_unlink("/autoconf");
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013294 return 0;
13295}
13296
13297_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013298if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013299 ac_cv_posix_semaphores_enabled=yes
13300else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013301 ac_cv_posix_semaphores_enabled=no
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013302fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013303rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13304 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013305fi
13306
13307
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013308fi
13309
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013310{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_semaphores_enabled" >&5
13311$as_echo "$ac_cv_posix_semaphores_enabled" >&6; }
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013312if test $ac_cv_posix_semaphores_enabled = no
13313then
13314
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013315$as_echo "#define POSIX_SEMAPHORES_NOT_ENABLED 1" >>confdefs.h
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013316
13317fi
13318
13319# Multiprocessing check for broken sem_getvalue
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013320{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken sem_getvalue" >&5
13321$as_echo_n "checking for broken sem_getvalue... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013322if ${ac_cv_broken_sem_getvalue+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013323 $as_echo_n "(cached) " >&6
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013324else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013325 if test "$cross_compiling" = yes; then :
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013326 ac_cv_broken_sem_getvalue=yes
13327else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013328 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013329/* end confdefs.h. */
13330
13331#include <unistd.h>
13332#include <fcntl.h>
13333#include <stdio.h>
13334#include <semaphore.h>
13335#include <sys/stat.h>
13336
13337int main(void){
Mark Dickinson59dc89e2009-12-13 21:06:06 +000013338 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013339 int count;
13340 int res;
13341 if(a==SEM_FAILED){
13342 perror("sem_open");
13343 return 1;
13344
13345 }
13346 res = sem_getvalue(a, &count);
13347 sem_close(a);
Mark Dickinson59dc89e2009-12-13 21:06:06 +000013348 sem_unlink("/autocftw");
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013349 return res==-1 ? 1 : 0;
13350}
13351
13352_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013353if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013354 ac_cv_broken_sem_getvalue=no
13355else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013356 ac_cv_broken_sem_getvalue=yes
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013357fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013358rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13359 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013360fi
13361
13362
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013363fi
13364
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013365{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_sem_getvalue" >&5
13366$as_echo "$ac_cv_broken_sem_getvalue" >&6; }
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013367if test $ac_cv_broken_sem_getvalue = yes
13368then
13369
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013370$as_echo "#define HAVE_BROKEN_SEM_GETVALUE 1" >>confdefs.h
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013371
13372fi
13373
Mark Dickinsonefc82f72009-03-20 15:51:55 +000013374# determine what size digit to use for Python's longs
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013375{ $as_echo "$as_me:${as_lineno-$LINENO}: checking digit size for Python's longs" >&5
13376$as_echo_n "checking digit size for Python's longs... " >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +000013377# Check whether --enable-big-digits was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013378if test "${enable_big_digits+set}" = set; then :
Mark Dickinsonefc82f72009-03-20 15:51:55 +000013379 enableval=$enable_big_digits; case $enable_big_digits in
13380yes)
13381 enable_big_digits=30 ;;
13382no)
13383 enable_big_digits=15 ;;
1338415|30)
13385 ;;
13386*)
Matthias Klose3cef2a92012-03-14 23:39:33 +010013387 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 +000013388esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013389{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_big_digits" >&5
13390$as_echo "$enable_big_digits" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +000013391
13392cat >>confdefs.h <<_ACEOF
13393#define PYLONG_BITS_IN_DIGIT $enable_big_digits
13394_ACEOF
13395
13396
13397else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013398 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
13399$as_echo "no value specified" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +000013400fi
13401
13402
Guido van Rossumef2255b2000-03-10 22:30:29 +000013403# check for wchar.h
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013404ac_fn_c_check_header_mongrel "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
Matthias Klose3cef2a92012-03-14 23:39:33 +010013405if test "x$ac_cv_header_wchar_h" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013406
13407
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013408$as_echo "#define HAVE_WCHAR_H 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013409
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013410 wchar_h="yes"
13411
Guido van Rossumef2255b2000-03-10 22:30:29 +000013412else
Martin v. Löwis11437992002-04-12 09:54:03 +000013413 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000013414
13415fi
13416
Michael W. Hudson54241132001-12-07 15:38:26 +000013417
Martin v. Löwis11437992002-04-12 09:54:03 +000013418
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013419# determine wchar_t size
13420if test "$wchar_h" = yes
13421then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013422 # The cast to long int works around a bug in the HP C Compiler
Martin v. Löwiseba40652007-08-30 20:10:57 +000013423# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
13424# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
13425# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013426{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
13427$as_echo_n "checking size of wchar_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013428if ${ac_cv_sizeof_wchar_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013429 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000013430else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013431 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "#include <wchar.h>
13432"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013433
Martin v. Löwis11437992002-04-12 09:54:03 +000013434else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013435 if test "$ac_cv_type_wchar_t" = yes; then
13436 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
13437$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +000013438as_fn_error 77 "cannot compute sizeof (wchar_t)
Matthias Klose3cef2a92012-03-14 23:39:33 +010013439See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000013440 else
13441 ac_cv_sizeof_wchar_t=0
13442 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013443fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013444
Martin v. Löwis11437992002-04-12 09:54:03 +000013445fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013446{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
13447$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000013448
13449
13450
Martin v. Löwis11437992002-04-12 09:54:03 +000013451cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013452#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000013453_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013454
Michael W. Hudson54241132001-12-07 15:38:26 +000013455
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013456fi
13457
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013458{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UCS-4 tcl" >&5
13459$as_echo_n "checking for UCS-4 tcl... " >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013460have_ucs4_tcl=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013461cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013462/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013463
13464#include <tcl.h>
13465#if TCL_UTF_MAX != 6
13466# error "NOT UCS4_TCL"
13467#endif
13468int
13469main ()
13470{
13471
13472 ;
13473 return 0;
13474}
13475_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013476if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013477
13478
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013479$as_echo "#define HAVE_UCS4_TCL 1" >>confdefs.h
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013480
13481 have_ucs4_tcl=yes
13482
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +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 +000013485{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ucs4_tcl" >&5
13486$as_echo "$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013487
Skip Montanaro6dead952003-09-25 14:50:04 +000013488# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013489if test "$wchar_h" = yes
13490then
13491 # check whether wchar_t is signed or not
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013492 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is signed" >&5
13493$as_echo_n "checking whether wchar_t is signed... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013494 if ${ac_cv_wchar_t_signed+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013495 $as_echo_n "(cached) " >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013496else
13497
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013498 if test "$cross_compiling" = yes; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013499 ac_cv_wchar_t_signed=yes
13500else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013501 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013502/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013503
13504 #include <wchar.h>
13505 int main()
13506 {
Martin v. Löwis44fe0e42006-04-11 07:15:30 +000013507 /* Success: exit code 0 */
13508 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013509 }
13510
13511_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013512if ac_fn_c_try_run "$LINENO"; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013513 ac_cv_wchar_t_signed=yes
13514else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013515 ac_cv_wchar_t_signed=no
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013516fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013517rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13518 conftest.$ac_objext conftest.beam conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013519fi
13520
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013521fi
13522
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013523 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wchar_t_signed" >&5
13524$as_echo "$ac_cv_wchar_t_signed" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000013525fi
13526
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013527{ $as_echo "$as_me:${as_lineno-$LINENO}: checking what type to use for unicode" >&5
13528$as_echo_n "checking what type to use for unicode... " >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000013529# Check whether --enable-unicode was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013530if test "${enable_unicode+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +000013531 enableval=$enable_unicode;
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013532else
13533 enable_unicode=yes
Martin v. Löwiseba40652007-08-30 20:10:57 +000013534fi
13535
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013536
13537if test $enable_unicode = yes
13538then
Martin v. Löwisfd917792001-06-27 20:22:04 +000013539 # Without any arguments, Py_UNICODE defaults to two-byte mode
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013540 case "$have_ucs4_tcl" in
13541 yes) enable_unicode="ucs4"
13542 ;;
13543 *) enable_unicode="ucs2"
13544 ;;
13545 esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013546fi
13547
Martin v. Löwis0036cba2002-04-12 09:58:45 +000013548
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013549case "$enable_unicode" in
13550ucs2) unicode_size="2"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013551 $as_echo "#define Py_UNICODE_SIZE 2" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013552
13553 ;;
13554ucs4) unicode_size="4"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013555 $as_echo "#define Py_UNICODE_SIZE 4" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013556
13557 ;;
Martin v. Löwised11a5d2012-05-20 10:42:17 +020013558no) ;; # To allow --disable-unicode
Matthias Klose3cef2a92012-03-14 23:39:33 +010013559*) 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 +000013560esac
13561
Michael W. Hudson54241132001-12-07 15:38:26 +000013562
Martin v. Löwis11437992002-04-12 09:54:03 +000013563
13564
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013565if test "$enable_unicode" = "no"
13566then
Martin v. Löwis339d0f72001-08-17 18:39:25 +000013567 UNICODE_OBJS=""
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013568 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not used" >&5
13569$as_echo "not used" >&6; }
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013570else
Martin v. Löwis339d0f72001-08-17 18:39:25 +000013571 UNICODE_OBJS="Objects/unicodeobject.o Objects/unicodectype.o"
Martin v. Löwis11437992002-04-12 09:54:03 +000013572
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013573$as_echo "#define Py_USING_UNICODE 1" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013574
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013575
13576 # wchar_t is only usable if it maps to an unsigned type
13577 if test "$unicode_size" = "$ac_cv_sizeof_wchar_t" \
Matthias Klose7dbeed72004-12-24 08:22:17 +000013578 -a "$ac_cv_wchar_t_signed" = "no"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013579 then
13580 PY_UNICODE_TYPE="wchar_t"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013581
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013582$as_echo "#define HAVE_USABLE_WCHAR_T 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013583
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013584 $as_echo "#define PY_UNICODE_TYPE wchar_t" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013585
13586 elif test "$ac_cv_sizeof_short" = "$unicode_size"
13587 then
13588 PY_UNICODE_TYPE="unsigned short"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013589 $as_echo "#define PY_UNICODE_TYPE unsigned short" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013590
13591 elif test "$ac_cv_sizeof_long" = "$unicode_size"
13592 then
13593 PY_UNICODE_TYPE="unsigned long"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013594 $as_echo "#define PY_UNICODE_TYPE unsigned long" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013595
13596 else
13597 PY_UNICODE_TYPE="no type found"
13598 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013599 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PY_UNICODE_TYPE" >&5
13600$as_echo "$PY_UNICODE_TYPE" >&6; }
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013601fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000013602
13603# check for endianness
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013604 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
13605$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013606if ${ac_cv_c_bigendian+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013607 $as_echo_n "(cached) " >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000013608else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013609 ac_cv_c_bigendian=unknown
13610 # See if we're dealing with a universal compiler.
13611 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13612/* end confdefs.h. */
13613#ifndef __APPLE_CC__
13614 not a universal capable compiler
13615 #endif
13616 typedef int dummy;
13617
Skip Montanaro6dead952003-09-25 14:50:04 +000013618_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013619if ac_fn_c_try_compile "$LINENO"; then :
13620
13621 # Check for potential -arch flags. It is not universal unless
13622 # there are at least two -arch flags with different values.
13623 ac_arch=
13624 ac_prev=
13625 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
13626 if test -n "$ac_prev"; then
13627 case $ac_word in
13628 i?86 | x86_64 | ppc | ppc64)
13629 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
13630 ac_arch=$ac_word
13631 else
13632 ac_cv_c_bigendian=universal
13633 break
13634 fi
13635 ;;
13636 esac
13637 ac_prev=
13638 elif test "x$ac_word" = "x-arch"; then
13639 ac_prev=arch
13640 fi
13641 done
13642fi
13643rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13644 if test $ac_cv_c_bigendian = unknown; then
13645 # See if sys/param.h defines the BYTE_ORDER macro.
13646 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013647/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000013648#include <sys/types.h>
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013649 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000013650
Martin v. Löwis11437992002-04-12 09:54:03 +000013651int
13652main ()
13653{
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013654#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
13655 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
13656 && LITTLE_ENDIAN)
13657 bogus endian macros
13658 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013659
13660 ;
13661 return 0;
13662}
13663_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013664if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000013665 # It does; now see whether it defined to BIG_ENDIAN or not.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013666 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013667/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000013668#include <sys/types.h>
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013669 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000013670
Martin v. Löwis11437992002-04-12 09:54:03 +000013671int
13672main ()
13673{
Guido van Rossumef2255b2000-03-10 22:30:29 +000013674#if BYTE_ORDER != BIG_ENDIAN
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013675 not big endian
13676 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013677
13678 ;
13679 return 0;
13680}
13681_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013682if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000013683 ac_cv_c_bigendian=yes
13684else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013685 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000013686fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013687rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013688fi
13689rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13690 fi
13691 if test $ac_cv_c_bigendian = unknown; then
13692 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
13693 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013694/* end confdefs.h. */
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013695#include <limits.h>
13696
Martin v. Löwis11437992002-04-12 09:54:03 +000013697int
13698main ()
13699{
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013700#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
13701 bogus endian macros
13702 #endif
13703
Martin v. Löwis11437992002-04-12 09:54:03 +000013704 ;
13705 return 0;
13706}
13707_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013708if ac_fn_c_try_compile "$LINENO"; then :
13709 # It does; now see whether it defined to _BIG_ENDIAN or not.
13710 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13711/* end confdefs.h. */
13712#include <limits.h>
13713
13714int
13715main ()
13716{
13717#ifndef _BIG_ENDIAN
13718 not big endian
13719 #endif
13720
13721 ;
13722 return 0;
13723}
13724_ACEOF
13725if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013726 ac_cv_c_bigendian=yes
Alexandre Vassalottia2db6872009-07-17 07:46:46 +000013727else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013728 ac_cv_c_bigendian=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013729fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013730rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13731fi
13732rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13733 fi
13734 if test $ac_cv_c_bigendian = unknown; then
13735 # Compile a test program.
13736 if test "$cross_compiling" = yes; then :
13737 # Try to guess by grepping values from an object file.
13738 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13739/* end confdefs.h. */
13740short int ascii_mm[] =
13741 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
13742 short int ascii_ii[] =
13743 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
13744 int use_ascii (int i) {
13745 return ascii_mm[i] + ascii_ii[i];
13746 }
13747 short int ebcdic_ii[] =
13748 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
13749 short int ebcdic_mm[] =
13750 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
13751 int use_ebcdic (int i) {
13752 return ebcdic_mm[i] + ebcdic_ii[i];
13753 }
13754 extern int foo;
Martin v. Löwiseba40652007-08-30 20:10:57 +000013755
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013756int
13757main ()
13758{
13759return use_ascii (foo) == use_ebcdic (foo);
13760 ;
13761 return 0;
13762}
13763_ACEOF
13764if ac_fn_c_try_compile "$LINENO"; then :
13765 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
13766 ac_cv_c_bigendian=yes
13767 fi
13768 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
13769 if test "$ac_cv_c_bigendian" = unknown; then
13770 ac_cv_c_bigendian=no
13771 else
13772 # finding both strings is unlikely to happen, but who knows?
13773 ac_cv_c_bigendian=unknown
13774 fi
13775 fi
13776fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013777rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013778else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013779 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013780/* end confdefs.h. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000013781$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000013782int
13783main ()
13784{
Martin v. Löwiseba40652007-08-30 20:10:57 +000013785
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013786 /* Are we little or big endian? From Harbison&Steele. */
13787 union
13788 {
13789 long int l;
13790 char c[sizeof (long int)];
13791 } u;
13792 u.l = 1;
13793 return u.c[sizeof (long int) - 1] == 1;
Martin v. Löwiseba40652007-08-30 20:10:57 +000013794
13795 ;
13796 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000013797}
Martin v. Löwis11437992002-04-12 09:54:03 +000013798_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013799if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000013800 ac_cv_c_bigendian=no
13801else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013802 ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000013803fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013804rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13805 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000013806fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013807
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013808 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013809fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013810{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
13811$as_echo "$ac_cv_c_bigendian" >&6; }
13812 case $ac_cv_c_bigendian in #(
13813 yes)
13814 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
13815;; #(
13816 no)
13817 ;; #(
13818 universal)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013819
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013820$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Alexandre Vassalottia2db6872009-07-17 07:46:46 +000013821
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013822 ;; #(
13823 *)
Georg Brandl71f4fbb2011-02-25 11:04:50 +000013824 as_fn_error $? "unknown endianness
Matthias Klose3cef2a92012-03-14 23:39:33 +010013825 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013826 esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000013827
Michael W. Hudson54241132001-12-07 15:38:26 +000013828
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013829# Check whether right shifting a negative integer extends the sign bit
13830# or fills with zeros (like the Cray J90, according to Tim Peters).
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013831{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether right shift extends the sign bit" >&5
13832$as_echo_n "checking whether right shift extends the sign bit... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013833if ${ac_cv_rshift_extends_sign+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013834 $as_echo_n "(cached) " >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000013835else
Martin v. Löwis11437992002-04-12 09:54:03 +000013836
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013837if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000013838 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013839else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013840 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013841/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013842
13843int main()
13844{
Vladimir Marangozova6180282000-07-12 05:05:06 +000013845 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013846}
13847
Martin v. Löwis11437992002-04-12 09:54:03 +000013848_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013849if ac_fn_c_try_run "$LINENO"; then :
Vladimir Marangozova6180282000-07-12 05:05:06 +000013850 ac_cv_rshift_extends_sign=yes
13851else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013852 ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000013853fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013854rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13855 conftest.$ac_objext conftest.beam conftest.$ac_ext
Vladimir Marangozova6180282000-07-12 05:05:06 +000013856fi
13857
Martin v. Löwiseba40652007-08-30 20:10:57 +000013858fi
13859
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013860{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rshift_extends_sign" >&5
13861$as_echo "$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000013862if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013863then
Martin v. Löwis11437992002-04-12 09:54:03 +000013864
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013865$as_echo "#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1" >>confdefs.h
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013866
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013867fi
13868
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013869# check for getc_unlocked and related locking functions
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013870{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getc_unlocked() and friends" >&5
13871$as_echo_n "checking for getc_unlocked() and friends... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013872if ${ac_cv_have_getc_unlocked+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013873 $as_echo_n "(cached) " >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013874else
Martin v. Löwis11437992002-04-12 09:54:03 +000013875
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013876cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013877/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013878#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013879int
13880main ()
13881{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013882
13883 FILE *f = fopen("/dev/null", "r");
13884 flockfile(f);
13885 getc_unlocked(f);
13886 funlockfile(f);
13887
Martin v. Löwis11437992002-04-12 09:54:03 +000013888 ;
13889 return 0;
13890}
13891_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013892if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013893 ac_cv_have_getc_unlocked=yes
13894else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013895 ac_cv_have_getc_unlocked=no
13896fi
13897rm -f core conftest.err conftest.$ac_objext \
13898 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013899fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013900
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013901{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getc_unlocked" >&5
13902$as_echo "$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013903if test "$ac_cv_have_getc_unlocked" = yes
13904then
Martin v. Löwis11437992002-04-12 09:54:03 +000013905
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013906$as_echo "#define HAVE_GETC_UNLOCKED 1" >>confdefs.h
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013907
13908fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013909
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013910# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000013911# save the value of LIBS so we don't actually link Python with readline
13912LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013913
Gregory P. Smithcc023f12008-09-07 05:15:58 +000013914# On some systems we need to link readline to a termcap compatible
13915# library. NOTE: Keep the precedence of listed libraries synchronised
13916# with setup.py.
13917py_cv_lib_readline=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013918{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link readline libs" >&5
13919$as_echo_n "checking how to link readline libs... " >&6; }
Gregory P. Smithcc023f12008-09-07 05:15:58 +000013920for py_libtermcap in "" ncursesw ncurses curses termcap; do
13921 if test -z "$py_libtermcap"; then
13922 READLINE_LIBS="-lreadline"
13923 else
13924 READLINE_LIBS="-lreadline -l$py_libtermcap"
13925 fi
13926 LIBS="$READLINE_LIBS $LIBS_no_readline"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013927 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013928/* end confdefs.h. */
13929
Martin v. Löwiseba40652007-08-30 20:10:57 +000013930/* Override any GCC internal prototype to avoid an error.
13931 Use char because int might match the return type of a GCC
13932 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013933#ifdef __cplusplus
13934extern "C"
13935#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013936char readline ();
13937int
13938main ()
13939{
Martin v. Löwiseba40652007-08-30 20:10:57 +000013940return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013941 ;
13942 return 0;
13943}
13944_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013945if ac_fn_c_try_link "$LINENO"; then :
Gregory P. Smithcc023f12008-09-07 05:15:58 +000013946 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013947fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013948rm -f core conftest.err conftest.$ac_objext \
13949 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smithcc023f12008-09-07 05:15:58 +000013950 if test $py_cv_lib_readline = yes; then
13951 break
13952 fi
13953done
13954# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
13955#AC_SUBST([READLINE_LIBS])
Gregory P. Smithe080cdf2008-09-07 19:19:04 +000013956if test $py_cv_lib_readline = no; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013957 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
13958$as_echo "none" >&6; }
Gregory P. Smithcc023f12008-09-07 05:15:58 +000013959else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013960 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_LIBS" >&5
13961$as_echo "$READLINE_LIBS" >&6; }
Gregory P. Smithcc023f12008-09-07 05:15:58 +000013962
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013963$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013964
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013965fi
13966
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013967# check for readline 2.1
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013968{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_callback_handler_install in -lreadline" >&5
13969$as_echo_n "checking for rl_callback_handler_install in -lreadline... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013970if ${ac_cv_lib_readline_rl_callback_handler_install+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013971 $as_echo_n "(cached) " >&6
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013972else
13973 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000013974LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013975cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013976/* end confdefs.h. */
13977
Martin v. Löwiseba40652007-08-30 20:10:57 +000013978/* Override any GCC internal prototype to avoid an error.
13979 Use char because int might match the return type of a GCC
13980 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013981#ifdef __cplusplus
13982extern "C"
13983#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013984char rl_callback_handler_install ();
13985int
13986main ()
13987{
Martin v. Löwiseba40652007-08-30 20:10:57 +000013988return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013989 ;
13990 return 0;
13991}
13992_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013993if ac_fn_c_try_link "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013994 ac_cv_lib_readline_rl_callback_handler_install=yes
13995else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013996 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013997fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013998rm -f core conftest.err conftest.$ac_objext \
13999 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014000LIBS=$ac_check_lib_save_LIBS
14001fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014002{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
14003$as_echo "$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010014004if test "x$ac_cv_lib_readline_rl_callback_handler_install" = xyes; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014005
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014006$as_echo "#define HAVE_RL_CALLBACK 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014007
14008fi
14009
14010
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014011# check for readline 2.2
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014012cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014013/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014014#include <readline/readline.h>
14015_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014016if ac_fn_c_try_cpp "$LINENO"; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014017 have_readline=yes
14018else
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014019 have_readline=no
Matthias Klosec511b472010-05-08 11:01:39 +000014020
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014021fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014022rm -f conftest.err conftest.i conftest.$ac_ext
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014023if test $have_readline = yes
14024then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014025 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014026/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014027#include <readline/readline.h>
14028
14029_ACEOF
14030if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014031 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014032
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014033$as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014034
14035fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +000014036rm -f conftest*
Antoine Pitroud9ff74e2009-10-26 19:16:46 +000014037
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014038 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroud9ff74e2009-10-26 19:16:46 +000014039/* end confdefs.h. */
14040#include <readline/readline.h>
14041
14042_ACEOF
14043if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014044 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then :
Antoine Pitroud9ff74e2009-10-26 19:16:46 +000014045
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014046$as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h
Antoine Pitroud9ff74e2009-10-26 19:16:46 +000014047
14048fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +000014049rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014050
14051fi
14052
Martin v. Löwis0daad592001-09-30 21:09:59 +000014053# check for readline 4.0
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014054{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -lreadline" >&5
14055$as_echo_n "checking for rl_pre_input_hook in -lreadline... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010014056if ${ac_cv_lib_readline_rl_pre_input_hook+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014057 $as_echo_n "(cached) " >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000014058else
Martin v. Löwis11437992002-04-12 09:54:03 +000014059 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000014060LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014061cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014062/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014063
Martin v. Löwiseba40652007-08-30 20:10:57 +000014064/* Override any GCC internal prototype to avoid an error.
14065 Use char because int might match the return type of a GCC
14066 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014067#ifdef __cplusplus
14068extern "C"
14069#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014070char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014071int
14072main ()
14073{
Martin v. Löwiseba40652007-08-30 20:10:57 +000014074return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014075 ;
14076 return 0;
14077}
14078_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014079if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014080 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000014081else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014082 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000014083fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014084rm -f core conftest.err conftest.$ac_objext \
14085 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014086LIBS=$ac_check_lib_save_LIBS
14087fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014088{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
14089$as_echo "$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010014090if test "x$ac_cv_lib_readline_rl_pre_input_hook" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000014091
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014092$as_echo "#define HAVE_RL_PRE_INPUT_HOOK 1" >>confdefs.h
Martin v. Löwis0daad592001-09-30 21:09:59 +000014093
Martin v. Löwis0daad592001-09-30 21:09:59 +000014094fi
14095
Michael W. Hudson54241132001-12-07 15:38:26 +000014096
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000014097# also in 4.0
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014098{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -lreadline" >&5
14099$as_echo_n "checking for rl_completion_display_matches_hook in -lreadline... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010014100if ${ac_cv_lib_readline_rl_completion_display_matches_hook+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014101 $as_echo_n "(cached) " >&6
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000014102else
14103 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000014104LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014105cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000014106/* end confdefs.h. */
14107
14108/* Override any GCC internal prototype to avoid an error.
14109 Use char because int might match the return type of a GCC
14110 builtin and then its argument prototype would still apply. */
14111#ifdef __cplusplus
14112extern "C"
14113#endif
14114char rl_completion_display_matches_hook ();
14115int
14116main ()
14117{
14118return rl_completion_display_matches_hook ();
14119 ;
14120 return 0;
14121}
14122_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014123if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000014124 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
14125else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014126 ac_cv_lib_readline_rl_completion_display_matches_hook=no
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000014127fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014128rm -f core conftest.err conftest.$ac_objext \
14129 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000014130LIBS=$ac_check_lib_save_LIBS
14131fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014132{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
14133$as_echo "$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010014134if test "x$ac_cv_lib_readline_rl_completion_display_matches_hook" = xyes; then :
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000014135
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014136$as_echo "#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000014137
14138fi
14139
14140
Martin Pantera70c3232016-04-03 02:54:58 +000014141# also in 4.0, but not in editline
14142{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_resize_terminal in -lreadline" >&5
14143$as_echo_n "checking for rl_resize_terminal in -lreadline... " >&6; }
14144if ${ac_cv_lib_readline_rl_resize_terminal+:} false; then :
14145 $as_echo_n "(cached) " >&6
14146else
14147 ac_check_lib_save_LIBS=$LIBS
14148LIBS="-lreadline $READLINE_LIBS $LIBS"
14149cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14150/* end confdefs.h. */
14151
14152/* Override any GCC internal prototype to avoid an error.
14153 Use char because int might match the return type of a GCC
14154 builtin and then its argument prototype would still apply. */
14155#ifdef __cplusplus
14156extern "C"
14157#endif
14158char rl_resize_terminal ();
14159int
14160main ()
14161{
14162return rl_resize_terminal ();
14163 ;
14164 return 0;
14165}
14166_ACEOF
14167if ac_fn_c_try_link "$LINENO"; then :
14168 ac_cv_lib_readline_rl_resize_terminal=yes
14169else
14170 ac_cv_lib_readline_rl_resize_terminal=no
14171fi
14172rm -f core conftest.err conftest.$ac_objext \
14173 conftest$ac_exeext conftest.$ac_ext
14174LIBS=$ac_check_lib_save_LIBS
14175fi
14176{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_resize_terminal" >&5
14177$as_echo "$ac_cv_lib_readline_rl_resize_terminal" >&6; }
14178if test "x$ac_cv_lib_readline_rl_resize_terminal" = xyes; then :
14179
14180$as_echo "#define HAVE_RL_RESIZE_TERMINAL 1" >>confdefs.h
14181
14182fi
14183
14184
Martin v. Löwis0daad592001-09-30 21:09:59 +000014185# check for readline 4.2
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014186{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5
14187$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010014188if ${ac_cv_lib_readline_rl_completion_matches+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014189 $as_echo_n "(cached) " >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000014190else
Martin v. Löwis11437992002-04-12 09:54:03 +000014191 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000014192LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014193cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014194/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014195
Martin v. Löwiseba40652007-08-30 20:10:57 +000014196/* Override any GCC internal prototype to avoid an error.
14197 Use char because int might match the return type of a GCC
14198 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014199#ifdef __cplusplus
14200extern "C"
14201#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014202char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014203int
14204main ()
14205{
Martin v. Löwiseba40652007-08-30 20:10:57 +000014206return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014207 ;
14208 return 0;
14209}
14210_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014211if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014212 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000014213else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014214 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000014215fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014216rm -f core conftest.err conftest.$ac_objext \
14217 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014218LIBS=$ac_check_lib_save_LIBS
14219fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014220{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_matches" >&5
14221$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010014222if test "x$ac_cv_lib_readline_rl_completion_matches" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000014223
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014224$as_echo "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h
Guido van Rossum353ae582001-07-10 16:45:32 +000014225
Guido van Rossum353ae582001-07-10 16:45:32 +000014226fi
14227
Jack Jansendd19cf82001-12-06 22:36:17 +000014228
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014229# also in readline 4.2
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014230cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014231/* end confdefs.h. */
14232#include <readline/readline.h>
14233_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014234if ac_fn_c_try_cpp "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014235 have_readline=yes
14236else
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014237 have_readline=no
Matthias Klosec511b472010-05-08 11:01:39 +000014238
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014239fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014240rm -f conftest.err conftest.i conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014241if test $have_readline = yes
14242then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014243 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014244/* end confdefs.h. */
14245#include <readline/readline.h>
14246
14247_ACEOF
14248if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014249 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014250
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014251$as_echo "#define HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014252
14253fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +000014254rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014255
14256fi
14257
Martin v. Löwis82bca632006-02-10 20:49:30 +000014258# End of readline checks: restore LIBS
14259LIBS=$LIBS_no_readline
14260
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014261{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken nice()" >&5
14262$as_echo_n "checking for broken nice()... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010014263if ${ac_cv_broken_nice+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014264 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000014265else
Martin v. Löwis11437992002-04-12 09:54:03 +000014266
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014267if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000014268 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014269else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014270 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014271/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014272
14273int main()
14274{
14275 int val1 = nice(1);
14276 if (val1 != -1 && val1 == nice(2))
14277 exit(0);
14278 exit(1);
14279}
14280
Martin v. Löwis11437992002-04-12 09:54:03 +000014281_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014282if ac_fn_c_try_run "$LINENO"; then :
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014283 ac_cv_broken_nice=yes
14284else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014285 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014286fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014287rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14288 conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014289fi
14290
Martin v. Löwiseba40652007-08-30 20:10:57 +000014291fi
14292
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014293{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_nice" >&5
14294$as_echo "$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014295if test "$ac_cv_broken_nice" = yes
14296then
Martin v. Löwis11437992002-04-12 09:54:03 +000014297
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014298$as_echo "#define HAVE_BROKEN_NICE 1" >>confdefs.h
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014299
14300fi
14301
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014302{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken poll()" >&5
14303$as_echo_n "checking for broken poll()... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010014304if ${ac_cv_broken_poll+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014305 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014306else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014307 if test "$cross_compiling" = yes; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014308 ac_cv_broken_poll=no
14309else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014310 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014311/* end confdefs.h. */
14312
14313#include <poll.h>
14314
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014315int main()
14316{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014317 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014318 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014319
14320 close (42);
14321
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014322 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014323 if (poll_test < 0)
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014324 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014325 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014326 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014327 else
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014328 return 1;
14329}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014330
14331_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014332if ac_fn_c_try_run "$LINENO"; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014333 ac_cv_broken_poll=yes
14334else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014335 ac_cv_broken_poll=no
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014336fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014337rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14338 conftest.$ac_objext conftest.beam conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014339fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014340
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014341fi
14342
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014343{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_poll" >&5
14344$as_echo "$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014345if test "$ac_cv_broken_poll" = yes
14346then
14347
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014348$as_echo "#define HAVE_BROKEN_POLL 1" >>confdefs.h
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014349
14350fi
14351
Brett Cannon43802422005-02-10 20:48:03 +000014352# 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 +000014353# (which is not required by ISO C or UNIX spec) and/or if we support
14354# tzname[]
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014355ac_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 +000014356#include <$ac_cv_struct_tm>
14357
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014358"
Matthias Klose3cef2a92012-03-14 23:39:33 +010014359if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Brett Cannon43802422005-02-10 20:48:03 +000014360
14361cat >>confdefs.h <<_ACEOF
14362#define HAVE_STRUCT_TM_TM_ZONE 1
14363_ACEOF
14364
14365
14366fi
14367
14368if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
14369
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014370$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000014371
14372else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014373 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
14374"
Matthias Klose3cef2a92012-03-14 23:39:33 +010014375if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014376 ac_have_decl=1
Martin v. Löwiseba40652007-08-30 20:10:57 +000014377else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014378 ac_have_decl=0
Martin v. Löwiseba40652007-08-30 20:10:57 +000014379fi
14380
Martin v. Löwiseba40652007-08-30 20:10:57 +000014381cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014382#define HAVE_DECL_TZNAME $ac_have_decl
Martin v. Löwiseba40652007-08-30 20:10:57 +000014383_ACEOF
14384
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014385 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
14386$as_echo_n "checking for tzname... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010014387if ${ac_cv_var_tzname+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014388 $as_echo_n "(cached) " >&6
Martin v. Löwiseba40652007-08-30 20:10:57 +000014389else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014390 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000014391/* end confdefs.h. */
14392#include <time.h>
Martin v. Löwiseba40652007-08-30 20:10:57 +000014393#if !HAVE_DECL_TZNAME
14394extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000014395#endif
14396
14397int
14398main ()
14399{
Martin v. Löwiseba40652007-08-30 20:10:57 +000014400return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000014401 ;
14402 return 0;
14403}
14404_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014405if ac_fn_c_try_link "$LINENO"; then :
Brett Cannon43802422005-02-10 20:48:03 +000014406 ac_cv_var_tzname=yes
14407else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014408 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000014409fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014410rm -f core conftest.err conftest.$ac_objext \
14411 conftest$ac_exeext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000014412fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014413{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
14414$as_echo "$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000014415 if test $ac_cv_var_tzname = yes; then
14416
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014417$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000014418
14419 fi
14420fi
14421
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014422
Martin v. Löwis1d459062005-03-14 21:23:33 +000014423# check tzset(3) exists and works like we expect it to
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014424{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working tzset()" >&5
14425$as_echo_n "checking for working tzset()... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010014426if ${ac_cv_working_tzset+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014427 $as_echo_n "(cached) " >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014428else
14429
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014430if test "$cross_compiling" = yes; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014431 ac_cv_working_tzset=no
14432else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014433 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014434/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014435
14436#include <stdlib.h>
14437#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000014438#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000014439
14440#if HAVE_TZNAME
14441extern char *tzname[];
14442#endif
14443
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014444int main()
14445{
Brett Cannon18367812003-09-19 00:59:16 +000014446 /* Note that we need to ensure that not only does tzset(3)
14447 do 'something' with localtime, but it works as documented
14448 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000014449 This includes making sure that tzname is set properly if
14450 tm->tm_zone does not exist since it is the alternative way
14451 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000014452
14453 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000014454 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000014455 */
14456
Martin v. Löwis1d459062005-03-14 21:23:33 +000014457 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000014458 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
14459
Neal Norwitz7f2588c2003-04-11 15:35:53 +000014460 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014461 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000014462 if (localtime(&groundhogday)->tm_hour != 0)
14463 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000014464#if HAVE_TZNAME
14465 /* For UTC, tzname[1] is sometimes "", sometimes " " */
14466 if (strcmp(tzname[0], "UTC") ||
14467 (tzname[1][0] != 0 && tzname[1][0] != ' '))
14468 exit(1);
14469#endif
Brett Cannon18367812003-09-19 00:59:16 +000014470
Neal Norwitz7f2588c2003-04-11 15:35:53 +000014471 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014472 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000014473 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014474 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000014475#if HAVE_TZNAME
14476 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
14477 exit(1);
14478#endif
Brett Cannon18367812003-09-19 00:59:16 +000014479
14480 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
14481 tzset();
14482 if (localtime(&groundhogday)->tm_hour != 11)
14483 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000014484#if HAVE_TZNAME
14485 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
14486 exit(1);
14487#endif
14488
14489#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000014490 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
14491 exit(1);
14492 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
14493 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000014494#endif
Brett Cannon18367812003-09-19 00:59:16 +000014495
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014496 exit(0);
14497}
14498
14499_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014500if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014501 ac_cv_working_tzset=yes
14502else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014503 ac_cv_working_tzset=no
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014504fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014505rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14506 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014507fi
14508
Martin v. Löwiseba40652007-08-30 20:10:57 +000014509fi
14510
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014511{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_tzset" >&5
14512$as_echo "$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014513if test "$ac_cv_working_tzset" = yes
14514then
14515
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014516$as_echo "#define HAVE_WORKING_TZSET 1" >>confdefs.h
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014517
14518fi
14519
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014520# Look for subsecond timestamps in struct stat
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014521{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec in struct stat" >&5
14522$as_echo_n "checking for tv_nsec in struct stat... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010014523if ${ac_cv_stat_tv_nsec+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014524 $as_echo_n "(cached) " >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014525else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014526 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014527/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014528#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014529int
14530main ()
14531{
14532
14533struct stat st;
14534st.st_mtim.tv_nsec = 1;
14535
14536 ;
14537 return 0;
14538}
14539_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014540if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa32c9942002-09-09 16:17:47 +000014541 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014542else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014543 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014544fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014545rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14546fi
14547
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014548{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec" >&5
14549$as_echo "$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014550if test "$ac_cv_stat_tv_nsec" = yes
14551then
14552
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014553$as_echo "#define HAVE_STAT_TV_NSEC 1" >>confdefs.h
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014554
14555fi
14556
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014557# Look for BSD style subsecond timestamps in struct stat
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014558{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec2 in struct stat" >&5
14559$as_echo_n "checking for tv_nsec2 in struct stat... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010014560if ${ac_cv_stat_tv_nsec2+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014561 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014562else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014563 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014564/* end confdefs.h. */
14565#include <sys/stat.h>
14566int
14567main ()
14568{
14569
14570struct stat st;
14571st.st_mtimespec.tv_nsec = 1;
14572
14573 ;
14574 return 0;
14575}
14576_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014577if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014578 ac_cv_stat_tv_nsec2=yes
14579else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014580 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014581fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014582rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14583fi
14584
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014585{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec2" >&5
14586$as_echo "$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014587if test "$ac_cv_stat_tv_nsec2" = yes
14588then
14589
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014590$as_echo "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014591
14592fi
14593
doko@ubuntu.comf27ec3e2014-04-17 20:11:19 +020014594# first curses configure check
14595ac_save_cppflags="$CPPFLAGS"
14596CPPFLAGS="$CPPFLAGS -I/usr/include/ncursesw"
14597
14598for ac_header in curses.h ncurses.h
14599do :
14600 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
14601ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
14602if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
14603 cat >>confdefs.h <<_ACEOF
14604#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
14605_ACEOF
14606
14607fi
14608
14609done
14610
14611
14612# On Solaris, term.h requires curses.h
14613for ac_header in term.h
14614do :
14615 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "
14616#ifdef HAVE_CURSES_H
14617#include <curses.h>
14618#endif
14619
14620"
14621if test "x$ac_cv_header_term_h" = xyes; then :
14622 cat >>confdefs.h <<_ACEOF
14623#define HAVE_TERM_H 1
14624_ACEOF
14625
14626fi
14627
14628done
14629
14630
Jack Jansen666b1e72001-10-31 12:11:48 +000014631# On HP/UX 11.0, mvwdelch is a block with a return statement
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014632{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mvwdelch is an expression" >&5
14633$as_echo_n "checking whether mvwdelch is an expression... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010014634if ${ac_cv_mvwdelch_is_expression+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014635 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000014636else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014637 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014638/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000014639#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014640int
14641main ()
14642{
Jack Jansen666b1e72001-10-31 12:11:48 +000014643
14644 int rtn;
14645 rtn = mvwdelch(0,0,0);
14646
Martin v. Löwis11437992002-04-12 09:54:03 +000014647 ;
14648 return 0;
14649}
14650_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014651if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000014652 ac_cv_mvwdelch_is_expression=yes
14653else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014654 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000014655fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014656rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14657fi
14658
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014659{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mvwdelch_is_expression" >&5
14660$as_echo "$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000014661
14662if test "$ac_cv_mvwdelch_is_expression" = yes
14663then
Martin v. Löwis11437992002-04-12 09:54:03 +000014664
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014665$as_echo "#define MVWDELCH_IS_EXPRESSION 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000014666
14667fi
14668
Miss Islington (bot)6ba0b582017-11-01 05:36:48 -070014669# Issue #25720: ncurses has introduced the NCURSES_OPAQUE symbol making opaque
14670# structs since version 5.7. If the macro is defined as zero before including
14671# [n]curses.h, ncurses will expose fields of the structs regardless of the
14672# configuration.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014673{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WINDOW has _flags" >&5
14674$as_echo_n "checking whether WINDOW has _flags... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010014675if ${ac_cv_window_has_flags+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014676 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000014677else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014678 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014679/* end confdefs.h. */
Miss Islington (bot)6ba0b582017-11-01 05:36:48 -070014680
14681 #define NCURSES_OPAQUE 0
14682 #include <curses.h>
14683
Martin v. Löwis11437992002-04-12 09:54:03 +000014684int
14685main ()
14686{
Jack Jansen666b1e72001-10-31 12:11:48 +000014687
14688 WINDOW *w;
14689 w->_flags = 0;
14690
Martin v. Löwis11437992002-04-12 09:54:03 +000014691 ;
14692 return 0;
14693}
14694_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014695if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000014696 ac_cv_window_has_flags=yes
14697else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014698 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000014699fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014700rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14701fi
14702
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014703{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_window_has_flags" >&5
14704$as_echo "$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000014705
Jack Jansen666b1e72001-10-31 12:11:48 +000014706
14707if test "$ac_cv_window_has_flags" = yes
14708then
Martin v. Löwis11437992002-04-12 09:54:03 +000014709
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014710$as_echo "#define WINDOW_HAS_FLAGS 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000014711
14712fi
14713
Miss Islington (bot)6ba0b582017-11-01 05:36:48 -070014714{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_pad" >&5
14715$as_echo_n "checking for is_pad... " >&6; }
14716cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14717/* end confdefs.h. */
14718#include <curses.h>
14719int
14720main ()
14721{
14722
14723#ifndef is_pad
14724void *x=is_pad
14725#endif
14726
14727 ;
14728 return 0;
14729}
14730_ACEOF
14731if ac_fn_c_try_compile "$LINENO"; then :
14732
14733$as_echo "#define HAVE_CURSES_IS_PAD 1" >>confdefs.h
14734
14735 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14736$as_echo "yes" >&6; }
14737else
14738 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14739$as_echo "no" >&6; }
14740
14741fi
14742rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14743
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014744{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_term_resized" >&5
14745$as_echo_n "checking for is_term_resized... " >&6; }
14746cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Walter Dörwald4994d952006-06-19 08:07:50 +000014747/* end confdefs.h. */
14748#include <curses.h>
14749int
14750main ()
14751{
14752void *x=is_term_resized
14753 ;
14754 return 0;
14755}
14756_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014757if ac_fn_c_try_compile "$LINENO"; then :
Walter Dörwald4994d952006-06-19 08:07:50 +000014758
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014759$as_echo "#define HAVE_CURSES_IS_TERM_RESIZED 1" >>confdefs.h
Walter Dörwald4994d952006-06-19 08:07:50 +000014760
Matthias Klosec511b472010-05-08 11:01:39 +000014761 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014762$as_echo "yes" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000014763else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014764 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14765$as_echo "no" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000014766
14767fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014768rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14769
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014770{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resize_term" >&5
14771$as_echo_n "checking for resize_term... " >&6; }
14772cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Walter Dörwald4994d952006-06-19 08:07:50 +000014773/* end confdefs.h. */
14774#include <curses.h>
14775int
14776main ()
14777{
14778void *x=resize_term
14779 ;
14780 return 0;
14781}
14782_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014783if ac_fn_c_try_compile "$LINENO"; then :
Walter Dörwald4994d952006-06-19 08:07:50 +000014784
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014785$as_echo "#define HAVE_CURSES_RESIZE_TERM 1" >>confdefs.h
Walter Dörwald4994d952006-06-19 08:07:50 +000014786
Matthias Klosec511b472010-05-08 11:01:39 +000014787 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014788$as_echo "yes" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000014789else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014790 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14791$as_echo "no" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000014792
14793fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014794rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14795
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014796{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resizeterm" >&5
14797$as_echo_n "checking for resizeterm... " >&6; }
14798cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Walter Dörwald4994d952006-06-19 08:07:50 +000014799/* end confdefs.h. */
14800#include <curses.h>
14801int
14802main ()
14803{
14804void *x=resizeterm
14805 ;
14806 return 0;
14807}
14808_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014809if ac_fn_c_try_compile "$LINENO"; then :
Walter Dörwald4994d952006-06-19 08:07:50 +000014810
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014811$as_echo "#define HAVE_CURSES_RESIZETERM 1" >>confdefs.h
Walter Dörwald4994d952006-06-19 08:07:50 +000014812
Matthias Klosec511b472010-05-08 11:01:39 +000014813 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014814$as_echo "yes" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000014815else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014816 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14817$as_echo "no" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000014818
14819fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014820rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Serhiy Storchakae0fc1af2017-10-31 16:12:35 +020014821
14822{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for immedok" >&5
14823$as_echo_n "checking for immedok... " >&6; }
14824cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14825/* end confdefs.h. */
14826#include <curses.h>
14827int
14828main ()
14829{
14830
14831#ifndef immedok
14832void *x=immedok
14833#endif
14834
14835 ;
14836 return 0;
14837}
14838_ACEOF
14839if ac_fn_c_try_compile "$LINENO"; then :
14840
14841$as_echo "#define HAVE_CURSES_IMMEDOK 1" >>confdefs.h
14842
14843 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14844$as_echo "yes" >&6; }
14845else
14846 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14847$as_echo "no" >&6; }
14848
14849fi
14850rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14851
14852{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for syncok" >&5
14853$as_echo_n "checking for syncok... " >&6; }
14854cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14855/* end confdefs.h. */
14856#include <curses.h>
14857int
14858main ()
14859{
14860
14861#ifndef syncok
14862void *x=syncok
14863#endif
14864
14865 ;
14866 return 0;
14867}
14868_ACEOF
14869if ac_fn_c_try_compile "$LINENO"; then :
14870
14871$as_echo "#define HAVE_CURSES_SYNCOK 1" >>confdefs.h
14872
14873 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14874$as_echo "yes" >&6; }
14875else
14876 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14877$as_echo "no" >&6; }
14878
14879fi
14880rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14881
Miss Islington (bot)87c66e42017-11-01 06:11:18 -070014882{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for wchgat" >&5
14883$as_echo_n "checking for wchgat... " >&6; }
14884cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14885/* end confdefs.h. */
14886#include <curses.h>
14887int
14888main ()
14889{
14890
14891#ifndef wchgat
14892void *x=wchgat
14893#endif
14894
14895 ;
14896 return 0;
14897}
14898_ACEOF
14899if ac_fn_c_try_compile "$LINENO"; then :
14900
14901$as_echo "#define HAVE_CURSES_WCHGAT 1" >>confdefs.h
14902
14903 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14904$as_echo "yes" >&6; }
14905else
14906 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14907$as_echo "no" >&6; }
14908
14909fi
14910rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14911
Serhiy Storchakae0fc1af2017-10-31 16:12:35 +020014912{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for filter" >&5
14913$as_echo_n "checking for filter... " >&6; }
14914cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14915/* end confdefs.h. */
14916#include <curses.h>
14917int
14918main ()
14919{
14920
14921#ifndef filter
14922void *x=filter
14923#endif
14924
14925 ;
14926 return 0;
14927}
14928_ACEOF
14929if ac_fn_c_try_compile "$LINENO"; then :
14930
14931$as_echo "#define HAVE_CURSES_FILTER 1" >>confdefs.h
14932
14933 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14934$as_echo "yes" >&6; }
14935else
14936 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14937$as_echo "no" >&6; }
14938
14939fi
14940rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14941
14942{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for has_key" >&5
14943$as_echo_n "checking for has_key... " >&6; }
14944cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14945/* end confdefs.h. */
14946#include <curses.h>
14947int
14948main ()
14949{
14950
14951#ifndef has_key
14952void *x=has_key
14953#endif
14954
14955 ;
14956 return 0;
14957}
14958_ACEOF
14959if ac_fn_c_try_compile "$LINENO"; then :
14960
14961$as_echo "#define HAVE_CURSES_HAS_KEY 1" >>confdefs.h
14962
14963 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14964$as_echo "yes" >&6; }
14965else
14966 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14967$as_echo "no" >&6; }
14968
14969fi
14970rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14971
14972{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for typeahead" >&5
14973$as_echo_n "checking for typeahead... " >&6; }
14974cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14975/* end confdefs.h. */
14976#include <curses.h>
14977int
14978main ()
14979{
14980
14981#ifndef typeahead
14982void *x=typeahead
14983#endif
14984
14985 ;
14986 return 0;
14987}
14988_ACEOF
14989if ac_fn_c_try_compile "$LINENO"; then :
14990
14991$as_echo "#define HAVE_CURSES_TYPEAHEAD 1" >>confdefs.h
14992
14993 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14994$as_echo "yes" >&6; }
14995else
14996 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14997$as_echo "no" >&6; }
14998
14999fi
15000rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15001
15002{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for use_env" >&5
15003$as_echo_n "checking for use_env... " >&6; }
15004cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15005/* end confdefs.h. */
15006#include <curses.h>
15007int
15008main ()
15009{
15010
15011#ifndef use_env
15012void *x=use_env
15013#endif
15014
15015 ;
15016 return 0;
15017}
15018_ACEOF
15019if ac_fn_c_try_compile "$LINENO"; then :
15020
15021$as_echo "#define HAVE_CURSES_USE_ENV 1" >>confdefs.h
15022
15023 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15024$as_echo "yes" >&6; }
15025else
15026 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15027$as_echo "no" >&6; }
15028
15029fi
15030rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
doko@ubuntu.comf27ec3e2014-04-17 20:11:19 +020015031# last curses configure check
15032CPPFLAGS=$ac_save_cppflags
Martin v. Löwiseba40652007-08-30 20:10:57 +000015033
doko@python.orgd65e2ba2013-01-31 23:52:03 +010015034{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for device files" >&5
15035$as_echo "$as_me: checking for device files" >&6;}
15036
15037if test "x$cross_compiling" = xyes; then
15038 if test "${ac_cv_file__dev_ptmx+set}" != set; then
15039 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
15040$as_echo_n "checking for /dev/ptmx... " >&6; }
15041 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
15042$as_echo "not set" >&6; }
15043 as_fn_error $? "set ac_cv_file__dev_ptmx to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
15044 fi
15045 if test "${ac_cv_file__dev_ptc+set}" != set; then
15046 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
15047$as_echo_n "checking for /dev/ptc... " >&6; }
15048 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
15049$as_echo "not set" >&6; }
15050 as_fn_error $? "set ac_cv_file__dev_ptc to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
15051 fi
15052fi
15053
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015054{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
15055$as_echo_n "checking for /dev/ptmx... " >&6; }
doko@python.orgd65e2ba2013-01-31 23:52:03 +010015056if ${ac_cv_file__dev_ptmx+:} false; then :
15057 $as_echo_n "(cached) " >&6
15058else
15059 test "$cross_compiling" = yes &&
15060 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
15061if test -r "/dev/ptmx"; then
15062 ac_cv_file__dev_ptmx=yes
15063else
15064 ac_cv_file__dev_ptmx=no
15065fi
15066fi
15067{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptmx" >&5
15068$as_echo "$ac_cv_file__dev_ptmx" >&6; }
15069if test "x$ac_cv_file__dev_ptmx" = xyes; then :
Martin v. Löwisfefbc202006-10-17 18:59:23 +000015070
doko@python.orgd65e2ba2013-01-31 23:52:03 +010015071fi
15072
15073if test "x$ac_cv_file__dev_ptmx" = xyes; then
Martin v. Löwis24a880b2002-12-31 12:55:15 +000015074
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015075$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
Martin v. Löwis24a880b2002-12-31 12:55:15 +000015076
Martin v. Löwis24a880b2002-12-31 12:55:15 +000015077fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015078{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
15079$as_echo_n "checking for /dev/ptc... " >&6; }
doko@python.orgd65e2ba2013-01-31 23:52:03 +010015080if ${ac_cv_file__dev_ptc+:} false; then :
15081 $as_echo_n "(cached) " >&6
15082else
15083 test "$cross_compiling" = yes &&
15084 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
15085if test -r "/dev/ptc"; then
15086 ac_cv_file__dev_ptc=yes
15087else
15088 ac_cv_file__dev_ptc=no
15089fi
15090fi
15091{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptc" >&5
15092$as_echo "$ac_cv_file__dev_ptc" >&6; }
15093if test "x$ac_cv_file__dev_ptc" = xyes; then :
Martin v. Löwisfefbc202006-10-17 18:59:23 +000015094
doko@python.orgd65e2ba2013-01-31 23:52:03 +010015095fi
15096
15097if test "x$ac_cv_file__dev_ptc" = xyes; then
Neal Norwitz865400f2003-03-21 01:42:58 +000015098
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015099$as_echo "#define HAVE_DEV_PTC 1" >>confdefs.h
Neal Norwitz865400f2003-03-21 01:42:58 +000015100
Neal Norwitz865400f2003-03-21 01:42:58 +000015101fi
15102
Mark Dickinson82864d12009-11-15 16:18:58 +000015103if test "$have_long_long" = yes
15104then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015105 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for %lld and %llu printf() format support" >&5
15106$as_echo_n "checking for %lld and %llu printf() format support... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010015107 if ${ac_cv_have_long_long_format+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015108 $as_echo_n "(cached) " >&6
Mark Dickinson82864d12009-11-15 16:18:58 +000015109else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015110 if test "$cross_compiling" = yes; then :
doko@python.orgd65e2ba2013-01-31 23:52:03 +010015111 ac_cv_have_long_long_format="cross -- assuming no"
15112 if test x$GCC = xyes; then
15113 save_CFLAGS=$CFLAGS
15114 CFLAGS="$CFLAGS -Werror -Wformat"
15115 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15116/* end confdefs.h. */
15117
15118 #include <stdio.h>
15119 #include <stddef.h>
15120
15121int
15122main ()
15123{
15124
15125 char *buffer;
15126 sprintf(buffer, "%lld", (long long)123);
15127 sprintf(buffer, "%lld", (long long)-123);
15128 sprintf(buffer, "%llu", (unsigned long long)123);
15129
15130 ;
15131 return 0;
15132}
15133_ACEOF
15134if ac_fn_c_try_compile "$LINENO"; then :
15135 ac_cv_have_long_long_format=yes
15136
15137fi
15138rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15139 CFLAGS=$save_CFLAGS
15140 fi
Mark Dickinson82864d12009-11-15 16:18:58 +000015141else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015142 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson82864d12009-11-15 16:18:58 +000015143/* end confdefs.h. */
15144
15145 #include <stdio.h>
15146 #include <stddef.h>
15147 #include <string.h>
15148
15149 #ifdef HAVE_SYS_TYPES_H
15150 #include <sys/types.h>
15151 #endif
15152
15153 int main()
15154 {
15155 char buffer[256];
15156
15157 if (sprintf(buffer, "%lld", (long long)123) < 0)
15158 return 1;
15159 if (strcmp(buffer, "123"))
15160 return 1;
15161
15162 if (sprintf(buffer, "%lld", (long long)-123) < 0)
15163 return 1;
15164 if (strcmp(buffer, "-123"))
15165 return 1;
15166
15167 if (sprintf(buffer, "%llu", (unsigned long long)123) < 0)
15168 return 1;
15169 if (strcmp(buffer, "123"))
15170 return 1;
15171
15172 return 0;
15173 }
15174
15175_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015176if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson82864d12009-11-15 16:18:58 +000015177 ac_cv_have_long_long_format=yes
15178else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015179 ac_cv_have_long_long_format=no
Mark Dickinson82864d12009-11-15 16:18:58 +000015180fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015181rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15182 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson82864d12009-11-15 16:18:58 +000015183fi
15184
15185
Mark Dickinson82864d12009-11-15 16:18:58 +000015186fi
15187
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015188 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_long_long_format" >&5
15189$as_echo "$ac_cv_have_long_long_format" >&6; }
Mark Dickinson82864d12009-11-15 16:18:58 +000015190fi
15191
Mark Dickinson5ce84742009-12-31 20:48:04 +000015192if test "$ac_cv_have_long_long_format" = yes
Mark Dickinson82864d12009-11-15 16:18:58 +000015193then
15194
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015195$as_echo "#define PY_FORMAT_LONG_LONG \"ll\"" >>confdefs.h
Mark Dickinson82864d12009-11-15 16:18:58 +000015196
15197fi
15198
Ronald Oussoren315cd0c2009-11-19 16:25:21 +000015199if test $ac_sys_system = Darwin
15200then
15201 LIBS="$LIBS -framework CoreFoundation"
15202fi
15203
Mark Dickinson82864d12009-11-15 16:18:58 +000015204
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015205{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for %zd printf() format support" >&5
15206$as_echo_n "checking for %zd printf() format support... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010015207if ${ac_cv_have_size_t_format+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015208 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000015209else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015210 if test "$cross_compiling" = yes; then :
Gregory P. Smithc9ff3a72009-11-02 02:03:16 +000015211 ac_cv_have_size_t_format="cross -- assuming yes"
15212
Brett Cannon09d12362006-05-11 05:11:33 +000015213else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015214 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Brett Cannon09d12362006-05-11 05:11:33 +000015215/* end confdefs.h. */
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000015216
Brett Cannon09d12362006-05-11 05:11:33 +000015217#include <stdio.h>
15218#include <stddef.h>
15219#include <string.h>
15220
Christian Heimesdb3d6cb2007-12-16 21:39:43 +000015221#ifdef HAVE_SYS_TYPES_H
15222#include <sys/types.h>
15223#endif
Neal Norwitz4a8fbdb2006-09-22 08:16:26 +000015224
15225#ifdef HAVE_SSIZE_T
15226typedef ssize_t Py_ssize_t;
15227#elif SIZEOF_VOID_P == SIZEOF_LONG
15228typedef long Py_ssize_t;
15229#else
15230typedef int Py_ssize_t;
15231#endif
Brett Cannon09d12362006-05-11 05:11:33 +000015232
Christian Heimesdb3d6cb2007-12-16 21:39:43 +000015233int main()
15234{
15235 char buffer[256];
15236
Brett Cannon09d12362006-05-11 05:11:33 +000015237 if(sprintf(buffer, "%zd", (size_t)123) < 0)
15238 return 1;
15239
Neal Norwitz4a8fbdb2006-09-22 08:16:26 +000015240 if (strcmp(buffer, "123"))
15241 return 1;
15242
15243 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
15244 return 1;
15245
15246 if (strcmp(buffer, "-123"))
Brett Cannon09d12362006-05-11 05:11:33 +000015247 return 1;
15248
15249 return 0;
15250}
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000015251
Brett Cannon09d12362006-05-11 05:11:33 +000015252_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015253if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000015254 ac_cv_have_size_t_format=yes
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015255else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015256 ac_cv_have_size_t_format=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015257fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015258rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15259 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +000015260fi
15261
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000015262fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015263{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t_format" >&5
15264$as_echo "$ac_cv_have_size_t_format" >&6; }
Gregory P. Smithc9ff3a72009-11-02 02:03:16 +000015265if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000015266
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015267$as_echo "#define PY_FORMAT_SIZE_T \"z\"" >>confdefs.h
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000015268
15269fi
15270
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015271ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
Martin v. Löwis01c04012002-11-11 14:58:44 +000015272#ifdef HAVE_SYS_TYPES_H
15273#include <sys/types.h>
15274#endif
15275#ifdef HAVE_SYS_SOCKET_H
15276#include <sys/socket.h>
15277#endif
15278
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015279"
Matthias Klose3cef2a92012-03-14 23:39:33 +010015280if test "x$ac_cv_type_socklen_t" = xyes; then :
Martin v. Löwis01c04012002-11-11 14:58:44 +000015281
Martin v. Löwis11437992002-04-12 09:54:03 +000015282else
Guido van Rossum95713eb2000-05-18 20:53:31 +000015283
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015284$as_echo "#define socklen_t int" >>confdefs.h
Guido van Rossum95713eb2000-05-18 20:53:31 +000015285
15286fi
15287
Michael W. Hudson54241132001-12-07 15:38:26 +000015288
Benjamin Peterson7497e912010-10-16 00:53:39 +000015289case $ac_sys_system in
15290AIX*)
15291
15292$as_echo "#define HAVE_BROKEN_PIPE_BUF 1" >>confdefs.h
15293 ;;
15294esac
15295
15296
Michael W. Hudson54241132001-12-07 15:38:26 +000015297
15298
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000015299for h in `(cd $srcdir;echo Python/thread_*.h)`
15300do
15301 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
15302done
15303
Michael W. Hudson54241132001-12-07 15:38:26 +000015304
Victor Stinner5f4056a2017-04-28 03:41:40 +020015305SRCDIRS="Parser Objects Python Modules"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015306{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5
15307$as_echo_n "checking for build directories... " >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015308for dir in $SRCDIRS; do
15309 if test ! -d $dir; then
15310 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000015311 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015312done
Benjamin Peterson2c992a02015-05-28 12:45:31 -050015313
15314# BEGIN_COMPUTED_GOTO
15315# Check for --with-computed-gotos
15316{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-computed-gotos" >&5
15317$as_echo_n "checking for --with-computed-gotos... " >&6; }
15318
15319# Check whether --with-computed-gotos was given.
15320if test "${with_computed_gotos+set}" = set; then :
15321 withval=$with_computed_gotos;
15322if test "$withval" = yes
15323then
15324
15325$as_echo "#define USE_COMPUTED_GOTOS 1" >>confdefs.h
15326
15327 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15328$as_echo "yes" >&6; }
15329fi
15330if test "$withval" = no
15331then
15332
15333$as_echo "#define USE_COMPUTED_GOTOS 0" >>confdefs.h
15334
15335 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15336$as_echo "no" >&6; }
15337fi
15338
15339else
15340 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
15341$as_echo "no value specified" >&6; }
15342fi
15343
15344
15345{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports computed gotos" >&5
15346$as_echo_n "checking whether $CC supports computed gotos... " >&6; }
15347if ${ac_cv_computed_gotos+:} false; then :
15348 $as_echo_n "(cached) " >&6
15349else
15350 if test "$cross_compiling" = yes; then :
15351 if test "${with_computed_gotos+set}" = set; then
15352 ac_cv_computed_gotos="$with_computed_gotos -- configured --with(out)-computed-gotos"
15353 else
15354 ac_cv_computed_gotos=no
15355 fi
15356else
15357 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15358/* end confdefs.h. */
15359
15360int main(int argc, char **argv)
15361{
15362 static void *targets[1] = { &&LABEL1 };
15363 goto LABEL2;
15364LABEL1:
15365 return 0;
15366LABEL2:
15367 goto *targets[0];
15368 return 1;
15369}
15370
15371_ACEOF
15372if ac_fn_c_try_run "$LINENO"; then :
15373 ac_cv_computed_gotos=yes
15374else
15375 ac_cv_computed_gotos=no
15376fi
15377rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15378 conftest.$ac_objext conftest.beam conftest.$ac_ext
15379fi
15380
15381fi
15382
15383{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_computed_gotos" >&5
15384$as_echo "$ac_cv_computed_gotos" >&6; }
15385case "$ac_cv_computed_gotos" in yes*)
15386
15387$as_echo "#define HAVE_COMPUTED_GOTOS 1" >>confdefs.h
15388
15389esac
15390# END_COMPUTED_GOTO
15391
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015392{ $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
15393$as_echo "done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000015394
Ned Deily3f1d0b32014-11-20 02:11:03 -080015395# ensurepip option
15396{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ensurepip" >&5
15397$as_echo_n "checking for ensurepip... " >&6; }
15398
15399# Check whether --with-ensurepip was given.
15400if test "${with_ensurepip+set}" = set; then :
15401 withval=$with_ensurepip;
15402else
15403 with_ensurepip=no
15404fi
15405
15406case $with_ensurepip in #(
15407 yes|upgrade) :
15408 ENSUREPIP=upgrade ;; #(
15409 install) :
15410 ENSUREPIP=install ;; #(
15411 no) :
15412 ENSUREPIP=no ;; #(
15413 *) :
15414 as_fn_error $? "--with-ensurepip=upgrade|install|no" "$LINENO" 5 ;;
15415esac
15416{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENSUREPIP" >&5
15417$as_echo "$ENSUREPIP" >&6; }
15418
15419
Guido van Rossum627b2d71993-12-24 10:39:16 +000015420# generate output files
Antoine Pitrouf2caeed2009-05-24 20:23:57 +000015421ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config Misc/python.pc"
Martin v. Löwis88afe662002-10-26 13:47:44 +000015422
Antoine Pitrouaabdceb2010-09-10 20:03:17 +000015423ac_config_files="$ac_config_files Modules/ld_so_aix"
15424
Martin v. Löwis11437992002-04-12 09:54:03 +000015425cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015426# This file is a shell script that caches the results of configure
15427# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000015428# scripts and configure runs, see configure's option --config-cache.
15429# It is not useful on other systems. If it contains results you don't
15430# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015431#
Martin v. Löwis11437992002-04-12 09:54:03 +000015432# config.status only pays attention to the cache file if you give it
15433# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015434#
Skip Montanaro6dead952003-09-25 14:50:04 +000015435# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000015436# loading this file, other *unset* `ac_cv_foo' will be assigned the
15437# following values.
15438
15439_ACEOF
15440
Guido van Rossumf78abae1997-01-21 22:02:36 +000015441# The following way of writing the cache mishandles newlines in values,
15442# but we know of no workaround that is simple, portable, and efficient.
Martin v. Löwiseba40652007-08-30 20:10:57 +000015443# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015444# Ultrix sh set writes to stderr and can't be redirected directly,
15445# and sets the high bit in the cache file unless we assign to the vars.
Martin v. Löwiseba40652007-08-30 20:10:57 +000015446(
15447 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
15448 eval ac_val=\$$ac_var
15449 case $ac_val in #(
15450 *${as_nl}*)
15451 case $ac_var in #(
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015452 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
15453$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015454 esac
15455 case $ac_var in #(
15456 _ | IFS | as_nl) ;; #(
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015457 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
15458 *) { eval $ac_var=; unset $ac_var;} ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015459 esac ;;
15460 esac
15461 done
15462
Martin v. Löwis11437992002-04-12 09:54:03 +000015463 (set) 2>&1 |
Martin v. Löwiseba40652007-08-30 20:10:57 +000015464 case $as_nl`(ac_space=' '; set) 2>&1` in #(
15465 *${as_nl}ac_space=\ *)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015466 # `set' does not quote correctly, so add quotes: double-quote
15467 # substitution turns \\\\ into \\, and sed turns \\ into \.
Martin v. Löwis11437992002-04-12 09:54:03 +000015468 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015469 "s/'/'\\\\''/g;
15470 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Martin v. Löwiseba40652007-08-30 20:10:57 +000015471 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000015472 *)
15473 # `set' quotes correctly as required by POSIX, so do not add quotes.
Martin v. Löwiseba40652007-08-30 20:10:57 +000015474 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000015475 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015476 esac |
15477 sort
15478) |
Martin v. Löwis11437992002-04-12 09:54:03 +000015479 sed '
Martin v. Löwiseba40652007-08-30 20:10:57 +000015480 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000015481 t clear
Martin v. Löwiseba40652007-08-30 20:10:57 +000015482 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000015483 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
15484 t end
Martin v. Löwiseba40652007-08-30 20:10:57 +000015485 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
15486 :end' >>confcache
15487if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
15488 if test -w "$cache_file"; then
Matthias Klose3cef2a92012-03-14 23:39:33 +010015489 if test "x$cache_file" != "x/dev/null"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015490 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
15491$as_echo "$as_me: updating cache $cache_file" >&6;}
Matthias Klose3cef2a92012-03-14 23:39:33 +010015492 if test ! -f "$cache_file" || test -h "$cache_file"; then
15493 cat confcache >"$cache_file"
15494 else
15495 case $cache_file in #(
15496 */* | ?:*)
15497 mv -f confcache "$cache_file"$$ &&
15498 mv -f "$cache_file"$$ "$cache_file" ;; #(
15499 *)
15500 mv -f confcache "$cache_file" ;;
15501 esac
15502 fi
15503 fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015504 else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015505 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
15506$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015507 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015508fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015509rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000015510
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015511test "x$prefix" = xNONE && prefix=$ac_default_prefix
15512# Let make expand exec_prefix.
15513test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000015514
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015515DEFS=-DHAVE_CONFIG_H
15516
Skip Montanaro6dead952003-09-25 14:50:04 +000015517ac_libobjs=
15518ac_ltlibobjs=
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015519U=
Skip Montanaro6dead952003-09-25 14:50:04 +000015520for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
15521 # 1. Remove the extension, and $U if already installed.
Martin v. Löwiseba40652007-08-30 20:10:57 +000015522 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015523 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
Martin v. Löwiseba40652007-08-30 20:10:57 +000015524 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
15525 # will be set to the directory where LIBOBJS objects are built.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015526 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
15527 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000015528done
15529LIBOBJS=$ac_libobjs
15530
15531LTLIBOBJS=$ac_ltlibobjs
15532
15533
Martin v. Löwis11437992002-04-12 09:54:03 +000015534
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015535
Matthias Klose3cef2a92012-03-14 23:39:33 +010015536: "${CONFIG_STATUS=./config.status}"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015537ac_write_fail=0
Martin v. Löwis11437992002-04-12 09:54:03 +000015538ac_clean_files_save=$ac_clean_files
15539ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015540{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
15541$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
15542as_write_fail=0
15543cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015544#! $SHELL
15545# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000015546# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015547# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000015548# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000015549
Martin v. Löwis11437992002-04-12 09:54:03 +000015550debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000015551ac_cs_recheck=false
15552ac_cs_silent=false
Jack Jansendd19cf82001-12-06 22:36:17 +000015553
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015554SHELL=\${CONFIG_SHELL-$SHELL}
15555export SHELL
15556_ASEOF
15557cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
15558## -------------------- ##
15559## M4sh Initialization. ##
15560## -------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000015561
Martin v. Löwiseba40652007-08-30 20:10:57 +000015562# Be more Bourne compatible
15563DUALCASE=1; export DUALCASE # for MKS sh
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015564if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015565 emulate sh
15566 NULLCMD=:
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015567 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000015568 # is contrary to our usage. Disable this feature.
15569 alias -g '${1+"$@"}'='"$@"'
Martin v. Löwiseba40652007-08-30 20:10:57 +000015570 setopt NO_GLOB_SUBST
Skip Montanaro89e975f2007-08-22 19:05:21 +000015571else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015572 case `(set -o) 2>/dev/null` in #(
15573 *posix*) :
15574 set -o posix ;; #(
15575 *) :
15576 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015577esac
Martin v. Löwis11437992002-04-12 09:54:03 +000015578fi
Michael W. Hudson54241132001-12-07 15:38:26 +000015579
Skip Montanaro6dead952003-09-25 14:50:04 +000015580
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015581as_nl='
15582'
15583export as_nl
15584# Printing a long string crashes Solaris 7 /usr/bin/printf.
15585as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
15586as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
15587as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
15588# Prefer a ksh shell builtin over an external printf program on Solaris,
15589# but without wasting forks for bash or zsh.
15590if test -z "$BASH_VERSION$ZSH_VERSION" \
15591 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
15592 as_echo='print -r --'
15593 as_echo_n='print -rn --'
15594elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
15595 as_echo='printf %s\n'
15596 as_echo_n='printf %s'
15597else
15598 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
15599 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
15600 as_echo_n='/usr/ucb/echo -n'
15601 else
15602 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
15603 as_echo_n_body='eval
15604 arg=$1;
15605 case $arg in #(
15606 *"$as_nl"*)
15607 expr "X$arg" : "X\\(.*\\)$as_nl";
15608 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
15609 esac;
15610 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
15611 '
15612 export as_echo_n_body
15613 as_echo_n='sh -c $as_echo_n_body as_echo'
15614 fi
15615 export as_echo_body
15616 as_echo='sh -c $as_echo_body as_echo'
15617fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015618
15619# The user is always right.
15620if test "${PATH_SEPARATOR+set}" != set; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015621 PATH_SEPARATOR=:
15622 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
15623 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
15624 PATH_SEPARATOR=';'
15625 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000015626fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015627
Martin v. Löwiseba40652007-08-30 20:10:57 +000015628
15629# IFS
15630# We need space, tab and new line, in precisely that order. Quoting is
15631# there to prevent editors from complaining about space-tab.
15632# (If _AS_PATH_WALK were called with IFS unset, it would disable word
15633# splitting by setting IFS to empty value.)
Martin v. Löwiseba40652007-08-30 20:10:57 +000015634IFS=" "" $as_nl"
15635
15636# Find who we are. Look in the path if we contain no directory separator.
Matthias Klose3cef2a92012-03-14 23:39:33 +010015637as_myself=
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015638case $0 in #((
Martin v. Löwiseba40652007-08-30 20:10:57 +000015639 *[\\/]* ) as_myself=$0 ;;
15640 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000015641for as_dir in $PATH
15642do
15643 IFS=$as_save_IFS
15644 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015645 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
15646 done
Martin v. Löwiseba40652007-08-30 20:10:57 +000015647IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000015648
Martin v. Löwiseba40652007-08-30 20:10:57 +000015649 ;;
15650esac
15651# We did not find ourselves, most probably we were run as `sh COMMAND'
15652# in which case we are not to be found in the path.
15653if test "x$as_myself" = x; then
15654 as_myself=$0
15655fi
15656if test ! -f "$as_myself"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015657 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
15658 exit 1
Martin v. Löwiseba40652007-08-30 20:10:57 +000015659fi
15660
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015661# Unset variables that we do not need and which cause bugs (e.g. in
15662# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
15663# suppresses any "Segmentation fault" message there. '((' could
15664# trigger a bug in pdksh 5.2.14.
15665for as_var in BASH_ENV ENV MAIL MAILPATH
15666do eval test x\${$as_var+set} = xset \
15667 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Martin v. Löwiseba40652007-08-30 20:10:57 +000015668done
15669PS1='$ '
15670PS2='> '
15671PS4='+ '
15672
15673# NLS nuisances.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015674LC_ALL=C
15675export LC_ALL
15676LANGUAGE=C
15677export LANGUAGE
Martin v. Löwiseba40652007-08-30 20:10:57 +000015678
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015679# CDPATH.
15680(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
15681
15682
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015683# as_fn_error STATUS ERROR [LINENO LOG_FD]
15684# ----------------------------------------
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015685# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
15686# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015687# script with STATUS, using 1 if that was 0.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015688as_fn_error ()
15689{
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015690 as_status=$1; test $as_status -eq 0 && as_status=1
15691 if test "$4"; then
15692 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
15693 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015694 fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015695 $as_echo "$as_me: error: $2" >&2
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015696 as_fn_exit $as_status
15697} # as_fn_error
15698
15699
15700# as_fn_set_status STATUS
15701# -----------------------
15702# Set $? to STATUS, without forking.
15703as_fn_set_status ()
15704{
15705 return $1
15706} # as_fn_set_status
15707
15708# as_fn_exit STATUS
15709# -----------------
15710# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
15711as_fn_exit ()
15712{
15713 set +e
15714 as_fn_set_status $1
15715 exit $1
15716} # as_fn_exit
15717
15718# as_fn_unset VAR
15719# ---------------
15720# Portably unset VAR.
15721as_fn_unset ()
15722{
15723 { eval $1=; unset $1;}
15724}
15725as_unset=as_fn_unset
15726# as_fn_append VAR VALUE
15727# ----------------------
15728# Append the text in VALUE to the end of the definition contained in VAR. Take
15729# advantage of any shell optimizations that allow amortized linear growth over
15730# repeated appends, instead of the typical quadratic growth present in naive
15731# implementations.
15732if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
15733 eval 'as_fn_append ()
15734 {
15735 eval $1+=\$2
15736 }'
15737else
15738 as_fn_append ()
15739 {
15740 eval $1=\$$1\$2
15741 }
15742fi # as_fn_append
15743
15744# as_fn_arith ARG...
15745# ------------------
15746# Perform arithmetic evaluation on the ARGs, and store the result in the
15747# global $as_val. Take advantage of shells that can avoid forks. The arguments
15748# must be portable across $(()) and expr.
15749if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
15750 eval 'as_fn_arith ()
15751 {
15752 as_val=$(( $* ))
15753 }'
15754else
15755 as_fn_arith ()
15756 {
15757 as_val=`expr "$@" || test $? -eq 1`
15758 }
15759fi # as_fn_arith
15760
15761
Martin v. Löwiseba40652007-08-30 20:10:57 +000015762if expr a : '\(a\)' >/dev/null 2>&1 &&
15763 test "X`expr 00001 : '.*\(...\)'`" = X001; then
15764 as_expr=expr
15765else
15766 as_expr=false
15767fi
15768
15769if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
15770 as_basename=basename
15771else
15772 as_basename=false
15773fi
15774
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015775if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
15776 as_dirname=dirname
15777else
15778 as_dirname=false
15779fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015780
Martin v. Löwiseba40652007-08-30 20:10:57 +000015781as_me=`$as_basename -- "$0" ||
15782$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
15783 X"$0" : 'X\(//\)$' \| \
15784 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015785$as_echo X/"$0" |
Martin v. Löwiseba40652007-08-30 20:10:57 +000015786 sed '/^.*\/\([^/][^/]*\)\/*$/{
15787 s//\1/
15788 q
15789 }
15790 /^X\/\(\/\/\)$/{
15791 s//\1/
15792 q
15793 }
15794 /^X\/\(\/\).*/{
15795 s//\1/
15796 q
15797 }
15798 s/.*/./; q'`
15799
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015800# Avoid depending upon Character Ranges.
15801as_cr_letters='abcdefghijklmnopqrstuvwxyz'
15802as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
15803as_cr_Letters=$as_cr_letters$as_cr_LETTERS
15804as_cr_digits='0123456789'
15805as_cr_alnum=$as_cr_Letters$as_cr_digits
Martin v. Löwiseba40652007-08-30 20:10:57 +000015806
15807ECHO_C= ECHO_N= ECHO_T=
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015808case `echo -n x` in #(((((
Martin v. Löwiseba40652007-08-30 20:10:57 +000015809-n*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015810 case `echo 'xy\c'` in
Martin v. Löwiseba40652007-08-30 20:10:57 +000015811 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015812 xy) ECHO_C='\c';;
15813 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
15814 ECHO_T=' ';;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015815 esac;;
15816*)
15817 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000015818esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015819
Martin v. Löwis11437992002-04-12 09:54:03 +000015820rm -f conf$$ conf$$.exe conf$$.file
Martin v. Löwiseba40652007-08-30 20:10:57 +000015821if test -d conf$$.dir; then
15822 rm -f conf$$.dir/conf$$.file
15823else
15824 rm -f conf$$.dir
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015825 mkdir conf$$.dir 2>/dev/null
Martin v. Löwiseba40652007-08-30 20:10:57 +000015826fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015827if (echo >conf$$.file) 2>/dev/null; then
15828 if ln -s conf$$.file conf$$ 2>/dev/null; then
15829 as_ln_s='ln -s'
15830 # ... but there are two gotchas:
15831 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
15832 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
Charles-François Natalibe2b9072013-01-08 19:47:00 +010015833 # In both cases, we have to default to `cp -pR'.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015834 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Charles-François Natalibe2b9072013-01-08 19:47:00 +010015835 as_ln_s='cp -pR'
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015836 elif ln conf$$.file conf$$ 2>/dev/null; then
15837 as_ln_s=ln
15838 else
Charles-François Natalibe2b9072013-01-08 19:47:00 +010015839 as_ln_s='cp -pR'
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015840 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015841else
Charles-François Natalibe2b9072013-01-08 19:47:00 +010015842 as_ln_s='cp -pR'
Martin v. Löwis11437992002-04-12 09:54:03 +000015843fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015844rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
15845rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000015846
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015847
15848# as_fn_mkdir_p
15849# -------------
15850# Create "$as_dir" as a directory, including parents if necessary.
15851as_fn_mkdir_p ()
15852{
15853
15854 case $as_dir in #(
15855 -*) as_dir=./$as_dir;;
15856 esac
15857 test -d "$as_dir" || eval $as_mkdir_p || {
15858 as_dirs=
15859 while :; do
15860 case $as_dir in #(
15861 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
15862 *) as_qdir=$as_dir;;
15863 esac
15864 as_dirs="'$as_qdir' $as_dirs"
15865 as_dir=`$as_dirname -- "$as_dir" ||
15866$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
15867 X"$as_dir" : 'X\(//\)[^/]' \| \
15868 X"$as_dir" : 'X\(//\)$' \| \
15869 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
15870$as_echo X"$as_dir" |
15871 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
15872 s//\1/
15873 q
15874 }
15875 /^X\(\/\/\)[^/].*/{
15876 s//\1/
15877 q
15878 }
15879 /^X\(\/\/\)$/{
15880 s//\1/
15881 q
15882 }
15883 /^X\(\/\).*/{
15884 s//\1/
15885 q
15886 }
15887 s/.*/./; q'`
15888 test -d "$as_dir" && break
15889 done
15890 test -z "$as_dirs" || eval "mkdir $as_dirs"
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015891 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015892
15893
15894} # as_fn_mkdir_p
Skip Montanaro6dead952003-09-25 14:50:04 +000015895if mkdir -p . 2>/dev/null; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015896 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +000015897else
Skip Montanarof0d5f792004-08-15 14:08:23 +000015898 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000015899 as_mkdir_p=false
15900fi
15901
Charles-François Natalibe2b9072013-01-08 19:47:00 +010015902
15903# as_fn_executable_p FILE
15904# -----------------------
15905# Test if FILE is an executable regular file.
15906as_fn_executable_p ()
15907{
15908 test -f "$1" && test -x "$1"
15909} # as_fn_executable_p
15910as_test_x='test -x'
15911as_executable_p=as_fn_executable_p
Martin v. Löwis11437992002-04-12 09:54:03 +000015912
15913# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000015914as_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 +000015915
15916# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000015917as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000015918
15919
Martin v. Löwis11437992002-04-12 09:54:03 +000015920exec 6>&1
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015921## ----------------------------------- ##
15922## Main body of $CONFIG_STATUS script. ##
15923## ----------------------------------- ##
15924_ASEOF
15925test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015926
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015927cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15928# Save the log message, to keep $0 and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000015929# report actual input values of CONFIG_FILES etc. instead of their
Martin v. Löwiseba40652007-08-30 20:10:57 +000015930# values after options handling.
15931ac_log="
Martin v. Löwis174440b2008-10-03 08:59:41 +000015932This file was extended by python $as_me 2.7, which was
Charles-François Natalibe2b9072013-01-08 19:47:00 +010015933generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000015934
15935 CONFIG_FILES = $CONFIG_FILES
15936 CONFIG_HEADERS = $CONFIG_HEADERS
15937 CONFIG_LINKS = $CONFIG_LINKS
15938 CONFIG_COMMANDS = $CONFIG_COMMANDS
15939 $ $0 $@
15940
Martin v. Löwiseba40652007-08-30 20:10:57 +000015941on `(hostname || uname -n) 2>/dev/null | sed 1q`
15942"
15943
Martin v. Löwis11437992002-04-12 09:54:03 +000015944_ACEOF
15945
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015946case $ac_config_files in *"
15947"*) set x $ac_config_files; shift; ac_config_files=$*;;
15948esac
15949
15950case $ac_config_headers in *"
15951"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
15952esac
15953
15954
15955cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015956# Files that config.status was made for.
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015957config_files="$ac_config_files"
15958config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000015959
Martin v. Löwiseba40652007-08-30 20:10:57 +000015960_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000015961
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015962cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015963ac_cs_usage="\
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015964\`$as_me' instantiates files and other configuration actions
15965from templates according to the current configuration. Unless the files
15966and actions are specified as TAGs, all are instantiated by default.
Martin v. Löwis11437992002-04-12 09:54:03 +000015967
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015968Usage: $0 [OPTION]... [TAG]...
Martin v. Löwis11437992002-04-12 09:54:03 +000015969
15970 -h, --help print this help, then exit
Martin v. Löwiseba40652007-08-30 20:10:57 +000015971 -V, --version print version number and configuration settings, then exit
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015972 --config print configuration, then exit
15973 -q, --quiet, --silent
15974 do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000015975 -d, --debug don't remove temporary files
15976 --recheck update $as_me by reconfiguring in the same conditions
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015977 --file=FILE[:TEMPLATE]
15978 instantiate the configuration file FILE
15979 --header=FILE[:TEMPLATE]
15980 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000015981
15982Configuration files:
15983$config_files
15984
15985Configuration headers:
15986$config_headers
15987
Benjamin Petersoncc8929b2016-08-03 22:01:32 -070015988Report bugs to <https://bugs.python.org/>."
Skip Montanaro89e975f2007-08-22 19:05:21 +000015989
Martin v. Löwiseba40652007-08-30 20:10:57 +000015990_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015991cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15992ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
Martin v. Löwis11437992002-04-12 09:54:03 +000015993ac_cs_version="\\
Martin v. Löwis174440b2008-10-03 08:59:41 +000015994python config.status 2.7
Charles-François Natalibe2b9072013-01-08 19:47:00 +010015995configured by $0, generated by GNU Autoconf 2.69,
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015996 with options \\"\$ac_cs_config\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000015997
Charles-François Natalibe2b9072013-01-08 19:47:00 +010015998Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000015999This config.status script is free software; the Free Software Foundation
16000gives unlimited permission to copy, distribute and modify it."
Martin v. Löwiseba40652007-08-30 20:10:57 +000016001
16002ac_pwd='$ac_pwd'
16003srcdir='$srcdir'
16004INSTALL='$INSTALL'
Trent Nelsonf6407a12012-08-30 14:56:13 +000016005MKDIR_P='$MKDIR_P'
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016006test -n "\$AWK" || AWK=awk
Martin v. Löwis11437992002-04-12 09:54:03 +000016007_ACEOF
16008
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016009cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16010# The default lists apply if the user does not specify any file.
Martin v. Löwis11437992002-04-12 09:54:03 +000016011ac_need_defaults=:
16012while test $# != 0
16013do
16014 case $1 in
Georg Brandl71f4fbb2011-02-25 11:04:50 +000016015 --*=?*)
Martin v. Löwiseba40652007-08-30 20:10:57 +000016016 ac_option=`expr "X$1" : 'X\([^=]*\)='`
16017 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000016018 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000016019 ;;
Georg Brandl71f4fbb2011-02-25 11:04:50 +000016020 --*=)
16021 ac_option=`expr "X$1" : 'X\([^=]*\)='`
16022 ac_optarg=
16023 ac_shift=:
16024 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000016025 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000016026 ac_option=$1
16027 ac_optarg=$2
16028 ac_shift=shift
16029 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016030 esac
16031
Skip Montanaro6dead952003-09-25 14:50:04 +000016032 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000016033 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000016034 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
16035 ac_cs_recheck=: ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000016036 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016037 $as_echo "$ac_cs_version"; exit ;;
16038 --config | --confi | --conf | --con | --co | --c )
16039 $as_echo "$ac_cs_config"; exit ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000016040 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000016041 debug=: ;;
16042 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000016043 $ac_shift
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016044 case $ac_optarg in
16045 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
Georg Brandl71f4fbb2011-02-25 11:04:50 +000016046 '') as_fn_error $? "missing file argument" ;;
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016047 esac
16048 as_fn_append CONFIG_FILES " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000016049 ac_need_defaults=false;;
16050 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000016051 $ac_shift
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016052 case $ac_optarg in
16053 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
16054 esac
16055 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000016056 ac_need_defaults=false;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000016057 --he | --h)
16058 # Conflict between --help and --header
Georg Brandl71f4fbb2011-02-25 11:04:50 +000016059 as_fn_error $? "ambiguous option: \`$1'
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016060Try \`$0 --help' for more information.";;
Martin v. Löwiseba40652007-08-30 20:10:57 +000016061 --help | --hel | -h )
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016062 $as_echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000016063 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
16064 | -silent | --silent | --silen | --sile | --sil | --si | --s)
16065 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016066
16067 # This is an error.
Georg Brandl71f4fbb2011-02-25 11:04:50 +000016068 -*) as_fn_error $? "unrecognized option: \`$1'
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016069Try \`$0 --help' for more information." ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016070
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016071 *) as_fn_append ac_config_targets " $1"
Martin v. Löwiseba40652007-08-30 20:10:57 +000016072 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016073
16074 esac
16075 shift
16076done
16077
Skip Montanaro6dead952003-09-25 14:50:04 +000016078ac_configure_extra_args=
16079
16080if $ac_cs_silent; then
16081 exec 6>/dev/null
16082 ac_configure_extra_args="$ac_configure_extra_args --silent"
16083fi
16084
16085_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016086cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Skip Montanaro6dead952003-09-25 14:50:04 +000016087if \$ac_cs_recheck; then
Charles-François Natalibe2b9072013-01-08 19:47:00 +010016088 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016089 shift
16090 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
16091 CONFIG_SHELL='$SHELL'
Martin v. Löwiseba40652007-08-30 20:10:57 +000016092 export CONFIG_SHELL
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016093 exec "\$@"
Skip Montanaro6dead952003-09-25 14:50:04 +000016094fi
16095
Martin v. Löwis11437992002-04-12 09:54:03 +000016096_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016097cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwiseba40652007-08-30 20:10:57 +000016098exec 5>>config.log
16099{
16100 echo
16101 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
16102## Running $as_me. ##
16103_ASBOX
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016104 $as_echo "$ac_log"
Martin v. Löwiseba40652007-08-30 20:10:57 +000016105} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016106
Martin v. Löwiseba40652007-08-30 20:10:57 +000016107_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016108cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwiseba40652007-08-30 20:10:57 +000016109_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000016110
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016111cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwiseba40652007-08-30 20:10:57 +000016112
16113# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000016114for ac_config_target in $ac_config_targets
16115do
Martin v. Löwiseba40652007-08-30 20:10:57 +000016116 case $ac_config_target in
16117 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
16118 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
16119 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
16120 "Mac/IDLE/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/IDLE/Makefile" ;;
Ronald Oussoren580c7fe2008-05-02 19:45:11 +000016121 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
16122 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000016123 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
16124 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
Antoine Pitrouf2caeed2009-05-24 20:23:57 +000016125 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
Antoine Pitrouaabdceb2010-09-10 20:03:17 +000016126 "Modules/ld_so_aix") CONFIG_FILES="$CONFIG_FILES Modules/ld_so_aix" ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000016127
Matthias Klose3cef2a92012-03-14 23:39:33 +010016128 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016129 esac
16130done
16131
Martin v. Löwiseba40652007-08-30 20:10:57 +000016132
Martin v. Löwis11437992002-04-12 09:54:03 +000016133# If the user did not use the arguments to specify the items to instantiate,
16134# then the envvar interface is used. Set only those that are not.
16135# We use the long form for the default assignment because of an extremely
16136# bizarre bug on SunOS 4.1.3.
16137if $ac_need_defaults; then
16138 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
16139 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
16140fi
16141
Skip Montanaro6dead952003-09-25 14:50:04 +000016142# Have a temporary directory for convenience. Make it in the build tree
Martin v. Löwiseba40652007-08-30 20:10:57 +000016143# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000016144# creating and moving files from /tmp can sometimes cause problems.
Martin v. Löwiseba40652007-08-30 20:10:57 +000016145# Hook for its removal unless debugging.
16146# Note that there is a small window in which the directory will not be cleaned:
16147# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000016148$debug ||
16149{
Matthias Klose3cef2a92012-03-14 23:39:33 +010016150 tmp= ac_tmp=
Martin v. Löwiseba40652007-08-30 20:10:57 +000016151 trap 'exit_status=$?
Matthias Klose3cef2a92012-03-14 23:39:33 +010016152 : "${ac_tmp:=$tmp}"
16153 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
Martin v. Löwiseba40652007-08-30 20:10:57 +000016154' 0
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016155 trap 'as_fn_exit 1' 1 2 13 15
Martin v. Löwis11437992002-04-12 09:54:03 +000016156}
Martin v. Löwis11437992002-04-12 09:54:03 +000016157# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000016158
Martin v. Löwis11437992002-04-12 09:54:03 +000016159{
Martin v. Löwiseba40652007-08-30 20:10:57 +000016160 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Matthias Klose3cef2a92012-03-14 23:39:33 +010016161 test -d "$tmp"
Martin v. Löwis11437992002-04-12 09:54:03 +000016162} ||
16163{
Martin v. Löwiseba40652007-08-30 20:10:57 +000016164 tmp=./conf$$-$RANDOM
16165 (umask 077 && mkdir "$tmp")
Georg Brandl71f4fbb2011-02-25 11:04:50 +000016166} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
Matthias Klose3cef2a92012-03-14 23:39:33 +010016167ac_tmp=$tmp
Martin v. Löwis11437992002-04-12 09:54:03 +000016168
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016169# Set up the scripts for CONFIG_FILES section.
16170# No need to generate them if there are no CONFIG_FILES.
16171# This happens for instance with `./config.status config.h'.
Martin v. Löwiseba40652007-08-30 20:10:57 +000016172if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016173
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016174
16175ac_cr=`echo X | tr X '\015'`
16176# On cygwin, bash can eat \r inside `` if the user requested igncr.
16177# But we know of no other shell where ac_cr would be empty at this
16178# point, so we can use a bashism as a fallback.
16179if test "x$ac_cr" = x; then
16180 eval ac_cr=\$\'\\r\'
16181fi
16182ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
16183if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +000016184 ac_cs_awk_cr='\\r'
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016185else
16186 ac_cs_awk_cr=$ac_cr
16187fi
16188
Matthias Klose3cef2a92012-03-14 23:39:33 +010016189echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
Martin v. Löwis11437992002-04-12 09:54:03 +000016190_ACEOF
16191
Martin v. Löwiseba40652007-08-30 20:10:57 +000016192
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016193{
16194 echo "cat >conf$$subs.awk <<_ACEOF" &&
16195 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
16196 echo "_ACEOF"
16197} >conf$$subs.sh ||
Georg Brandl71f4fbb2011-02-25 11:04:50 +000016198 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
16199ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
Martin v. Löwiseba40652007-08-30 20:10:57 +000016200ac_delim='%!_!# '
16201for ac_last_try in false false false false false :; do
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016202 . ./conf$$subs.sh ||
Georg Brandl71f4fbb2011-02-25 11:04:50 +000016203 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016204
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016205 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
16206 if test $ac_delim_n = $ac_delim_num; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000016207 break
16208 elif $ac_last_try; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +000016209 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016210 else
16211 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000016212 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016213done
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016214rm -f conf$$subs.sh
Martin v. Löwiseba40652007-08-30 20:10:57 +000016215
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016216cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Matthias Klose3cef2a92012-03-14 23:39:33 +010016217cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
Martin v. Löwiseba40652007-08-30 20:10:57 +000016218_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016219sed -n '
16220h
16221s/^/S["/; s/!.*/"]=/
16222p
16223g
16224s/^[^!]*!//
16225:repl
16226t repl
16227s/'"$ac_delim"'$//
16228t delim
16229:nl
16230h
16231s/\(.\{148\}\)..*/\1/
16232t more1
16233s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
16234p
16235n
16236b repl
16237:more1
16238s/["\\]/\\&/g; s/^/"/; s/$/"\\/
16239p
16240g
16241s/.\{148\}//
16242t nl
16243:delim
16244h
16245s/\(.\{148\}\)..*/\1/
16246t more2
16247s/["\\]/\\&/g; s/^/"/; s/$/"/
16248p
16249b
16250:more2
16251s/["\\]/\\&/g; s/^/"/; s/$/"\\/
16252p
16253g
16254s/.\{148\}//
16255t delim
16256' <conf$$subs.awk | sed '
16257/^[^""]/{
16258 N
16259 s/\n//
16260}
16261' >>$CONFIG_STATUS || ac_write_fail=1
16262rm -f conf$$subs.awk
16263cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16264_ACAWK
Matthias Klose3cef2a92012-03-14 23:39:33 +010016265cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016266 for (key in S) S_is_set[key] = 1
16267 FS = ""
16268
16269}
16270{
16271 line = $ 0
16272 nfields = split(line, field, "@")
16273 substed = 0
16274 len = length(field[1])
16275 for (i = 2; i < nfields; i++) {
16276 key = field[i]
16277 keylen = length(key)
16278 if (S_is_set[key]) {
16279 value = S[key]
16280 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
16281 len += length(value) + length(field[++i])
16282 substed = 1
16283 } else
16284 len += 1 + keylen
16285 }
16286
16287 print line
16288}
16289
16290_ACAWK
Martin v. Löwiseba40652007-08-30 20:10:57 +000016291_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016292cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16293if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
16294 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
16295else
16296 cat
Matthias Klose3cef2a92012-03-14 23:39:33 +010016297fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
Georg Brandl71f4fbb2011-02-25 11:04:50 +000016298 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016299_ACEOF
16300
Georg Brandl71f4fbb2011-02-25 11:04:50 +000016301# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
16302# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
Martin v. Löwiseba40652007-08-30 20:10:57 +000016303# trailing colons and then remove the whole line if VPATH becomes empty
16304# (actually we leave an empty line to preserve line numbers).
16305if test "x$srcdir" = x.; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +000016306 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
16307h
16308s///
16309s/^/:/
16310s/[ ]*$/:/
16311s/:\$(srcdir):/:/g
16312s/:\${srcdir}:/:/g
16313s/:@srcdir@:/:/g
16314s/^:*//
Martin v. Löwiseba40652007-08-30 20:10:57 +000016315s/:*$//
Georg Brandl71f4fbb2011-02-25 11:04:50 +000016316x
16317s/\(=[ ]*\).*/\1/
16318G
16319s/\n//
Martin v. Löwiseba40652007-08-30 20:10:57 +000016320s/^[^=]*=[ ]*$//
16321}'
16322fi
16323
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016324cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016325fi # test -n "$CONFIG_FILES"
16326
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016327# Set up the scripts for CONFIG_HEADERS section.
16328# No need to generate them if there are no CONFIG_HEADERS.
16329# This happens for instance with `./config.status Makefile'.
16330if test -n "$CONFIG_HEADERS"; then
Matthias Klose3cef2a92012-03-14 23:39:33 +010016331cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016332BEGIN {
16333_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000016334
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016335# Transform confdefs.h into an awk script `defines.awk', embedded as
16336# here-document in config.status, that substitutes the proper values into
16337# config.h.in to produce config.h.
16338
16339# Create a delimiter string that does not exist in confdefs.h, to ease
16340# handling of long lines.
16341ac_delim='%!_!# '
16342for ac_last_try in false false :; do
Matthias Klose3cef2a92012-03-14 23:39:33 +010016343 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
16344 if test -z "$ac_tt"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016345 break
16346 elif $ac_last_try; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +000016347 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016348 else
16349 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
16350 fi
16351done
16352
16353# For the awk script, D is an array of macro values keyed by name,
16354# likewise P contains macro parameters if any. Preserve backslash
16355# newline sequences.
16356
16357ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
16358sed -n '
16359s/.\{148\}/&'"$ac_delim"'/g
16360t rset
16361:rset
16362s/^[ ]*#[ ]*define[ ][ ]*/ /
16363t def
16364d
16365:def
16366s/\\$//
16367t bsnl
16368s/["\\]/\\&/g
16369s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
16370D["\1"]=" \3"/p
16371s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
16372d
16373:bsnl
16374s/["\\]/\\&/g
16375s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
16376D["\1"]=" \3\\\\\\n"\\/p
16377t cont
16378s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
16379t cont
16380d
16381:cont
16382n
16383s/.\{148\}/&'"$ac_delim"'/g
16384t clear
16385:clear
16386s/\\$//
16387t bsnlc
16388s/["\\]/\\&/g; s/^/"/; s/$/"/p
16389d
16390:bsnlc
16391s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
16392b cont
16393' <confdefs.h | sed '
16394s/'"$ac_delim"'/"\\\
16395"/g' >>$CONFIG_STATUS || ac_write_fail=1
16396
16397cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16398 for (key in D) D_is_set[key] = 1
16399 FS = ""
16400}
16401/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
16402 line = \$ 0
16403 split(line, arg, " ")
16404 if (arg[1] == "#") {
16405 defundef = arg[2]
16406 mac1 = arg[3]
16407 } else {
16408 defundef = substr(arg[1], 2)
16409 mac1 = arg[2]
16410 }
16411 split(mac1, mac2, "(") #)
16412 macro = mac2[1]
16413 prefix = substr(line, 1, index(line, defundef) - 1)
16414 if (D_is_set[macro]) {
16415 # Preserve the white space surrounding the "#".
16416 print prefix "define", macro P[macro] D[macro]
16417 next
16418 } else {
16419 # Replace #undef with comments. This is necessary, for example,
16420 # in the case of _POSIX_SOURCE, which is predefined and required
16421 # on some systems where configure will not decide to define it.
16422 if (defundef == "undef") {
16423 print "/*", prefix defundef, macro, "*/"
16424 next
16425 }
16426 }
16427}
16428{ print }
16429_ACAWK
16430_ACEOF
16431cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Georg Brandl71f4fbb2011-02-25 11:04:50 +000016432 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016433fi # test -n "$CONFIG_HEADERS"
16434
16435
16436eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
16437shift
16438for ac_tag
Martin v. Löwiseba40652007-08-30 20:10:57 +000016439do
16440 case $ac_tag in
16441 :[FHLC]) ac_mode=$ac_tag; continue;;
16442 esac
16443 case $ac_mode$ac_tag in
16444 :[FHL]*:*);;
Matthias Klose3cef2a92012-03-14 23:39:33 +010016445 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000016446 :[FH]-) ac_tag=-:-;;
16447 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
16448 esac
16449 ac_save_IFS=$IFS
16450 IFS=:
16451 set x $ac_tag
16452 IFS=$ac_save_IFS
16453 shift
16454 ac_file=$1
16455 shift
16456
16457 case $ac_mode in
16458 :L) ac_source=$1;;
16459 :[FH])
16460 ac_file_inputs=
16461 for ac_f
16462 do
16463 case $ac_f in
Matthias Klose3cef2a92012-03-14 23:39:33 +010016464 -) ac_f="$ac_tmp/stdin";;
Martin v. Löwiseba40652007-08-30 20:10:57 +000016465 *) # Look for the file first in the build tree, then in the source tree
16466 # (if the path is not absolute). The absolute path cannot be DOS-style,
16467 # because $ac_f cannot contain `:'.
16468 test -f "$ac_f" ||
16469 case $ac_f in
16470 [\\/$]*) false;;
16471 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
16472 esac ||
Matthias Klose3cef2a92012-03-14 23:39:33 +010016473 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000016474 esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016475 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
16476 as_fn_append ac_file_inputs " '$ac_f'"
Martin v. Löwiseba40652007-08-30 20:10:57 +000016477 done
16478
16479 # Let's still pretend it is `configure' which instantiates (i.e., don't
16480 # use $as_me), people would be surprised to read:
16481 # /* config.h. Generated by config.status. */
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016482 configure_input='Generated from '`
16483 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
16484 `' by configure.'
Martin v. Löwiseba40652007-08-30 20:10:57 +000016485 if test x"$ac_file" != x-; then
16486 configure_input="$ac_file. $configure_input"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016487 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
16488$as_echo "$as_me: creating $ac_file" >&6;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000016489 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016490 # Neutralize special characters interpreted by sed in replacement strings.
16491 case $configure_input in #(
16492 *\&* | *\|* | *\\* )
16493 ac_sed_conf_input=`$as_echo "$configure_input" |
16494 sed 's/[\\\\&|]/\\\\&/g'`;; #(
16495 *) ac_sed_conf_input=$configure_input;;
16496 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000016497
16498 case $ac_tag in
Matthias Klose3cef2a92012-03-14 23:39:33 +010016499 *:-:* | *:-) cat >"$ac_tmp/stdin" \
16500 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000016501 esac
16502 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016503 esac
16504
Martin v. Löwiseba40652007-08-30 20:10:57 +000016505 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000016506$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016507 X"$ac_file" : 'X\(//\)[^/]' \| \
16508 X"$ac_file" : 'X\(//\)$' \| \
Martin v. Löwiseba40652007-08-30 20:10:57 +000016509 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016510$as_echo X"$ac_file" |
Martin v. Löwiseba40652007-08-30 20:10:57 +000016511 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
16512 s//\1/
16513 q
16514 }
16515 /^X\(\/\/\)[^/].*/{
16516 s//\1/
16517 q
16518 }
16519 /^X\(\/\/\)$/{
16520 s//\1/
16521 q
16522 }
16523 /^X\(\/\).*/{
16524 s//\1/
16525 q
16526 }
16527 s/.*/./; q'`
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016528 as_dir="$ac_dir"; as_fn_mkdir_p
Martin v. Löwis11437992002-04-12 09:54:03 +000016529 ac_builddir=.
16530
Martin v. Löwiseba40652007-08-30 20:10:57 +000016531case "$ac_dir" in
16532.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
16533*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016534 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Martin v. Löwiseba40652007-08-30 20:10:57 +000016535 # A ".." for each directory in $ac_dir_suffix.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016536 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Martin v. Löwiseba40652007-08-30 20:10:57 +000016537 case $ac_top_builddir_sub in
16538 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
16539 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
16540 esac ;;
16541esac
16542ac_abs_top_builddir=$ac_pwd
16543ac_abs_builddir=$ac_pwd$ac_dir_suffix
16544# for backward compatibility:
16545ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000016546
16547case $srcdir in
Martin v. Löwiseba40652007-08-30 20:10:57 +000016548 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000016549 ac_srcdir=.
Martin v. Löwiseba40652007-08-30 20:10:57 +000016550 ac_top_srcdir=$ac_top_builddir_sub
16551 ac_abs_top_srcdir=$ac_pwd ;;
16552 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000016553 ac_srcdir=$srcdir$ac_dir_suffix;
Martin v. Löwiseba40652007-08-30 20:10:57 +000016554 ac_top_srcdir=$srcdir
16555 ac_abs_top_srcdir=$srcdir ;;
16556 *) # Relative name.
16557 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
16558 ac_top_srcdir=$ac_top_build_prefix$srcdir
16559 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016560esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000016561ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000016562
Martin v. Löwis11437992002-04-12 09:54:03 +000016563
Martin v. Löwiseba40652007-08-30 20:10:57 +000016564 case $ac_mode in
16565 :F)
16566 #
16567 # CONFIG_FILE
16568 #
Martin v. Löwis11437992002-04-12 09:54:03 +000016569
16570 case $INSTALL in
16571 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000016572 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016573 esac
Trent Nelsonf6407a12012-08-30 14:56:13 +000016574 ac_MKDIR_P=$MKDIR_P
16575 case $MKDIR_P in
16576 [\\/$]* | ?:[\\/]* ) ;;
16577 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
16578 esac
Brett Cannon19fab762007-06-02 03:02:29 +000016579_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000016580
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016581cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwiseba40652007-08-30 20:10:57 +000016582# If the template does not know about datarootdir, expand it.
16583# FIXME: This hack should be removed a few years after 2.60.
16584ac_datarootdir_hack=; ac_datarootdir_seen=
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016585ac_sed_dataroot='
16586/datarootdir/ {
Martin v. Löwiseba40652007-08-30 20:10:57 +000016587 p
16588 q
16589}
16590/@datadir@/p
16591/@docdir@/p
16592/@infodir@/p
16593/@localedir@/p
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016594/@mandir@/p'
16595case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
Martin v. Löwiseba40652007-08-30 20:10:57 +000016596*datarootdir*) ac_datarootdir_seen=yes;;
16597*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016598 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
16599$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000016600_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016601cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwiseba40652007-08-30 20:10:57 +000016602 ac_datarootdir_hack='
16603 s&@datadir@&$datadir&g
16604 s&@docdir@&$docdir&g
16605 s&@infodir@&$infodir&g
16606 s&@localedir@&$localedir&g
16607 s&@mandir@&$mandir&g
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016608 s&\\\${datarootdir}&$datarootdir&g' ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000016609esac
16610_ACEOF
16611
16612# Neutralize VPATH when `$srcdir' = `.'.
16613# Shell code in configure.ac might set extrasub.
16614# FIXME: do we really want to maintain this feature?
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016615cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16616ac_sed_extra="$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000016617$extrasub
16618_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016619cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016620:t
16621/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016622s|@configure_input@|$ac_sed_conf_input|;t t
Martin v. Löwiseba40652007-08-30 20:10:57 +000016623s&@top_builddir@&$ac_top_builddir_sub&;t t
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016624s&@top_build_prefix@&$ac_top_build_prefix&;t t
Martin v. Löwiseba40652007-08-30 20:10:57 +000016625s&@srcdir@&$ac_srcdir&;t t
16626s&@abs_srcdir@&$ac_abs_srcdir&;t t
16627s&@top_srcdir@&$ac_top_srcdir&;t t
16628s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
16629s&@builddir@&$ac_builddir&;t t
16630s&@abs_builddir@&$ac_abs_builddir&;t t
16631s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
16632s&@INSTALL@&$ac_INSTALL&;t t
Trent Nelsonf6407a12012-08-30 14:56:13 +000016633s&@MKDIR_P@&$ac_MKDIR_P&;t t
Martin v. Löwiseba40652007-08-30 20:10:57 +000016634$ac_datarootdir_hack
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016635"
Matthias Klose3cef2a92012-03-14 23:39:33 +010016636eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
16637 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016638
Martin v. Löwiseba40652007-08-30 20:10:57 +000016639test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
Matthias Klose3cef2a92012-03-14 23:39:33 +010016640 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
16641 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
16642 "$ac_tmp/out"`; test -z "$ac_out"; } &&
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016643 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Georg Brandl71f4fbb2011-02-25 11:04:50 +000016644which seems to be undefined. Please make sure it is defined" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016645$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Georg Brandl71f4fbb2011-02-25 11:04:50 +000016646which seems to be undefined. Please make sure it is defined" >&2;}
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016647
Matthias Klose3cef2a92012-03-14 23:39:33 +010016648 rm -f "$ac_tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000016649 case $ac_file in
Matthias Klose3cef2a92012-03-14 23:39:33 +010016650 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
16651 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016652 esac \
Georg Brandl71f4fbb2011-02-25 11:04:50 +000016653 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016654 ;;
16655 :H)
16656 #
16657 # CONFIG_HEADER
16658 #
Martin v. Löwis11437992002-04-12 09:54:03 +000016659 if test x"$ac_file" != x-; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016660 {
16661 $as_echo "/* $configure_input */" \
Matthias Klose3cef2a92012-03-14 23:39:33 +010016662 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
16663 } >"$ac_tmp/config.h" \
Georg Brandl71f4fbb2011-02-25 11:04:50 +000016664 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Matthias Klose3cef2a92012-03-14 23:39:33 +010016665 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016666 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
16667$as_echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000016668 else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016669 rm -f "$ac_file"
Matthias Klose3cef2a92012-03-14 23:39:33 +010016670 mv "$ac_tmp/config.h" "$ac_file" \
Georg Brandl71f4fbb2011-02-25 11:04:50 +000016671 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000016672 fi
16673 else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016674 $as_echo "/* $configure_input */" \
Matthias Klose3cef2a92012-03-14 23:39:33 +010016675 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
Georg Brandl71f4fbb2011-02-25 11:04:50 +000016676 || as_fn_error $? "could not create -" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000016677 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016678 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000016679
Martin v. Löwiseba40652007-08-30 20:10:57 +000016680
16681 esac
16682
Antoine Pitrouaabdceb2010-09-10 20:03:17 +000016683
16684 case $ac_file$ac_mode in
16685 "Modules/ld_so_aix":F) chmod +x Modules/ld_so_aix ;;
16686
16687 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000016688done # for ac_tag
16689
Guido van Rossum627b2d71993-12-24 10:39:16 +000016690
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016691as_fn_exit 0
Martin v. Löwis11437992002-04-12 09:54:03 +000016692_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000016693ac_clean_files=$ac_clean_files_save
16694
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016695test $ac_write_fail = 0 ||
Georg Brandl71f4fbb2011-02-25 11:04:50 +000016696 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016697
Martin v. Löwis11437992002-04-12 09:54:03 +000016698
16699# configure is writing to config.log, and then calls config.status.
16700# config.status does its own redirection, appending to config.log.
16701# Unfortunately, on DOS this fails, as config.log is still kept open
16702# by configure, so config.status won't be able to write to it; its
16703# output is simply discarded. So we exec the FD to /dev/null,
16704# effectively closing config.log, so it can be properly (re)opened and
16705# appended to by config.status. When coming back to configure, we
16706# need to make the FD available again.
16707if test "$no_create" != yes; then
16708 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000016709 ac_config_status_args=
16710 test "$silent" = yes &&
16711 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000016712 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000016713 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000016714 exec 5>>config.log
16715 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
16716 # would make configure fail if this is the last instruction.
Georg Brandl71f4fbb2011-02-25 11:04:50 +000016717 $ac_cs_success || as_fn_exit 1
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016718fi
16719if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
16720 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
16721$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000016722fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000016723
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000016724
Martin v. Löwisf7afe952006-04-14 15:16:15 +000016725echo "creating Modules/Setup"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000016726if test ! -f Modules/Setup
16727then
16728 cp $srcdir/Modules/Setup.dist Modules/Setup
16729fi
16730
Martin v. Löwisf7afe952006-04-14 15:16:15 +000016731echo "creating Modules/Setup.local"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000016732if test ! -f Modules/Setup.local
16733then
16734 echo "# Edit this file for local setup changes" >Modules/Setup.local
16735fi
16736
16737echo "creating Makefile"
16738$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
16739 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000016740 Modules/Setup.local Modules/Setup
Skip Montanaro89e975f2007-08-22 19:05:21 +000016741
16742case $ac_sys_system in
16743BeOS)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016744 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
Skip Montanaro89e975f2007-08-22 19:05:21 +000016745
16746 Support for BeOS is deprecated as of Python 2.6.
16747 See PEP 11 for the gory details.
16748 " >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016749$as_echo "$as_me: WARNING:
Skip Montanaro89e975f2007-08-22 19:05:21 +000016750
16751 Support for BeOS is deprecated as of Python 2.6.
16752 See PEP 11 for the gory details.
16753 " >&2;}
16754 ;;
16755*) ;;
16756esac
16757
Neil Schemenauerc761fc82001-02-19 04:50:49 +000016758mv config.c Modules
Gregory P. Smith6d8fdfc2016-09-07 23:28:23 -070016759
16760if test "$Py_OPT" = 'false' -a "$Py_DEBUG" != 'true'; then
16761 echo "" >&6
16762 echo "" >&6
16763 echo "If you want a release build with all optimizations active (LTO, PGO, etc),"
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)b9999152016-11-20 21:19:36 +000016764 echo "please run ./configure --enable-optimizations" >&6
Gregory P. Smith6d8fdfc2016-09-07 23:28:23 -070016765 echo "" >&6
16766 echo "" >&6
16767fi