blob: 03b73c6f1356414d3eaf96b62d4ce29fb189f825 [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
Xiang Zhang95f9e142018-08-20 23:15:07 +08005794 GITVERSION="git --git-dir \$(srcdir)/.git rev-parse --short HEAD"
5795 GITTAG="git --git-dir \$(srcdir)/.git describe --all --always --dirty"
5796 GITBRANCH="git --git-dir \$(srcdir)/.git 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
Victor Stinner319cfb52018-06-22 09:11:33 +02006484
6485 if test "$ac_cv_prog_cc_g" = "yes"
6486 then
6487 # bpo-30345: Add -g to LDFLAGS when compiling with LTO
6488 # to get debug symbols.
6489 LTOFLAGS="$LTOFLAGS -g"
6490 fi
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)c543a0f2016-06-02 23:44:40 +00006491fi
6492
6493
Brett Cannon4ff151a2015-09-18 15:09:42 -07006494# Enable PGO flags.
Zachary Ware6ed42ea2015-12-21 11:43:03 -06006495
6496
6497
6498
6499
Gregory P. Smith794b2912016-09-08 00:07:40 -07006500# Make this work on systems where llvm tools are not installed with their
6501# normal names in the default $PATH (ie: Ubuntu). They exist under the
6502# non-suffixed name in their versioned llvm directory.
6503llvm_bin_dir=''
6504llvm_path="${PATH}"
6505if test "${CC}" = "clang"
6506then
6507 clang_bin=`which clang`
6508 # Some systems install clang elsewhere as a symlink to the real path
6509 # which is where the related llvm tools are located.
6510 if test -L "${clang_bin}"
6511 then
6512 clang_dir=`dirname "${clang_bin}"`
6513 clang_bin=`readlink "${clang_bin}"`
6514 llvm_bin_dir="${clang_dir}/"`dirname "${clang_bin}"`
6515 llvm_path="${llvm_path}${PATH_SEPARATOR}${llvm_bin_dir}"
6516 fi
6517fi
Zachary Ware6ed42ea2015-12-21 11:43:03 -06006518
Gregory P. Smith794b2912016-09-08 00:07:40 -07006519{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
6520$as_echo_n "checking target system type... " >&6; }
6521if ${ac_cv_target+:} false; then :
Brett Cannon4ff151a2015-09-18 15:09:42 -07006522 $as_echo_n "(cached) " >&6
6523else
Gregory P. Smith794b2912016-09-08 00:07:40 -07006524 if test "x$target_alias" = x; then
6525 ac_cv_target=$ac_cv_host
Brett Cannon4ff151a2015-09-18 15:09:42 -07006526else
Gregory P. Smith794b2912016-09-08 00:07:40 -07006527 ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
6528 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
6529fi
6530
6531fi
6532{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
6533$as_echo "$ac_cv_target" >&6; }
6534case $ac_cv_target in
6535*-*-*) ;;
6536*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
6537esac
6538target=$ac_cv_target
6539ac_save_IFS=$IFS; IFS='-'
6540set x $ac_cv_target
6541shift
6542target_cpu=$1
6543target_vendor=$2
6544shift; shift
6545# Remember, the first character of IFS is used to create $*,
6546# except with old shells:
6547target_os=$*
6548IFS=$ac_save_IFS
6549case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
6550
6551
6552# The aliases save the names the user supplied, while $host etc.
6553# will get canonicalized.
6554test -n "$target_alias" &&
6555 test "$program_prefix$program_suffix$program_transform_name" = \
6556 NONENONEs,x,x, &&
6557 program_prefix=${target_alias}-
6558# Extract the first word of "$target_alias-llvm-profdata", so it can be a program name with args.
6559set dummy $target_alias-llvm-profdata; ac_word=$2
6560{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6561$as_echo_n "checking for $ac_word... " >&6; }
6562if ${ac_cv_path_LLVM_PROFDATA+:} false; then :
6563 $as_echo_n "(cached) " >&6
6564else
6565 case $LLVM_PROFDATA in
6566 [\\/]* | ?:[\\/]*)
6567 ac_cv_path_LLVM_PROFDATA="$LLVM_PROFDATA" # Let the user override the test with a path.
6568 ;;
6569 *)
6570 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6571for as_dir in ${llvm_path}
Brett Cannon4ff151a2015-09-18 15:09:42 -07006572do
6573 IFS=$as_save_IFS
6574 test -z "$as_dir" && as_dir=.
6575 for ac_exec_ext in '' $ac_executable_extensions; do
6576 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Gregory P. Smith794b2912016-09-08 00:07:40 -07006577 ac_cv_path_LLVM_PROFDATA="$as_dir/$ac_word$ac_exec_ext"
Brett Cannon4ff151a2015-09-18 15:09:42 -07006578 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6579 break 2
6580 fi
6581done
6582 done
6583IFS=$as_save_IFS
6584
Gregory P. Smith794b2912016-09-08 00:07:40 -07006585 ;;
6586esac
Brett Cannon4ff151a2015-09-18 15:09:42 -07006587fi
Gregory P. Smith794b2912016-09-08 00:07:40 -07006588LLVM_PROFDATA=$ac_cv_path_LLVM_PROFDATA
6589if test -n "$LLVM_PROFDATA"; then
6590 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_PROFDATA" >&5
6591$as_echo "$LLVM_PROFDATA" >&6; }
Brett Cannon4ff151a2015-09-18 15:09:42 -07006592else
6593 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6594$as_echo "no" >&6; }
6595fi
6596
6597
Gregory P. Smith794b2912016-09-08 00:07:40 -07006598if test -z "$ac_cv_path_LLVM_PROFDATA"; then
6599 if test "$build" = "$target"; then
6600 ac_pt_LLVM_PROFDATA=$LLVM_PROFDATA
6601 # Extract the first word of "llvm-profdata", so it can be a program name with args.
6602set dummy llvm-profdata; ac_word=$2
6603{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6604$as_echo_n "checking for $ac_word... " >&6; }
6605if ${ac_cv_path_ac_pt_LLVM_PROFDATA+:} false; then :
6606 $as_echo_n "(cached) " >&6
6607else
6608 case $ac_pt_LLVM_PROFDATA in
6609 [\\/]* | ?:[\\/]*)
6610 ac_cv_path_ac_pt_LLVM_PROFDATA="$ac_pt_LLVM_PROFDATA" # Let the user override the test with a path.
6611 ;;
6612 *)
6613 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6614for as_dir in ${llvm_path}
6615do
6616 IFS=$as_save_IFS
6617 test -z "$as_dir" && as_dir=.
6618 for ac_exec_ext in '' $ac_executable_extensions; do
6619 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6620 ac_cv_path_ac_pt_LLVM_PROFDATA="$as_dir/$ac_word$ac_exec_ext"
6621 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6622 break 2
6623 fi
6624done
6625 done
6626IFS=$as_save_IFS
6627
6628 test -z "$ac_cv_path_ac_pt_LLVM_PROFDATA" && ac_cv_path_ac_pt_LLVM_PROFDATA="''"
6629 ;;
6630esac
6631fi
6632ac_pt_LLVM_PROFDATA=$ac_cv_path_ac_pt_LLVM_PROFDATA
6633if test -n "$ac_pt_LLVM_PROFDATA"; then
6634 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_LLVM_PROFDATA" >&5
6635$as_echo "$ac_pt_LLVM_PROFDATA" >&6; }
6636else
6637 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6638$as_echo "no" >&6; }
6639fi
6640
6641 LLVM_PROFDATA=$ac_pt_LLVM_PROFDATA
6642 else
6643 LLVM_PROFDATA="''"
6644 fi
6645else
6646 LLVM_PROFDATA="$ac_cv_path_LLVM_PROFDATA"
6647fi
6648
6649
6650if test -n "${LLVM_PROFDATA}" -a -x "${LLVM_PROFDATA}"
6651then
6652 LLVM_PROF_FOUND="found"
6653else
6654 LLVM_PROF_FOUND="not-found"
6655fi
6656if test "$ac_sys_system" = "Darwin" -a "${LLVM_PROF_FOUND}" = "not-found"
6657then
6658 found_llvm_profdata=`/usr/bin/xcrun -find llvm-profdata 2>/dev/null`
6659 if test -n "${found_llvm_profdata}"
6660 then
6661 # llvm-profdata isn't directly in $PATH in some cases.
6662 # https://apple.stackexchange.com/questions/197053/
6663 LLVM_PROFDATA='/usr/bin/xcrun llvm-profdata'
6664 LLVM_PROF_FOUND=found
6665 { $as_echo "$as_me:${as_lineno-$LINENO}: llvm-profdata found via xcrun: ${LLVM_PROFDATA}" >&5
6666$as_echo "$as_me: llvm-profdata found via xcrun: ${LLVM_PROFDATA}" >&6;}
6667 fi
6668fi
Brett Cannon4ff151a2015-09-18 15:09:42 -07006669LLVM_PROF_ERR=no
6670case $CC in
6671 *clang*)
6672 # Any changes made here should be reflected in the GCC+Darwin case below
6673 PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
6674 PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd"
Gregory P. Smith794b2912016-09-08 00:07:40 -07006675 LLVM_PROF_MERGER="${LLVM_PROFDATA} merge -output=code.profclangd *.profclangr"
Brett Cannon4ff151a2015-09-18 15:09:42 -07006676 LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"code-%p.profclangr\""
6677 if test $LLVM_PROF_FOUND = not-found
6678 then
6679 LLVM_PROF_ERR=yes
Gregory P. Smith794b2912016-09-08 00:07:40 -07006680 if test "${REQUIRE_PGO}" = "yes"
6681 then
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)b9999152016-11-20 21:19:36 +00006682 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 -07006683 fi
Brett Cannon4ff151a2015-09-18 15:09:42 -07006684 fi
6685 ;;
6686 *gcc*)
6687 case $ac_sys_system in
6688 Darwin*)
6689 PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
6690 PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd"
Gregory P. Smith794b2912016-09-08 00:07:40 -07006691 LLVM_PROF_MERGER="${LLVM_PROFDATA} merge -output=code.profclangd *.profclangr"
Brett Cannon4ff151a2015-09-18 15:09:42 -07006692 LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"code-%p.profclangr\""
Gregory P. Smith794b2912016-09-08 00:07:40 -07006693 if test "${LLVM_PROF_FOUND}" = "not-found"
Brett Cannon4ff151a2015-09-18 15:09:42 -07006694 then
6695 LLVM_PROF_ERR=yes
Gregory P. Smith794b2912016-09-08 00:07:40 -07006696 if test "${REQUIRE_PGO}" = "yes"
6697 then
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)b9999152016-11-20 21:19:36 +00006698 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 -07006699 fi
Brett Cannon4ff151a2015-09-18 15:09:42 -07006700 fi
6701 ;;
6702 *)
6703 PGO_PROF_GEN_FLAG="-fprofile-generate"
6704 PGO_PROF_USE_FLAG="-fprofile-use -fprofile-correction"
6705 LLVM_PROF_MERGER="true"
6706 LLVM_PROF_FILE=""
6707 ;;
6708 esac
6709 ;;
Zachary Ware6ed42ea2015-12-21 11:43:03 -06006710 *icc*)
6711 PGO_PROF_GEN_FLAG="-prof-gen"
6712 PGO_PROF_USE_FLAG="-prof-use"
6713 LLVM_PROF_MERGER="true"
6714 LLVM_PROF_FILE=""
6715 ;;
Brett Cannon4ff151a2015-09-18 15:09:42 -07006716esac
6717
6718
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006719# On some compilers, pthreads are available without further options
6720# (e.g. MacOS X). On some of these systems, the compiler will not
6721# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
6722# So we have to see first whether pthreads are available without
6723# options before we can check whether -Kpthread improves anything.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006724{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads are available without options" >&5
6725$as_echo_n "checking whether pthreads are available without options... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01006726if ${ac_cv_pthread_is_default+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006727 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006728else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006729 if test "$cross_compiling" = yes; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006730 ac_cv_pthread_is_default=no
6731else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006732 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006733/* end confdefs.h. */
6734
Stefan Krahae66ca62012-11-22 22:36:57 +01006735#include <stdio.h>
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006736#include <pthread.h>
6737
6738void* routine(void* p){return NULL;}
6739
6740int main(){
6741 pthread_t p;
6742 if(pthread_create(&p,NULL,routine,NULL)!=0)
6743 return 1;
6744 (void)pthread_detach(p);
6745 return 0;
6746}
6747
6748_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006749if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006750
6751 ac_cv_pthread_is_default=yes
6752 ac_cv_kthread=no
6753 ac_cv_pthread=no
6754
6755else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006756 ac_cv_pthread_is_default=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006757fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006758rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6759 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006760fi
6761
6762
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006763fi
6764
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006765{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_is_default" >&5
6766$as_echo "$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006767
6768
6769if test $ac_cv_pthread_is_default = yes
6770then
6771 ac_cv_kpthread=no
6772else
6773# -Kpthread, if available, provides the right #defines
6774# and linker options to make pthread_create available
6775# Some compilers won't report that they do not support -Kpthread,
6776# so we need to run a program to see whether it really made the
6777# function available.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006778{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kpthread" >&5
6779$as_echo_n "checking whether $CC accepts -Kpthread... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01006780if ${ac_cv_kpthread+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006781 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006782else
6783 ac_save_cc="$CC"
6784CC="$CC -Kpthread"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006785if test "$cross_compiling" = yes; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006786 ac_cv_kpthread=no
6787else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006788 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006789/* end confdefs.h. */
6790
Stefan Krahae66ca62012-11-22 22:36:57 +01006791#include <stdio.h>
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006792#include <pthread.h>
6793
6794void* routine(void* p){return NULL;}
6795
6796int main(){
6797 pthread_t p;
6798 if(pthread_create(&p,NULL,routine,NULL)!=0)
6799 return 1;
6800 (void)pthread_detach(p);
6801 return 0;
6802}
6803
6804_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006805if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006806 ac_cv_kpthread=yes
6807else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006808 ac_cv_kpthread=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006809fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006810rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6811 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006812fi
6813
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006814CC="$ac_save_cc"
6815fi
6816
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006817{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kpthread" >&5
6818$as_echo "$ac_cv_kpthread" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006819fi
6820
6821if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
6822then
6823# -Kthread, if available, provides the right #defines
6824# and linker options to make pthread_create available
6825# Some compilers won't report that they do not support -Kthread,
6826# so we need to run a program to see whether it really made the
6827# function available.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006828{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kthread" >&5
6829$as_echo_n "checking whether $CC accepts -Kthread... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01006830if ${ac_cv_kthread+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006831 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006832else
6833 ac_save_cc="$CC"
6834CC="$CC -Kthread"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006835if test "$cross_compiling" = yes; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006836 ac_cv_kthread=no
6837else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006838 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006839/* end confdefs.h. */
6840
Stefan Krahae66ca62012-11-22 22:36:57 +01006841#include <stdio.h>
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006842#include <pthread.h>
6843
6844void* routine(void* p){return NULL;}
6845
6846int main(){
6847 pthread_t p;
6848 if(pthread_create(&p,NULL,routine,NULL)!=0)
6849 return 1;
6850 (void)pthread_detach(p);
6851 return 0;
6852}
6853
6854_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006855if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006856 ac_cv_kthread=yes
6857else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006858 ac_cv_kthread=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006859fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006860rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6861 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006862fi
6863
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006864CC="$ac_save_cc"
6865fi
6866
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006867{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kthread" >&5
6868$as_echo "$ac_cv_kthread" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006869fi
6870
6871if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
6872then
6873# -pthread, if available, provides the right #defines
6874# and linker options to make pthread_create available
6875# Some compilers won't report that they do not support -pthread,
6876# so we need to run a program to see whether it really made the
6877# function available.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006878{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -pthread" >&5
6879$as_echo_n "checking whether $CC accepts -pthread... " >&6; }
doko@python.orgfa3f9a32013-01-25 15:32:31 +01006880if ${ac_cv_pthread+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006881 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006882else
6883 ac_save_cc="$CC"
6884CC="$CC -pthread"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006885if test "$cross_compiling" = yes; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006886 ac_cv_pthread=no
6887else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006888 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006889/* end confdefs.h. */
6890
Stefan Krahae66ca62012-11-22 22:36:57 +01006891#include <stdio.h>
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006892#include <pthread.h>
6893
6894void* routine(void* p){return NULL;}
6895
6896int main(){
6897 pthread_t p;
6898 if(pthread_create(&p,NULL,routine,NULL)!=0)
6899 return 1;
6900 (void)pthread_detach(p);
6901 return 0;
6902}
6903
6904_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006905if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006906 ac_cv_pthread=yes
6907else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006908 ac_cv_pthread=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006909fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006910rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6911 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006912fi
6913
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006914CC="$ac_save_cc"
6915fi
6916
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006917{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread" >&5
6918$as_echo "$ac_cv_pthread" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006919fi
6920
6921# If we have set a CC compiler flag for thread support then
6922# check if it works for CXX, too.
6923ac_cv_cxx_thread=no
6924if test ! -z "$CXX"
6925then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006926{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX also accepts flags for thread support" >&5
6927$as_echo_n "checking whether $CXX also accepts flags for thread support... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006928ac_save_cxx="$CXX"
6929
6930if test "$ac_cv_kpthread" = "yes"
6931then
6932 CXX="$CXX -Kpthread"
6933 ac_cv_cxx_thread=yes
6934elif test "$ac_cv_kthread" = "yes"
6935then
6936 CXX="$CXX -Kthread"
6937 ac_cv_cxx_thread=yes
6938elif test "$ac_cv_pthread" = "yes"
6939then
6940 CXX="$CXX -pthread"
6941 ac_cv_cxx_thread=yes
6942fi
6943
6944if test $ac_cv_cxx_thread = yes
6945then
6946 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
6947 $CXX -c conftest.$ac_ext 2>&5
6948 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
6949 && test -s conftest$ac_exeext && ./conftest$ac_exeext
6950 then
6951 ac_cv_cxx_thread=yes
6952 else
6953 ac_cv_cxx_thread=no
6954 fi
6955 rm -fr conftest*
6956fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006957{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_thread" >&5
6958$as_echo "$ac_cv_cxx_thread" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006959fi
6960CXX="$ac_save_cxx"
6961
6962
6963# checks for header files
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006964{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
6965$as_echo_n "checking for ANSI C header files... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01006966if ${ac_cv_header_stdc+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006967 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006968else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006969 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006970/* end confdefs.h. */
6971#include <stdlib.h>
6972#include <stdarg.h>
6973#include <string.h>
6974#include <float.h>
6975
6976int
6977main ()
6978{
6979
6980 ;
6981 return 0;
6982}
6983_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006984if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006985 ac_cv_header_stdc=yes
6986else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006987 ac_cv_header_stdc=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006988fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006989rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6990
6991if test $ac_cv_header_stdc = yes; then
6992 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006993 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006994/* end confdefs.h. */
6995#include <string.h>
6996
6997_ACEOF
6998if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006999 $EGREP "memchr" >/dev/null 2>&1; then :
7000
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00007001else
7002 ac_cv_header_stdc=no
7003fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00007004rm -f conftest*
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00007005
7006fi
7007
7008if test $ac_cv_header_stdc = yes; then
7009 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007010 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00007011/* end confdefs.h. */
7012#include <stdlib.h>
7013
7014_ACEOF
7015if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007016 $EGREP "free" >/dev/null 2>&1; then :
7017
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00007018else
7019 ac_cv_header_stdc=no
7020fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00007021rm -f conftest*
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00007022
7023fi
7024
7025if test $ac_cv_header_stdc = yes; then
7026 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007027 if test "$cross_compiling" = yes; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00007028 :
7029else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007030 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00007031/* end confdefs.h. */
7032#include <ctype.h>
7033#include <stdlib.h>
7034#if ((' ' & 0x0FF) == 0x020)
7035# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
7036# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
7037#else
7038# define ISLOWER(c) \
7039 (('a' <= (c) && (c) <= 'i') \
7040 || ('j' <= (c) && (c) <= 'r') \
7041 || ('s' <= (c) && (c) <= 'z'))
7042# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
7043#endif
7044
7045#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
7046int
7047main ()
7048{
7049 int i;
7050 for (i = 0; i < 256; i++)
7051 if (XOR (islower (i), ISLOWER (i))
7052 || toupper (i) != TOUPPER (i))
7053 return 2;
7054 return 0;
7055}
7056_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007057if ac_fn_c_try_run "$LINENO"; then :
7058
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00007059else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007060 ac_cv_header_stdc=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00007061fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007062rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7063 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00007064fi
7065
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00007066fi
7067fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007068{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
7069$as_echo "$ac_cv_header_stdc" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00007070if test $ac_cv_header_stdc = yes; then
7071
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007072$as_echo "#define STDC_HEADERS 1" >>confdefs.h
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00007073
7074fi
7075
Miss Islington (bot)6ccdad72018-01-24 01:51:39 -08007076for 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 +00007077fcntl.h grp.h \
doko@ubuntu.comf27ec3e2014-04-17 20:11:19 +02007078ieeefp.h io.h langinfo.h libintl.h poll.h process.h pthread.h \
Martin v. Löwis40e9aed2006-10-02 15:20:37 +00007079shadow.h signal.h stdint.h stropts.h termios.h thread.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00007080unistd.h utime.h \
Christian Heimes0e9ab5f2008-03-21 23:49:44 +00007081sys/audioio.h sys/bsdtty.h sys/epoll.h sys/event.h sys/file.h sys/loadavg.h \
7082sys/lock.h sys/mkdev.h sys/modem.h \
Benjamin Peterson6b1c9092016-12-19 23:54:25 -08007083sys/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 +00007084sys/termio.h sys/time.h \
Martin v. Löwis0e8bd7e2006-06-10 12:23:46 +00007085sys/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 +00007086sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Christian Heimesffa70112017-09-05 17:08:45 +02007087bluetooth/bluetooth.h linux/tipc.h spawn.h util.h alloca.h sys/sysmacros.h
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007088do :
7089 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7090ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007091if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007092 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007093#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00007094_ACEOF
7095
7096fi
7097
Guido van Rossum627b2d71993-12-24 10:39:16 +00007098done
7099
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007100ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00007101for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007102 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
7103{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
7104$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007105if eval \${$as_ac_Header+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007106 $as_echo_n "(cached) " >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00007107else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007108 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007109/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007110#include <sys/types.h>
7111#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00007112
Martin v. Löwis11437992002-04-12 09:54:03 +00007113int
7114main ()
7115{
7116if ((DIR *) 0)
7117return 0;
7118 ;
7119 return 0;
7120}
7121_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007122if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007123 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00007124else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007125 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007126fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007127rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00007128fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007129eval ac_res=\$$as_ac_Header
7130 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
7131$as_echo "$ac_res" >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007132if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007133 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007134#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00007135_ACEOF
7136
7137ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00007138fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007139
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007140done
7141# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
7142if test $ac_header_dirent = dirent.h; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007143 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
7144$as_echo_n "checking for library containing opendir... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007145if ${ac_cv_search_opendir+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007146 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007147else
Martin v. Löwis11437992002-04-12 09:54:03 +00007148 ac_func_search_save_LIBS=$LIBS
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007149cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007150/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007151
Martin v. Löwiseba40652007-08-30 20:10:57 +00007152/* Override any GCC internal prototype to avoid an error.
7153 Use char because int might match the return type of a GCC
7154 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007155#ifdef __cplusplus
7156extern "C"
7157#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007158char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007159int
7160main ()
7161{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007162return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007163 ;
7164 return 0;
7165}
7166_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00007167for ac_lib in '' dir; do
7168 if test -z "$ac_lib"; then
7169 ac_res="none required"
7170 else
7171 ac_res=-l$ac_lib
Skip Montanaro89e975f2007-08-22 19:05:21 +00007172 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Martin v. Löwiseba40652007-08-30 20:10:57 +00007173 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007174 if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00007175 ac_cv_search_opendir=$ac_res
Brett Cannon19fab762007-06-02 03:02:29 +00007176fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007177rm -f core conftest.err conftest.$ac_objext \
7178 conftest$ac_exeext
Matthias Klose3cef2a92012-03-14 23:39:33 +01007179 if ${ac_cv_search_opendir+:} false; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00007180 break
Skip Montanaro89e975f2007-08-22 19:05:21 +00007181fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007182done
Matthias Klose3cef2a92012-03-14 23:39:33 +01007183if ${ac_cv_search_opendir+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007184
Martin v. Löwiseba40652007-08-30 20:10:57 +00007185else
7186 ac_cv_search_opendir=no
7187fi
7188rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007189LIBS=$ac_func_search_save_LIBS
7190fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007191{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
7192$as_echo "$ac_cv_search_opendir" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007193ac_res=$ac_cv_search_opendir
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007194if test "$ac_res" != no; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00007195 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00007196
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007197fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007198
Michael W. Hudson54241132001-12-07 15:38:26 +00007199else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007200 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
7201$as_echo_n "checking for library containing opendir... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007202if ${ac_cv_search_opendir+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007203 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007204else
7205 ac_func_search_save_LIBS=$LIBS
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007206cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007207/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007208
Martin v. Löwiseba40652007-08-30 20:10:57 +00007209/* Override any GCC internal prototype to avoid an error.
7210 Use char because int might match the return type of a GCC
7211 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007212#ifdef __cplusplus
7213extern "C"
7214#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007215char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007216int
7217main ()
7218{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007219return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007220 ;
7221 return 0;
7222}
7223_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00007224for ac_lib in '' x; do
7225 if test -z "$ac_lib"; then
7226 ac_res="none required"
7227 else
7228 ac_res=-l$ac_lib
Skip Montanaro89e975f2007-08-22 19:05:21 +00007229 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Martin v. Löwiseba40652007-08-30 20:10:57 +00007230 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007231 if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00007232 ac_cv_search_opendir=$ac_res
Brett Cannon19fab762007-06-02 03:02:29 +00007233fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007234rm -f core conftest.err conftest.$ac_objext \
7235 conftest$ac_exeext
Matthias Klose3cef2a92012-03-14 23:39:33 +01007236 if ${ac_cv_search_opendir+:} false; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00007237 break
Skip Montanaro89e975f2007-08-22 19:05:21 +00007238fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007239done
Matthias Klose3cef2a92012-03-14 23:39:33 +01007240if ${ac_cv_search_opendir+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007241
Martin v. Löwiseba40652007-08-30 20:10:57 +00007242else
7243 ac_cv_search_opendir=no
7244fi
7245rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007246LIBS=$ac_func_search_save_LIBS
7247fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007248{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
7249$as_echo "$ac_cv_search_opendir" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007250ac_res=$ac_cv_search_opendir
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007251if test "$ac_res" != no; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00007252 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00007253
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007254fi
7255
7256fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00007257
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007258{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5
7259$as_echo_n "checking whether sys/types.h defines makedev... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007260if ${ac_cv_header_sys_types_h_makedev+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007261 $as_echo_n "(cached) " >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007262else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007263 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007264/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007265#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007266int
7267main ()
7268{
7269return makedev(0, 0);
7270 ;
7271 return 0;
7272}
7273_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007274if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007275 ac_cv_header_sys_types_h_makedev=yes
7276else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007277 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007278fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007279rm -f core conftest.err conftest.$ac_objext \
7280 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007281
7282fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007283{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_types_h_makedev" >&5
7284$as_echo "$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007285
7286if test $ac_cv_header_sys_types_h_makedev = no; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007287ac_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 +01007288if test "x$ac_cv_header_sys_mkdev_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007289
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007290$as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007291
7292fi
7293
7294
7295
7296 if test $ac_cv_header_sys_mkdev_h = no; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007297 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 +01007298if test "x$ac_cv_header_sys_sysmacros_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007299
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007300$as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007301
7302fi
7303
7304
7305 fi
7306fi
7307
Michael W. Hudson54241132001-12-07 15:38:26 +00007308
Martin v. Löwis11017b12006-01-14 18:12:57 +00007309# On Linux, netlink.h requires asm/types.h
Martin v. Löwis11017b12006-01-14 18:12:57 +00007310for ac_header in linux/netlink.h
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007311do :
7312 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 +00007313#ifdef HAVE_ASM_TYPES_H
7314#include <asm/types.h>
7315#endif
7316#ifdef HAVE_SYS_SOCKET_H
7317#include <sys/socket.h>
7318#endif
7319
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007320"
Matthias Klose3cef2a92012-03-14 23:39:33 +01007321if test "x$ac_cv_header_linux_netlink_h" = xyes; then :
Martin v. Löwis11017b12006-01-14 18:12:57 +00007322 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007323#define HAVE_LINUX_NETLINK_H 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00007324_ACEOF
7325
7326fi
7327
7328done
7329
7330
Guido van Rossum627b2d71993-12-24 10:39:16 +00007331# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00007332was_it_defined=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007333{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_t in time.h" >&5
7334$as_echo_n "checking for clock_t in time.h... " >&6; }
7335cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007336/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007337#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007338
7339_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007340if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007341 $EGREP "clock_t" >/dev/null 2>&1; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +00007342 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00007343else
Martin v. Löwis11437992002-04-12 09:54:03 +00007344
7345
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007346$as_echo "#define clock_t long" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00007347
Martin v. Löwisc45929e2002-04-06 10:10:49 +00007348
Guido van Rossum627b2d71993-12-24 10:39:16 +00007349fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00007350rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00007351
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007352{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
7353$as_echo "$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00007354
Neal Norwitz11690112002-07-30 01:08:28 +00007355# Check whether using makedev requires defining _OSF_SOURCE
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007356{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for makedev" >&5
7357$as_echo_n "checking for makedev... " >&6; }
7358cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007359/* end confdefs.h. */
Jesus Cea616de772010-04-28 10:32:30 +00007360
7361#if defined(MAJOR_IN_MKDEV)
7362#include <sys/mkdev.h>
7363#elif defined(MAJOR_IN_SYSMACROS)
7364#include <sys/sysmacros.h>
7365#else
Neal Norwitz6eb37f02003-02-23 23:28:15 +00007366#include <sys/types.h>
Jesus Cea616de772010-04-28 10:32:30 +00007367#endif
Neal Norwitz11690112002-07-30 01:08:28 +00007368int
7369main ()
7370{
7371 makedev(0, 0)
7372 ;
7373 return 0;
7374}
7375_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007376if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00007377 ac_cv_has_makedev=yes
7378else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007379 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00007380fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007381rm -f core conftest.err conftest.$ac_objext \
7382 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00007383if test "$ac_cv_has_makedev" = "no"; then
7384 # we didn't link, try if _OSF_SOURCE will allow us to link
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007385 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007386/* end confdefs.h. */
Neal Norwitz11690112002-07-30 01:08:28 +00007387
Neal Norwitz6eb37f02003-02-23 23:28:15 +00007388#define _OSF_SOURCE 1
7389#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00007390
Neal Norwitz11690112002-07-30 01:08:28 +00007391int
7392main ()
7393{
7394 makedev(0, 0)
7395 ;
7396 return 0;
7397}
7398_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007399if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00007400 ac_cv_has_makedev=yes
7401else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007402 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00007403fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007404rm -f core conftest.err conftest.$ac_objext \
7405 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00007406 if test "$ac_cv_has_makedev" = "yes"; then
7407
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007408$as_echo "#define _OSF_SOURCE 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00007409
7410 fi
7411fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007412{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_makedev" >&5
7413$as_echo "$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00007414if test "$ac_cv_has_makedev" = "yes"; then
7415
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007416$as_echo "#define HAVE_MAKEDEV 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00007417
7418fi
7419
Martin v. Löwis399a6892002-10-04 10:22:02 +00007420# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
7421# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
7422# defined, but the compiler does not support pragma redefine_extname,
7423# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
7424# structures (such as rlimit64) without declaring them. As a
7425# work-around, disable LFS on such configurations
7426
7427use_lfs=yes
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007428{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Solaris LFS bug" >&5
7429$as_echo_n "checking Solaris LFS bug... " >&6; }
7430cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007431/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00007432
7433#define _LARGEFILE_SOURCE 1
7434#define _FILE_OFFSET_BITS 64
7435#include <sys/resource.h>
7436
Martin v. Löwis399a6892002-10-04 10:22:02 +00007437int
7438main ()
7439{
7440struct rlimit foo;
7441 ;
7442 return 0;
7443}
7444_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007445if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis399a6892002-10-04 10:22:02 +00007446 sol_lfs_bug=no
7447else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007448 sol_lfs_bug=yes
Martin v. Löwis399a6892002-10-04 10:22:02 +00007449fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007450rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007451{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $sol_lfs_bug" >&5
7452$as_echo "$sol_lfs_bug" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00007453if test "$sol_lfs_bug" = "yes"; then
7454 use_lfs=no
7455fi
7456
7457if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00007458# Two defines needed to enable largefile support on various platforms
7459# These may affect some typedefs
Georg Brandl94800df2011-02-25 11:09:02 +00007460case $ac_sys_system/$ac_sys_release in
7461AIX*)
7462
7463$as_echo "#define _LARGE_FILES 1" >>confdefs.h
7464
7465 ;;
7466esac
Guido van Rossum810cc512001-09-09 23:51:39 +00007467
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007468$as_echo "#define _LARGEFILE_SOURCE 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007469
7470
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007471$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
Guido van Rossum810cc512001-09-09 23:51:39 +00007472
Martin v. Löwis399a6892002-10-04 10:22:02 +00007473fi
Michael W. Hudson54241132001-12-07 15:38:26 +00007474
Guido van Rossum84e7b241996-08-19 21:59:00 +00007475# Add some code to confdefs.h so that the test for off_t works on SCO
7476cat >> confdefs.h <<\EOF
7477#if defined(SCO_DS)
7478#undef _OFF_T
7479#endif
7480EOF
7481
Guido van Rossumef2255b2000-03-10 22:30:29 +00007482# Type availability checks
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007483ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
Matthias Klose3cef2a92012-03-14 23:39:33 +01007484if test "x$ac_cv_type_mode_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007485
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007486else
Martin v. Löwis11437992002-04-12 09:54:03 +00007487
7488cat >>confdefs.h <<_ACEOF
7489#define mode_t int
7490_ACEOF
7491
7492fi
7493
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007494ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
Matthias Klose3cef2a92012-03-14 23:39:33 +01007495if test "x$ac_cv_type_off_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007496
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007497else
Martin v. Löwis11437992002-04-12 09:54:03 +00007498
7499cat >>confdefs.h <<_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00007500#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00007501_ACEOF
7502
7503fi
7504
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007505ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
Matthias Klose3cef2a92012-03-14 23:39:33 +01007506if test "x$ac_cv_type_pid_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007507
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007508else
Martin v. Löwis11437992002-04-12 09:54:03 +00007509
7510cat >>confdefs.h <<_ACEOF
7511#define pid_t int
7512_ACEOF
7513
7514fi
7515
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00007516
Martin v. Löwis11437992002-04-12 09:54:03 +00007517cat >>confdefs.h <<_ACEOF
Matthias Klosecbf54b12010-05-08 11:04:18 +00007518#define RETSIGTYPE void
Martin v. Löwis11437992002-04-12 09:54:03 +00007519_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00007520
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007521ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
Matthias Klose3cef2a92012-03-14 23:39:33 +01007522if test "x$ac_cv_type_size_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007523
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007524else
Martin v. Löwis11437992002-04-12 09:54:03 +00007525
7526cat >>confdefs.h <<_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00007527#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00007528_ACEOF
7529
7530fi
7531
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007532{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
7533$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007534if ${ac_cv_type_uid_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007535 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007536else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007537 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007538/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007539#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007540
7541_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007542if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007543 $EGREP "uid_t" >/dev/null 2>&1; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007544 ac_cv_type_uid_t=yes
7545else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007546 ac_cv_type_uid_t=no
7547fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00007548rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00007549
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007550fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007551{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
7552$as_echo "$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00007553if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007554
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007555$as_echo "#define uid_t int" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007556
7557
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007558$as_echo "#define gid_t int" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007559
7560fi
7561
Mark Dickinson17c50cd2012-12-02 13:13:56 +00007562
7563# There are two separate checks for each of the exact-width integer types we
7564# need. First we check whether the type is available using the usual
7565# AC_CHECK_TYPE macro with the default includes (which includes <inttypes.h>
7566# and <stdint.h> where available). We then also use the special type checks of
7567# the form AC_TYPE_UINT32_T, which in the case that uint32_t is not available
7568# directly, #define's uint32_t to be a suitable type.
7569
7570ac_fn_c_check_type "$LINENO" "uint32_t" "ac_cv_type_uint32_t" "$ac_includes_default"
7571if test "x$ac_cv_type_uint32_t" = xyes; then :
7572
7573$as_echo "#define HAVE_UINT32_T 1" >>confdefs.h
7574
7575fi
7576
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007577ac_fn_c_find_uintX_t "$LINENO" "32" "ac_cv_c_uint32_t"
7578case $ac_cv_c_uint32_t in #(
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007579 no|yes) ;; #(
7580 *)
7581
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007582$as_echo "#define _UINT32_T 1" >>confdefs.h
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007583
7584
7585cat >>confdefs.h <<_ACEOF
7586#define uint32_t $ac_cv_c_uint32_t
7587_ACEOF
7588;;
7589 esac
7590
Mark Dickinson17c50cd2012-12-02 13:13:56 +00007591
7592ac_fn_c_check_type "$LINENO" "uint64_t" "ac_cv_type_uint64_t" "$ac_includes_default"
7593if test "x$ac_cv_type_uint64_t" = xyes; then :
7594
7595$as_echo "#define HAVE_UINT64_T 1" >>confdefs.h
7596
7597fi
7598
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007599ac_fn_c_find_uintX_t "$LINENO" "64" "ac_cv_c_uint64_t"
7600case $ac_cv_c_uint64_t in #(
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007601 no|yes) ;; #(
7602 *)
7603
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007604$as_echo "#define _UINT64_T 1" >>confdefs.h
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007605
7606
7607cat >>confdefs.h <<_ACEOF
7608#define uint64_t $ac_cv_c_uint64_t
7609_ACEOF
7610;;
7611 esac
7612
Mark Dickinson17c50cd2012-12-02 13:13:56 +00007613
7614ac_fn_c_check_type "$LINENO" "int32_t" "ac_cv_type_int32_t" "$ac_includes_default"
7615if test "x$ac_cv_type_int32_t" = xyes; then :
7616
7617$as_echo "#define HAVE_INT32_T 1" >>confdefs.h
7618
7619fi
7620
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007621ac_fn_c_find_intX_t "$LINENO" "32" "ac_cv_c_int32_t"
7622case $ac_cv_c_int32_t in #(
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007623 no|yes) ;; #(
7624 *)
7625
7626cat >>confdefs.h <<_ACEOF
7627#define int32_t $ac_cv_c_int32_t
7628_ACEOF
7629;;
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007630esac
7631
Mark Dickinson17c50cd2012-12-02 13:13:56 +00007632
7633ac_fn_c_check_type "$LINENO" "int64_t" "ac_cv_type_int64_t" "$ac_includes_default"
7634if test "x$ac_cv_type_int64_t" = xyes; then :
7635
7636$as_echo "#define HAVE_INT64_T 1" >>confdefs.h
7637
7638fi
7639
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007640ac_fn_c_find_intX_t "$LINENO" "64" "ac_cv_c_int64_t"
7641case $ac_cv_c_int64_t in #(
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007642 no|yes) ;; #(
7643 *)
7644
7645cat >>confdefs.h <<_ACEOF
7646#define int64_t $ac_cv_c_int64_t
7647_ACEOF
7648;;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00007649esac
Martin v. Löwis18e16552006-02-15 17:27:45 +00007650
Mark Dickinson17c50cd2012-12-02 13:13:56 +00007651
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007652ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
Matthias Klose3cef2a92012-03-14 23:39:33 +01007653if test "x$ac_cv_type_ssize_t" = xyes; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00007654
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007655$as_echo "#define HAVE_SSIZE_T 1" >>confdefs.h
Martin v. Löwis18e16552006-02-15 17:27:45 +00007656
7657fi
7658
Jack Jansendd19cf82001-12-06 22:36:17 +00007659
Michael W. Hudson54241132001-12-07 15:38:26 +00007660# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00007661# ANSI C requires sizeof(char) == 1, so no need to check it
Martin v. Löwiseba40652007-08-30 20:10:57 +00007662# The cast to long int works around a bug in the HP C Compiler
7663# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7664# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7665# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007666{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
7667$as_echo_n "checking size of int... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007668if ${ac_cv_sizeof_int+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007669 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007670else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007671 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 +00007672
Martin v. Löwis11437992002-04-12 09:54:03 +00007673else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007674 if test "$ac_cv_type_int" = yes; then
7675 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7676$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007677as_fn_error 77 "cannot compute sizeof (int)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007678See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007679 else
7680 ac_cv_sizeof_int=0
7681 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007682fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007683
Martin v. Löwis11437992002-04-12 09:54:03 +00007684fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007685{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
7686$as_echo "$ac_cv_sizeof_int" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007687
7688
7689
Martin v. Löwis11437992002-04-12 09:54:03 +00007690cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007691#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00007692_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007693
7694
Martin v. Löwiseba40652007-08-30 20:10:57 +00007695# The cast to long int works around a bug in the HP C Compiler
7696# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7697# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7698# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007699{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
7700$as_echo_n "checking size of long... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007701if ${ac_cv_sizeof_long+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007702 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007703else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007704 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 +00007705
Martin v. Löwis11437992002-04-12 09:54:03 +00007706else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007707 if test "$ac_cv_type_long" = yes; then
7708 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7709$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007710as_fn_error 77 "cannot compute sizeof (long)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007711See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007712 else
7713 ac_cv_sizeof_long=0
7714 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007715fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007716
Martin v. Löwis11437992002-04-12 09:54:03 +00007717fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007718{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
7719$as_echo "$ac_cv_sizeof_long" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007720
7721
7722
Martin v. Löwis11437992002-04-12 09:54:03 +00007723cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007724#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00007725_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007726
7727
Martin v. Löwiseba40652007-08-30 20:10:57 +00007728# The cast to long int works around a bug in the HP C Compiler
7729# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7730# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7731# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007732{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
7733$as_echo_n "checking size of void *... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007734if ${ac_cv_sizeof_void_p+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007735 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007736else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007737 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 +00007738
Martin v. Löwis11437992002-04-12 09:54:03 +00007739else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007740 if test "$ac_cv_type_void_p" = yes; then
7741 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7742$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007743as_fn_error 77 "cannot compute sizeof (void *)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007744See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007745 else
7746 ac_cv_sizeof_void_p=0
7747 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007748fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007749
Martin v. Löwis11437992002-04-12 09:54:03 +00007750fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007751{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
7752$as_echo "$ac_cv_sizeof_void_p" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007753
7754
7755
Martin v. Löwis11437992002-04-12 09:54:03 +00007756cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00007757#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00007758_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00007759
7760
Martin v. Löwiseba40652007-08-30 20:10:57 +00007761# The cast to long int works around a bug in the HP C Compiler
7762# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7763# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7764# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007765{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
7766$as_echo_n "checking size of short... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007767if ${ac_cv_sizeof_short+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007768 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007769else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007770 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 +00007771
Martin v. Löwis11437992002-04-12 09:54:03 +00007772else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007773 if test "$ac_cv_type_short" = yes; then
7774 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7775$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007776as_fn_error 77 "cannot compute sizeof (short)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007777See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007778 else
7779 ac_cv_sizeof_short=0
7780 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007781fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007782
Martin v. Löwis11437992002-04-12 09:54:03 +00007783fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007784{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
7785$as_echo "$ac_cv_sizeof_short" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007786
7787
7788
Martin v. Löwis11437992002-04-12 09:54:03 +00007789cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007790#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00007791_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007792
7793
Martin v. Löwiseba40652007-08-30 20:10:57 +00007794# The cast to long int works around a bug in the HP C Compiler
7795# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7796# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7797# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007798{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of float" >&5
7799$as_echo_n "checking size of float... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007800if ${ac_cv_sizeof_float+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007801 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007802else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007803 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 +00007804
Martin v. Löwis11437992002-04-12 09:54:03 +00007805else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007806 if test "$ac_cv_type_float" = yes; then
7807 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7808$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007809as_fn_error 77 "cannot compute sizeof (float)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007810See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007811 else
7812 ac_cv_sizeof_float=0
7813 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007814fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007815
Martin v. Löwis11437992002-04-12 09:54:03 +00007816fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007817{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_float" >&5
7818$as_echo "$ac_cv_sizeof_float" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007819
7820
7821
Martin v. Löwis11437992002-04-12 09:54:03 +00007822cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007823#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00007824_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007825
7826
Martin v. Löwiseba40652007-08-30 20:10:57 +00007827# The cast to long int works around a bug in the HP C Compiler
7828# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7829# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7830# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007831{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of double" >&5
7832$as_echo_n "checking size of double... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007833if ${ac_cv_sizeof_double+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007834 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007835else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007836 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 +00007837
Martin v. Löwis11437992002-04-12 09:54:03 +00007838else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007839 if test "$ac_cv_type_double" = yes; then
7840 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7841$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007842as_fn_error 77 "cannot compute sizeof (double)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007843See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007844 else
7845 ac_cv_sizeof_double=0
7846 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007847fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007848
Martin v. Löwis11437992002-04-12 09:54:03 +00007849fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007850{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5
7851$as_echo "$ac_cv_sizeof_double" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007852
7853
7854
Martin v. Löwis11437992002-04-12 09:54:03 +00007855cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007856#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00007857_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007858
7859
Martin v. Löwiseba40652007-08-30 20:10:57 +00007860# The cast to long int works around a bug in the HP C Compiler
7861# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7862# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7863# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007864{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of fpos_t" >&5
7865$as_echo_n "checking size of fpos_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007866if ${ac_cv_sizeof_fpos_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007867 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007868else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007869 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 +00007870
Martin v. Löwis11437992002-04-12 09:54:03 +00007871else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007872 if test "$ac_cv_type_fpos_t" = yes; then
7873 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7874$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007875as_fn_error 77 "cannot compute sizeof (fpos_t)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007876See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007877 else
7878 ac_cv_sizeof_fpos_t=0
7879 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007880fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007881
Martin v. Löwis11437992002-04-12 09:54:03 +00007882fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007883{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_fpos_t" >&5
7884$as_echo "$ac_cv_sizeof_fpos_t" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007885
7886
7887
Martin v. Löwis11437992002-04-12 09:54:03 +00007888cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007889#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007890_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007891
Michael W. Hudson54241132001-12-07 15:38:26 +00007892
Martin v. Löwiseba40652007-08-30 20:10:57 +00007893# The cast to long int works around a bug in the HP C Compiler
7894# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7895# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7896# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007897{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
7898$as_echo_n "checking size of size_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007899if ${ac_cv_sizeof_size_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007900 $as_echo_n "(cached) " >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00007901else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007902 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 +00007903
Martin v. Löwis18e16552006-02-15 17:27:45 +00007904else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007905 if test "$ac_cv_type_size_t" = yes; then
7906 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7907$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007908as_fn_error 77 "cannot compute sizeof (size_t)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007909See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007910 else
7911 ac_cv_sizeof_size_t=0
7912 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +00007913fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007914
Martin v. Löwis18e16552006-02-15 17:27:45 +00007915fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007916{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
7917$as_echo "$ac_cv_sizeof_size_t" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007918
7919
7920
Martin v. Löwis18e16552006-02-15 17:27:45 +00007921cat >>confdefs.h <<_ACEOF
7922#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
7923_ACEOF
7924
7925
Christian Heimes951cc0f2008-01-31 23:08:23 +00007926# The cast to long int works around a bug in the HP C Compiler
7927# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7928# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7929# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007930{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pid_t" >&5
7931$as_echo_n "checking size of pid_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007932if ${ac_cv_sizeof_pid_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007933 $as_echo_n "(cached) " >&6
Christian Heimes951cc0f2008-01-31 23:08:23 +00007934else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007935 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 +00007936
Christian Heimes951cc0f2008-01-31 23:08:23 +00007937else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007938 if test "$ac_cv_type_pid_t" = yes; then
7939 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7940$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007941as_fn_error 77 "cannot compute sizeof (pid_t)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007942See \`config.log' for more details" "$LINENO" 5; }
Christian Heimes951cc0f2008-01-31 23:08:23 +00007943 else
7944 ac_cv_sizeof_pid_t=0
7945 fi
7946fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007947
Christian Heimes951cc0f2008-01-31 23:08:23 +00007948fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007949{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pid_t" >&5
7950$as_echo "$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes951cc0f2008-01-31 23:08:23 +00007951
7952
7953
7954cat >>confdefs.h <<_ACEOF
7955#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
7956_ACEOF
7957
7958
Michael W. Hudson54241132001-12-07 15:38:26 +00007959
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007960{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support" >&5
7961$as_echo_n "checking for long long support... " >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007962have_long_long=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007963cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007964/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007965
Martin v. Löwis11437992002-04-12 09:54:03 +00007966int
7967main ()
7968{
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007969long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007970 ;
7971 return 0;
7972}
7973_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007974if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007975
7976
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007977$as_echo "#define HAVE_LONG_LONG 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007978
Martin v. Löwisc45929e2002-04-06 10:10:49 +00007979 have_long_long=yes
7980
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007981fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007982rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007983{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_long" >&5
7984$as_echo "$have_long_long" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +00007985if test "$have_long_long" = yes ; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00007986# The cast to long int works around a bug in the HP C Compiler
7987# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7988# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7989# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007990{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
7991$as_echo_n "checking size of long long... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007992if ${ac_cv_sizeof_long_long+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007993 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007994else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007995 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 +00007996
Martin v. Löwis11437992002-04-12 09:54:03 +00007997else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007998 if test "$ac_cv_type_long_long" = yes; then
7999 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8000$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00008001as_fn_error 77 "cannot compute sizeof (long long)
Matthias Klose3cef2a92012-03-14 23:39:33 +01008002See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008003 else
8004 ac_cv_sizeof_long_long=0
8005 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008006fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008007
Martin v. Löwis11437992002-04-12 09:54:03 +00008008fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008009{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
8010$as_echo "$ac_cv_sizeof_long_long" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008011
8012
8013
Martin v. Löwis11437992002-04-12 09:54:03 +00008014cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008015#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +00008016_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008017
Michael W. Hudson54241132001-12-07 15:38:26 +00008018
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008019fi
8020
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008021{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support" >&5
8022$as_echo_n "checking for long double support... " >&6; }
Mark Dickinsondc1688a2008-06-27 22:20:14 +00008023have_long_double=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008024cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsondc1688a2008-06-27 22:20:14 +00008025/* end confdefs.h. */
8026
8027int
8028main ()
8029{
Matthias Klosec511b472010-05-08 11:01:39 +00008030long double x; x = (long double)0;
Mark Dickinsondc1688a2008-06-27 22:20:14 +00008031 ;
8032 return 0;
8033}
8034_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008035if ac_fn_c_try_compile "$LINENO"; then :
Mark Dickinsondc1688a2008-06-27 22:20:14 +00008036
8037
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008038$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
Mark Dickinsondc1688a2008-06-27 22:20:14 +00008039
8040 have_long_double=yes
8041
Mark Dickinsondc1688a2008-06-27 22:20:14 +00008042fi
Mark Dickinsondc1688a2008-06-27 22:20:14 +00008043rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008044{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_double" >&5
8045$as_echo "$have_long_double" >&6; }
Mark Dickinsondc1688a2008-06-27 22:20:14 +00008046if test "$have_long_double" = yes ; then
Mark Dickinsondc1688a2008-06-27 22:20:14 +00008047# The cast to long int works around a bug in the HP C Compiler
8048# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8049# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8050# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008051{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long double" >&5
8052$as_echo_n "checking size of long double... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008053if ${ac_cv_sizeof_long_double+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008054 $as_echo_n "(cached) " >&6
Mark Dickinsondc1688a2008-06-27 22:20:14 +00008055else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008056 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 +00008057
Mark Dickinsondc1688a2008-06-27 22:20:14 +00008058else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008059 if test "$ac_cv_type_long_double" = yes; then
8060 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8061$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00008062as_fn_error 77 "cannot compute sizeof (long double)
Matthias Klose3cef2a92012-03-14 23:39:33 +01008063See \`config.log' for more details" "$LINENO" 5; }
Mark Dickinsondc1688a2008-06-27 22:20:14 +00008064 else
8065 ac_cv_sizeof_long_double=0
8066 fi
8067fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008068
Mark Dickinsondc1688a2008-06-27 22:20:14 +00008069fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008070{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double" >&5
8071$as_echo "$ac_cv_sizeof_long_double" >&6; }
Mark Dickinsondc1688a2008-06-27 22:20:14 +00008072
8073
8074
8075cat >>confdefs.h <<_ACEOF
8076#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
8077_ACEOF
8078
8079
8080fi
8081
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008082{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _Bool support" >&5
8083$as_echo_n "checking for _Bool support... " >&6; }
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00008084have_c99_bool=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008085cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00008086/* end confdefs.h. */
8087
8088int
8089main ()
8090{
8091_Bool x; x = (_Bool)0;
8092 ;
8093 return 0;
8094}
8095_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008096if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00008097
8098
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008099$as_echo "#define HAVE_C99_BOOL 1" >>confdefs.h
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00008100
8101 have_c99_bool=yes
8102
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00008103fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008104rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008105{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_c99_bool" >&5
8106$as_echo "$have_c99_bool" >&6; }
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00008107if test "$have_c99_bool" = yes ; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00008108# The cast to long int works around a bug in the HP C Compiler
8109# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8110# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8111# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008112{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of _Bool" >&5
8113$as_echo_n "checking size of _Bool... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008114if ${ac_cv_sizeof__Bool+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008115 $as_echo_n "(cached) " >&6
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00008116else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008117 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 +00008118
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00008119else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008120 if test "$ac_cv_type__Bool" = yes; then
8121 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8122$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00008123as_fn_error 77 "cannot compute sizeof (_Bool)
Matthias Klose3cef2a92012-03-14 23:39:33 +01008124See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008125 else
8126 ac_cv_sizeof__Bool=0
8127 fi
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00008128fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008129
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00008130fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008131{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof__Bool" >&5
8132$as_echo "$ac_cv_sizeof__Bool" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008133
8134
8135
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00008136cat >>confdefs.h <<_ACEOF
8137#define SIZEOF__BOOL $ac_cv_sizeof__Bool
8138_ACEOF
8139
8140
8141fi
8142
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008143ac_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 +00008144 #include <stdint.h>
8145 #endif
Antoine Pitrou7be5a652010-10-10 08:14:41 +00008146 #ifdef HAVE_INTTYPES_H
8147 #include <inttypes.h>
8148 #endif
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008149"
Matthias Klose3cef2a92012-03-14 23:39:33 +01008150if test "x$ac_cv_type_uintptr_t" = xyes; then :
Martin v. Löwisebe26702006-10-02 14:55:51 +00008151
8152cat >>confdefs.h <<_ACEOF
8153#define HAVE_UINTPTR_T 1
8154_ACEOF
8155
Martin v. Löwiseba40652007-08-30 20:10:57 +00008156# The cast to long int works around a bug in the HP C Compiler
8157# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8158# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8159# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008160{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of uintptr_t" >&5
8161$as_echo_n "checking size of uintptr_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008162if ${ac_cv_sizeof_uintptr_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008163 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008164else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008165 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 +00008166
Martin v. Löwis11437992002-04-12 09:54:03 +00008167else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008168 if test "$ac_cv_type_uintptr_t" = yes; then
8169 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8170$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00008171as_fn_error 77 "cannot compute sizeof (uintptr_t)
Matthias Klose3cef2a92012-03-14 23:39:33 +01008172See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008173 else
8174 ac_cv_sizeof_uintptr_t=0
8175 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008176fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008177
Martin v. Löwis11437992002-04-12 09:54:03 +00008178fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008179{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uintptr_t" >&5
8180$as_echo "$ac_cv_sizeof_uintptr_t" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008181
8182
8183
Martin v. Löwis11437992002-04-12 09:54:03 +00008184cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008185#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008186_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008187
Michael W. Hudson54241132001-12-07 15:38:26 +00008188
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008189fi
8190
Martin v. Löwisebe26702006-10-02 14:55:51 +00008191
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008192# The cast to long int works around a bug in the HP C Compiler
8193# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8194# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8195# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008196{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
8197$as_echo_n "checking size of off_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008198if ${ac_cv_sizeof_off_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008199 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008200else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008201 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008202#ifdef HAVE_SYS_TYPES_H
8203#include <sys/types.h>
8204#endif
8205
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008206"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008207
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008208else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008209 if test "$ac_cv_type_off_t" = yes; then
8210 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8211$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00008212as_fn_error 77 "cannot compute sizeof (off_t)
Matthias Klose3cef2a92012-03-14 23:39:33 +01008213See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008214 else
8215 ac_cv_sizeof_off_t=0
8216 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008217fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008218
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008219fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008220{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
8221$as_echo "$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008222
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008223
8224
Martin v. Löwis11437992002-04-12 09:54:03 +00008225cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008226#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008227_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008228
Michael W. Hudson54241132001-12-07 15:38:26 +00008229
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008230
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008231{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable large file support" >&5
8232$as_echo_n "checking whether to enable large file support... " >&6; }
Mark Dickinson0ef0b912009-12-31 21:11:48 +00008233if test "$have_long_long" = yes
8234then
8235if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +00008236 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008237
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008238$as_echo "#define HAVE_LARGEFILE_SUPPORT 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008239
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008240 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8241$as_echo "yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008242else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008243 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8244$as_echo "no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008245fi
Mark Dickinson0ef0b912009-12-31 21:11:48 +00008246else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008247 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8248$as_echo "no" >&6; }
Mark Dickinson0ef0b912009-12-31 21:11:48 +00008249fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008250
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008251# The cast to long int works around a bug in the HP C Compiler
8252# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8253# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8254# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008255{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
8256$as_echo_n "checking size of time_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008257if ${ac_cv_sizeof_time_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008258 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008259else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008260 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008261#ifdef HAVE_SYS_TYPES_H
8262#include <sys/types.h>
8263#endif
8264#ifdef HAVE_TIME_H
8265#include <time.h>
8266#endif
8267
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008268"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008269
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008270else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008271 if test "$ac_cv_type_time_t" = yes; then
8272 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8273$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00008274as_fn_error 77 "cannot compute sizeof (time_t)
Matthias Klose3cef2a92012-03-14 23:39:33 +01008275See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008276 else
8277 ac_cv_sizeof_time_t=0
8278 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008279fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008280
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008281fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008282{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
8283$as_echo "$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008284
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008285
8286
Martin v. Löwis11437992002-04-12 09:54:03 +00008287cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008288#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008289_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008290
Michael W. Hudson54241132001-12-07 15:38:26 +00008291
8292
Trent Mick635f6fb2000-08-23 21:33:05 +00008293# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008294ac_save_cc="$CC"
8295if test "$ac_cv_kpthread" = "yes"
8296then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00008297elif test "$ac_cv_kthread" = "yes"
8298then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008299elif test "$ac_cv_pthread" = "yes"
8300then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008301fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008302{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_t" >&5
8303$as_echo_n "checking for pthread_t... " >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00008304have_pthread_t=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008305cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008306/* end confdefs.h. */
Matthias Klosec511b472010-05-08 11:01:39 +00008307
8308 #include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008309int
8310main ()
8311{
Guido van Rossum12580492000-09-24 16:47:19 +00008312pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008313 ;
8314 return 0;
8315}
Matthias Klosec511b472010-05-08 11:01:39 +00008316
Martin v. Löwis11437992002-04-12 09:54:03 +00008317_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008318if ac_fn_c_try_compile "$LINENO"; then :
Trent Mick635f6fb2000-08-23 21:33:05 +00008319 have_pthread_t=yes
Trent Mick635f6fb2000-08-23 21:33:05 +00008320fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008321rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008322{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_pthread_t" >&5
8323$as_echo "$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00008324if test "$have_pthread_t" = yes ; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008325 # The cast to long int works around a bug in the HP C Compiler
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008326# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8327# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8328# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008329{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
8330$as_echo_n "checking size of pthread_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008331if ${ac_cv_sizeof_pthread_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008332 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008333else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008334 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t" "
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008335#ifdef HAVE_PTHREAD_H
8336#include <pthread.h>
8337#endif
8338
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008339"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008340
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008341else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008342 if test "$ac_cv_type_pthread_t" = yes; then
8343 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8344$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00008345as_fn_error 77 "cannot compute sizeof (pthread_t)
Matthias Klose3cef2a92012-03-14 23:39:33 +01008346See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008347 else
8348 ac_cv_sizeof_pthread_t=0
8349 fi
Trent Mick635f6fb2000-08-23 21:33:05 +00008350fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008351
Trent Mick635f6fb2000-08-23 21:33:05 +00008352fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008353{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
8354$as_echo "$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008355
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008356
8357
Martin v. Löwis11437992002-04-12 09:54:03 +00008358cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00008359#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008360_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00008361
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008362
Trent Mick635f6fb2000-08-23 21:33:05 +00008363fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008364CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00008365
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008366{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-toolbox-glue" >&5
8367$as_echo_n "checking for --enable-toolbox-glue... " >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008368# Check whether --enable-toolbox-glue was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008369if test "${enable_toolbox_glue+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00008370 enableval=$enable_toolbox_glue;
8371fi
Jack Jansene578a632001-08-15 01:27:14 +00008372
8373
8374if test -z "$enable_toolbox_glue"
Martin v. Löwis11437992002-04-12 09:54:03 +00008375then
Jack Jansene578a632001-08-15 01:27:14 +00008376 case $ac_sys_system/$ac_sys_release in
8377 Darwin/*)
8378 enable_toolbox_glue="yes";;
8379 *)
8380 enable_toolbox_glue="no";;
8381 esac
8382fi
8383case "$enable_toolbox_glue" in
8384yes)
Jack Jansene578a632001-08-15 01:27:14 +00008385 extra_machdep_objs="Python/mactoolboxglue.o"
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00008386 extra_undefs="-u _PyMac_Error"
Martin v. Löwis11437992002-04-12 09:54:03 +00008387
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008388$as_echo "#define USE_TOOLBOX_OBJECT_GLUE 1" >>confdefs.h
Jack Jansene578a632001-08-15 01:27:14 +00008389
8390 ;;
8391*)
Jack Jansene578a632001-08-15 01:27:14 +00008392 extra_machdep_objs=""
Jack Jansen591cbed2001-08-15 13:55:15 +00008393 extra_undefs=""
Jack Jansene578a632001-08-15 01:27:14 +00008394 ;;
8395esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008396{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_toolbox_glue" >&5
8397$as_echo "$enable_toolbox_glue" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00008398
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008399
Ronald Oussoren0d236eb2008-06-06 21:31:33 +00008400
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008401case $ac_sys_system/$ac_sys_release in
Anthony Baxter82201742006-04-09 15:07:40 +00008402 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008403 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
8404 ;;
8405 Darwin/*)
8406 OTHER_LIBTOOL_OPT=""
8407 ;;
8408esac
8409
8410
Ronald Oussoren25967582009-09-06 10:00:26 +00008411
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008412case $ac_sys_system/$ac_sys_release in
Anthony Baxter82201742006-04-09 15:07:40 +00008413 Darwin/[01567]\..*)
Ronald Oussoren988117f2006-04-29 11:31:35 +00008414 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
8415 if test "${enable_universalsdk}"; then
8416 :
8417 else
Ronald Oussorenbc0e83c2010-02-11 13:26:54 +00008418 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Ronald Oussoren988117f2006-04-29 11:31:35 +00008419 fi
Jack Jansenb36687a2004-07-16 08:43:47 +00008420 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00008421 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00008422 Darwin/*)
Ronald Oussorena55af9a2010-01-17 16:25:57 +00008423 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008424 if test ${gcc_version} '<' 4.0
8425 then
8426 LIBTOOL_CRUFT="-lcc_dynamic"
8427 else
8428 LIBTOOL_CRUFT=""
8429 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008430 if test "$cross_compiling" = yes; then :
Ronald Oussoren23d92532009-09-07 06:12:00 +00008431 ac_osx_32bit=yes
Ronald Oussoren25967582009-09-06 10:00:26 +00008432else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008433 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren25967582009-09-06 10:00:26 +00008434/* end confdefs.h. */
Ronald Oussoren23d92532009-09-07 06:12:00 +00008435
Ronald Oussoren25967582009-09-06 10:00:26 +00008436 #include <unistd.h>
8437 int main(int argc, char*argv[])
8438 {
8439 if (sizeof(long) == 4) {
8440 return 0;
8441 } else {
8442 return 1;
8443 }
Ronald Oussoren84ddd722009-09-08 07:17:10 +00008444 }
Ronald Oussoren23d92532009-09-07 06:12:00 +00008445
Ronald Oussoren25967582009-09-06 10:00:26 +00008446_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008447if ac_fn_c_try_run "$LINENO"; then :
Ronald Oussoren25967582009-09-06 10:00:26 +00008448 ac_osx_32bit=yes
8449else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008450 ac_osx_32bit=no
Ronald Oussoren25967582009-09-06 10:00:26 +00008451fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008452rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8453 conftest.$ac_objext conftest.beam conftest.$ac_ext
Ronald Oussoren25967582009-09-06 10:00:26 +00008454fi
8455
8456
Ronald Oussoren25967582009-09-06 10:00:26 +00008457 if test "${ac_osx_32bit}" = "yes"; then
Ronald Oussorenbc0e83c2010-02-11 13:26:54 +00008458 case `/usr/bin/arch` in
Ronald Oussoren25967582009-09-06 10:00:26 +00008459 i386)
8460 MACOSX_DEFAULT_ARCH="i386"
8461 ;;
8462 ppc)
8463 MACOSX_DEFAULT_ARCH="ppc"
8464 ;;
8465 *)
Georg Brandl71f4fbb2011-02-25 11:04:50 +00008466 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren25967582009-09-06 10:00:26 +00008467 ;;
8468 esac
8469 else
Ronald Oussorenbc0e83c2010-02-11 13:26:54 +00008470 case `/usr/bin/arch` in
Ronald Oussoren25967582009-09-06 10:00:26 +00008471 i386)
8472 MACOSX_DEFAULT_ARCH="x86_64"
8473 ;;
8474 ppc)
8475 MACOSX_DEFAULT_ARCH="ppc64"
8476 ;;
8477 *)
Georg Brandl71f4fbb2011-02-25 11:04:50 +00008478 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren25967582009-09-06 10:00:26 +00008479 ;;
8480 esac
8481
Ronald Oussoren25967582009-09-06 10:00:26 +00008482 fi
8483
8484 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +00008485 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00008486 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008487esac
8488
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008489{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-framework" >&5
8490$as_echo_n "checking for --enable-framework... " >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00008491if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008492then
Skip Montanarodecc6a42003-01-01 20:07:49 +00008493 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00008494 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00008495 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008496
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008497$as_echo "#define WITH_NEXT_FRAMEWORK 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008498
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008499 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8500$as_echo "yes" >&6; }
Ronald Oussoren450d5612009-06-08 21:12:41 +00008501 if test $enable_shared = "yes"
8502 then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00008503 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 +00008504 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008505else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008506 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8507$as_echo "no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008508fi
8509
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008510{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dyld" >&5
8511$as_echo_n "checking for dyld... " >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008512case $ac_sys_system/$ac_sys_release in
8513 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008514
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008515$as_echo "#define WITH_DYLD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008516
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008517 { $as_echo "$as_me:${as_lineno-$LINENO}: result: always on for Darwin" >&5
8518$as_echo "always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008519 ;;
8520 *)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008521 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8522$as_echo "no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00008523 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008524esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008525
Guido van Rossum0a516c91994-09-12 10:58:40 +00008526# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00008527
Michael W. Hudson54241132001-12-07 15:38:26 +00008528
8529
8530
8531
Ronald Oussoren75912852010-04-08 08:13:31 +00008532
Guido van Rossum0a516c91994-09-12 10:58:40 +00008533# SO is the extension of shared libraries `(including the dot!)
Guido van Rossumaef734b2001-01-10 21:09:12 +00008534# -- usually .so, .sl on HP-UX, .dll on Cygwin
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008535{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SO" >&5
8536$as_echo_n "checking SO... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008537if test -z "$SO"
8538then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008539 case $ac_sys_system in
Neal Norwitz58e28882006-05-19 07:00:58 +00008540 hp*|HP*)
8541 case `uname -m` in
8542 ia64) SO=.so;;
8543 *) SO=.sl;;
8544 esac
8545 ;;
Guido van Rossumaef734b2001-01-10 21:09:12 +00008546 CYGWIN*) SO=.dll;;
Guido van Rossum563e7081996-09-10 18:20:48 +00008547 *) SO=.so;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008548 esac
Martin v. Löwis368de8f2003-06-14 14:46:38 +00008549else
8550 # this might also be a termcap variable, see #610332
8551 echo
8552 echo '====================================================================='
8553 echo '+ +'
8554 echo '+ WARNING: You have set SO in your environment. +'
8555 echo '+ Do you really mean to change the extension for shared libraries? +'
8556 echo '+ Continuing in 10 seconds to let you to ponder. +'
8557 echo '+ +'
8558 echo '====================================================================='
8559 sleep 10
Guido van Rossum0a516c91994-09-12 10:58:40 +00008560fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008561{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SO" >&5
8562$as_echo "$SO" >&6; }
Neal Norwitz58e28882006-05-19 07:00:58 +00008563
Ronald Oussoren79f90492009-01-02 10:44:46 +00008564
Neal Norwitz58e28882006-05-19 07:00:58 +00008565cat >>confdefs.h <<_ACEOF
8566#define SHLIB_EXT "$SO"
8567_ACEOF
8568
Guido van Rossum0a516c91994-09-12 10:58:40 +00008569# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +00008570# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008571# (Shared libraries in this instance are shared modules to be loaded into
8572# Python, as opposed to building Python itself as a shared library.)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008573{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDSHARED" >&5
8574$as_echo_n "checking LDSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008575if test -z "$LDSHARED"
8576then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008577 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008578 AIX*)
Martin Panterf75a2eb2016-11-20 09:31:41 +00008579 BLDSHARED="Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +00008580 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008581 ;;
8582 BeOS*)
8583 BLDSHARED="\$(srcdir)/Modules/ld_so_beos $LDLIBRARY"
Guido van Rossumce608b02001-09-28 15:59:38 +00008584 LDSHARED="\$(BINLIBDEST)/config/ld_so_beos \$(LIBDIR)/$LDLIBRARY"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008585 ;;
Guido van Rossum07397971997-04-29 21:49:50 +00008586 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00008587 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +00008588 SunOS/5*)
Ronald Oussoren75912852010-04-08 08:13:31 +00008589 if test "$GCC" = "yes" ; then
8590 LDSHARED='$(CC) -shared'
8591 LDCXXSHARED='$(CXX) -shared'
8592 else
8593 LDSHARED='$(CC) -G'
8594 LDCXXSHARED='$(CXX) -G'
Greg Ward57c9a662000-05-26 12:22:54 +00008595 fi ;;
Thomas Hellerdc96a772008-04-04 10:07:55 +00008596 hp*|HP*)
Ronald Oussoren75912852010-04-08 08:13:31 +00008597 if test "$GCC" = "yes" ; then
8598 LDSHARED='$(CC) -shared'
8599 LDCXXSHARED='$(CXX) -shared'
8600 else
8601 LDSHARED='ld -b'
Thomas Hellerdc96a772008-04-04 10:07:55 +00008602 fi ;;
Guido van Rossumda88dad1995-01-26 00:46:29 +00008603 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
Jack Jansen418c3b12001-11-14 10:59:57 +00008604 Darwin/1.3*)
Stefan Krah3a3e2032010-11-28 15:30:05 +00008605 LDSHARED='$(CC) -bundle'
8606 LDCXXSHARED='$(CXX) -bundle'
Jack Jansena3891ea2001-09-07 14:25:12 +00008607 if test "$enable_framework" ; then
8608 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00008609 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
8610 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Ronald Oussoren75912852010-04-08 08:13:31 +00008611 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00008612 else
8613 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00008614 LDSHARED="$LDSHARED -undefined suppress"
Ronald Oussoren75912852010-04-08 08:13:31 +00008615 LDCXXSHARED="$LDCXXSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00008616 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00008617 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Stefan Krah3a3e2032010-11-28 15:30:05 +00008618 LDSHARED='$(CC) -bundle'
8619 LDCXXSHARED='$(CXX) -bundle'
Jack Jansene578a632001-08-15 01:27:14 +00008620 if test "$enable_framework" ; then
8621 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00008622 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
8623 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Ronald Oussoren75912852010-04-08 08:13:31 +00008624 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00008625 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00008626 # No framework, use the Python app as bundle-loader
8627 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00008628 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Ronald Oussoren75912852010-04-08 08:13:31 +00008629 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008630 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00008631 Darwin/*)
8632 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
8633 # This allows an extension to be used in any Python
Ronald Oussoren38f1b982007-09-02 09:46:07 +00008634
Ned Deilyc40b9032014-06-25 13:48:46 -07008635 dep_target_major=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
8636 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
8637 dep_target_minor=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
8638 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
8639 if test ${dep_target_major} -eq 10 && \
8640 test ${dep_target_minor} -le 2
Jack Jansen6b08a402004-06-03 12:41:45 +00008641 then
Ned Deilyc40b9032014-06-25 13:48:46 -07008642 # building for OS X 10.0 through 10.2
Stefan Krah3a3e2032010-11-28 15:30:05 +00008643 LDSHARED='$(CC) -bundle'
8644 LDCXXSHARED='$(CXX) -bundle'
Jack Jansen6b08a402004-06-03 12:41:45 +00008645 if test "$enable_framework" ; then
8646 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00008647 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
8648 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Ronald Oussoren75912852010-04-08 08:13:31 +00008649 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +00008650 else
8651 # No framework, use the Python app as bundle-loader
8652 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
8653 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Ronald Oussoren75912852010-04-08 08:13:31 +00008654 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Jack Jansen6b08a402004-06-03 12:41:45 +00008655 fi
Ned Deilyc40b9032014-06-25 13:48:46 -07008656 else
8657 # building for OS X 10.3 and later
Ned Deilyc40b9032014-06-25 13:48:46 -07008658 LDSHARED='$(CC) -bundle -undefined dynamic_lookup'
8659 LDCXXSHARED='$(CXX) -bundle -undefined dynamic_lookup'
8660 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +00008661 fi
8662 ;;
Ronald Oussoren75912852010-04-08 08:13:31 +00008663 Linux*|GNU*|QNX*)
8664 LDSHARED='$(CC) -shared'
8665 LDCXXSHARED='$(CXX) -shared';;
8666 BSD/OS*/4*)
8667 LDSHARED="gcc -shared"
8668 LDCXXSHARED="g++ -shared";;
Martin v. Löwis222c5152006-06-03 07:37:13 +00008669 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00008670 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00008671 then
Stefan Krah3a3e2032010-11-28 15:30:05 +00008672 LDSHARED='$(CC) -shared'
8673 LDCXXSHARED='$(CXX) -shared'
Guido van Rossum0286ae82000-08-29 15:06:49 +00008674 else
Stefan Krah3a3e2032010-11-28 15:30:05 +00008675 LDSHARED="ld -Bshareable"
Guido van Rossum0286ae82000-08-29 15:06:49 +00008676 fi;;
Martin v. Löwis222c5152006-06-03 07:37:13 +00008677 OpenBSD*)
8678 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
8679 then
Stefan Krah3a3e2032010-11-28 15:30:05 +00008680 LDSHARED='$(CC) -shared $(CCSHARED)'
8681 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Martin v. Löwis222c5152006-06-03 07:37:13 +00008682 else
8683 case `uname -r` in
8684 [01].* | 2.[0-7] | 2.[0-7].*)
8685 LDSHARED="ld -Bshareable ${LDFLAGS}"
8686 ;;
8687 *)
Stefan Krah3a3e2032010-11-28 15:30:05 +00008688 LDSHARED='$(CC) -shared $(CCSHARED)'
8689 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Martin v. Löwis222c5152006-06-03 07:37:13 +00008690 ;;
8691 esac
8692 fi;;
Ronald Oussoren75912852010-04-08 08:13:31 +00008693 NetBSD*|DragonFly*)
Antoine Pitroucb402772011-01-02 20:51:34 +00008694 LDSHARED='$(CC) -shared'
8695 LDCXXSHARED='$(CXX) -shared';;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00008696 OpenUNIX*|UnixWare*)
Ronald Oussoren75912852010-04-08 08:13:31 +00008697 if test "$GCC" = "yes" ; then
8698 LDSHARED='$(CC) -shared'
8699 LDCXXSHARED='$(CXX) -shared'
8700 else
8701 LDSHARED='$(CC) -G'
8702 LDCXXSHARED='$(CXX) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00008703 fi;;
Ronald Oussoren75912852010-04-08 08:13:31 +00008704 SCO_SV*)
8705 LDSHARED='$(CC) -Wl,-G,-Bexport'
8706 LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
8707 CYGWIN*)
8708 LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
8709 LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
8710 atheos*)
8711 LDSHARED="gcc -shared"
8712 LDCXXSHARED="g++ -shared";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008713 *) LDSHARED="ld";;
8714 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008715fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008716{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDSHARED" >&5
8717$as_echo "$LDSHARED" >&6; }
Ronald Oussoren75912852010-04-08 08:13:31 +00008718LDCXXSHARED=${LDCXXSHARED-$LDSHARED}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008719BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00008720# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008721# library (module) -- this is only needed for a few systems
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008722{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CCSHARED" >&5
8723$as_echo_n "checking CCSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008724if test -z "$CCSHARED"
8725then
Guido van Rossum07397971997-04-29 21:49:50 +00008726 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00008727 SunOS*) if test "$GCC" = yes;
Martin v. Löwiseb623572007-03-12 10:50:39 +00008728 then CCSHARED="-fPIC";
8729 elif test `uname -p` = sparc;
8730 then CCSHARED="-xcode=pic32";
8731 else CCSHARED="-Kpic";
8732 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00008733 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00008734 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00008735 else CCSHARED="+z";
8736 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008737 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00008738 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00008739 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00008740 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00008741 if test "$GCC" = "yes"
8742 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008743 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00008744 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00008745 SCO_SV*)
8746 if test "$GCC" = "yes"
8747 then CCSHARED="-fPIC"
8748 else CCSHARED="-Kpic -belf"
8749 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008750 IRIX*/6*) case $CC in
8751 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00008752 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008753 esac;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008754 atheos*) CCSHARED="-fPIC";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008755 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008756fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008757{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCSHARED" >&5
8758$as_echo "$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008759# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008760# the python executable -- this is only needed for a few systems
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008761{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKFORSHARED" >&5
8762$as_echo_n "checking LINKFORSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008763if test -z "$LINKFORSHARED"
8764then
Guido van Rossum07397971997-04-29 21:49:50 +00008765 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008766 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008767 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00008768 LINKFORSHARED="-Wl,-E -Wl,+s";;
8769# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00008770 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008771 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008772 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00008773 Darwin/*)
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00008774 # -u _PyMac_Error is needed to pull in the mac toolbox glue,
8775 # which is
Jack Jansene578a632001-08-15 01:27:14 +00008776 # not used by the core itself but which needs to be in the core so
8777 # that dynamically loaded extension modules have access to it.
Jack Jansen97e3f002003-02-23 22:59:01 +00008778 # -prebind is no longer used, because it actually seems to give a
8779 # slowdown in stead of a speedup, maybe due to the large number of
8780 # dynamic loads Python does.
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00008781
8782 LINKFORSHARED="$extra_undefs"
Jack Jansene578a632001-08-15 01:27:14 +00008783 if test "$enable_framework"
8784 then
Jack Jansenda49e192005-01-07 13:08:22 +00008785 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00008786 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00008787 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00008788 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00008789 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00008790 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00008791 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +00008792 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
8793 then
8794 LINKFORSHARED="-Wl,--export-dynamic"
8795 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008796 SunOS/5*) case $CC in
8797 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00008798 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00008799 then
8800 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008801 fi;;
8802 esac;;
Jason Tishler30765592003-09-04 11:04:06 +00008803 CYGWIN*)
8804 if test $enable_shared = "no"
8805 then
8806 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
8807 fi;;
Martin v. Löwis8c255e42008-05-23 15:06:50 +00008808 QNX*)
8809 # -Wl,-E causes the symbols to be added to the dynamic
8810 # symbol table so that they can be found when a module
8811 # is loaded. -N 2048K causes the stack size to be set
8812 # to 2048 kilobytes so that the stack doesn't overflow
8813 # when running test_compile.py.
8814 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008815 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008816fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008817{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKFORSHARED" >&5
8818$as_echo "$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008819
Michael W. Hudson54241132001-12-07 15:38:26 +00008820
Ronald Oussoren0d236eb2008-06-06 21:31:33 +00008821
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008822{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAGSFORSHARED" >&5
8823$as_echo_n "checking CFLAGSFORSHARED... " >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00008824if test ! "$LIBRARY" = "$LDLIBRARY"
8825then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00008826 case $ac_sys_system in
8827 CYGWIN*)
8828 # Cygwin needs CCSHARED when building extension DLLs
8829 # but not when building the interpreter DLL.
8830 CFLAGSFORSHARED='';;
8831 *)
8832 CFLAGSFORSHARED='$(CCSHARED)'
8833 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00008834fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008835{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CFLAGSFORSHARED" >&5
8836$as_echo "$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00008837
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008838# SHLIBS are libraries (except -lc and -lm) to link to the python shared
8839# library (with --enable-shared).
8840# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00008841# symbols, this must be set to $(LIBS) (expanded by make). We do this even
8842# if it is not required, since it creates a dependency of the shared library
8843# to LIBS. This, in turn, means that applications linking the shared libpython
8844# don't need to link LIBS explicitly. The default should be only changed
8845# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008846
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008847{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SHLIBS" >&5
8848$as_echo_n "checking SHLIBS... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008849case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008850 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00008851 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008852esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008853{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIBS" >&5
8854$as_echo "$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008855
8856
Guido van Rossum627b2d71993-12-24 10:39:16 +00008857# checks for libraries
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008858{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
8859$as_echo_n "checking for dlopen in -ldl... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008860if ${ac_cv_lib_dl_dlopen+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008861 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008862else
Martin v. Löwis11437992002-04-12 09:54:03 +00008863 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008864LIBS="-ldl $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008865cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008866/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008867
Martin v. Löwiseba40652007-08-30 20:10:57 +00008868/* Override any GCC internal prototype to avoid an error.
8869 Use char because int might match the return type of a GCC
8870 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008871#ifdef __cplusplus
8872extern "C"
8873#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008874char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008875int
8876main ()
8877{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008878return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008879 ;
8880 return 0;
8881}
8882_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008883if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008884 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008885else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008886 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008887fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008888rm -f core conftest.err conftest.$ac_objext \
8889 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008890LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00008891fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008892{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
8893$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008894if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008895 cat >>confdefs.h <<_ACEOF
8896#define HAVE_LIBDL 1
8897_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00008898
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008899 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00008900
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008901fi
8902 # Dynamic linking for SunOS/Solaris and SYSV
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008903{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
8904$as_echo_n "checking for shl_load in -ldld... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008905if ${ac_cv_lib_dld_shl_load+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008906 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008907else
Martin v. Löwis11437992002-04-12 09:54:03 +00008908 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008909LIBS="-ldld $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008910cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008911/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008912
Martin v. Löwiseba40652007-08-30 20:10:57 +00008913/* Override any GCC internal prototype to avoid an error.
8914 Use char because int might match the return type of a GCC
8915 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008916#ifdef __cplusplus
8917extern "C"
8918#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008919char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008920int
8921main ()
8922{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008923return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008924 ;
8925 return 0;
8926}
8927_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008928if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008929 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008930else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008931 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008932fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008933rm -f core conftest.err conftest.$ac_objext \
8934 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008935LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00008936fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008937{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
8938$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008939if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008940 cat >>confdefs.h <<_ACEOF
8941#define HAVE_LIBDLD 1
8942_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00008943
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008944 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008945
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008946fi
8947 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +00008948
Ronald Oussoren79f90492009-01-02 10:44:46 +00008949# only check for sem_init if thread support is requested
Martin v. Löwis519adae2003-09-20 10:47:47 +00008950if test "$with_threads" = "yes" -o -z "$with_threads"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008951 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
8952$as_echo_n "checking for library containing sem_init... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008953if ${ac_cv_search_sem_init+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008954 $as_echo_n "(cached) " >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00008955else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00008956 ac_func_search_save_LIBS=$LIBS
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008957cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008958/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008959
Martin v. Löwiseba40652007-08-30 20:10:57 +00008960/* Override any GCC internal prototype to avoid an error.
8961 Use char because int might match the return type of a GCC
8962 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008963#ifdef __cplusplus
8964extern "C"
8965#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008966char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008967int
8968main ()
8969{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008970return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008971 ;
8972 return 0;
8973}
8974_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00008975for ac_lib in '' pthread rt posix4; do
8976 if test -z "$ac_lib"; then
8977 ac_res="none required"
8978 else
8979 ac_res=-l$ac_lib
Skip Montanaro89e975f2007-08-22 19:05:21 +00008980 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Martin v. Löwiseba40652007-08-30 20:10:57 +00008981 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008982 if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00008983 ac_cv_search_sem_init=$ac_res
Brett Cannon19fab762007-06-02 03:02:29 +00008984fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008985rm -f core conftest.err conftest.$ac_objext \
8986 conftest$ac_exeext
Matthias Klose3cef2a92012-03-14 23:39:33 +01008987 if ${ac_cv_search_sem_init+:} false; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00008988 break
Skip Montanaro89e975f2007-08-22 19:05:21 +00008989fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008990done
Matthias Klose3cef2a92012-03-14 23:39:33 +01008991if ${ac_cv_search_sem_init+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008992
Martin v. Löwiseba40652007-08-30 20:10:57 +00008993else
8994 ac_cv_search_sem_init=no
8995fi
8996rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00008997LIBS=$ac_func_search_save_LIBS
8998fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008999{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
9000$as_echo "$ac_cv_search_sem_init" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009001ac_res=$ac_cv_search_sem_init
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009002if test "$ac_res" != no; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00009003 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009004
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009005fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +00009006 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +00009007 # posix4 on Solaris 2.6
9008 # pthread (first!) on Linux
9009fi
9010
Martin v. Löwis19d17342003-06-14 21:03:05 +00009011# check if we need libintl for locale functions
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009012{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for textdomain in -lintl" >&5
9013$as_echo_n "checking for textdomain in -lintl... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009014if ${ac_cv_lib_intl_textdomain+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009015 $as_echo_n "(cached) " >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +00009016else
9017 ac_check_lib_save_LIBS=$LIBS
9018LIBS="-lintl $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009019cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009020/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00009021
Martin v. Löwiseba40652007-08-30 20:10:57 +00009022/* Override any GCC internal prototype to avoid an error.
9023 Use char because int might match the return type of a GCC
9024 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00009025#ifdef __cplusplus
9026extern "C"
9027#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +00009028char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00009029int
9030main ()
9031{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009032return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00009033 ;
9034 return 0;
9035}
9036_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009037if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00009038 ac_cv_lib_intl_textdomain=yes
9039else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009040 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +00009041fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009042rm -f core conftest.err conftest.$ac_objext \
9043 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +00009044LIBS=$ac_check_lib_save_LIBS
9045fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009046{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_textdomain" >&5
9047$as_echo "$ac_cv_lib_intl_textdomain" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009048if test "x$ac_cv_lib_intl_textdomain" = xyes; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00009049
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009050$as_echo "#define WITH_LIBINTL 1" >>confdefs.h
Martin v. Löwis19d17342003-06-14 21:03:05 +00009051
9052fi
9053
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009054
9055# checks for system dependent C++ extensions support
9056case "$ac_sys_system" in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009057 AIX*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for genuine AIX C++ extensions support" >&5
9058$as_echo_n "checking for genuine AIX C++ extensions support... " >&6; }
9059 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009060/* end confdefs.h. */
Matthias Klosec511b472010-05-08 11:01:39 +00009061
Georg Brandl94800df2011-02-25 11:09:02 +00009062 #include <load.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009063int
9064main ()
9065{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009066loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00009067 ;
9068 return 0;
9069}
Matthias Klosec511b472010-05-08 11:01:39 +00009070
Martin v. Löwis11437992002-04-12 09:54:03 +00009071_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009072if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009073
Matthias Klosec511b472010-05-08 11:01:39 +00009074
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009075$as_echo "#define AIX_GENUINE_CPLUSPLUS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009076
Matthias Klosec511b472010-05-08 11:01:39 +00009077 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009078$as_echo "yes" >&6; }
Matthias Klosec511b472010-05-08 11:01:39 +00009079
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009080else
Matthias Klosec511b472010-05-08 11:01:39 +00009081
9082 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009083$as_echo "no" >&6; }
Matthias Klosec511b472010-05-08 11:01:39 +00009084
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009085fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009086rm -f core conftest.err conftest.$ac_objext \
9087 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009088 *) ;;
9089esac
9090
Guido van Rossum70c7f481998-03-26 18:44:10 +00009091# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009092# BeOS' sockets are stashed in libnet.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009093{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_open in -lnsl" >&5
9094$as_echo_n "checking for t_open in -lnsl... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009095if ${ac_cv_lib_nsl_t_open+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009096 $as_echo_n "(cached) " >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009097else
Martin v. Löwis11437992002-04-12 09:54:03 +00009098 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009099LIBS="-lnsl $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009100cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009101/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009102
Martin v. Löwiseba40652007-08-30 20:10:57 +00009103/* Override any GCC internal prototype to avoid an error.
9104 Use char because int might match the return type of a GCC
9105 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009106#ifdef __cplusplus
9107extern "C"
9108#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009109char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009110int
9111main ()
9112{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009113return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009114 ;
9115 return 0;
9116}
9117_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009118if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009119 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009120else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009121 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009122fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009123rm -f core conftest.err conftest.$ac_objext \
9124 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009125LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009126fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009127{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_t_open" >&5
9128$as_echo "$ac_cv_lib_nsl_t_open" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009129if test "x$ac_cv_lib_nsl_t_open" = xyes; then :
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009130 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009131fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00009132 # SVR4
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009133{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
9134$as_echo_n "checking for socket in -lsocket... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009135if ${ac_cv_lib_socket_socket+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009136 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009137else
Martin v. Löwis11437992002-04-12 09:54:03 +00009138 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009139LIBS="-lsocket $LIBS $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009140cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009141/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009142
Martin v. Löwiseba40652007-08-30 20:10:57 +00009143/* Override any GCC internal prototype to avoid an error.
9144 Use char because int might match the return type of a GCC
9145 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009146#ifdef __cplusplus
9147extern "C"
9148#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009149char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009150int
9151main ()
9152{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009153return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009154 ;
9155 return 0;
9156}
9157_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009158if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009159 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009160else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009161 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009162fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009163rm -f core conftest.err conftest.$ac_objext \
9164 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009165LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009166fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009167{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
9168$as_echo "$ac_cv_lib_socket_socket" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009169if test "x$ac_cv_lib_socket_socket" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +00009170 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +00009171fi
9172 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +00009173
Jeremy Hyltoncb25d5e2000-07-27 21:23:28 +00009174case "$ac_sys_system" in
9175BeOS*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009176{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lnet" >&5
9177$as_echo_n "checking for socket in -lnet... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009178if ${ac_cv_lib_net_socket+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009179 $as_echo_n "(cached) " >&6
Guido van Rossumad678af1998-10-02 14:42:15 +00009180else
Martin v. Löwis11437992002-04-12 09:54:03 +00009181 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +00009182LIBS="-lnet $LIBS $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009183cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009184/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009185
Martin v. Löwiseba40652007-08-30 20:10:57 +00009186/* Override any GCC internal prototype to avoid an error.
9187 Use char because int might match the return type of a GCC
9188 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009189#ifdef __cplusplus
9190extern "C"
9191#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009192char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009193int
9194main ()
9195{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009196return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009197 ;
9198 return 0;
9199}
9200_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009201if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009202 ac_cv_lib_net_socket=yes
Guido van Rossumad678af1998-10-02 14:42:15 +00009203else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009204 ac_cv_lib_net_socket=no
Guido van Rossumad678af1998-10-02 14:42:15 +00009205fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009206rm -f core conftest.err conftest.$ac_objext \
9207 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009208LIBS=$ac_check_lib_save_LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +00009209fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009210{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_net_socket" >&5
9211$as_echo "$ac_cv_lib_net_socket" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009212if test "x$ac_cv_lib_net_socket" = xyes; then :
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009213 LIBS="-lnet $LIBS"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009214fi
9215 # BeOS
9216;;
9217esac
Guido van Rossum70c7f481998-03-26 18:44:10 +00009218
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009219{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libs" >&5
9220$as_echo_n "checking for --with-libs... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009221
Martin v. Löwiseba40652007-08-30 20:10:57 +00009222# Check whether --with-libs was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009223if test "${with_libs+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00009224 withval=$with_libs;
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009225{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9226$as_echo "$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +00009227LIBS="$withval $LIBS"
9228
9229else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009230 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9231$as_echo "no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009232fi
9233
Guido van Rossum7f43da71994-08-01 12:15:30 +00009234
Benjamin Peterson64e8f6e2014-12-15 00:00:23 -05009235
9236
9237
9238
9239
9240
9241
9242if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
9243 if test -n "$ac_tool_prefix"; then
Benjamin Peterson1c335e62010-01-01 15:16:29 +00009244 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
9245set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009246{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9247$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009248if ${ac_cv_path_PKG_CONFIG+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009249 $as_echo_n "(cached) " >&6
Benjamin Peterson1c335e62010-01-01 15:16:29 +00009250else
9251 case $PKG_CONFIG in
9252 [\\/]* | ?:[\\/]*)
9253 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
9254 ;;
9255 *)
9256 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9257for as_dir in $PATH
9258do
9259 IFS=$as_save_IFS
9260 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009261 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01009262 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Benjamin Peterson1c335e62010-01-01 15:16:29 +00009263 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009264 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Peterson1c335e62010-01-01 15:16:29 +00009265 break 2
9266 fi
9267done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009268 done
Benjamin Peterson1c335e62010-01-01 15:16:29 +00009269IFS=$as_save_IFS
9270
9271 ;;
9272esac
9273fi
9274PKG_CONFIG=$ac_cv_path_PKG_CONFIG
9275if test -n "$PKG_CONFIG"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009276 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
9277$as_echo "$PKG_CONFIG" >&6; }
Benjamin Peterson1c335e62010-01-01 15:16:29 +00009278else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009279 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9280$as_echo "no" >&6; }
Benjamin Peterson1c335e62010-01-01 15:16:29 +00009281fi
9282
9283
9284fi
9285if test -z "$ac_cv_path_PKG_CONFIG"; then
9286 ac_pt_PKG_CONFIG=$PKG_CONFIG
9287 # Extract the first word of "pkg-config", so it can be a program name with args.
9288set dummy pkg-config; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009289{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9290$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009291if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009292 $as_echo_n "(cached) " >&6
Benjamin Peterson1c335e62010-01-01 15:16:29 +00009293else
9294 case $ac_pt_PKG_CONFIG in
9295 [\\/]* | ?:[\\/]*)
9296 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
9297 ;;
9298 *)
9299 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9300for as_dir in $PATH
9301do
9302 IFS=$as_save_IFS
9303 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009304 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01009305 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Benjamin Peterson1c335e62010-01-01 15:16:29 +00009306 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009307 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Peterson1c335e62010-01-01 15:16:29 +00009308 break 2
9309 fi
9310done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009311 done
Benjamin Peterson1c335e62010-01-01 15:16:29 +00009312IFS=$as_save_IFS
9313
9314 ;;
9315esac
9316fi
9317ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
9318if test -n "$ac_pt_PKG_CONFIG"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009319 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
9320$as_echo "$ac_pt_PKG_CONFIG" >&6; }
Benjamin Peterson1c335e62010-01-01 15:16:29 +00009321else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009322 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9323$as_echo "no" >&6; }
Benjamin Peterson1c335e62010-01-01 15:16:29 +00009324fi
9325
9326 if test "x$ac_pt_PKG_CONFIG" = x; then
9327 PKG_CONFIG=""
9328 else
9329 case $cross_compiling:$ac_tool_warned in
9330yes:)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009331{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9332$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Benjamin Peterson1c335e62010-01-01 15:16:29 +00009333ac_tool_warned=yes ;;
9334esac
9335 PKG_CONFIG=$ac_pt_PKG_CONFIG
9336 fi
9337else
9338 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
9339fi
9340
Benjamin Peterson64e8f6e2014-12-15 00:00:23 -05009341fi
9342if test -n "$PKG_CONFIG"; then
9343 _pkg_min_version=0.9.0
9344 { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
9345$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
9346 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
9347 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9348$as_echo "yes" >&6; }
9349 else
9350 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9351$as_echo "no" >&6; }
9352 PKG_CONFIG=""
9353 fi
9354fi
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00009355
9356# Check for use of the system expat library
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009357{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-expat" >&5
9358$as_echo_n "checking for --with-system-expat... " >&6; }
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00009359
9360# Check whether --with-system_expat was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009361if test "${with_system_expat+set}" = set; then :
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00009362 withval=$with_system_expat;
Benjamin Petersonf2d1b2a2010-10-31 16:53:53 +00009363else
9364 with_system_expat="no"
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00009365fi
9366
9367
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009368{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_expat" >&5
9369$as_echo "$with_system_expat" >&6; }
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00009370
9371# Check for use of the system libffi library
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009372{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-ffi" >&5
9373$as_echo_n "checking for --with-system-ffi... " >&6; }
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00009374
9375# Check whether --with-system_ffi was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009376if test "${with_system_ffi+set}" = set; then :
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00009377 withval=$with_system_ffi;
Benjamin Petersonf2d1b2a2010-10-31 16:53:53 +00009378else
9379 with_system_ffi="no"
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00009380fi
9381
9382
9383if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
Benjamin Peterson1c335e62010-01-01 15:16:29 +00009384 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
9385else
9386 LIBFFI_INCLUDEDIR=""
9387fi
9388
9389
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009390{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_ffi" >&5
9391$as_echo "$with_system_ffi" >&6; }
Martin v. Löwis9176fc12006-04-11 11:12:43 +00009392
Ned Deilya2a9f572013-10-25 00:30:10 -07009393# Check for --with-tcltk-includes=path and --with-tcltk-libs=path
9394
9395
9396{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-includes" >&5
9397$as_echo_n "checking for --with-tcltk-includes... " >&6; }
9398
9399# Check whether --with-tcltk-includes was given.
9400if test "${with_tcltk_includes+set}" = set; then :
9401 withval=$with_tcltk_includes;
9402else
9403 with_tcltk_includes="default"
9404fi
9405
9406{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_includes" >&5
9407$as_echo "$with_tcltk_includes" >&6; }
9408{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-libs" >&5
9409$as_echo_n "checking for --with-tcltk-libs... " >&6; }
9410
9411# Check whether --with-tcltk-libs was given.
9412if test "${with_tcltk_libs+set}" = set; then :
9413 withval=$with_tcltk_libs;
9414else
9415 with_tcltk_libs="default"
9416fi
9417
9418{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_libs" >&5
9419$as_echo "$with_tcltk_libs" >&6; }
9420if test "x$with_tcltk_includes" = xdefault || test "x$with_tcltk_libs" = xdefault
9421then
9422 if test "x$with_tcltk_includes" != "x$with_tcltk_libs"
9423 then
9424 as_fn_error $? "use both --with-tcltk-includes='...' and --with-tcltk-libs='...' or neither" "$LINENO" 5
9425 fi
9426 TCLTK_INCLUDES=""
9427 TCLTK_LIBS=""
9428else
9429 TCLTK_INCLUDES="$with_tcltk_includes"
9430 TCLTK_LIBS="$with_tcltk_libs"
9431fi
9432
Benjamin Peterson867475c2009-04-29 20:36:25 +00009433# Check for --with-dbmliborder
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009434{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dbmliborder" >&5
9435$as_echo_n "checking for --with-dbmliborder... " >&6; }
Benjamin Peterson867475c2009-04-29 20:36:25 +00009436
9437# Check whether --with-dbmliborder was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009438if test "${with_dbmliborder+set}" = set; then :
Benjamin Peterson867475c2009-04-29 20:36:25 +00009439 withval=$with_dbmliborder;
9440if test x$with_dbmliborder = xyes
9441then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00009442as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Benjamin Peterson867475c2009-04-29 20:36:25 +00009443else
9444 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
9445 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
9446 then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00009447 as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Benjamin Peterson867475c2009-04-29 20:36:25 +00009448 fi
9449 done
9450fi
9451fi
9452
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009453{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dbmliborder" >&5
9454$as_echo "$with_dbmliborder" >&6; }
Benjamin Peterson867475c2009-04-29 20:36:25 +00009455
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00009456# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009457
9458
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009459{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-signal-module" >&5
9460$as_echo_n "checking for --with-signal-module... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009461
Martin v. Löwiseba40652007-08-30 20:10:57 +00009462# Check whether --with-signal-module was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009463if test "${with_signal_module+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00009464 withval=$with_signal_module;
9465fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009466
9467
9468if test -z "$with_signal_module"
9469then with_signal_module="yes"
9470fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009471{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_signal_module" >&5
9472$as_echo "$with_signal_module" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009473
9474if test "${with_signal_module}" = "yes"; then
9475 USE_SIGNAL_MODULE=""
9476 SIGNAL_OBJS=""
9477else
9478 USE_SIGNAL_MODULE="#"
9479 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
9480fi
9481
Guido van Rossum3d15bd82001-01-10 18:53:48 +00009482# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +00009483
Barry Warsawc0d24d82000-06-29 16:12:00 +00009484USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +00009485
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009486{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dec-threads" >&5
9487$as_echo_n "checking for --with-dec-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009488
Guido van Rossumec2f0731997-01-22 20:54:01 +00009489
Martin v. Löwiseba40652007-08-30 20:10:57 +00009490# Check whether --with-dec-threads was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009491if test "${with_dec_threads+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00009492 withval=$with_dec_threads;
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009493{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9494$as_echo "$withval" >&6; }
Guido van Rossumec2f0731997-01-22 20:54:01 +00009495LDLAST=-threads
Guido van Rossumf78abae1997-01-21 22:02:36 +00009496if test "${with_thread+set}" != set; then
Guido van Rossumec2f0731997-01-22 20:54:01 +00009497 with_thread="$withval";
Guido van Rossumf78abae1997-01-21 22:02:36 +00009498fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00009499else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009500 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9501$as_echo "no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009502fi
9503
Martin v. Löwis11437992002-04-12 09:54:03 +00009504
9505# Templates for things AC_DEFINEd more than once.
9506# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +00009507
9508
Martin v. Löwis11437992002-04-12 09:54:03 +00009509
9510
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009511{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-threads" >&5
9512$as_echo_n "checking for --with-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009513
Martin v. Löwiseba40652007-08-30 20:10:57 +00009514# Check whether --with-threads was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009515if test "${with_threads+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00009516 withval=$with_threads;
9517fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00009518
9519
Barry Warsawc0d24d82000-06-29 16:12:00 +00009520# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +00009521
Martin v. Löwiseba40652007-08-30 20:10:57 +00009522# Check whether --with-thread was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009523if test "${with_thread+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00009524 withval=$with_thread; with_threads=$with_thread
9525fi
9526
Barry Warsawc0d24d82000-06-29 16:12:00 +00009527
9528if test -z "$with_threads"
9529then with_threads="yes"
9530fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009531{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_threads" >&5
9532$as_echo "$with_threads" >&6; }
Barry Warsawc0d24d82000-06-29 16:12:00 +00009533
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009534
Barry Warsawc0d24d82000-06-29 16:12:00 +00009535if test "$with_threads" = "no"
9536then
9537 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009538elif test "$ac_cv_pthread_is_default" = yes
9539then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009540 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009541
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009542 # Defining _REENTRANT on system with POSIX threads should not hurt.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009543 $as_echo "#define _REENTRANT 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009544
9545 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +00009546 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009547elif test "$ac_cv_kpthread" = "yes"
9548then
9549 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00009550 if test "$ac_cv_cxx_thread" = "yes"; then
9551 CXX="$CXX -Kpthread"
9552 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009553 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum2242f2f2001-04-11 20:58:20 +00009554
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009555 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009556 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00009557elif test "$ac_cv_kthread" = "yes"
9558then
9559 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00009560 if test "$ac_cv_cxx_thread" = "yes"; then
9561 CXX="$CXX -Kthread"
9562 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009563 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis5f433f02003-05-05 05:05:30 +00009564
9565 posix_threads=yes
9566 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009567elif test "$ac_cv_pthread" = "yes"
9568then
9569 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00009570 if test "$ac_cv_cxx_thread" = "yes"; then
9571 CXX="$CXX -pthread"
9572 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009573 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009574
9575 posix_threads=yes
9576 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009577else
9578 if test ! -z "$with_threads" -a -d "$with_threads"
9579 then LDFLAGS="$LDFLAGS -L$with_threads"
9580 fi
9581 if test ! -z "$withval" -a -d "$withval"
9582 then LDFLAGS="$LDFLAGS -L$withval"
9583 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009584
9585 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +00009586 # define _POSIX_THREADS in unistd.h. Some apparently don't
9587 # (e.g. gnu pth with pthread emulation)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009588 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _POSIX_THREADS in unistd.h" >&5
9589$as_echo_n "checking for _POSIX_THREADS in unistd.h... " >&6; }
9590 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009591/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +00009592
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009593#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +00009594#ifdef _POSIX_THREADS
9595yes
9596#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009597
9598_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009599if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009600 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009601 unistd_defines_pthreads=yes
9602else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009603 unistd_defines_pthreads=no
9604fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00009605rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009606
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009607 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $unistd_defines_pthreads" >&5
9608$as_echo "$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009609
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009610 $as_echo "#define _REENTRANT 1" >>confdefs.h
Guido van Rossum9caf77a1996-08-01 00:52:26 +00009611
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009612 ac_fn_c_check_header_mongrel "$LINENO" "cthreads.h" "ac_cv_header_cthreads_h" "$ac_includes_default"
Matthias Klose3cef2a92012-03-14 23:39:33 +01009613if test "x$ac_cv_header_cthreads_h" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009614 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +00009615
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009616 $as_echo "#define C_THREADS 1" >>confdefs.h
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009617
Martin v. Löwis11437992002-04-12 09:54:03 +00009618
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009619$as_echo "#define HURD_C_THREADS 1" >>confdefs.h
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009620
9621 LIBS="$LIBS -lthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009622 THREADOBJ="Python/thread.o"
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009623else
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009624
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009625 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 +01009626if test "x$ac_cv_header_mach_cthreads_h" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009627 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +00009628
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009629 $as_echo "#define C_THREADS 1" >>confdefs.h
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009630
Martin v. Löwis11437992002-04-12 09:54:03 +00009631
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009632$as_echo "#define MACH_C_THREADS 1" >>confdefs.h
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009633
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009634 THREADOBJ="Python/thread.o"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009635else
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009636
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009637 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pth" >&5
9638$as_echo_n "checking for --with-pth... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009639
Martin v. Löwiseba40652007-08-30 20:10:57 +00009640# Check whether --with-pth was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009641if test "${with_pth+set}" = set; then :
9642 withval=$with_pth; { $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9643$as_echo "$withval" >&6; }
9644 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009645
9646
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009647$as_echo "#define HAVE_PTH 1" >>confdefs.h
Guido van Rossum9e8181b2000-09-19 00:46:46 +00009648
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00009649 LIBS="-lpth $LIBS"
9650 THREADOBJ="Python/thread.o"
Guido van Rossum9e8181b2000-09-19 00:46:46 +00009651else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009652 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9653$as_echo "no" >&6; }
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009654
9655 # Just looking for pthread_create in libpthread is not enough:
9656 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
9657 # So we really have to include pthread.h, and then link.
9658 _libs=$LIBS
9659 LIBS="$LIBS -lpthread"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009660 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
9661$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
9662 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009663/* end confdefs.h. */
Stefan Krahae66ca62012-11-22 22:36:57 +01009664
9665#include <stdio.h>
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009666#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +00009667
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009668void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +00009669int
9670main ()
9671{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009672
9673pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +00009674 ;
9675 return 0;
9676}
9677_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009678if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009679
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009680 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9681$as_echo "yes" >&6; }
9682 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum02a1c402000-02-25 19:26:31 +00009683
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009684 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009685 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +00009686else
Martin v. Löwis11437992002-04-12 09:54:03 +00009687
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009688 LIBS=$_libs
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009689 ac_fn_c_check_func "$LINENO" "pthread_detach" "ac_cv_func_pthread_detach"
Matthias Klose3cef2a92012-03-14 23:39:33 +01009690if test "x$ac_cv_func_pthread_detach" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009691 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumad678af1998-10-02 14:42:15 +00009692
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009693 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009694 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +00009695else
Guido van Rossumad678af1998-10-02 14:42:15 +00009696
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009697 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 +01009698if test "x$ac_cv_header_atheos_threads_h" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009699 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009700
9701
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009702$as_echo "#define ATHEOS_THREADS 1" >>confdefs.h
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009703
9704 THREADOBJ="Python/thread.o"
9705else
9706
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009707 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 +01009708if test "x$ac_cv_header_kernel_OS_h" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009709 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009710
9711
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009712$as_echo "#define BEOS_THREADS 1" >>confdefs.h
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009713
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009714 THREADOBJ="Python/thread.o"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009715else
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009716
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009717 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5
9718$as_echo_n "checking for pthread_create in -lpthreads... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009719if ${ac_cv_lib_pthreads_pthread_create+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009720 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009721else
Martin v. Löwis11437992002-04-12 09:54:03 +00009722 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009723LIBS="-lpthreads $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009724cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009725/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009726
Martin v. Löwiseba40652007-08-30 20:10:57 +00009727/* Override any GCC internal prototype to avoid an error.
9728 Use char because int might match the return type of a GCC
9729 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009730#ifdef __cplusplus
9731extern "C"
9732#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009733char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009734int
9735main ()
9736{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009737return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009738 ;
9739 return 0;
9740}
9741_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009742if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009743 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +00009744else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009745 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +00009746fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009747rm -f core conftest.err conftest.$ac_objext \
9748 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009749LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00009750fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009751{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5
9752$as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009753if test "x$ac_cv_lib_pthreads_pthread_create" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009754 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Greg Steinadf63d62000-07-05 10:38:09 +00009755
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009756 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00009757 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009758 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +00009759else
Greg Steinadf63d62000-07-05 10:38:09 +00009760
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009761 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5
9762$as_echo_n "checking for pthread_create in -lc_r... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009763if ${ac_cv_lib_c_r_pthread_create+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009764 $as_echo_n "(cached) " >&6
Greg Steinadf63d62000-07-05 10:38:09 +00009765else
Martin v. Löwis11437992002-04-12 09:54:03 +00009766 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00009767LIBS="-lc_r $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009768cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009769/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009770
Martin v. Löwiseba40652007-08-30 20:10:57 +00009771/* Override any GCC internal prototype to avoid an error.
9772 Use char because int might match the return type of a GCC
9773 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009774#ifdef __cplusplus
9775extern "C"
9776#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009777char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009778int
9779main ()
9780{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009781return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009782 ;
9783 return 0;
9784}
9785_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009786if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009787 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +00009788else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009789 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +00009790fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009791rm -f core conftest.err conftest.$ac_objext \
9792 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009793LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +00009794fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009795{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5
9796$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009797if test "x$ac_cv_lib_c_r_pthread_create" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009798 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum49545951997-12-02 19:28:29 +00009799
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009800 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00009801 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009802 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +00009803else
Guido van Rossum07bd90e2000-05-08 13:41:38 +00009804
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009805 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_create_system in -lpthread" >&5
9806$as_echo_n "checking for __pthread_create_system in -lpthread... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009807if ${ac_cv_lib_pthread___pthread_create_system+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009808 $as_echo_n "(cached) " >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009809else
Martin v. Löwis11437992002-04-12 09:54:03 +00009810 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009811LIBS="-lpthread $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009812cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009813/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009814
Martin v. Löwiseba40652007-08-30 20:10:57 +00009815/* Override any GCC internal prototype to avoid an error.
9816 Use char because int might match the return type of a GCC
9817 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009818#ifdef __cplusplus
9819extern "C"
9820#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009821char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009822int
9823main ()
9824{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009825return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009826 ;
9827 return 0;
9828}
9829_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009830if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009831 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009832else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009833 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009834fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009835rm -f core conftest.err conftest.$ac_objext \
9836 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009837LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009838fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009839{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_create_system" >&5
9840$as_echo "$ac_cv_lib_pthread___pthread_create_system" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009841if test "x$ac_cv_lib_pthread___pthread_create_system" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009842 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009843
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009844 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00009845 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009846 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009847else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009848
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009849 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lcma" >&5
9850$as_echo_n "checking for pthread_create in -lcma... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009851if ${ac_cv_lib_cma_pthread_create+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009852 $as_echo_n "(cached) " >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +00009853else
Martin v. Löwis11437992002-04-12 09:54:03 +00009854 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00009855LIBS="-lcma $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009856cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009857/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009858
Martin v. Löwiseba40652007-08-30 20:10:57 +00009859/* Override any GCC internal prototype to avoid an error.
9860 Use char because int might match the return type of a GCC
9861 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009862#ifdef __cplusplus
9863extern "C"
9864#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009865char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009866int
9867main ()
9868{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009869return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009870 ;
9871 return 0;
9872}
9873_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009874if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009875 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +00009876else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009877 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +00009878fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009879rm -f core conftest.err conftest.$ac_objext \
9880 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009881LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00009882fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009883{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cma_pthread_create" >&5
9884$as_echo "$ac_cv_lib_cma_pthread_create" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009885if test "x$ac_cv_lib_cma_pthread_create" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009886 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumb93a8621998-05-07 13:27:32 +00009887
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009888 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00009889 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009890 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +00009891else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +00009892
Martin v. Löwis130fb172001-07-19 11:00:41 +00009893 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +00009894fi
9895
Guido van Rossum627b2d71993-12-24 10:39:16 +00009896
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009897fi
9898
Guido van Rossum0be3e491997-05-22 20:33:33 +00009899fi
9900
Guido van Rossum49545951997-12-02 19:28:29 +00009901fi
9902
Guido van Rossumb93a8621998-05-07 13:27:32 +00009903fi
9904
Guido van Rossum07bd90e2000-05-08 13:41:38 +00009905
Michael W. Hudson54241132001-12-07 15:38:26 +00009906fi
9907
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009908
9909fi
9910
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009911fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009912rm -f core conftest.err conftest.$ac_objext \
9913 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009914fi
9915
Martin v. Löwis11437992002-04-12 09:54:03 +00009916fi
9917
9918
9919fi
9920
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009921
Michael W. Hudson54241132001-12-07 15:38:26 +00009922
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009923 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usconfig in -lmpc" >&5
9924$as_echo_n "checking for usconfig in -lmpc... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009925if ${ac_cv_lib_mpc_usconfig+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009926 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009927else
Martin v. Löwis11437992002-04-12 09:54:03 +00009928 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009929LIBS="-lmpc $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009930cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009931/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009932
Martin v. Löwiseba40652007-08-30 20:10:57 +00009933/* Override any GCC internal prototype to avoid an error.
9934 Use char because int might match the return type of a GCC
9935 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009936#ifdef __cplusplus
9937extern "C"
9938#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009939char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009940int
9941main ()
9942{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009943return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009944 ;
9945 return 0;
9946}
9947_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009948if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009949 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009950else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009951 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009952fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009953rm -f core conftest.err conftest.$ac_objext \
9954 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009955LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009956fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009957{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpc_usconfig" >&5
9958$as_echo "$ac_cv_lib_mpc_usconfig" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009959if test "x$ac_cv_lib_mpc_usconfig" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009960 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00009961
Martin v. Löwis130fb172001-07-19 11:00:41 +00009962 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009963 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009964 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +00009965fi
9966
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00009967
Neal Norwitza978ab02002-11-02 16:58:05 +00009968 if test "$posix_threads" != "yes"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009969 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thr_create in -lthread" >&5
9970$as_echo_n "checking for thr_create in -lthread... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009971if ${ac_cv_lib_thread_thr_create+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009972 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009973else
Martin v. Löwis11437992002-04-12 09:54:03 +00009974 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009975LIBS="-lthread $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009976cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009977/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009978
Martin v. Löwiseba40652007-08-30 20:10:57 +00009979/* Override any GCC internal prototype to avoid an error.
9980 Use char because int might match the return type of a GCC
9981 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009982#ifdef __cplusplus
9983extern "C"
9984#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009985char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009986int
9987main ()
9988{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009989return thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009990 ;
9991 return 0;
9992}
9993_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009994if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009995 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009996else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009997 ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009998fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009999rm -f core conftest.err conftest.$ac_objext \
10000 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010001LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010002fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010003{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_thread_thr_create" >&5
10004$as_echo "$ac_cv_lib_thread_thr_create" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010005if test "x$ac_cv_lib_thread_thr_create" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010006 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000010007
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010008 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010009 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010010 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000010011fi
10012
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010013 fi
Michael W. Hudson54241132001-12-07 15:38:26 +000010014
Martin v. Löwis130fb172001-07-19 11:00:41 +000010015 if test "$USE_THREAD_MODULE" != "#"
10016 then
10017 # If the above checks didn't disable threads, (at least) OSF1
10018 # needs this '-threads' argument during linking.
10019 case $ac_sys_system in
10020 OSF1) LDLAST=-threads;;
10021 esac
Jeremy Hylton1a2ca862000-10-16 16:59:12 +000010022 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010023fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010024
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010025if test "$posix_threads" = "yes"; then
10026 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010027
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010028$as_echo "#define _POSIX_THREADS 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010029
10030 fi
10031
10032 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
10033 case $ac_sys_system/$ac_sys_release in
Charles-François Natali4929eb92011-07-21 19:41:04 +020010034 SunOS/5.6)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010035$as_echo "#define HAVE_PTHREAD_DESTRUCTOR 1" >>confdefs.h
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010036
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010037 ;;
10038 SunOS/5.8)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010039$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010040
10041 ;;
Charles-François Natali4929eb92011-07-21 19:41:04 +020010042 AIX/*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010043$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Christian Heimescba36bb2008-01-30 22:54:18 +000010044
10045 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010046 esac
10047
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010048 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
10049$as_echo_n "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010050 if ${ac_cv_pthread_system_supported+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010051 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010052else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010053 if test "$cross_compiling" = yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010054 ac_cv_pthread_system_supported=no
10055else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010056 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010057/* end confdefs.h. */
Stefan Krahae66ca62012-11-22 22:36:57 +010010058
10059 #include <stdio.h>
10060 #include <pthread.h>
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010061 void *foo(void *parm) {
10062 return NULL;
10063 }
10064 main() {
10065 pthread_attr_t attr;
10066 pthread_t id;
10067 if (pthread_attr_init(&attr)) exit(-1);
10068 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
10069 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
10070 exit(0);
10071 }
10072_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010073if ac_fn_c_try_run "$LINENO"; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010074 ac_cv_pthread_system_supported=yes
10075else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010076 ac_cv_pthread_system_supported=no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010077fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010078rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10079 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010080fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010081
Martin v. Löwiseba40652007-08-30 20:10:57 +000010082
Guido van Rossum627b2d71993-12-24 10:39:16 +000010083fi
10084
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010085 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_system_supported" >&5
10086$as_echo "$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010087 if test "$ac_cv_pthread_system_supported" = "yes"; then
10088
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010089$as_echo "#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010090
10091 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010092 for ac_func in pthread_sigmask
10093do :
10094 ac_fn_c_check_func "$LINENO" "pthread_sigmask" "ac_cv_func_pthread_sigmask"
Matthias Klose3cef2a92012-03-14 23:39:33 +010010095if test "x$ac_cv_func_pthread_sigmask" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010096 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010097#define HAVE_PTHREAD_SIGMASK 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010098_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +000010099 case $ac_sys_system in
10100 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010101
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010102$as_echo "#define HAVE_BROKEN_PTHREAD_SIGMASK 1" >>confdefs.h
Jason Tishlerfac083d2003-07-22 15:20:49 +000010103
10104 ;;
10105 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010106fi
10107done
10108
Christian Heimes0d604cf2013-08-21 13:26:05 +020010109 for ac_func in pthread_atfork
10110do :
10111 ac_fn_c_check_func "$LINENO" "pthread_atfork" "ac_cv_func_pthread_atfork"
10112if test "x$ac_cv_func_pthread_atfork" = xyes; then :
10113 cat >>confdefs.h <<_ACEOF
10114#define HAVE_PTHREAD_ATFORK 1
10115_ACEOF
10116
10117fi
10118done
10119
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010120fi
10121
10122
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010123# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000010124
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010125{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if --enable-ipv6 is specified" >&5
10126$as_echo_n "checking if --enable-ipv6 is specified... " >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000010127# Check whether --enable-ipv6 was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010128if test "${enable_ipv6+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +000010129 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010130 no)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010131 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10132$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010133 ipv6=no
10134 ;;
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010135 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10136$as_echo "yes" >&6; }
10137 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010138
10139 ipv6=yes
10140 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010141 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010142else
Martin v. Löwis11437992002-04-12 09:54:03 +000010143
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010144 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010145/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010146 /* AF_INET6 available check */
10147#include <sys/types.h>
10148#include <sys/socket.h>
Charles-François Natalibe2b9072013-01-08 19:47:00 +010010149int
10150main ()
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010151{
Charles-François Natalibe2b9072013-01-08 19:47:00 +010010152int domain = AF_INET6;
10153 ;
10154 return 0;
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010155}
Martin v. Löwis11437992002-04-12 09:54:03 +000010156_ACEOF
Charles-François Natalibe2b9072013-01-08 19:47:00 +010010157if ac_fn_c_try_compile "$LINENO"; then :
Matthias Klosec511b472010-05-08 11:01:39 +000010158
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010159 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10160$as_echo "yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010161 ipv6=yes
Matthias Klosec511b472010-05-08 11:01:39 +000010162
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010163else
Matthias Klosec511b472010-05-08 11:01:39 +000010164
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010165 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10166$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010167 ipv6=no
Matthias Klosec511b472010-05-08 11:01:39 +000010168
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010169fi
Charles-François Natalibe2b9072013-01-08 19:47:00 +010010170rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010171
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010172if test "$ipv6" = "yes"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010173 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RFC2553 API is available" >&5
10174$as_echo_n "checking if RFC2553 API is available... " >&6; }
10175 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010176/* end confdefs.h. */
Matthias Klosec511b472010-05-08 11:01:39 +000010177
10178 #include <sys/types.h>
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010179#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010180int
10181main ()
10182{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010183struct sockaddr_in6 x;
Matthias Klosec511b472010-05-08 11:01:39 +000010184 x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000010185 ;
10186 return 0;
10187}
Matthias Klosec511b472010-05-08 11:01:39 +000010188
Martin v. Löwis11437992002-04-12 09:54:03 +000010189_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010190if ac_fn_c_try_compile "$LINENO"; then :
Matthias Klosec511b472010-05-08 11:01:39 +000010191
10192 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010193$as_echo "yes" >&6; }
Matthias Klosec511b472010-05-08 11:01:39 +000010194 ipv6=yes
10195
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010196else
Matthias Klosec511b472010-05-08 11:01:39 +000010197
10198 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010199$as_echo "no" >&6; }
Matthias Klosec511b472010-05-08 11:01:39 +000010200 ipv6=no
10201
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010202fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010203rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010204fi
10205
10206if test "$ipv6" = "yes"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010207 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010208
10209fi
10210
Martin v. Löwiseba40652007-08-30 20:10:57 +000010211fi
10212
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010213
10214ipv6type=unknown
10215ipv6lib=none
10216ipv6trylibc=no
10217
10218if test "$ipv6" = "yes"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010219 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5
10220$as_echo_n "checking ipv6 stack type... " >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +000010221 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
10222 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010223 case $i in
10224 inria)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010225 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010226/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010227
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010228#include <netinet/in.h>
10229#ifdef IPV6_INRIA_VERSION
10230yes
10231#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010232_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010233if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010234 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010235 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010236fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +000010237rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010238
10239 ;;
10240 kame)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010241 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010242/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010243
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010244#include <netinet/in.h>
10245#ifdef __KAME__
10246yes
10247#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010248_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010249if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010250 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010251 ipv6type=$i;
10252 ipv6lib=inet6
10253 ipv6libdir=/usr/local/v6/lib
10254 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010255fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +000010256rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010257
10258 ;;
10259 linux-glibc)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010260 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010261/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010262
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010263#include <features.h>
10264#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
10265yes
10266#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010267_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010268if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010269 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010270 ipv6type=$i;
10271 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010272fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +000010273rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010274
10275 ;;
10276 linux-inet6)
10277 if test -d /usr/inet6; then
10278 ipv6type=$i
10279 ipv6lib=inet6
10280 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000010281 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010282 fi
10283 ;;
10284 solaris)
10285 if test -f /etc/netconfig; then
Antoine Pitrou31e85952011-01-03 18:57:14 +000010286 if $GREP -q tcp6 /etc/netconfig; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010287 ipv6type=$i
10288 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010289 fi
10290 fi
10291 ;;
10292 toshiba)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010293 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010294/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010295
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010296#include <sys/param.h>
10297#ifdef _TOSHIBA_INET6
10298yes
10299#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010300_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010301if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010302 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010303 ipv6type=$i;
10304 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010305 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010306fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +000010307rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010308
10309 ;;
10310 v6d)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010311 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010312/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010313
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010314#include </usr/local/v6/include/sys/v6config.h>
10315#ifdef __V6D__
10316yes
10317#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010318_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010319if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010320 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010321 ipv6type=$i;
10322 ipv6lib=v6;
10323 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000010324 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010325fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +000010326rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010327
10328 ;;
10329 zeta)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010330 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010331/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010332
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010333#include <sys/param.h>
10334#ifdef _ZETA_MINAMI_INET6
10335yes
10336#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010337_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010338if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010339 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010340 ipv6type=$i;
10341 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010342 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010343fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +000010344rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010345
10346 ;;
10347 esac
10348 if test "$ipv6type" != "unknown"; then
10349 break
10350 fi
10351 done
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010352 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5
10353$as_echo "$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010354fi
10355
10356if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
10357 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
10358 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
10359 echo "using lib$ipv6lib"
10360 else
10361 if test $ipv6trylibc = "yes"; then
10362 echo "using libc"
10363 else
10364 echo 'Fatal: no $ipv6lib library found. cannot continue.'
10365 echo "You need to fetch lib$ipv6lib.a from appropriate"
10366 echo 'ipv6 kit and compile beforehand.'
10367 exit 1
10368 fi
10369 fi
10370fi
10371
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010372{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for OSX 10.5 SDK or later" >&5
10373$as_echo_n "checking for OSX 10.5 SDK or later... " >&6; }
10374cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000010375/* end confdefs.h. */
Matthias Klosec511b472010-05-08 11:01:39 +000010376
10377 #include <Carbon/Carbon.h>
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000010378int
10379main ()
10380{
10381FSIORefNum fRef = 0
10382 ;
10383 return 0;
10384}
Mark Dickinson0712b562010-05-08 19:13:21 +000010385
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000010386_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010387if ac_fn_c_try_compile "$LINENO"; then :
Matthias Klosec511b472010-05-08 11:01:39 +000010388
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000010389
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010390$as_echo "#define HAVE_OSX105_SDK 1" >>confdefs.h
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000010391
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010392 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10393$as_echo "yes" >&6; }
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000010394
Mark Dickinson0712b562010-05-08 19:13:21 +000010395else
10396
10397 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10398$as_echo "no" >&6; }
10399
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000010400fi
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000010401rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10402
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010403# Check for --with-doc-strings
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010404{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-doc-strings" >&5
10405$as_echo_n "checking for --with-doc-strings... " >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010406
Martin v. Löwiseba40652007-08-30 20:10:57 +000010407# Check whether --with-doc-strings was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010408if test "${with_doc_strings+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +000010409 withval=$with_doc_strings;
10410fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010411
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010412
10413if test -z "$with_doc_strings"
10414then with_doc_strings="yes"
10415fi
10416if test "$with_doc_strings" != "no"
10417then
10418
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010419$as_echo "#define WITH_DOC_STRINGS 1" >>confdefs.h
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010420
10421fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010422{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_doc_strings" >&5
10423$as_echo "$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010424
Neil Schemenauera35c6882001-02-27 04:45:05 +000010425# Check for Python-specific malloc support
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010426{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tsc" >&5
10427$as_echo_n "checking for --with-tsc... " >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010428
Martin v. Löwiseba40652007-08-30 20:10:57 +000010429# Check whether --with-tsc was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010430if test "${with_tsc+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +000010431 withval=$with_tsc;
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010432if test "$withval" != no
10433then
10434
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010435$as_echo "#define WITH_TSC 1" >>confdefs.h
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010436
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010437 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10438$as_echo "yes" >&6; }
10439else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10440$as_echo "no" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010441fi
10442else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010443 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10444$as_echo "no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000010445fi
10446
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010447
10448# Check for Python-specific malloc support
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010449{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pymalloc" >&5
10450$as_echo_n "checking for --with-pymalloc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010451
Martin v. Löwiseba40652007-08-30 20:10:57 +000010452# Check whether --with-pymalloc was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010453if test "${with_pymalloc+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +000010454 withval=$with_pymalloc;
10455fi
Michael W. Hudson54241132001-12-07 15:38:26 +000010456
Neil Schemenauera35c6882001-02-27 04:45:05 +000010457
Neil Schemenauer16c22972002-03-22 15:34:49 +000010458if test -z "$with_pymalloc"
10459then with_pymalloc="yes"
10460fi
10461if test "$with_pymalloc" != "no"
10462then
Martin v. Löwis11437992002-04-12 09:54:03 +000010463
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010464$as_echo "#define WITH_PYMALLOC 1" >>confdefs.h
Neil Schemenauer16c22972002-03-22 15:34:49 +000010465
10466fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010467{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pymalloc" >&5
10468$as_echo "$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +000010469
Benjamin Peterson91c12eb2009-12-03 02:52:39 +000010470# Check for Valgrind support
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010471{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-valgrind" >&5
10472$as_echo_n "checking for --with-valgrind... " >&6; }
Benjamin Peterson91c12eb2009-12-03 02:52:39 +000010473
10474# Check whether --with-valgrind was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010475if test "${with_valgrind+set}" = set; then :
Benjamin Peterson91c12eb2009-12-03 02:52:39 +000010476 withval=$with_valgrind;
10477else
10478 with_valgrind=no
10479fi
10480
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010481{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_valgrind" >&5
10482$as_echo "$with_valgrind" >&6; }
Benjamin Peterson91c12eb2009-12-03 02:52:39 +000010483if test "$with_valgrind" != no; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010484 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 +010010485if test "x$ac_cv_header_valgrind_valgrind_h" = xyes; then :
Benjamin Peterson91c12eb2009-12-03 02:52:39 +000010486
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010487$as_echo "#define WITH_VALGRIND 1" >>confdefs.h
Benjamin Peterson91c12eb2009-12-03 02:52:39 +000010488
10489else
Georg Brandl71f4fbb2011-02-25 11:04:50 +000010490 as_fn_error $? "Valgrind support requested but headers not available" "$LINENO" 5
Benjamin Peterson91c12eb2009-12-03 02:52:39 +000010491
10492fi
10493
10494
10495fi
10496
Barry Warsawef82cd72000-06-30 16:21:01 +000010497# Check for --with-wctype-functions
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010498{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-wctype-functions" >&5
10499$as_echo_n "checking for --with-wctype-functions... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010500
Martin v. Löwiseba40652007-08-30 20:10:57 +000010501# Check whether --with-wctype-functions was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010502if test "${with_wctype_functions+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +000010503 withval=$with_wctype_functions;
Barry Warsawef82cd72000-06-30 16:21:01 +000010504if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000010505then
10506
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010507$as_echo "#define WANT_WCTYPE_FUNCTIONS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000010508
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010509 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10510$as_echo "yes" >&6; }
10511else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10512$as_echo "no" >&6; }
Barry Warsawef82cd72000-06-30 16:21:01 +000010513fi
10514else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010515 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10516$as_echo "no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000010517fi
10518
Barry Warsawef82cd72000-06-30 16:21:01 +000010519
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010520# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000010521
Guido van Rossum98935bf2001-09-05 19:13:16 +000010522DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000010523
Guido van Rossume97ee181999-12-20 21:27:22 +000010524# the dlopen() function means we might want to use dynload_shlib.o. some
10525# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +000010526for ac_func in dlopen
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010527do :
10528 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
Matthias Klose3cef2a92012-03-14 23:39:33 +010010529if test "x$ac_cv_func_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010530 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010531#define HAVE_DLOPEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010532_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000010533
Guido van Rossume97ee181999-12-20 21:27:22 +000010534fi
Thomas Wouters3a584202000-08-05 23:28:51 +000010535done
Guido van Rossume97ee181999-12-20 21:27:22 +000010536
Michael W. Hudson54241132001-12-07 15:38:26 +000010537
Guido van Rossume97ee181999-12-20 21:27:22 +000010538# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
10539# loading of modules.
10540
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010541{ $as_echo "$as_me:${as_lineno-$LINENO}: checking DYNLOADFILE" >&5
10542$as_echo_n "checking DYNLOADFILE... " >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000010543if test -z "$DYNLOADFILE"
10544then
10545 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000010546 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
10547 if test "$ac_cv_func_dlopen" = yes
10548 then DYNLOADFILE="dynload_shlib.o"
10549 else DYNLOADFILE="dynload_aix.o"
10550 fi
10551 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000010552 BeOS*) DYNLOADFILE="dynload_beos.o";;
10553 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Anthony Baxter82201742006-04-09 15:07:40 +000010554 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
10555 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010556 atheos*) DYNLOADFILE="dynload_atheos.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000010557 *)
10558 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
10559 # out any dynamic loading
10560 if test "$ac_cv_func_dlopen" = yes
10561 then DYNLOADFILE="dynload_shlib.o"
10562 else DYNLOADFILE="dynload_stub.o"
10563 fi
10564 ;;
10565 esac
10566fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010567{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DYNLOADFILE" >&5
10568$as_echo "$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000010569if test "$DYNLOADFILE" != "dynload_stub.o"
10570then
Martin v. Löwis11437992002-04-12 09:54:03 +000010571
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010572$as_echo "#define HAVE_DYNAMIC_LOADING 1" >>confdefs.h
Guido van Rossume97ee181999-12-20 21:27:22 +000010573
10574fi
10575
Neil Schemenauer4e425612001-06-19 15:44:15 +000010576# MACHDEP_OBJS can be set to platform-specific object files needed by Python
10577
Michael W. Hudson54241132001-12-07 15:38:26 +000010578
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010579{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP_OBJS" >&5
10580$as_echo_n "checking MACHDEP_OBJS... " >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000010581if test -z "$MACHDEP_OBJS"
10582then
Jack Jansene578a632001-08-15 01:27:14 +000010583 MACHDEP_OBJS=$extra_machdep_objs
10584else
10585 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000010586fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010587{ $as_echo "$as_me:${as_lineno-$LINENO}: result: MACHDEP_OBJS" >&5
10588$as_echo "MACHDEP_OBJS" >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000010589
Guido van Rossum627b2d71993-12-24 10:39:16 +000010590# checks for library functions
Martin v. Löwisaef18b12008-03-24 13:31:16 +000010591for ac_func in alarm setitimer getitimer bind_textdomain_codeset chown \
10592 clock confstr ctermid execv fchmod fchown fork fpathconf ftime ftruncate \
doko@ubuntu.coma50b0de2015-04-13 21:55:59 +020010593 gai_strerror getgroups getlogin getloadavg getpeername getpgid getpid \
10594 getentropy \
Martin v. Löwis50ea4562009-11-27 13:56:01 +000010595 getpriority getresuid getresgid getpwent getspnam getspent getsid getwd \
Benjamin Petersond16e01c2014-02-04 10:20:26 -050010596 initgroups kill killpg lchmod lchown lstat mkfifo mknod mktime mmap \
Martin v. Löwisa5f09072002-10-11 05:37:59 +000010597 mremap nice pathconf pause plock poll pthread_init \
Guido van Rossum162e38c2003-02-19 15:25:10 +000010598 putenv readlink realpath \
Jesse Noller355b1262009-04-02 00:03:28 +000010599 select sem_open sem_timedwait sem_getvalue sem_unlink setegid seteuid \
10600 setgid \
Martin v. Löwis4daacb12003-03-28 18:37:01 +000010601 setlocale setregid setreuid setsid setpgid setpgrp setuid setvbuf snprintf \
Martin v. Löwis50ea4562009-11-27 13:56:01 +000010602 setlocale setregid setreuid setresuid setresgid \
10603 setsid setpgid setpgrp setuid setvbuf snprintf \
Skip Montanaro7e11a012004-02-07 12:55:46 +000010604 sigaction siginterrupt sigrelse strftime \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000010605 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Neal Norwitz05a45592006-03-20 06:30:08 +000010606 truncate uname unsetenv utimes waitpid wait3 wait4 wcscoll _getpty
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010607do :
10608 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10609ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Georg Brandl71f4fbb2011-02-25 11:04:50 +000010610if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010611 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010612#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010613_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000010614
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010615fi
10616done
10617
Michael W. Hudson54241132001-12-07 15:38:26 +000010618
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010619# For some functions, having a definition is not sufficient, since
10620# we want to take their address.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010621{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chroot" >&5
10622$as_echo_n "checking for chroot... " >&6; }
10623cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010624/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010625#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010626int
10627main ()
10628{
10629void *x=chroot
10630 ;
10631 return 0;
10632}
10633_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010634if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010635
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010636$as_echo "#define HAVE_CHROOT 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010637
Matthias Klosec511b472010-05-08 11:01:39 +000010638 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010639$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010640else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010641 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10642$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010643
10644fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010645rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010646{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for link" >&5
10647$as_echo_n "checking for link... " >&6; }
10648cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010649/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010650#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010651int
10652main ()
10653{
10654void *x=link
10655 ;
10656 return 0;
10657}
10658_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010659if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010660
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010661$as_echo "#define HAVE_LINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010662
Matthias Klosec511b472010-05-08 11:01:39 +000010663 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010664$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010665else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010666 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10667$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010668
10669fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010670rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010671{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for symlink" >&5
10672$as_echo_n "checking for symlink... " >&6; }
10673cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010674/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010675#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010676int
10677main ()
10678{
10679void *x=symlink
10680 ;
10681 return 0;
10682}
10683_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010684if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010685
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010686$as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010687
Matthias Klosec511b472010-05-08 11:01:39 +000010688 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010689$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010690else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010691 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10692$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010693
10694fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010695rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010696{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fchdir" >&5
10697$as_echo_n "checking for fchdir... " >&6; }
10698cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010699/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010700#include <unistd.h>
10701int
10702main ()
10703{
10704void *x=fchdir
10705 ;
10706 return 0;
10707}
10708_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010709if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010710
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010711$as_echo "#define HAVE_FCHDIR 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010712
Matthias Klosec511b472010-05-08 11:01:39 +000010713 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010714$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010715else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010716 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10717$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010718
10719fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010720rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010721{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fsync" >&5
10722$as_echo_n "checking for fsync... " >&6; }
10723cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010724/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010725#include <unistd.h>
10726int
10727main ()
10728{
10729void *x=fsync
10730 ;
10731 return 0;
10732}
10733_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010734if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010735
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010736$as_echo "#define HAVE_FSYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010737
Matthias Klosec511b472010-05-08 11:01:39 +000010738 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010739$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010740else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010741 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10742$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010743
10744fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010745rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010746{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fdatasync" >&5
10747$as_echo_n "checking for fdatasync... " >&6; }
10748cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010749/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010750#include <unistd.h>
10751int
10752main ()
10753{
10754void *x=fdatasync
10755 ;
10756 return 0;
10757}
10758_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010759if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010760
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010761$as_echo "#define HAVE_FDATASYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010762
Matthias Klosec511b472010-05-08 11:01:39 +000010763 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010764$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010765else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010766 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10767$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010768
10769fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010770rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010771{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll" >&5
10772$as_echo_n "checking for epoll... " >&6; }
10773cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000010774/* end confdefs.h. */
10775#include <sys/epoll.h>
10776int
10777main ()
10778{
10779void *x=epoll_create
10780 ;
10781 return 0;
10782}
10783_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010784if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010785
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010786$as_echo "#define HAVE_EPOLL 1" >>confdefs.h
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000010787
Matthias Klosec511b472010-05-08 11:01:39 +000010788 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010789$as_echo "yes" >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000010790else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010791 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10792$as_echo "no" >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000010793
10794fi
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000010795rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010796{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kqueue" >&5
10797$as_echo_n "checking for kqueue... " >&6; }
10798cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000010799/* end confdefs.h. */
10800
10801#include <sys/types.h>
10802#include <sys/event.h>
10803
10804int
10805main ()
10806{
10807int x=kqueue()
10808 ;
10809 return 0;
10810}
10811_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010812if ac_fn_c_try_compile "$LINENO"; then :
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000010813
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010814$as_echo "#define HAVE_KQUEUE 1" >>confdefs.h
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000010815
Matthias Klosec511b472010-05-08 11:01:39 +000010816 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010817$as_echo "yes" >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000010818else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010819 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10820$as_echo "no" >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000010821
10822fi
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000010823rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000010824# On some systems (eg. FreeBSD 5), we would find a definition of the
10825# functions ctermid_r, setgroups in the library, but no prototype
10826# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
10827# address to avoid compiler warnings and potential miscompilations
10828# because of the missing prototypes.
10829
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010830{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ctermid_r" >&5
10831$as_echo_n "checking for ctermid_r... " >&6; }
10832cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010833/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000010834
Martin v. Löwisd5843682002-11-21 20:41:28 +000010835#include <stdio.h>
10836
Martin v. Löwisd5843682002-11-21 20:41:28 +000010837int
10838main ()
10839{
10840void* p = ctermid_r
10841 ;
10842 return 0;
10843}
10844_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010845if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000010846
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010847$as_echo "#define HAVE_CTERMID_R 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000010848
Matthias Klosec511b472010-05-08 11:01:39 +000010849 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010850$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010851else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010852 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10853$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010854
10855fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010856rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10857
Antoine Pitroub170f172010-09-10 18:47:36 +000010858{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock declaration" >&5
10859$as_echo_n "checking for flock declaration... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010860if ${ac_cv_flock_decl+:} false; then :
Antoine Pitroub170f172010-09-10 18:47:36 +000010861 $as_echo_n "(cached) " >&6
10862else
10863 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010864/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010865#include <sys/file.h>
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010866int
10867main ()
10868{
10869void* p = flock
Antoine Pitroub170f172010-09-10 18:47:36 +000010870
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010871 ;
10872 return 0;
10873}
10874_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010875if ac_fn_c_try_compile "$LINENO"; then :
Antoine Pitroub170f172010-09-10 18:47:36 +000010876 ac_cv_flock_decl=yes
10877else
10878 ac_cv_flock_decl=no
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010879
10880fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010881rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitrou85729812010-09-07 14:55:24 +000010882
Antoine Pitroub170f172010-09-10 18:47:36 +000010883fi
10884{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_flock_decl" >&5
10885$as_echo "$ac_cv_flock_decl" >&6; }
10886if test "x${ac_cv_flock_decl}" = xyes; then
10887 for ac_func in flock
10888do :
10889 ac_fn_c_check_func "$LINENO" "flock" "ac_cv_func_flock"
Matthias Klose3cef2a92012-03-14 23:39:33 +010010890if test "x$ac_cv_func_flock" = xyes; then :
Antoine Pitroub170f172010-09-10 18:47:36 +000010891 cat >>confdefs.h <<_ACEOF
10892#define HAVE_FLOCK 1
Antoine Pitrou85729812010-09-07 14:55:24 +000010893_ACEOF
Antoine Pitroub170f172010-09-10 18:47:36 +000010894
Antoine Pitrou85729812010-09-07 14:55:24 +000010895else
Antoine Pitroub170f172010-09-10 18:47:36 +000010896 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock in -lbsd" >&5
Antoine Pitrou85729812010-09-07 14:55:24 +000010897$as_echo_n "checking for flock in -lbsd... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010898if ${ac_cv_lib_bsd_flock+:} false; then :
Antoine Pitrou85729812010-09-07 14:55:24 +000010899 $as_echo_n "(cached) " >&6
10900else
10901 ac_check_lib_save_LIBS=$LIBS
10902LIBS="-lbsd $LIBS"
10903cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10904/* end confdefs.h. */
10905
10906/* Override any GCC internal prototype to avoid an error.
10907 Use char because int might match the return type of a GCC
10908 builtin and then its argument prototype would still apply. */
10909#ifdef __cplusplus
10910extern "C"
10911#endif
10912char flock ();
10913int
10914main ()
10915{
10916return flock ();
10917 ;
10918 return 0;
10919}
10920_ACEOF
10921if ac_fn_c_try_link "$LINENO"; then :
10922 ac_cv_lib_bsd_flock=yes
10923else
10924 ac_cv_lib_bsd_flock=no
10925fi
10926rm -f core conftest.err conftest.$ac_objext \
10927 conftest$ac_exeext conftest.$ac_ext
10928LIBS=$ac_check_lib_save_LIBS
10929fi
10930{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_flock" >&5
10931$as_echo "$ac_cv_lib_bsd_flock" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010932if test "x$ac_cv_lib_bsd_flock" = xyes; then :
Antoine Pitroub170f172010-09-10 18:47:36 +000010933 $as_echo "#define HAVE_FLOCK 1" >>confdefs.h
Antoine Pitrou85729812010-09-07 14:55:24 +000010934
10935
10936$as_echo "#define FLOCK_NEEDS_LIBBSD 1" >>confdefs.h
10937
10938
10939fi
10940
10941
10942fi
Antoine Pitroub170f172010-09-10 18:47:36 +000010943done
10944
Antoine Pitrou85729812010-09-07 14:55:24 +000010945fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010946
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010947{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
10948$as_echo_n "checking for getpagesize... " >&6; }
10949cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010950/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010951
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010952#include <unistd.h>
10953
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010954int
10955main ()
10956{
10957void* p = getpagesize
10958 ;
10959 return 0;
10960}
10961_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010962if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010963
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010964$as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010965
Matthias Klosec511b472010-05-08 11:01:39 +000010966 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010967$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010968else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010969 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10970$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010971
10972fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010973rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010974
Charles-François Natali93a11752011-11-27 13:01:35 +010010975{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken unsetenv" >&5
10976$as_echo_n "checking for broken unsetenv... " >&6; }
10977cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10978/* end confdefs.h. */
10979
10980#include <stdlib.h>
10981
10982int
10983main ()
10984{
10985int res = unsetenv("DUMMY")
10986 ;
10987 return 0;
10988}
10989_ACEOF
10990if ac_fn_c_try_compile "$LINENO"; then :
10991 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10992$as_echo "no" >&6; }
10993else
10994
10995$as_echo "#define HAVE_BROKEN_UNSETENV 1" >>confdefs.h
10996
10997 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10998$as_echo "yes" >&6; }
10999
11000fi
11001rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11002
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011003for ac_prog in true
11004do
11005 # Extract the first word of "$ac_prog", so it can be a program name with args.
11006set dummy $ac_prog; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011007{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11008$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011009if ${ac_cv_prog_TRUE+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011010 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011011else
11012 if test -n "$TRUE"; then
11013 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
11014else
11015as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11016for as_dir in $PATH
11017do
11018 IFS=$as_save_IFS
11019 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011020 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +010011021 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011022 ac_cv_prog_TRUE="$ac_prog"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011023 $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 +000011024 break 2
11025 fi
11026done
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011027 done
Martin v. Löwiseba40652007-08-30 20:10:57 +000011028IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011029
11030fi
11031fi
11032TRUE=$ac_cv_prog_TRUE
11033if test -n "$TRUE"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011034 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TRUE" >&5
11035$as_echo "$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011036else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011037 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11038$as_echo "no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011039fi
11040
Martin v. Löwiseba40652007-08-30 20:10:57 +000011041
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011042 test -n "$TRUE" && break
11043done
11044test -n "$TRUE" || TRUE="/bin/true"
11045
11046
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011047{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lc" >&5
11048$as_echo_n "checking for inet_aton in -lc... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011049if ${ac_cv_lib_c_inet_aton+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011050 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011051else
11052 ac_check_lib_save_LIBS=$LIBS
11053LIBS="-lc $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011054cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011055/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011056
Martin v. Löwiseba40652007-08-30 20:10:57 +000011057/* Override any GCC internal prototype to avoid an error.
11058 Use char because int might match the return type of a GCC
11059 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011060#ifdef __cplusplus
11061extern "C"
11062#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011063char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011064int
11065main ()
11066{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011067return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011068 ;
11069 return 0;
11070}
11071_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011072if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011073 ac_cv_lib_c_inet_aton=yes
11074else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011075 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011076fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011077rm -f core conftest.err conftest.$ac_objext \
11078 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011079LIBS=$ac_check_lib_save_LIBS
11080fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011081{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_inet_aton" >&5
11082$as_echo "$ac_cv_lib_c_inet_aton" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011083if test "x$ac_cv_lib_c_inet_aton" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011084 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011085else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011086 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5
11087$as_echo_n "checking for inet_aton in -lresolv... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011088if ${ac_cv_lib_resolv_inet_aton+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011089 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011090else
11091 ac_check_lib_save_LIBS=$LIBS
11092LIBS="-lresolv $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011093cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011094/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011095
Martin v. Löwiseba40652007-08-30 20:10:57 +000011096/* Override any GCC internal prototype to avoid an error.
11097 Use char because int might match the return type of a GCC
11098 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011099#ifdef __cplusplus
11100extern "C"
11101#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011102char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011103int
11104main ()
11105{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011106return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011107 ;
11108 return 0;
11109}
11110_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011111if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011112 ac_cv_lib_resolv_inet_aton=yes
11113else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011114 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011115fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011116rm -f core conftest.err conftest.$ac_objext \
11117 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011118LIBS=$ac_check_lib_save_LIBS
11119fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011120{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5
11121$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011122if test "x$ac_cv_lib_resolv_inet_aton" = xyes; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011123 cat >>confdefs.h <<_ACEOF
11124#define HAVE_LIBRESOLV 1
11125_ACEOF
11126
11127 LIBS="-lresolv $LIBS"
11128
11129fi
11130
11131
11132fi
11133
11134
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000011135# On Tru64, chflags seems to be present, but calling it will
11136# exit Python
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011137{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chflags" >&5
11138$as_echo_n "checking for chflags... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011139if ${ac_cv_have_chflags+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011140 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011141else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011142 if test "$cross_compiling" = yes; then :
Gregory P. Smith49437c22009-11-02 01:38:35 +000011143 ac_cv_have_chflags=cross
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000011144else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011145 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000011146/* end confdefs.h. */
Ned Deily43e10542011-06-27 23:41:53 -070011147
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000011148#include <sys/stat.h>
11149#include <unistd.h>
11150int main(int argc, char*argv[])
11151{
11152 if(chflags(argv[0], 0) != 0)
11153 return 1;
11154 return 0;
11155}
Ned Deily43e10542011-06-27 23:41:53 -070011156
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000011157_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011158if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011159 ac_cv_have_chflags=yes
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011160else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011161 ac_cv_have_chflags=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011162fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011163rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11164 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +000011165fi
11166
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011167
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011168fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011169{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_chflags" >&5
11170$as_echo "$ac_cv_have_chflags" >&6; }
Gregory P. Smith49437c22009-11-02 01:38:35 +000011171if test "$ac_cv_have_chflags" = cross ; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011172 ac_fn_c_check_func "$LINENO" "chflags" "ac_cv_func_chflags"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011173if test "x$ac_cv_func_chflags" = xyes; then :
Gregory P. Smith49437c22009-11-02 01:38:35 +000011174 ac_cv_have_chflags="yes"
11175else
11176 ac_cv_have_chflags="no"
11177fi
11178
11179fi
11180if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011181
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011182$as_echo "#define HAVE_CHFLAGS 1" >>confdefs.h
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011183
11184fi
11185
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011186{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lchflags" >&5
11187$as_echo_n "checking for lchflags... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011188if ${ac_cv_have_lchflags+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011189 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011190else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011191 if test "$cross_compiling" = yes; then :
Gregory P. Smith49437c22009-11-02 01:38:35 +000011192 ac_cv_have_lchflags=cross
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000011193else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011194 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000011195/* end confdefs.h. */
Ned Deily43e10542011-06-27 23:41:53 -070011196
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000011197#include <sys/stat.h>
11198#include <unistd.h>
11199int main(int argc, char*argv[])
11200{
11201 if(lchflags(argv[0], 0) != 0)
11202 return 1;
11203 return 0;
11204}
Ned Deily43e10542011-06-27 23:41:53 -070011205
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000011206_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011207if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011208 ac_cv_have_lchflags=yes
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011209else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011210 ac_cv_have_lchflags=no
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000011211fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011212rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11213 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011214fi
11215
11216
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011217fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011218{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lchflags" >&5
11219$as_echo "$ac_cv_have_lchflags" >&6; }
Gregory P. Smith49437c22009-11-02 01:38:35 +000011220if test "$ac_cv_have_lchflags" = cross ; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011221 ac_fn_c_check_func "$LINENO" "lchflags" "ac_cv_func_lchflags"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011222if test "x$ac_cv_func_lchflags" = xyes; then :
Gregory P. Smith49437c22009-11-02 01:38:35 +000011223 ac_cv_have_lchflags="yes"
11224else
11225 ac_cv_have_lchflags="no"
11226fi
11227
11228fi
11229if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011230
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011231$as_echo "#define HAVE_LCHFLAGS 1" >>confdefs.h
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011232
11233fi
11234
Ronald Oussorenf8752642006-07-06 10:13:35 +000011235case $ac_sys_system/$ac_sys_release in
11236Darwin/*)
11237 _CUR_CFLAGS="${CFLAGS}"
11238 _CUR_LDFLAGS="${LDFLAGS}"
11239 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
11240 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
11241 ;;
11242esac
11243
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011244{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5
11245$as_echo_n "checking for inflateCopy in -lz... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011246if ${ac_cv_lib_z_inflateCopy+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011247 $as_echo_n "(cached) " >&6
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000011248else
11249 ac_check_lib_save_LIBS=$LIBS
11250LIBS="-lz $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011251cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000011252/* end confdefs.h. */
11253
Martin v. Löwiseba40652007-08-30 20:10:57 +000011254/* Override any GCC internal prototype to avoid an error.
11255 Use char because int might match the return type of a GCC
11256 builtin and then its argument prototype would still apply. */
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000011257#ifdef __cplusplus
11258extern "C"
11259#endif
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000011260char inflateCopy ();
11261int
11262main ()
11263{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011264return inflateCopy ();
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000011265 ;
11266 return 0;
11267}
11268_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011269if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000011270 ac_cv_lib_z_inflateCopy=yes
11271else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011272 ac_cv_lib_z_inflateCopy=no
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000011273fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011274rm -f core conftest.err conftest.$ac_objext \
11275 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000011276LIBS=$ac_check_lib_save_LIBS
11277fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011278{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5
11279$as_echo "$ac_cv_lib_z_inflateCopy" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011280if test "x$ac_cv_lib_z_inflateCopy" = xyes; then :
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000011281
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011282$as_echo "#define HAVE_ZLIB_COPY 1" >>confdefs.h
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000011283
11284fi
11285
11286
Ronald Oussorenf8752642006-07-06 10:13:35 +000011287case $ac_sys_system/$ac_sys_release in
11288Darwin/*)
11289 CFLAGS="${_CUR_CFLAGS}"
11290 LDFLAGS="${_CUR_LDFLAGS}"
11291 ;;
11292esac
11293
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011294{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hstrerror" >&5
11295$as_echo_n "checking for hstrerror... " >&6; }
11296cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011297/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000011298
Martin v. Löwise9416172003-05-03 10:12:45 +000011299#include <netdb.h>
11300
Martin v. Löwise9416172003-05-03 10:12:45 +000011301int
11302main ()
11303{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011304void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000011305 ;
11306 return 0;
11307}
11308_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011309if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000011310
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011311$as_echo "#define HAVE_HSTRERROR 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000011312
Matthias Klosec511b472010-05-08 11:01:39 +000011313 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011314$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011315else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011316 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11317$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011318
11319fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011320rm -f core conftest.err conftest.$ac_objext \
11321 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011322
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011323{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5
11324$as_echo_n "checking for inet_aton... " >&6; }
11325cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011326/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000011327
Martin v. Löwis86d66262006-02-17 08:40:11 +000011328#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000011329#include <sys/socket.h>
11330#include <netinet/in.h>
11331#include <arpa/inet.h>
11332
Martin v. Löwise9416172003-05-03 10:12:45 +000011333int
11334main ()
11335{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011336void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000011337 ;
11338 return 0;
11339}
11340_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011341if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000011342
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011343$as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000011344
Matthias Klosec511b472010-05-08 11:01:39 +000011345 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011346$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011347else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011348 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11349$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011350
11351fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011352rm -f core conftest.err conftest.$ac_objext \
11353 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011354
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011355{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_pton" >&5
11356$as_echo_n "checking for inet_pton... " >&6; }
11357cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011358/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000011359
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000011360#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000011361#include <sys/socket.h>
11362#include <netinet/in.h>
11363#include <arpa/inet.h>
11364
Martin v. Löwise9416172003-05-03 10:12:45 +000011365int
11366main ()
11367{
11368void* p = inet_pton
11369 ;
11370 return 0;
11371}
11372_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011373if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000011374
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011375$as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000011376
Matthias Klosec511b472010-05-08 11:01:39 +000011377 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011378$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011379else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011380 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11381$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011382
11383fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011384rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000011385
Martin v. Löwisd6640d42003-07-06 09:29:52 +000011386# On some systems, setgroups is in unistd.h, on others, in grp.h
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011387{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for setgroups" >&5
11388$as_echo_n "checking for setgroups... " >&6; }
11389cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011390/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000011391
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000011392#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000011393#ifdef HAVE_GRP_H
11394#include <grp.h>
11395#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000011396
Martin v. Löwisd5843682002-11-21 20:41:28 +000011397int
11398main ()
11399{
11400void* p = setgroups
11401 ;
11402 return 0;
11403}
11404_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011405if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000011406
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011407$as_echo "#define HAVE_SETGROUPS 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000011408
Matthias Klosec511b472010-05-08 11:01:39 +000011409 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011410$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011411else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011412 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11413$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011414
11415fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011416rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000011417
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011418# check for openpty and forkpty
11419
11420for ac_func in openpty
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011421do :
11422 ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011423if test "x$ac_cv_func_openpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011424 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011425#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011426_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011427
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011428else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011429 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5
11430$as_echo_n "checking for openpty in -lutil... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011431if ${ac_cv_lib_util_openpty+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011432 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000011433else
Martin v. Löwis11437992002-04-12 09:54:03 +000011434 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011435LIBS="-lutil $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011436cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011437/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011438
Martin v. Löwiseba40652007-08-30 20:10:57 +000011439/* Override any GCC internal prototype to avoid an error.
11440 Use char because int might match the return type of a GCC
11441 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011442#ifdef __cplusplus
11443extern "C"
11444#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011445char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011446int
11447main ()
11448{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011449return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011450 ;
11451 return 0;
11452}
11453_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011454if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011455 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000011456else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011457 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011458fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011459rm -f core conftest.err conftest.$ac_objext \
11460 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011461LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011462fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011463{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5
11464$as_echo "$ac_cv_lib_util_openpty" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011465if test "x$ac_cv_lib_util_openpty" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011466 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000011467 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011468else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011469 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lbsd" >&5
11470$as_echo_n "checking for openpty in -lbsd... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011471if ${ac_cv_lib_bsd_openpty+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011472 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011473else
11474 ac_check_lib_save_LIBS=$LIBS
11475LIBS="-lbsd $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011476cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011477/* end confdefs.h. */
11478
Martin v. Löwiseba40652007-08-30 20:10:57 +000011479/* Override any GCC internal prototype to avoid an error.
11480 Use char because int might match the return type of a GCC
11481 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011482#ifdef __cplusplus
11483extern "C"
11484#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011485char openpty ();
11486int
11487main ()
11488{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011489return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011490 ;
11491 return 0;
11492}
11493_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011494if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011495 ac_cv_lib_bsd_openpty=yes
11496else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011497 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011498fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011499rm -f core conftest.err conftest.$ac_objext \
11500 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011501LIBS=$ac_check_lib_save_LIBS
11502fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011503{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_openpty" >&5
11504$as_echo "$ac_cv_lib_bsd_openpty" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011505if test "x$ac_cv_lib_bsd_openpty" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011506 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011507 LIBS="$LIBS -lbsd"
11508fi
11509
11510
11511fi
11512
Fred Drake8cef4cf2000-06-28 16:40:38 +000011513
11514fi
11515done
11516
11517for ac_func in forkpty
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011518do :
11519 ac_fn_c_check_func "$LINENO" "forkpty" "ac_cv_func_forkpty"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011520if test "x$ac_cv_func_forkpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011521 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011522#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011523_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011524
Fred Drake8cef4cf2000-06-28 16:40:38 +000011525else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011526 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5
11527$as_echo_n "checking for forkpty in -lutil... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011528if ${ac_cv_lib_util_forkpty+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011529 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000011530else
Martin v. Löwis11437992002-04-12 09:54:03 +000011531 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011532LIBS="-lutil $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011533cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011534/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011535
Martin v. Löwiseba40652007-08-30 20:10:57 +000011536/* Override any GCC internal prototype to avoid an error.
11537 Use char because int might match the return type of a GCC
11538 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011539#ifdef __cplusplus
11540extern "C"
11541#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011542char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011543int
11544main ()
11545{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011546return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011547 ;
11548 return 0;
11549}
11550_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011551if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011552 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000011553else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011554 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011555fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011556rm -f core conftest.err conftest.$ac_objext \
11557 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011558LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011559fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011560{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5
11561$as_echo "$ac_cv_lib_util_forkpty" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011562if test "x$ac_cv_lib_util_forkpty" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011563 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000011564 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011565else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011566 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lbsd" >&5
11567$as_echo_n "checking for forkpty in -lbsd... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011568if ${ac_cv_lib_bsd_forkpty+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011569 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011570else
11571 ac_check_lib_save_LIBS=$LIBS
11572LIBS="-lbsd $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011573cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011574/* end confdefs.h. */
11575
Martin v. Löwiseba40652007-08-30 20:10:57 +000011576/* Override any GCC internal prototype to avoid an error.
11577 Use char because int might match the return type of a GCC
11578 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011579#ifdef __cplusplus
11580extern "C"
11581#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011582char forkpty ();
11583int
11584main ()
11585{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011586return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011587 ;
11588 return 0;
11589}
11590_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011591if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011592 ac_cv_lib_bsd_forkpty=yes
11593else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011594 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011595fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011596rm -f core conftest.err conftest.$ac_objext \
11597 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011598LIBS=$ac_check_lib_save_LIBS
11599fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011600{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_forkpty" >&5
11601$as_echo "$ac_cv_lib_bsd_forkpty" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011602if test "x$ac_cv_lib_bsd_forkpty" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011603 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011604 LIBS="$LIBS -lbsd"
11605fi
11606
11607
11608fi
11609
Fred Drake8cef4cf2000-06-28 16:40:38 +000011610
11611fi
11612done
11613
Jack Jansendd19cf82001-12-06 22:36:17 +000011614
Brett Cannonaa5778d2008-03-18 04:09:00 +000011615# Stuff for expat.
Brett Cannonaa5778d2008-03-18 04:09:00 +000011616for ac_func in memmove
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011617do :
11618 ac_fn_c_check_func "$LINENO" "memmove" "ac_cv_func_memmove"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011619if test "x$ac_cv_func_memmove" = xyes; then :
Brett Cannonaa5778d2008-03-18 04:09:00 +000011620 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011621#define HAVE_MEMMOVE 1
Brett Cannonaa5778d2008-03-18 04:09:00 +000011622_ACEOF
11623
11624fi
11625done
11626
11627
Michael W. Hudson54241132001-12-07 15:38:26 +000011628# check for long file support functions
Fred Drake8cef4cf2000-06-28 16:40:38 +000011629for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011630do :
11631 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11632ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Georg Brandl71f4fbb2011-02-25 11:04:50 +000011633if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011634 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011635#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011636_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000011637
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011638fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000011639done
11640
Michael W. Hudson54241132001-12-07 15:38:26 +000011641
Georg Brandl71f4fbb2011-02-25 11:04:50 +000011642ac_fn_c_check_func "$LINENO" "dup2" "ac_cv_func_dup2"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011643if test "x$ac_cv_func_dup2" = xyes; then :
Georg Brandl71f4fbb2011-02-25 11:04:50 +000011644 $as_echo "#define HAVE_DUP2 1" >>confdefs.h
Martin v. Löwis1142de32002-03-29 16:28:31 +000011645
Martin v. Löwis1142de32002-03-29 16:28:31 +000011646else
Martin v. Löwiseba40652007-08-30 20:10:57 +000011647 case " $LIBOBJS " in
Georg Brandl71f4fbb2011-02-25 11:04:50 +000011648 *" dup2.$ac_objext "* ) ;;
11649 *) LIBOBJS="$LIBOBJS dup2.$ac_objext"
Martin v. Löwiseba40652007-08-30 20:10:57 +000011650 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000011651esac
11652
Martin v. Löwis1142de32002-03-29 16:28:31 +000011653fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +000011654
11655ac_fn_c_check_func "$LINENO" "getcwd" "ac_cv_func_getcwd"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011656if test "x$ac_cv_func_getcwd" = xyes; then :
Georg Brandl71f4fbb2011-02-25 11:04:50 +000011657 $as_echo "#define HAVE_GETCWD 1" >>confdefs.h
11658
11659else
11660 case " $LIBOBJS " in
11661 *" getcwd.$ac_objext "* ) ;;
11662 *) LIBOBJS="$LIBOBJS getcwd.$ac_objext"
11663 ;;
11664esac
11665
11666fi
11667
11668ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011669if test "x$ac_cv_func_strdup" = xyes; then :
Georg Brandl71f4fbb2011-02-25 11:04:50 +000011670 $as_echo "#define HAVE_STRDUP 1" >>confdefs.h
11671
11672else
11673 case " $LIBOBJS " in
11674 *" strdup.$ac_objext "* ) ;;
11675 *) LIBOBJS="$LIBOBJS strdup.$ac_objext"
11676 ;;
11677esac
11678
11679fi
Martin v. Löwis1142de32002-03-29 16:28:31 +000011680
11681
11682for ac_func in getpgrp
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011683do :
11684 ac_fn_c_check_func "$LINENO" "getpgrp" "ac_cv_func_getpgrp"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011685if test "x$ac_cv_func_getpgrp" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011686 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011687#define HAVE_GETPGRP 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011688_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011689 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011690/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011691#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011692int
11693main ()
11694{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011695getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000011696 ;
11697 return 0;
11698}
11699_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011700if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011701
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011702$as_echo "#define GETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000011703
Guido van Rossum627b2d71993-12-24 10:39:16 +000011704fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011705rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011706
Guido van Rossum627b2d71993-12-24 10:39:16 +000011707fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011708done
Guido van Rossum627b2d71993-12-24 10:39:16 +000011709
Jack Jansen150753c2003-03-29 22:07:47 +000011710for ac_func in setpgrp
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011711do :
11712 ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011713if test "x$ac_cv_func_setpgrp" = xyes; then :
Jack Jansen150753c2003-03-29 22:07:47 +000011714 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011715#define HAVE_SETPGRP 1
Jack Jansen150753c2003-03-29 22:07:47 +000011716_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011717 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011718/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000011719#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000011720int
11721main ()
11722{
11723setpgrp(0,0);
11724 ;
11725 return 0;
11726}
11727_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011728if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011729
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011730$as_echo "#define SETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000011731
Guido van Rossum8eee56f1994-10-20 22:18:37 +000011732fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011733rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000011734
11735fi
11736done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000011737
Thomas Wouters3a584202000-08-05 23:28:51 +000011738for ac_func in gettimeofday
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011739do :
11740 ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011741if test "x$ac_cv_func_gettimeofday" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011742 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011743#define HAVE_GETTIMEOFDAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011744_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011745 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011746/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000011747#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011748int
11749main ()
11750{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011751gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000011752 ;
11753 return 0;
11754}
11755_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011756if ac_fn_c_try_compile "$LINENO"; then :
11757
Guido van Rossum627b2d71993-12-24 10:39:16 +000011758else
Skip Montanaro6dead952003-09-25 14:50:04 +000011759
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011760$as_echo "#define GETTIMEOFDAY_NO_TZ 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000011761
Martin v. Löwis11437992002-04-12 09:54:03 +000011762
Guido van Rossum627b2d71993-12-24 10:39:16 +000011763fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011764rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011765
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011766fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011767done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011768
Michael W. Hudson54241132001-12-07 15:38:26 +000011769
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011770{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for major" >&5
11771$as_echo_n "checking for major... " >&6; }
11772cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011773/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011774
Neal Norwitz6eb37f02003-02-23 23:28:15 +000011775#if defined(MAJOR_IN_MKDEV)
11776#include <sys/mkdev.h>
11777#elif defined(MAJOR_IN_SYSMACROS)
11778#include <sys/sysmacros.h>
11779#else
11780#include <sys/types.h>
11781#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011782
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011783int
11784main ()
11785{
11786
11787 makedev(major(0),minor(0));
11788
11789 ;
11790 return 0;
11791}
11792_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011793if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011794
11795
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011796$as_echo "#define HAVE_DEVICE_MACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011797
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011798 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11799$as_echo "yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011800
11801else
Skip Montanaro6dead952003-09-25 14:50:04 +000011802
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011803 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11804$as_echo "no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011805
11806fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011807rm -f core conftest.err conftest.$ac_objext \
11808 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000011809
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011810# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000011811# for [no]getaddrinfo in netdb.h.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011812{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
11813$as_echo_n "checking for getaddrinfo... " >&6; }
11814cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011815/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011816
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000011817#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011818#include <sys/socket.h>
11819#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000011820#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011821
Martin v. Löwis11437992002-04-12 09:54:03 +000011822int
11823main ()
11824{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011825getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000011826 ;
11827 return 0;
11828}
11829_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011830if ac_fn_c_try_link "$LINENO"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011831 have_getaddrinfo=yes
11832else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011833 have_getaddrinfo=no
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011834fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011835rm -f core conftest.err conftest.$ac_objext \
11836 conftest$ac_exeext conftest.$ac_ext
11837{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getaddrinfo" >&5
11838$as_echo "$have_getaddrinfo" >&6; }
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011839if test $have_getaddrinfo = yes
11840then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011841 { $as_echo "$as_me:${as_lineno-$LINENO}: checking getaddrinfo bug" >&5
11842$as_echo_n "checking getaddrinfo bug... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011843 if ${ac_cv_buggy_getaddrinfo+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011844 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011845else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011846 if test "$cross_compiling" = yes; then :
doko@python.orgd65e2ba2013-01-31 23:52:03 +010011847
11848if test "${enable_ipv6+set}" = set; then
11849 ac_cv_buggy_getaddrinfo="no -- configured with --(en|dis)able-ipv6"
11850else
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011851 ac_cv_buggy_getaddrinfo=yes
doko@python.orgd65e2ba2013-01-31 23:52:03 +010011852fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011853else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011854 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011855/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011856
Stefan Krah0afe4e42012-11-22 23:56:51 +010011857#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011858#include <sys/types.h>
11859#include <netdb.h>
11860#include <string.h>
11861#include <sys/socket.h>
11862#include <netinet/in.h>
11863
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011864int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011865{
11866 int passive, gaierr, inet4 = 0, inet6 = 0;
11867 struct addrinfo hints, *ai, *aitop;
11868 char straddr[INET6_ADDRSTRLEN], strport[16];
11869
11870 for (passive = 0; passive <= 1; passive++) {
11871 memset(&hints, 0, sizeof(hints));
11872 hints.ai_family = AF_UNSPEC;
11873 hints.ai_flags = passive ? AI_PASSIVE : 0;
11874 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000011875 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011876 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
11877 (void)gai_strerror(gaierr);
11878 goto bad;
11879 }
11880 for (ai = aitop; ai; ai = ai->ai_next) {
11881 if (ai->ai_addr == NULL ||
11882 ai->ai_addrlen == 0 ||
11883 getnameinfo(ai->ai_addr, ai->ai_addrlen,
11884 straddr, sizeof(straddr), strport, sizeof(strport),
11885 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
11886 goto bad;
11887 }
11888 switch (ai->ai_family) {
11889 case AF_INET:
11890 if (strcmp(strport, "54321") != 0) {
11891 goto bad;
11892 }
11893 if (passive) {
11894 if (strcmp(straddr, "0.0.0.0") != 0) {
11895 goto bad;
11896 }
11897 } else {
11898 if (strcmp(straddr, "127.0.0.1") != 0) {
11899 goto bad;
11900 }
11901 }
11902 inet4++;
11903 break;
11904 case AF_INET6:
11905 if (strcmp(strport, "54321") != 0) {
11906 goto bad;
11907 }
11908 if (passive) {
11909 if (strcmp(straddr, "::") != 0) {
11910 goto bad;
11911 }
11912 } else {
11913 if (strcmp(straddr, "::1") != 0) {
11914 goto bad;
11915 }
11916 }
11917 inet6++;
11918 break;
11919 case AF_UNSPEC:
11920 goto bad;
11921 break;
11922 default:
11923 /* another family support? */
11924 break;
11925 }
11926 }
Benjamin Petersond34677c2016-09-06 15:54:24 -070011927 freeaddrinfo(aitop);
11928 aitop = NULL;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011929 }
11930
11931 if (!(inet4 == 0 || inet4 == 2))
11932 goto bad;
11933 if (!(inet6 == 0 || inet6 == 2))
11934 goto bad;
11935
11936 if (aitop)
11937 freeaddrinfo(aitop);
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011938 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011939
11940 bad:
11941 if (aitop)
11942 freeaddrinfo(aitop);
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011943 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011944}
11945
Martin v. Löwis11437992002-04-12 09:54:03 +000011946_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011947if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011948 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011949else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011950 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011951fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011952rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11953 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011954fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011955
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011956fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011957
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011958fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011959
Benjamin Peterson75fed812010-11-01 01:47:19 +000011960{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_buggy_getaddrinfo" >&5
11961$as_echo "$ac_cv_buggy_getaddrinfo" >&6; }
11962
Mark Dickinson0ef0b912009-12-31 21:11:48 +000011963if test $have_getaddrinfo = no -o "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011964then
11965 if test $ipv6 = yes
11966 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011967 echo 'Fatal: You must get working getaddrinfo() function.'
11968 echo ' or you can specify "--disable-ipv6"'.
11969 exit 1
11970 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011971else
Martin v. Löwis11437992002-04-12 09:54:03 +000011972
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011973$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011974
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011975fi
Benjamin Peterson75fed812010-11-01 01:47:19 +000011976
Jack Jansen9a66b6d2001-08-08 13:56:14 +000011977for ac_func in getnameinfo
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011978do :
11979 ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011980if test "x$ac_cv_func_getnameinfo" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011981 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011982#define HAVE_GETNAMEINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011983_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011984
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011985fi
11986done
11987
Michael W. Hudson54241132001-12-07 15:38:26 +000011988
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011989# checks for structures
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011990{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
11991$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011992if ${ac_cv_header_time+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011993 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011994else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011995 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011996/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011997#include <sys/types.h>
11998#include <sys/time.h>
11999#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012000
Martin v. Löwis11437992002-04-12 09:54:03 +000012001int
12002main ()
12003{
12004if ((struct tm *) 0)
12005return 0;
12006 ;
12007 return 0;
12008}
12009_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012010if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012011 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000012012else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012013 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012014fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012015rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012016fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012017{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
12018$as_echo "$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000012019if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012020
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012021$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012022
12023fi
12024
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012025{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
12026$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012027if ${ac_cv_struct_tm+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012028 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012029else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012030 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012031/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012032#include <sys/types.h>
12033#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012034
Martin v. Löwis11437992002-04-12 09:54:03 +000012035int
12036main ()
12037{
Martin v. Löwiseba40652007-08-30 20:10:57 +000012038struct tm tm;
12039 int *p = &tm.tm_sec;
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012040 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000012041 ;
12042 return 0;
12043}
12044_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012045if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012046 ac_cv_struct_tm=time.h
12047else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012048 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012049fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012050rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012051fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012052{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
12053$as_echo "$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000012054if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012055
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012056$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012057
12058fi
12059
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012060ac_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 +000012061#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000012062
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012063"
Matthias Klose3cef2a92012-03-14 23:39:33 +010012064if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012065
12066cat >>confdefs.h <<_ACEOF
12067#define HAVE_STRUCT_TM_TM_ZONE 1
12068_ACEOF
12069
12070
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012071fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012072
Martin v. Löwis11437992002-04-12 09:54:03 +000012073if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
12074
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012075$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012076
12077else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012078 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
12079"
Matthias Klose3cef2a92012-03-14 23:39:33 +010012080if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012081 ac_have_decl=1
Martin v. Löwiseba40652007-08-30 20:10:57 +000012082else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012083 ac_have_decl=0
Martin v. Löwiseba40652007-08-30 20:10:57 +000012084fi
12085
Martin v. Löwiseba40652007-08-30 20:10:57 +000012086cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012087#define HAVE_DECL_TZNAME $ac_have_decl
Martin v. Löwiseba40652007-08-30 20:10:57 +000012088_ACEOF
12089
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012090 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
12091$as_echo_n "checking for tzname... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012092if ${ac_cv_var_tzname+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012093 $as_echo_n "(cached) " >&6
Martin v. Löwiseba40652007-08-30 20:10:57 +000012094else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012095 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012096/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000012097#include <time.h>
Martin v. Löwiseba40652007-08-30 20:10:57 +000012098#if !HAVE_DECL_TZNAME
12099extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000012100#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012101
Martin v. Löwis11437992002-04-12 09:54:03 +000012102int
12103main ()
12104{
Martin v. Löwiseba40652007-08-30 20:10:57 +000012105return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000012106 ;
12107 return 0;
12108}
12109_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012110if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012111 ac_cv_var_tzname=yes
12112else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012113 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012114fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012115rm -f core conftest.err conftest.$ac_objext \
12116 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000012117fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012118{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
12119$as_echo "$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000012120 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012121
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012122$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000012123
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012124 fi
12125fi
12126
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012127ac_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 +010012128if test "x$ac_cv_member_struct_stat_st_rdev" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012129
12130cat >>confdefs.h <<_ACEOF
12131#define HAVE_STRUCT_STAT_ST_RDEV 1
12132_ACEOF
12133
12134
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012135fi
12136
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012137ac_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 +010012138if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000012139
Martin v. Löwis11437992002-04-12 09:54:03 +000012140cat >>confdefs.h <<_ACEOF
12141#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
12142_ACEOF
12143
12144
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012145fi
12146
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012147ac_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 +010012148if test "x$ac_cv_member_struct_stat_st_flags" = xyes; then :
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000012149
12150cat >>confdefs.h <<_ACEOF
12151#define HAVE_STRUCT_STAT_ST_FLAGS 1
12152_ACEOF
12153
12154
12155fi
12156
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012157ac_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 +010012158if test "x$ac_cv_member_struct_stat_st_gen" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000012159
12160cat >>confdefs.h <<_ACEOF
12161#define HAVE_STRUCT_STAT_ST_GEN 1
12162_ACEOF
12163
12164
12165fi
12166
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012167ac_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 +010012168if test "x$ac_cv_member_struct_stat_st_birthtime" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000012169
12170cat >>confdefs.h <<_ACEOF
12171#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
12172_ACEOF
12173
12174
12175fi
12176
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012177ac_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 +010012178if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000012179
Martin v. Löwis11437992002-04-12 09:54:03 +000012180cat >>confdefs.h <<_ACEOF
12181#define HAVE_STRUCT_STAT_ST_BLOCKS 1
12182_ACEOF
12183
12184
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012185fi
12186
Michael W. Hudson54241132001-12-07 15:38:26 +000012187
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012188{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5
12189$as_echo_n "checking for time.h that defines altzone... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012190if ${ac_cv_header_time_altzone+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012191 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012192else
Matthias Klosec511b472010-05-08 11:01:39 +000012193
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012194 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012195/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012196#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012197int
12198main ()
12199{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012200return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000012201 ;
12202 return 0;
12203}
12204_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012205if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012206 ac_cv_header_time_altzone=yes
12207else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012208 ac_cv_header_time_altzone=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012209fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012210rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosec511b472010-05-08 11:01:39 +000012211
Martin v. Löwiseba40652007-08-30 20:10:57 +000012212fi
12213
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012214{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5
12215$as_echo "$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012216if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012217
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012218$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012219
12220fi
12221
Guido van Rossumda88dad1995-01-26 00:46:29 +000012222was_it_defined=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012223{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
12224$as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
12225cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012226/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012227
12228#include <sys/types.h>
12229#include <sys/select.h>
12230#include <sys/time.h>
12231
Martin v. Löwis11437992002-04-12 09:54:03 +000012232int
12233main ()
12234{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012235;
Martin v. Löwis11437992002-04-12 09:54:03 +000012236 ;
12237 return 0;
12238}
12239_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012240if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012241
12242
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012243$as_echo "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012244
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012245 was_it_defined=yes
12246
Martin v. Löwiseba40652007-08-30 20:10:57 +000012247fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012248rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012249{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
12250$as_echo "$was_it_defined" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012251
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012252{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for addrinfo" >&5
12253$as_echo_n "checking for addrinfo... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012254if ${ac_cv_struct_addrinfo+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012255 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012256else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012257 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012258/* end confdefs.h. */
Matthias Klosec511b472010-05-08 11:01:39 +000012259#include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012260int
12261main ()
12262{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012263struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000012264 ;
12265 return 0;
12266}
12267_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012268if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012269 ac_cv_struct_addrinfo=yes
12270else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012271 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012272fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012273rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12274fi
12275
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012276{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5
12277$as_echo "$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012278if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012279
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012280$as_echo "#define HAVE_ADDRINFO 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012281
12282fi
12283
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012284{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5
12285$as_echo_n "checking for sockaddr_storage... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012286if ${ac_cv_struct_sockaddr_storage+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012287 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012288else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012289 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012290/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012291
12292# include <sys/types.h>
12293# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012294int
12295main ()
12296{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012297struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000012298 ;
12299 return 0;
12300}
12301_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012302if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012303 ac_cv_struct_sockaddr_storage=yes
12304else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012305 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012306fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012307rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12308fi
12309
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012310{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5
12311$as_echo "$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012312if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012313
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012314$as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012315
12316fi
12317
Guido van Rossum627b2d71993-12-24 10:39:16 +000012318# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000012319
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012320{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
12321$as_echo_n "checking whether char is unsigned... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012322if ${ac_cv_c_char_unsigned+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012323 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000012324else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012325 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012326/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012327$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000012328int
12329main ()
12330{
12331static int test_array [1 - 2 * !(((char) -1) < 0)];
Charles-François Natalibe2b9072013-01-08 19:47:00 +010012332test_array [0] = 0;
12333return test_array [0];
Martin v. Löwis11437992002-04-12 09:54:03 +000012334
12335 ;
12336 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000012337}
Martin v. Löwis11437992002-04-12 09:54:03 +000012338_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012339if ac_fn_c_try_compile "$LINENO"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000012340 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000012341else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012342 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012343fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012344rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012345fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012346{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
12347$as_echo "$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012348if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012349 $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012350
12351fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000012352
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012353{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
12354$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012355if ${ac_cv_c_const+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012356 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000012357else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012358 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012359/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012360
Martin v. Löwis11437992002-04-12 09:54:03 +000012361int
12362main ()
12363{
Charles-François Natalibe2b9072013-01-08 19:47:00 +010012364
Martin v. Löwis11437992002-04-12 09:54:03 +000012365#ifndef __cplusplus
Charles-François Natalibe2b9072013-01-08 19:47:00 +010012366 /* Ultrix mips cc rejects this sort of thing. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012367 typedef int charset[2];
Charles-François Natalibe2b9072013-01-08 19:47:00 +010012368 const charset cs = { 0, 0 };
Martin v. Löwis11437992002-04-12 09:54:03 +000012369 /* SunOS 4.1.1 cc rejects this. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000012370 char const *const *pcpcc;
12371 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000012372 /* NEC SVR4.0.2 mips cc rejects this. */
12373 struct point {int x, y;};
12374 static struct point const zero = {0,0};
12375 /* AIX XL C 1.02.0.0 rejects this.
12376 It does not let you subtract one const X* pointer from another in
12377 an arm of an if-expression whose if-part is not a constant
12378 expression */
12379 const char *g = "string";
Martin v. Löwiseba40652007-08-30 20:10:57 +000012380 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012381 /* HPUX 7.0 cc rejects these. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000012382 ++pcpcc;
12383 ppc = (char**) pcpcc;
12384 pcpcc = (char const *const *) ppc;
Charles-François Natalibe2b9072013-01-08 19:47:00 +010012385 { /* SCO 3.2v4 cc rejects this sort of thing. */
12386 char tx;
12387 char *t = &tx;
Martin v. Löwis11437992002-04-12 09:54:03 +000012388 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012389
Martin v. Löwis11437992002-04-12 09:54:03 +000012390 *t++ = 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +000012391 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012392 }
12393 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
12394 int x[] = {25, 17};
12395 const int *foo = &x[0];
12396 ++foo;
12397 }
12398 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
12399 typedef const int *iptr;
12400 iptr p = 0;
12401 ++p;
12402 }
Charles-François Natalibe2b9072013-01-08 19:47:00 +010012403 { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
Martin v. Löwis11437992002-04-12 09:54:03 +000012404 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
Charles-François Natalibe2b9072013-01-08 19:47:00 +010012405 struct s { int j; const int *ap[3]; } bx;
12406 struct s *b = &bx; b->j = 5;
Martin v. Löwis11437992002-04-12 09:54:03 +000012407 }
12408 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
12409 const int foo = 10;
Martin v. Löwiseba40652007-08-30 20:10:57 +000012410 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012411 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012412 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000012413#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000012414
Martin v. Löwis11437992002-04-12 09:54:03 +000012415 ;
12416 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000012417}
Martin v. Löwis11437992002-04-12 09:54:03 +000012418_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012419if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012420 ac_cv_c_const=yes
12421else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012422 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012423fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012424rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012425fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012426{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
12427$as_echo "$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012428if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012429
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012430$as_echo "#define const /**/" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012431
12432fi
12433
Michael W. Hudson54241132001-12-07 15:38:26 +000012434
Guido van Rossumda88dad1995-01-26 00:46:29 +000012435works=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012436{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5
12437$as_echo_n "checking for working volatile... " >&6; }
12438cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012439/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000012440
Martin v. Löwis11437992002-04-12 09:54:03 +000012441int
12442main ()
12443{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012444volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012445 ;
12446 return 0;
12447}
12448_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012449if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000012450 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000012451else
Skip Montanaro6dead952003-09-25 14:50:04 +000012452
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012453$as_echo "#define volatile /**/" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000012454
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012455
Guido van Rossum627b2d71993-12-24 10:39:16 +000012456fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012457rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012458{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
12459$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000012460
Guido van Rossumda88dad1995-01-26 00:46:29 +000012461works=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012462{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working signed char" >&5
12463$as_echo_n "checking for working signed char... " >&6; }
12464cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012465/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000012466
Martin v. Löwis11437992002-04-12 09:54:03 +000012467int
12468main ()
12469{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012470signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000012471 ;
12472 return 0;
12473}
12474_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012475if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000012476 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000012477else
Skip Montanaro6dead952003-09-25 14:50:04 +000012478
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012479$as_echo "#define signed /**/" >>confdefs.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000012480
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012481
Guido van Rossum7f43da71994-08-01 12:15:30 +000012482fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012483rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012484{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
12485$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000012486
Guido van Rossumda88dad1995-01-26 00:46:29 +000012487have_prototypes=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012488{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototypes" >&5
12489$as_echo_n "checking for prototypes... " >&6; }
12490cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012491/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012492int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012493int
12494main ()
12495{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012496return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000012497 ;
12498 return 0;
12499}
12500_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012501if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012502
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012503$as_echo "#define HAVE_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012504
Matthias Klosec511b472010-05-08 11:01:39 +000012505 have_prototypes=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000012506fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012507rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012508{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_prototypes" >&5
12509$as_echo "$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012510
Guido van Rossumda88dad1995-01-26 00:46:29 +000012511works=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012512{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for variable length prototypes and stdarg.h" >&5
12513$as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; }
12514cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012515/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012516
12517#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000012518int foo(int x, ...) {
12519 va_list va;
12520 va_start(va, x);
12521 va_arg(va, int);
12522 va_arg(va, char *);
12523 va_arg(va, double);
12524 return 0;
12525}
Guido van Rossum7f43da71994-08-01 12:15:30 +000012526
Martin v. Löwis11437992002-04-12 09:54:03 +000012527int
12528main ()
12529{
Guido van Rossum90eea071996-08-30 20:58:57 +000012530return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000012531 ;
12532 return 0;
12533}
12534_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012535if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012536
12537
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012538$as_echo "#define HAVE_STDARG_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012539
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012540 works=yes
12541
Guido van Rossum627b2d71993-12-24 10:39:16 +000012542fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012543rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012544{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
12545$as_echo "$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012546
Martin v. Löwisd6320502004-08-12 13:45:08 +000012547# check for socketpair
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012548{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair" >&5
12549$as_echo_n "checking for socketpair... " >&6; }
12550cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000012551/* end confdefs.h. */
12552
12553#include <sys/types.h>
12554#include <sys/socket.h>
12555
12556int
12557main ()
12558{
12559void *x=socketpair
12560 ;
12561 return 0;
12562}
12563_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012564if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd6320502004-08-12 13:45:08 +000012565
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012566$as_echo "#define HAVE_SOCKETPAIR 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +000012567
Matthias Klosec511b472010-05-08 11:01:39 +000012568 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012569$as_echo "yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000012570else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012571 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12572$as_echo "no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000012573
12574fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012575rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000012576
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012577# check if sockaddr has sa_len member
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012578{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr has sa_len member" >&5
12579$as_echo_n "checking if sockaddr has sa_len member... " >&6; }
12580cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012581/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012582#include <sys/types.h>
12583#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012584int
12585main ()
12586{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012587struct sockaddr x;
12588x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012589 ;
12590 return 0;
12591}
12592_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012593if ac_fn_c_try_compile "$LINENO"; then :
12594 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12595$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012596
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012597$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012598
12599else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012600 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12601$as_echo "no" >&6; }
Matthias Klosec511b472010-05-08 11:01:39 +000012602
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012603fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012604rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012605
Guido van Rossumda88dad1995-01-26 00:46:29 +000012606va_list_is_array=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012607{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether va_list is an array" >&5
12608$as_echo_n "checking whether va_list is an array... " >&6; }
12609cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012610/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012611
12612#ifdef HAVE_STDARG_PROTOTYPES
12613#include <stdarg.h>
12614#else
12615#include <varargs.h>
12616#endif
12617
Martin v. Löwis11437992002-04-12 09:54:03 +000012618int
12619main ()
12620{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012621va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000012622 ;
12623 return 0;
12624}
12625_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012626if ac_fn_c_try_compile "$LINENO"; then :
12627
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012628else
Skip Montanaro6dead952003-09-25 14:50:04 +000012629
Martin v. Löwis11437992002-04-12 09:54:03 +000012630
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012631$as_echo "#define VA_LIST_IS_ARRAY 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012632
Guido van Rossumda88dad1995-01-26 00:46:29 +000012633 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012634
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012635fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012636rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012637{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $va_list_is_array" >&5
12638$as_echo "$va_list_is_array" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012639
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012640# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000012641
12642
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012643ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r"
Matthias Klose3cef2a92012-03-14 23:39:33 +010012644if test "x$ac_cv_func_gethostbyname_r" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012645
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012646 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000012647
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012648 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 6 args" >&5
12649$as_echo_n "checking gethostbyname_r with 6 args... " >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012650 OLD_CFLAGS=$CFLAGS
12651 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012652 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012653/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012654
12655# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012656
Martin v. Löwis11437992002-04-12 09:54:03 +000012657int
12658main ()
12659{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012660
12661 char *name;
12662 struct hostent *he, *res;
12663 char buffer[2048];
12664 int buflen = 2048;
12665 int h_errnop;
12666
12667 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000012668
12669 ;
12670 return 0;
12671}
12672_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012673if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012674
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012675 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000012676
Martin v. Löwis11437992002-04-12 09:54:03 +000012677
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012678$as_echo "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012679
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012680 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12681$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012682
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012683else
Skip Montanaro6dead952003-09-25 14:50:04 +000012684
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012685 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12686$as_echo "no" >&6; }
12687 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 5 args" >&5
12688$as_echo_n "checking gethostbyname_r with 5 args... " >&6; }
12689 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012690/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012691
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012692# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012693
Martin v. Löwis11437992002-04-12 09:54:03 +000012694int
12695main ()
12696{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012697
12698 char *name;
12699 struct hostent *he;
Matthias Klosec511b472010-05-08 11:01:39 +000012700 char buffer[2048];
12701 int buflen = 2048;
12702 int h_errnop;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012703
Matthias Klosec511b472010-05-08 11:01:39 +000012704 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000012705
12706 ;
12707 return 0;
12708}
12709_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012710if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012711
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012712 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000012713
Martin v. Löwis11437992002-04-12 09:54:03 +000012714
Matthias Klosec511b472010-05-08 11:01:39 +000012715$as_echo "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012716
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012717 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12718$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012719
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012720else
Skip Montanaro6dead952003-09-25 14:50:04 +000012721
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012722 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12723$as_echo "no" >&6; }
Matthias Klosec511b472010-05-08 11:01:39 +000012724 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 3 args" >&5
12725$as_echo_n "checking gethostbyname_r with 3 args... " >&6; }
12726 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12727/* end confdefs.h. */
12728
12729# include <netdb.h>
12730
12731int
12732main ()
12733{
12734
12735 char *name;
12736 struct hostent *he;
12737 struct hostent_data data;
12738
12739 (void) gethostbyname_r(name, he, &data);
12740
12741 ;
12742 return 0;
12743}
12744_ACEOF
12745if ac_fn_c_try_compile "$LINENO"; then :
12746
12747 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
12748
12749
12750$as_echo "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h
12751
12752 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12753$as_echo "yes" >&6; }
12754
12755else
12756
12757 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12758$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012759
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012760fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012761rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012762
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012763fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012764rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012765
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012766fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012767rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012768 CFLAGS=$OLD_CFLAGS
12769
12770else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012771
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012772 for ac_func in gethostbyname
12773do :
12774 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
Matthias Klose3cef2a92012-03-14 23:39:33 +010012775if test "x$ac_cv_func_gethostbyname" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012776 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012777#define HAVE_GETHOSTBYNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012778_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012779
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012780fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012781done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012782
Michael W. Hudson54241132001-12-07 15:38:26 +000012783
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012784fi
12785
Michael W. Hudson54241132001-12-07 15:38:26 +000012786
12787
12788
12789
12790
12791
Guido van Rossum627b2d71993-12-24 10:39:16 +000012792# checks for system services
12793# (none yet)
12794
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012795# Linux requires this for correct f.p. operations
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012796ac_fn_c_check_func "$LINENO" "__fpu_control" "ac_cv_func___fpu_control"
Matthias Klose3cef2a92012-03-14 23:39:33 +010012797if test "x$ac_cv_func___fpu_control" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012798
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000012799else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012800 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5
12801$as_echo_n "checking for __fpu_control in -lieee... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012802if ${ac_cv_lib_ieee___fpu_control+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012803 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012804else
Martin v. Löwis11437992002-04-12 09:54:03 +000012805 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012806LIBS="-lieee $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012807cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012808/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012809
Martin v. Löwiseba40652007-08-30 20:10:57 +000012810/* Override any GCC internal prototype to avoid an error.
12811 Use char because int might match the return type of a GCC
12812 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012813#ifdef __cplusplus
12814extern "C"
12815#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012816char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012817int
12818main ()
12819{
Martin v. Löwiseba40652007-08-30 20:10:57 +000012820return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012821 ;
12822 return 0;
12823}
12824_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012825if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012826 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000012827else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012828 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012829fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012830rm -f core conftest.err conftest.$ac_objext \
12831 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012832LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012833fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012834{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee___fpu_control" >&5
12835$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012836if test "x$ac_cv_lib_ieee___fpu_control" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012837 cat >>confdefs.h <<_ACEOF
12838#define HAVE_LIBIEEE 1
12839_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012840
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012841 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012842
Guido van Rossum627b2d71993-12-24 10:39:16 +000012843fi
12844
Michael W. Hudson54241132001-12-07 15:38:26 +000012845
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000012846fi
12847
Michael W. Hudson54241132001-12-07 15:38:26 +000012848
Guido van Rossum7f253911997-05-09 02:42:48 +000012849# Check for --with-fpectl
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012850{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-fpectl" >&5
12851$as_echo_n "checking for --with-fpectl... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012852
Martin v. Löwiseba40652007-08-30 20:10:57 +000012853# Check whether --with-fpectl was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012854if test "${with_fpectl+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +000012855 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000012856if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000012857then
12858
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012859$as_echo "#define WANT_SIGFPE_HANDLER 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012860
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012861 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12862$as_echo "yes" >&6; }
12863else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12864$as_echo "no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000012865fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000012866else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012867 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12868$as_echo "no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012869fi
12870
Guido van Rossum7f253911997-05-09 02:42:48 +000012871
Guido van Rossum7f43da71994-08-01 12:15:30 +000012872# check for --with-libm=...
12873
Guido van Rossum563e7081996-09-10 18:20:48 +000012874case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000012875Darwin) ;;
Guido van Rossumec95c7b1998-08-04 17:59:56 +000012876BeOS) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000012877*) LIBM=-lm
12878esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012879{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libm=STRING" >&5
12880$as_echo_n "checking for --with-libm=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012881
Martin v. Löwiseba40652007-08-30 20:10:57 +000012882# Check whether --with-libm was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012883if test "${with_libm+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +000012884 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000012885if test "$withval" = no
12886then LIBM=
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012887 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBM empty" >&5
12888$as_echo "force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000012889elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000012890then LIBM=$withval
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012891 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBM=\"$withval\"" >&5
12892$as_echo "set LIBM=\"$withval\"" >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +000012893else as_fn_error $? "proper usage is --with-libm=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000012894fi
Guido van Rossum7f253911997-05-09 02:42:48 +000012895else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012896 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBM=\"$LIBM\"" >&5
12897$as_echo "default LIBM=\"$LIBM\"" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012898fi
12899
Guido van Rossum7f43da71994-08-01 12:15:30 +000012900
12901# check for --with-libc=...
12902
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012903{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libc=STRING" >&5
12904$as_echo_n "checking for --with-libc=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012905
Martin v. Löwiseba40652007-08-30 20:10:57 +000012906# Check whether --with-libc was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012907if test "${with_libc+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +000012908 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000012909if test "$withval" = no
12910then LIBC=
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012911 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBC empty" >&5
12912$as_echo "force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000012913elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000012914then LIBC=$withval
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012915 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBC=\"$withval\"" >&5
12916$as_echo "set LIBC=\"$withval\"" >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +000012917else as_fn_error $? "proper usage is --with-libc=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000012918fi
Guido van Rossum7f253911997-05-09 02:42:48 +000012919else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012920 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBC=\"$LIBC\"" >&5
12921$as_echo "default LIBC=\"$LIBC\"" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012922fi
12923
Guido van Rossum7f43da71994-08-01 12:15:30 +000012924
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012925# **************************************************
12926# * Check for various properties of floating point *
12927# **************************************************
Mark Dickinson265d7382008-04-21 22:32:24 +000012928
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012929{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are little-endian IEEE 754 binary64" >&5
12930$as_echo_n "checking whether C doubles are little-endian IEEE 754 binary64... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012931if ${ac_cv_little_endian_double+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012932 $as_echo_n "(cached) " >&6
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012933else
12934
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012935if test "$cross_compiling" = yes; then :
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012936 ac_cv_little_endian_double=no
12937else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012938 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012939/* end confdefs.h. */
12940
12941#include <string.h>
12942int main() {
12943 double x = 9006104071832581.0;
12944 if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
12945 return 0;
12946 else
12947 return 1;
12948}
12949
12950_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012951if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012952 ac_cv_little_endian_double=yes
12953else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012954 ac_cv_little_endian_double=no
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012955fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012956rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12957 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012958fi
12959
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012960fi
12961
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012962{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_little_endian_double" >&5
12963$as_echo "$ac_cv_little_endian_double" >&6; }
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012964if test "$ac_cv_little_endian_double" = yes
12965then
12966
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012967$as_echo "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012968
12969fi
12970
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012971{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are big-endian IEEE 754 binary64" >&5
12972$as_echo_n "checking whether C doubles are big-endian IEEE 754 binary64... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012973if ${ac_cv_big_endian_double+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012974 $as_echo_n "(cached) " >&6
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012975else
12976
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012977if test "$cross_compiling" = yes; then :
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012978 ac_cv_big_endian_double=no
12979else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012980 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012981/* end confdefs.h. */
12982
12983#include <string.h>
12984int main() {
12985 double x = 9006104071832581.0;
12986 if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
12987 return 0;
12988 else
12989 return 1;
12990}
12991
12992_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012993if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012994 ac_cv_big_endian_double=yes
12995else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012996 ac_cv_big_endian_double=no
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012997fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012998rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12999 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000013000fi
13001
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000013002fi
13003
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013004{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_big_endian_double" >&5
13005$as_echo "$ac_cv_big_endian_double" >&6; }
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000013006if test "$ac_cv_big_endian_double" = yes
13007then
13008
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013009$as_echo "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000013010
13011fi
13012
13013# Some ARM platforms use a mixed-endian representation for doubles.
13014# While Python doesn't currently have full support for these platforms
13015# (see e.g., issue 1762561), we can at least make sure that float <-> string
13016# conversions work.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013017{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5
13018$as_echo_n "checking whether C doubles are ARM mixed-endian IEEE 754 binary64... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013019if ${ac_cv_mixed_endian_double+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013020 $as_echo_n "(cached) " >&6
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000013021else
13022
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013023if test "$cross_compiling" = yes; then :
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000013024 ac_cv_mixed_endian_double=no
13025else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013026 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000013027/* end confdefs.h. */
13028
13029#include <string.h>
13030int main() {
13031 double x = 9006104071832581.0;
13032 if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
13033 return 0;
13034 else
13035 return 1;
13036}
13037
13038_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013039if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000013040 ac_cv_mixed_endian_double=yes
13041else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013042 ac_cv_mixed_endian_double=no
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000013043fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013044rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13045 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000013046fi
13047
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000013048fi
13049
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013050{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mixed_endian_double" >&5
13051$as_echo "$ac_cv_mixed_endian_double" >&6; }
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000013052if test "$ac_cv_mixed_endian_double" = yes
13053then
13054
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013055$as_echo "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000013056
13057fi
13058
13059# The short float repr introduced in Python 3.1 requires the
13060# correctly-rounded string <-> double conversion functions from
13061# Python/dtoa.c, which in turn require that the FPU uses 53-bit
13062# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsona548dee2009-11-15 13:12:43 +000013063# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000013064# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsona548dee2009-11-15 13:12:43 +000013065
13066# This inline assembler syntax may also work for suncc and icc,
13067# so we try it on all platforms.
13068
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013069{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
13070$as_echo_n "checking whether we can use gcc inline assembler to get and set x87 control word... " >&6; }
13071cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000013072/* end confdefs.h. */
13073
13074int
13075main ()
13076{
13077
Mark Dickinsona548dee2009-11-15 13:12:43 +000013078 unsigned short cw;
13079 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
13080 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000013081
13082 ;
13083 return 0;
13084}
13085_ACEOF
Stefan Krah99e36b92015-07-03 15:30:54 +020013086if ac_fn_c_try_link "$LINENO"; then :
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000013087 have_gcc_asm_for_x87=yes
13088else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013089 have_gcc_asm_for_x87=no
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000013090fi
Stefan Krah99e36b92015-07-03 15:30:54 +020013091rm -f core conftest.err conftest.$ac_objext \
13092 conftest$ac_exeext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013093{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x87" >&5
13094$as_echo "$have_gcc_asm_for_x87" >&6; }
Mark Dickinsona548dee2009-11-15 13:12:43 +000013095if test "$have_gcc_asm_for_x87" = yes
13096then
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000013097
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013098$as_echo "#define HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000013099
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000013100fi
Mark Dickinson7a3d8642008-04-22 00:54:27 +000013101
Mark Dickinson04b27232009-01-04 12:29:36 +000013102# Detect whether system arithmetic is subject to x87-style double
13103# rounding issues. The result of this test has little meaning on non
13104# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
13105# mode is round-to-nearest and double rounding issues are present, and
13106# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013107{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x87-style double rounding" >&5
13108$as_echo_n "checking for x87-style double rounding... " >&6; }
Mark Dickinson99abd142009-10-24 13:44:16 +000013109# $BASECFLAGS may affect the result
13110ac_save_cc="$CC"
13111CC="$CC $BASECFLAGS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013112if test "$cross_compiling" = yes; then :
Mark Dickinson04b27232009-01-04 12:29:36 +000013113 ac_cv_x87_double_rounding=no
13114else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013115 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson04b27232009-01-04 12:29:36 +000013116/* end confdefs.h. */
13117
13118#include <stdlib.h>
13119#include <math.h>
13120int main() {
13121 volatile double x, y, z;
13122 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
13123 x = 0.99999999999999989; /* 1-2**-53 */
13124 y = 1./x;
13125 if (y != 1.)
13126 exit(0);
13127 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
13128 x = 1e16;
13129 y = 2.99999;
13130 z = x + y;
13131 if (z != 1e16+4.)
13132 exit(0);
13133 /* both tests show evidence of double rounding */
13134 exit(1);
13135}
13136
13137_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013138if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson04b27232009-01-04 12:29:36 +000013139 ac_cv_x87_double_rounding=no
13140else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013141 ac_cv_x87_double_rounding=yes
Mark Dickinson04b27232009-01-04 12:29:36 +000013142fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013143rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13144 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson04b27232009-01-04 12:29:36 +000013145fi
13146
Mark Dickinson99abd142009-10-24 13:44:16 +000013147CC="$ac_save_cc"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013148{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5
13149$as_echo "$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson04b27232009-01-04 12:29:36 +000013150if test "$ac_cv_x87_double_rounding" = yes
13151then
13152
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013153$as_echo "#define X87_DOUBLE_ROUNDING 1" >>confdefs.h
Mark Dickinson04b27232009-01-04 12:29:36 +000013154
13155fi
13156
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000013157# ************************************
13158# * Check for mathematical functions *
13159# ************************************
13160
13161LIBS_SAVE=$LIBS
13162LIBS="$LIBS $LIBM"
13163
Mark Dickinson265d7382008-04-21 22:32:24 +000013164# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
13165# -0. on some architectures.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013166{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether tanh preserves the sign of zero" >&5
13167$as_echo_n "checking whether tanh preserves the sign of zero... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013168if ${ac_cv_tanh_preserves_zero_sign+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013169 $as_echo_n "(cached) " >&6
Mark Dickinson265d7382008-04-21 22:32:24 +000013170else
13171
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013172if test "$cross_compiling" = yes; then :
Mark Dickinson265d7382008-04-21 22:32:24 +000013173 ac_cv_tanh_preserves_zero_sign=no
13174else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013175 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson265d7382008-04-21 22:32:24 +000013176/* end confdefs.h. */
13177
13178#include <math.h>
Mark Dickinson7a3d8642008-04-22 00:54:27 +000013179#include <stdlib.h>
Mark Dickinson265d7382008-04-21 22:32:24 +000013180int main() {
13181 /* return 0 if either negative zeros don't exist
13182 on this platform or if negative zeros exist
13183 and tanh(-0.) == -0. */
13184 if (atan2(0., -1.) == atan2(-0., -1.) ||
13185 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
13186 else exit(1);
13187}
13188
13189_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013190if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson265d7382008-04-21 22:32:24 +000013191 ac_cv_tanh_preserves_zero_sign=yes
13192else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013193 ac_cv_tanh_preserves_zero_sign=no
Mark Dickinson265d7382008-04-21 22:32:24 +000013194fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013195rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13196 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson265d7382008-04-21 22:32:24 +000013197fi
13198
Mark Dickinson265d7382008-04-21 22:32:24 +000013199fi
13200
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013201{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_tanh_preserves_zero_sign" >&5
13202$as_echo "$ac_cv_tanh_preserves_zero_sign" >&6; }
Mark Dickinson265d7382008-04-21 22:32:24 +000013203if test "$ac_cv_tanh_preserves_zero_sign" = yes
13204then
13205
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013206$as_echo "#define TANH_PRESERVES_ZERO_SIGN 1" >>confdefs.h
Mark Dickinson265d7382008-04-21 22:32:24 +000013207
13208fi
13209
Mark Dickinson65898e02009-09-05 10:27:00 +000013210for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013211do :
13212 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13213ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Georg Brandl71f4fbb2011-02-25 11:04:50 +000013214if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinson65898e02009-09-05 10:27:00 +000013215 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013216#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Mark Dickinson65898e02009-09-05 10:27:00 +000013217_ACEOF
13218
13219fi
13220done
13221
Mark Dickinson65898e02009-09-05 10:27:00 +000013222for ac_func in hypot lgamma log1p round tgamma
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013223do :
13224 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13225ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Georg Brandl71f4fbb2011-02-25 11:04:50 +000013226if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Christian Heimes0a8143f2007-12-18 23:22:54 +000013227 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013228#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Christian Heimes0a8143f2007-12-18 23:22:54 +000013229_ACEOF
13230
13231fi
13232done
13233
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013234ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
13235"
Matthias Klose3cef2a92012-03-14 23:39:33 +010013236if test "x$ac_cv_have_decl_isinf" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013237 ac_have_decl=1
Mark Dickinsond181e3a2009-01-04 13:57:26 +000013238else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013239 ac_have_decl=0
Mark Dickinsond181e3a2009-01-04 13:57:26 +000013240fi
13241
Mark Dickinsond181e3a2009-01-04 13:57:26 +000013242cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013243#define HAVE_DECL_ISINF $ac_have_decl
Mark Dickinsond181e3a2009-01-04 13:57:26 +000013244_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013245ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h>
13246"
Matthias Klose3cef2a92012-03-14 23:39:33 +010013247if test "x$ac_cv_have_decl_isnan" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013248 ac_have_decl=1
Mark Dickinsond181e3a2009-01-04 13:57:26 +000013249else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013250 ac_have_decl=0
Mark Dickinsond181e3a2009-01-04 13:57:26 +000013251fi
Mark Dickinsond181e3a2009-01-04 13:57:26 +000013252
13253cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013254#define HAVE_DECL_ISNAN $ac_have_decl
Mark Dickinsond181e3a2009-01-04 13:57:26 +000013255_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013256ac_fn_c_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include <math.h>
13257"
Matthias Klose3cef2a92012-03-14 23:39:33 +010013258if test "x$ac_cv_have_decl_isfinite" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013259 ac_have_decl=1
Mark Dickinsond181e3a2009-01-04 13:57:26 +000013260else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013261 ac_have_decl=0
Mark Dickinsond181e3a2009-01-04 13:57:26 +000013262fi
Mark Dickinsond181e3a2009-01-04 13:57:26 +000013263
13264cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013265#define HAVE_DECL_ISFINITE $ac_have_decl
Mark Dickinsond181e3a2009-01-04 13:57:26 +000013266_ACEOF
13267
13268
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000013269LIBS=$LIBS_SAVE
13270
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013271# For multiprocessing module, check that sem_open
13272# actually works. For FreeBSD versions <= 7.2,
13273# the kernel module that provides POSIX semaphores
13274# isn't loaded by default, so an attempt to call
13275# sem_open results in a 'Signal 12' error.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013276{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX semaphores are enabled" >&5
13277$as_echo_n "checking whether POSIX semaphores are enabled... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013278if ${ac_cv_posix_semaphores_enabled+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013279 $as_echo_n "(cached) " >&6
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013280else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013281 if test "$cross_compiling" = yes; then :
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013282 ac_cv_posix_semaphores_enabled=yes
13283else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013284 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013285/* end confdefs.h. */
13286
13287#include <unistd.h>
13288#include <fcntl.h>
13289#include <stdio.h>
13290#include <semaphore.h>
13291#include <sys/stat.h>
13292
13293int main(void) {
13294 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
13295 if (a == SEM_FAILED) {
13296 perror("sem_open");
13297 return 1;
13298 }
13299 sem_close(a);
Mark Dickinson59dc89e2009-12-13 21:06:06 +000013300 sem_unlink("/autoconf");
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013301 return 0;
13302}
13303
13304_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013305if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013306 ac_cv_posix_semaphores_enabled=yes
13307else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013308 ac_cv_posix_semaphores_enabled=no
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013309fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013310rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13311 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013312fi
13313
13314
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013315fi
13316
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013317{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_semaphores_enabled" >&5
13318$as_echo "$ac_cv_posix_semaphores_enabled" >&6; }
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013319if test $ac_cv_posix_semaphores_enabled = no
13320then
13321
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013322$as_echo "#define POSIX_SEMAPHORES_NOT_ENABLED 1" >>confdefs.h
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013323
13324fi
13325
13326# Multiprocessing check for broken sem_getvalue
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013327{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken sem_getvalue" >&5
13328$as_echo_n "checking for broken sem_getvalue... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013329if ${ac_cv_broken_sem_getvalue+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013330 $as_echo_n "(cached) " >&6
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013331else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013332 if test "$cross_compiling" = yes; then :
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013333 ac_cv_broken_sem_getvalue=yes
13334else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013335 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013336/* end confdefs.h. */
13337
13338#include <unistd.h>
13339#include <fcntl.h>
13340#include <stdio.h>
13341#include <semaphore.h>
13342#include <sys/stat.h>
13343
13344int main(void){
Mark Dickinson59dc89e2009-12-13 21:06:06 +000013345 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013346 int count;
13347 int res;
13348 if(a==SEM_FAILED){
13349 perror("sem_open");
13350 return 1;
13351
13352 }
13353 res = sem_getvalue(a, &count);
13354 sem_close(a);
Mark Dickinson59dc89e2009-12-13 21:06:06 +000013355 sem_unlink("/autocftw");
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013356 return res==-1 ? 1 : 0;
13357}
13358
13359_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013360if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013361 ac_cv_broken_sem_getvalue=no
13362else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013363 ac_cv_broken_sem_getvalue=yes
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013364fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013365rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13366 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013367fi
13368
13369
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013370fi
13371
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013372{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_sem_getvalue" >&5
13373$as_echo "$ac_cv_broken_sem_getvalue" >&6; }
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013374if test $ac_cv_broken_sem_getvalue = yes
13375then
13376
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013377$as_echo "#define HAVE_BROKEN_SEM_GETVALUE 1" >>confdefs.h
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013378
13379fi
13380
Mark Dickinsonefc82f72009-03-20 15:51:55 +000013381# determine what size digit to use for Python's longs
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013382{ $as_echo "$as_me:${as_lineno-$LINENO}: checking digit size for Python's longs" >&5
13383$as_echo_n "checking digit size for Python's longs... " >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +000013384# Check whether --enable-big-digits was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013385if test "${enable_big_digits+set}" = set; then :
Mark Dickinsonefc82f72009-03-20 15:51:55 +000013386 enableval=$enable_big_digits; case $enable_big_digits in
13387yes)
13388 enable_big_digits=30 ;;
13389no)
13390 enable_big_digits=15 ;;
1339115|30)
13392 ;;
13393*)
Matthias Klose3cef2a92012-03-14 23:39:33 +010013394 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 +000013395esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013396{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_big_digits" >&5
13397$as_echo "$enable_big_digits" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +000013398
13399cat >>confdefs.h <<_ACEOF
13400#define PYLONG_BITS_IN_DIGIT $enable_big_digits
13401_ACEOF
13402
13403
13404else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013405 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
13406$as_echo "no value specified" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +000013407fi
13408
13409
Guido van Rossumef2255b2000-03-10 22:30:29 +000013410# check for wchar.h
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013411ac_fn_c_check_header_mongrel "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
Matthias Klose3cef2a92012-03-14 23:39:33 +010013412if test "x$ac_cv_header_wchar_h" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013413
13414
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013415$as_echo "#define HAVE_WCHAR_H 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013416
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013417 wchar_h="yes"
13418
Guido van Rossumef2255b2000-03-10 22:30:29 +000013419else
Martin v. Löwis11437992002-04-12 09:54:03 +000013420 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000013421
13422fi
13423
Michael W. Hudson54241132001-12-07 15:38:26 +000013424
Martin v. Löwis11437992002-04-12 09:54:03 +000013425
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013426# determine wchar_t size
13427if test "$wchar_h" = yes
13428then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013429 # The cast to long int works around a bug in the HP C Compiler
Martin v. Löwiseba40652007-08-30 20:10:57 +000013430# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
13431# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
13432# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013433{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
13434$as_echo_n "checking size of wchar_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013435if ${ac_cv_sizeof_wchar_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013436 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000013437else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013438 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "#include <wchar.h>
13439"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013440
Martin v. Löwis11437992002-04-12 09:54:03 +000013441else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013442 if test "$ac_cv_type_wchar_t" = yes; then
13443 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
13444$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +000013445as_fn_error 77 "cannot compute sizeof (wchar_t)
Matthias Klose3cef2a92012-03-14 23:39:33 +010013446See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000013447 else
13448 ac_cv_sizeof_wchar_t=0
13449 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013450fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013451
Martin v. Löwis11437992002-04-12 09:54:03 +000013452fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013453{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
13454$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000013455
13456
13457
Martin v. Löwis11437992002-04-12 09:54:03 +000013458cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013459#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000013460_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013461
Michael W. Hudson54241132001-12-07 15:38:26 +000013462
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013463fi
13464
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013465{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UCS-4 tcl" >&5
13466$as_echo_n "checking for UCS-4 tcl... " >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013467have_ucs4_tcl=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013468cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013469/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013470
13471#include <tcl.h>
13472#if TCL_UTF_MAX != 6
13473# error "NOT UCS4_TCL"
13474#endif
13475int
13476main ()
13477{
13478
13479 ;
13480 return 0;
13481}
13482_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013483if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013484
13485
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013486$as_echo "#define HAVE_UCS4_TCL 1" >>confdefs.h
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013487
13488 have_ucs4_tcl=yes
13489
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013490fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013491rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013492{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ucs4_tcl" >&5
13493$as_echo "$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013494
Skip Montanaro6dead952003-09-25 14:50:04 +000013495# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013496if test "$wchar_h" = yes
13497then
13498 # check whether wchar_t is signed or not
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013499 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is signed" >&5
13500$as_echo_n "checking whether wchar_t is signed... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013501 if ${ac_cv_wchar_t_signed+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013502 $as_echo_n "(cached) " >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013503else
13504
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013505 if test "$cross_compiling" = yes; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013506 ac_cv_wchar_t_signed=yes
13507else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013508 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013509/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013510
13511 #include <wchar.h>
13512 int main()
13513 {
Martin v. Löwis44fe0e42006-04-11 07:15:30 +000013514 /* Success: exit code 0 */
13515 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013516 }
13517
13518_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013519if ac_fn_c_try_run "$LINENO"; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013520 ac_cv_wchar_t_signed=yes
13521else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013522 ac_cv_wchar_t_signed=no
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013523fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013524rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13525 conftest.$ac_objext conftest.beam conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013526fi
13527
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013528fi
13529
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013530 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wchar_t_signed" >&5
13531$as_echo "$ac_cv_wchar_t_signed" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000013532fi
13533
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013534{ $as_echo "$as_me:${as_lineno-$LINENO}: checking what type to use for unicode" >&5
13535$as_echo_n "checking what type to use for unicode... " >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000013536# Check whether --enable-unicode was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013537if test "${enable_unicode+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +000013538 enableval=$enable_unicode;
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013539else
13540 enable_unicode=yes
Martin v. Löwiseba40652007-08-30 20:10:57 +000013541fi
13542
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013543
13544if test $enable_unicode = yes
13545then
Martin v. Löwisfd917792001-06-27 20:22:04 +000013546 # Without any arguments, Py_UNICODE defaults to two-byte mode
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013547 case "$have_ucs4_tcl" in
13548 yes) enable_unicode="ucs4"
13549 ;;
13550 *) enable_unicode="ucs2"
13551 ;;
13552 esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013553fi
13554
Martin v. Löwis0036cba2002-04-12 09:58:45 +000013555
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013556case "$enable_unicode" in
13557ucs2) unicode_size="2"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013558 $as_echo "#define Py_UNICODE_SIZE 2" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013559
13560 ;;
13561ucs4) unicode_size="4"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013562 $as_echo "#define Py_UNICODE_SIZE 4" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013563
13564 ;;
Martin v. Löwised11a5d2012-05-20 10:42:17 +020013565no) ;; # To allow --disable-unicode
Matthias Klose3cef2a92012-03-14 23:39:33 +010013566*) 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 +000013567esac
13568
Michael W. Hudson54241132001-12-07 15:38:26 +000013569
Martin v. Löwis11437992002-04-12 09:54:03 +000013570
13571
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013572if test "$enable_unicode" = "no"
13573then
Martin v. Löwis339d0f72001-08-17 18:39:25 +000013574 UNICODE_OBJS=""
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013575 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not used" >&5
13576$as_echo "not used" >&6; }
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013577else
Martin v. Löwis339d0f72001-08-17 18:39:25 +000013578 UNICODE_OBJS="Objects/unicodeobject.o Objects/unicodectype.o"
Martin v. Löwis11437992002-04-12 09:54:03 +000013579
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013580$as_echo "#define Py_USING_UNICODE 1" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013581
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013582
13583 # wchar_t is only usable if it maps to an unsigned type
13584 if test "$unicode_size" = "$ac_cv_sizeof_wchar_t" \
Matthias Klose7dbeed72004-12-24 08:22:17 +000013585 -a "$ac_cv_wchar_t_signed" = "no"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013586 then
13587 PY_UNICODE_TYPE="wchar_t"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013588
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013589$as_echo "#define HAVE_USABLE_WCHAR_T 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013590
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013591 $as_echo "#define PY_UNICODE_TYPE wchar_t" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013592
13593 elif test "$ac_cv_sizeof_short" = "$unicode_size"
13594 then
13595 PY_UNICODE_TYPE="unsigned short"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013596 $as_echo "#define PY_UNICODE_TYPE unsigned short" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013597
13598 elif test "$ac_cv_sizeof_long" = "$unicode_size"
13599 then
13600 PY_UNICODE_TYPE="unsigned long"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013601 $as_echo "#define PY_UNICODE_TYPE unsigned long" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013602
13603 else
13604 PY_UNICODE_TYPE="no type found"
13605 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013606 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PY_UNICODE_TYPE" >&5
13607$as_echo "$PY_UNICODE_TYPE" >&6; }
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013608fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000013609
13610# check for endianness
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013611 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
13612$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013613if ${ac_cv_c_bigendian+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013614 $as_echo_n "(cached) " >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000013615else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013616 ac_cv_c_bigendian=unknown
13617 # See if we're dealing with a universal compiler.
13618 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13619/* end confdefs.h. */
13620#ifndef __APPLE_CC__
13621 not a universal capable compiler
13622 #endif
13623 typedef int dummy;
13624
Skip Montanaro6dead952003-09-25 14:50:04 +000013625_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013626if ac_fn_c_try_compile "$LINENO"; then :
13627
13628 # Check for potential -arch flags. It is not universal unless
13629 # there are at least two -arch flags with different values.
13630 ac_arch=
13631 ac_prev=
13632 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
13633 if test -n "$ac_prev"; then
13634 case $ac_word in
13635 i?86 | x86_64 | ppc | ppc64)
13636 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
13637 ac_arch=$ac_word
13638 else
13639 ac_cv_c_bigendian=universal
13640 break
13641 fi
13642 ;;
13643 esac
13644 ac_prev=
13645 elif test "x$ac_word" = "x-arch"; then
13646 ac_prev=arch
13647 fi
13648 done
13649fi
13650rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13651 if test $ac_cv_c_bigendian = unknown; then
13652 # See if sys/param.h defines the BYTE_ORDER macro.
13653 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013654/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000013655#include <sys/types.h>
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013656 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000013657
Martin v. Löwis11437992002-04-12 09:54:03 +000013658int
13659main ()
13660{
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013661#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
13662 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
13663 && LITTLE_ENDIAN)
13664 bogus endian macros
13665 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013666
13667 ;
13668 return 0;
13669}
13670_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013671if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000013672 # It does; now see whether it defined to BIG_ENDIAN or not.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013673 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013674/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000013675#include <sys/types.h>
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013676 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000013677
Martin v. Löwis11437992002-04-12 09:54:03 +000013678int
13679main ()
13680{
Guido van Rossumef2255b2000-03-10 22:30:29 +000013681#if BYTE_ORDER != BIG_ENDIAN
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013682 not big endian
13683 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013684
13685 ;
13686 return 0;
13687}
13688_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013689if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000013690 ac_cv_c_bigendian=yes
13691else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013692 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000013693fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013694rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013695fi
13696rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13697 fi
13698 if test $ac_cv_c_bigendian = unknown; then
13699 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
13700 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013701/* end confdefs.h. */
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013702#include <limits.h>
13703
Martin v. Löwis11437992002-04-12 09:54:03 +000013704int
13705main ()
13706{
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013707#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
13708 bogus endian macros
13709 #endif
13710
Martin v. Löwis11437992002-04-12 09:54:03 +000013711 ;
13712 return 0;
13713}
13714_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013715if ac_fn_c_try_compile "$LINENO"; then :
13716 # It does; now see whether it defined to _BIG_ENDIAN or not.
13717 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13718/* end confdefs.h. */
13719#include <limits.h>
13720
13721int
13722main ()
13723{
13724#ifndef _BIG_ENDIAN
13725 not big endian
13726 #endif
13727
13728 ;
13729 return 0;
13730}
13731_ACEOF
13732if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013733 ac_cv_c_bigendian=yes
Alexandre Vassalottia2db6872009-07-17 07:46:46 +000013734else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013735 ac_cv_c_bigendian=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013736fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013737rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13738fi
13739rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13740 fi
13741 if test $ac_cv_c_bigendian = unknown; then
13742 # Compile a test program.
13743 if test "$cross_compiling" = yes; then :
13744 # Try to guess by grepping values from an object file.
13745 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13746/* end confdefs.h. */
13747short int ascii_mm[] =
13748 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
13749 short int ascii_ii[] =
13750 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
13751 int use_ascii (int i) {
13752 return ascii_mm[i] + ascii_ii[i];
13753 }
13754 short int ebcdic_ii[] =
13755 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
13756 short int ebcdic_mm[] =
13757 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
13758 int use_ebcdic (int i) {
13759 return ebcdic_mm[i] + ebcdic_ii[i];
13760 }
13761 extern int foo;
Martin v. Löwiseba40652007-08-30 20:10:57 +000013762
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013763int
13764main ()
13765{
13766return use_ascii (foo) == use_ebcdic (foo);
13767 ;
13768 return 0;
13769}
13770_ACEOF
13771if ac_fn_c_try_compile "$LINENO"; then :
13772 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
13773 ac_cv_c_bigendian=yes
13774 fi
13775 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
13776 if test "$ac_cv_c_bigendian" = unknown; then
13777 ac_cv_c_bigendian=no
13778 else
13779 # finding both strings is unlikely to happen, but who knows?
13780 ac_cv_c_bigendian=unknown
13781 fi
13782 fi
13783fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013784rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013785else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013786 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013787/* end confdefs.h. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000013788$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000013789int
13790main ()
13791{
Martin v. Löwiseba40652007-08-30 20:10:57 +000013792
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013793 /* Are we little or big endian? From Harbison&Steele. */
13794 union
13795 {
13796 long int l;
13797 char c[sizeof (long int)];
13798 } u;
13799 u.l = 1;
13800 return u.c[sizeof (long int) - 1] == 1;
Martin v. Löwiseba40652007-08-30 20:10:57 +000013801
13802 ;
13803 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000013804}
Martin v. Löwis11437992002-04-12 09:54:03 +000013805_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013806if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000013807 ac_cv_c_bigendian=no
13808else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013809 ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000013810fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013811rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13812 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000013813fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013814
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013815 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013816fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013817{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
13818$as_echo "$ac_cv_c_bigendian" >&6; }
13819 case $ac_cv_c_bigendian in #(
13820 yes)
13821 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
13822;; #(
13823 no)
13824 ;; #(
13825 universal)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013826
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013827$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Alexandre Vassalottia2db6872009-07-17 07:46:46 +000013828
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013829 ;; #(
13830 *)
Georg Brandl71f4fbb2011-02-25 11:04:50 +000013831 as_fn_error $? "unknown endianness
Matthias Klose3cef2a92012-03-14 23:39:33 +010013832 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013833 esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000013834
Michael W. Hudson54241132001-12-07 15:38:26 +000013835
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013836# Check whether right shifting a negative integer extends the sign bit
13837# or fills with zeros (like the Cray J90, according to Tim Peters).
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013838{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether right shift extends the sign bit" >&5
13839$as_echo_n "checking whether right shift extends the sign bit... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013840if ${ac_cv_rshift_extends_sign+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013841 $as_echo_n "(cached) " >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000013842else
Martin v. Löwis11437992002-04-12 09:54:03 +000013843
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013844if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000013845 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013846else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013847 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013848/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013849
13850int main()
13851{
Vladimir Marangozova6180282000-07-12 05:05:06 +000013852 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013853}
13854
Martin v. Löwis11437992002-04-12 09:54:03 +000013855_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013856if ac_fn_c_try_run "$LINENO"; then :
Vladimir Marangozova6180282000-07-12 05:05:06 +000013857 ac_cv_rshift_extends_sign=yes
13858else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013859 ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000013860fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013861rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13862 conftest.$ac_objext conftest.beam conftest.$ac_ext
Vladimir Marangozova6180282000-07-12 05:05:06 +000013863fi
13864
Martin v. Löwiseba40652007-08-30 20:10:57 +000013865fi
13866
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013867{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rshift_extends_sign" >&5
13868$as_echo "$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000013869if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013870then
Martin v. Löwis11437992002-04-12 09:54:03 +000013871
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013872$as_echo "#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1" >>confdefs.h
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013873
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013874fi
13875
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013876# check for getc_unlocked and related locking functions
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013877{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getc_unlocked() and friends" >&5
13878$as_echo_n "checking for getc_unlocked() and friends... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013879if ${ac_cv_have_getc_unlocked+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013880 $as_echo_n "(cached) " >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013881else
Martin v. Löwis11437992002-04-12 09:54:03 +000013882
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013883cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013884/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013885#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013886int
13887main ()
13888{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013889
13890 FILE *f = fopen("/dev/null", "r");
13891 flockfile(f);
13892 getc_unlocked(f);
13893 funlockfile(f);
13894
Martin v. Löwis11437992002-04-12 09:54:03 +000013895 ;
13896 return 0;
13897}
13898_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013899if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013900 ac_cv_have_getc_unlocked=yes
13901else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013902 ac_cv_have_getc_unlocked=no
13903fi
13904rm -f core conftest.err conftest.$ac_objext \
13905 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013906fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013907
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013908{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getc_unlocked" >&5
13909$as_echo "$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013910if test "$ac_cv_have_getc_unlocked" = yes
13911then
Martin v. Löwis11437992002-04-12 09:54:03 +000013912
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013913$as_echo "#define HAVE_GETC_UNLOCKED 1" >>confdefs.h
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013914
13915fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013916
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013917# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000013918# save the value of LIBS so we don't actually link Python with readline
13919LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013920
Gregory P. Smithcc023f12008-09-07 05:15:58 +000013921# On some systems we need to link readline to a termcap compatible
13922# library. NOTE: Keep the precedence of listed libraries synchronised
13923# with setup.py.
13924py_cv_lib_readline=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013925{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link readline libs" >&5
13926$as_echo_n "checking how to link readline libs... " >&6; }
Gregory P. Smithcc023f12008-09-07 05:15:58 +000013927for py_libtermcap in "" ncursesw ncurses curses termcap; do
13928 if test -z "$py_libtermcap"; then
13929 READLINE_LIBS="-lreadline"
13930 else
13931 READLINE_LIBS="-lreadline -l$py_libtermcap"
13932 fi
13933 LIBS="$READLINE_LIBS $LIBS_no_readline"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013934 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013935/* end confdefs.h. */
13936
Martin v. Löwiseba40652007-08-30 20:10:57 +000013937/* Override any GCC internal prototype to avoid an error.
13938 Use char because int might match the return type of a GCC
13939 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013940#ifdef __cplusplus
13941extern "C"
13942#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013943char readline ();
13944int
13945main ()
13946{
Martin v. Löwiseba40652007-08-30 20:10:57 +000013947return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013948 ;
13949 return 0;
13950}
13951_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013952if ac_fn_c_try_link "$LINENO"; then :
Gregory P. Smithcc023f12008-09-07 05:15:58 +000013953 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013954fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013955rm -f core conftest.err conftest.$ac_objext \
13956 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smithcc023f12008-09-07 05:15:58 +000013957 if test $py_cv_lib_readline = yes; then
13958 break
13959 fi
13960done
13961# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
13962#AC_SUBST([READLINE_LIBS])
Gregory P. Smithe080cdf2008-09-07 19:19:04 +000013963if test $py_cv_lib_readline = no; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013964 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
13965$as_echo "none" >&6; }
Gregory P. Smithcc023f12008-09-07 05:15:58 +000013966else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013967 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_LIBS" >&5
13968$as_echo "$READLINE_LIBS" >&6; }
Gregory P. Smithcc023f12008-09-07 05:15:58 +000013969
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013970$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013971
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013972fi
13973
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013974# check for readline 2.1
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013975{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_callback_handler_install in -lreadline" >&5
13976$as_echo_n "checking for rl_callback_handler_install in -lreadline... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013977if ${ac_cv_lib_readline_rl_callback_handler_install+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013978 $as_echo_n "(cached) " >&6
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013979else
13980 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000013981LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013982cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013983/* end confdefs.h. */
13984
Martin v. Löwiseba40652007-08-30 20:10:57 +000013985/* Override any GCC internal prototype to avoid an error.
13986 Use char because int might match the return type of a GCC
13987 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013988#ifdef __cplusplus
13989extern "C"
13990#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013991char rl_callback_handler_install ();
13992int
13993main ()
13994{
Martin v. Löwiseba40652007-08-30 20:10:57 +000013995return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013996 ;
13997 return 0;
13998}
13999_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014000if ac_fn_c_try_link "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014001 ac_cv_lib_readline_rl_callback_handler_install=yes
14002else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014003 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014004fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014005rm -f core conftest.err conftest.$ac_objext \
14006 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014007LIBS=$ac_check_lib_save_LIBS
14008fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014009{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
14010$as_echo "$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010014011if test "x$ac_cv_lib_readline_rl_callback_handler_install" = xyes; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014012
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014013$as_echo "#define HAVE_RL_CALLBACK 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014014
14015fi
14016
14017
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014018# check for readline 2.2
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014019cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014020/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014021#include <readline/readline.h>
14022_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014023if ac_fn_c_try_cpp "$LINENO"; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014024 have_readline=yes
14025else
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014026 have_readline=no
Matthias Klosec511b472010-05-08 11:01:39 +000014027
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014028fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014029rm -f conftest.err conftest.i conftest.$ac_ext
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014030if test $have_readline = yes
14031then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014032 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014033/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014034#include <readline/readline.h>
14035
14036_ACEOF
14037if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014038 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014039
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014040$as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014041
14042fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +000014043rm -f conftest*
Antoine Pitroud9ff74e2009-10-26 19:16:46 +000014044
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014045 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroud9ff74e2009-10-26 19:16:46 +000014046/* end confdefs.h. */
14047#include <readline/readline.h>
14048
14049_ACEOF
14050if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014051 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then :
Antoine Pitroud9ff74e2009-10-26 19:16:46 +000014052
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014053$as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h
Antoine Pitroud9ff74e2009-10-26 19:16:46 +000014054
14055fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +000014056rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014057
14058fi
14059
Martin v. Löwis0daad592001-09-30 21:09:59 +000014060# check for readline 4.0
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014061{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -lreadline" >&5
14062$as_echo_n "checking for rl_pre_input_hook in -lreadline... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010014063if ${ac_cv_lib_readline_rl_pre_input_hook+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014064 $as_echo_n "(cached) " >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000014065else
Martin v. Löwis11437992002-04-12 09:54:03 +000014066 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000014067LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014068cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014069/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014070
Martin v. Löwiseba40652007-08-30 20:10:57 +000014071/* Override any GCC internal prototype to avoid an error.
14072 Use char because int might match the return type of a GCC
14073 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014074#ifdef __cplusplus
14075extern "C"
14076#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014077char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014078int
14079main ()
14080{
Martin v. Löwiseba40652007-08-30 20:10:57 +000014081return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014082 ;
14083 return 0;
14084}
14085_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014086if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014087 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000014088else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014089 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000014090fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014091rm -f core conftest.err conftest.$ac_objext \
14092 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014093LIBS=$ac_check_lib_save_LIBS
14094fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014095{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
14096$as_echo "$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010014097if test "x$ac_cv_lib_readline_rl_pre_input_hook" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000014098
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014099$as_echo "#define HAVE_RL_PRE_INPUT_HOOK 1" >>confdefs.h
Martin v. Löwis0daad592001-09-30 21:09:59 +000014100
Martin v. Löwis0daad592001-09-30 21:09:59 +000014101fi
14102
Michael W. Hudson54241132001-12-07 15:38:26 +000014103
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000014104# also in 4.0
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014105{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -lreadline" >&5
14106$as_echo_n "checking for rl_completion_display_matches_hook in -lreadline... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010014107if ${ac_cv_lib_readline_rl_completion_display_matches_hook+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014108 $as_echo_n "(cached) " >&6
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000014109else
14110 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000014111LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014112cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000014113/* end confdefs.h. */
14114
14115/* Override any GCC internal prototype to avoid an error.
14116 Use char because int might match the return type of a GCC
14117 builtin and then its argument prototype would still apply. */
14118#ifdef __cplusplus
14119extern "C"
14120#endif
14121char rl_completion_display_matches_hook ();
14122int
14123main ()
14124{
14125return rl_completion_display_matches_hook ();
14126 ;
14127 return 0;
14128}
14129_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014130if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000014131 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
14132else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014133 ac_cv_lib_readline_rl_completion_display_matches_hook=no
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000014134fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014135rm -f core conftest.err conftest.$ac_objext \
14136 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000014137LIBS=$ac_check_lib_save_LIBS
14138fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014139{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
14140$as_echo "$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010014141if test "x$ac_cv_lib_readline_rl_completion_display_matches_hook" = xyes; then :
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000014142
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014143$as_echo "#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000014144
14145fi
14146
14147
Martin Pantera70c3232016-04-03 02:54:58 +000014148# also in 4.0, but not in editline
14149{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_resize_terminal in -lreadline" >&5
14150$as_echo_n "checking for rl_resize_terminal in -lreadline... " >&6; }
14151if ${ac_cv_lib_readline_rl_resize_terminal+:} false; then :
14152 $as_echo_n "(cached) " >&6
14153else
14154 ac_check_lib_save_LIBS=$LIBS
14155LIBS="-lreadline $READLINE_LIBS $LIBS"
14156cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14157/* end confdefs.h. */
14158
14159/* Override any GCC internal prototype to avoid an error.
14160 Use char because int might match the return type of a GCC
14161 builtin and then its argument prototype would still apply. */
14162#ifdef __cplusplus
14163extern "C"
14164#endif
14165char rl_resize_terminal ();
14166int
14167main ()
14168{
14169return rl_resize_terminal ();
14170 ;
14171 return 0;
14172}
14173_ACEOF
14174if ac_fn_c_try_link "$LINENO"; then :
14175 ac_cv_lib_readline_rl_resize_terminal=yes
14176else
14177 ac_cv_lib_readline_rl_resize_terminal=no
14178fi
14179rm -f core conftest.err conftest.$ac_objext \
14180 conftest$ac_exeext conftest.$ac_ext
14181LIBS=$ac_check_lib_save_LIBS
14182fi
14183{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_resize_terminal" >&5
14184$as_echo "$ac_cv_lib_readline_rl_resize_terminal" >&6; }
14185if test "x$ac_cv_lib_readline_rl_resize_terminal" = xyes; then :
14186
14187$as_echo "#define HAVE_RL_RESIZE_TERMINAL 1" >>confdefs.h
14188
14189fi
14190
14191
Martin v. Löwis0daad592001-09-30 21:09:59 +000014192# check for readline 4.2
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014193{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5
14194$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010014195if ${ac_cv_lib_readline_rl_completion_matches+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014196 $as_echo_n "(cached) " >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000014197else
Martin v. Löwis11437992002-04-12 09:54:03 +000014198 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000014199LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014200cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014201/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014202
Martin v. Löwiseba40652007-08-30 20:10:57 +000014203/* Override any GCC internal prototype to avoid an error.
14204 Use char because int might match the return type of a GCC
14205 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014206#ifdef __cplusplus
14207extern "C"
14208#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014209char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014210int
14211main ()
14212{
Martin v. Löwiseba40652007-08-30 20:10:57 +000014213return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014214 ;
14215 return 0;
14216}
14217_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014218if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014219 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000014220else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014221 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000014222fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014223rm -f core conftest.err conftest.$ac_objext \
14224 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014225LIBS=$ac_check_lib_save_LIBS
14226fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014227{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_matches" >&5
14228$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010014229if test "x$ac_cv_lib_readline_rl_completion_matches" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000014230
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014231$as_echo "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h
Guido van Rossum353ae582001-07-10 16:45:32 +000014232
Guido van Rossum353ae582001-07-10 16:45:32 +000014233fi
14234
Jack Jansendd19cf82001-12-06 22:36:17 +000014235
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014236# also in readline 4.2
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014237cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014238/* end confdefs.h. */
14239#include <readline/readline.h>
14240_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014241if ac_fn_c_try_cpp "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014242 have_readline=yes
14243else
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014244 have_readline=no
Matthias Klosec511b472010-05-08 11:01:39 +000014245
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014246fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014247rm -f conftest.err conftest.i conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014248if test $have_readline = yes
14249then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014250 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014251/* end confdefs.h. */
14252#include <readline/readline.h>
14253
14254_ACEOF
14255if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014256 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014257
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014258$as_echo "#define HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014259
14260fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +000014261rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014262
14263fi
14264
Martin v. Löwis82bca632006-02-10 20:49:30 +000014265# End of readline checks: restore LIBS
14266LIBS=$LIBS_no_readline
14267
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014268{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken nice()" >&5
14269$as_echo_n "checking for broken nice()... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010014270if ${ac_cv_broken_nice+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014271 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000014272else
Martin v. Löwis11437992002-04-12 09:54:03 +000014273
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014274if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000014275 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014276else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014277 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014278/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014279
14280int main()
14281{
14282 int val1 = nice(1);
14283 if (val1 != -1 && val1 == nice(2))
14284 exit(0);
14285 exit(1);
14286}
14287
Martin v. Löwis11437992002-04-12 09:54:03 +000014288_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014289if ac_fn_c_try_run "$LINENO"; then :
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014290 ac_cv_broken_nice=yes
14291else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014292 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014293fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014294rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14295 conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014296fi
14297
Martin v. Löwiseba40652007-08-30 20:10:57 +000014298fi
14299
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014300{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_nice" >&5
14301$as_echo "$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014302if test "$ac_cv_broken_nice" = yes
14303then
Martin v. Löwis11437992002-04-12 09:54:03 +000014304
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014305$as_echo "#define HAVE_BROKEN_NICE 1" >>confdefs.h
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014306
14307fi
14308
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014309{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken poll()" >&5
14310$as_echo_n "checking for broken poll()... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010014311if ${ac_cv_broken_poll+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014312 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014313else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014314 if test "$cross_compiling" = yes; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014315 ac_cv_broken_poll=no
14316else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014317 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014318/* end confdefs.h. */
14319
14320#include <poll.h>
14321
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014322int main()
14323{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014324 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014325 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014326
14327 close (42);
14328
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014329 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014330 if (poll_test < 0)
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014331 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014332 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014333 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014334 else
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014335 return 1;
14336}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014337
14338_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014339if ac_fn_c_try_run "$LINENO"; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014340 ac_cv_broken_poll=yes
14341else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014342 ac_cv_broken_poll=no
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014343fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014344rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14345 conftest.$ac_objext conftest.beam conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014346fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014347
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014348fi
14349
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014350{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_poll" >&5
14351$as_echo "$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014352if test "$ac_cv_broken_poll" = yes
14353then
14354
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014355$as_echo "#define HAVE_BROKEN_POLL 1" >>confdefs.h
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014356
14357fi
14358
Brett Cannon43802422005-02-10 20:48:03 +000014359# 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 +000014360# (which is not required by ISO C or UNIX spec) and/or if we support
14361# tzname[]
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014362ac_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 +000014363#include <$ac_cv_struct_tm>
14364
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014365"
Matthias Klose3cef2a92012-03-14 23:39:33 +010014366if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Brett Cannon43802422005-02-10 20:48:03 +000014367
14368cat >>confdefs.h <<_ACEOF
14369#define HAVE_STRUCT_TM_TM_ZONE 1
14370_ACEOF
14371
14372
14373fi
14374
14375if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
14376
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014377$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000014378
14379else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014380 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
14381"
Matthias Klose3cef2a92012-03-14 23:39:33 +010014382if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014383 ac_have_decl=1
Martin v. Löwiseba40652007-08-30 20:10:57 +000014384else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014385 ac_have_decl=0
Martin v. Löwiseba40652007-08-30 20:10:57 +000014386fi
14387
Martin v. Löwiseba40652007-08-30 20:10:57 +000014388cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014389#define HAVE_DECL_TZNAME $ac_have_decl
Martin v. Löwiseba40652007-08-30 20:10:57 +000014390_ACEOF
14391
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014392 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
14393$as_echo_n "checking for tzname... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010014394if ${ac_cv_var_tzname+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014395 $as_echo_n "(cached) " >&6
Martin v. Löwiseba40652007-08-30 20:10:57 +000014396else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014397 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000014398/* end confdefs.h. */
14399#include <time.h>
Martin v. Löwiseba40652007-08-30 20:10:57 +000014400#if !HAVE_DECL_TZNAME
14401extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000014402#endif
14403
14404int
14405main ()
14406{
Martin v. Löwiseba40652007-08-30 20:10:57 +000014407return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000014408 ;
14409 return 0;
14410}
14411_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014412if ac_fn_c_try_link "$LINENO"; then :
Brett Cannon43802422005-02-10 20:48:03 +000014413 ac_cv_var_tzname=yes
14414else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014415 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000014416fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014417rm -f core conftest.err conftest.$ac_objext \
14418 conftest$ac_exeext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000014419fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014420{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
14421$as_echo "$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000014422 if test $ac_cv_var_tzname = yes; then
14423
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014424$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000014425
14426 fi
14427fi
14428
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014429
Martin v. Löwis1d459062005-03-14 21:23:33 +000014430# check tzset(3) exists and works like we expect it to
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014431{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working tzset()" >&5
14432$as_echo_n "checking for working tzset()... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010014433if ${ac_cv_working_tzset+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014434 $as_echo_n "(cached) " >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014435else
14436
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014437if test "$cross_compiling" = yes; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014438 ac_cv_working_tzset=no
14439else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014440 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014441/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014442
14443#include <stdlib.h>
14444#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000014445#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000014446
14447#if HAVE_TZNAME
14448extern char *tzname[];
14449#endif
14450
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014451int main()
14452{
Brett Cannon18367812003-09-19 00:59:16 +000014453 /* Note that we need to ensure that not only does tzset(3)
14454 do 'something' with localtime, but it works as documented
14455 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000014456 This includes making sure that tzname is set properly if
14457 tm->tm_zone does not exist since it is the alternative way
14458 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000014459
14460 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000014461 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000014462 */
14463
Martin v. Löwis1d459062005-03-14 21:23:33 +000014464 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000014465 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
14466
Neal Norwitz7f2588c2003-04-11 15:35:53 +000014467 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014468 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000014469 if (localtime(&groundhogday)->tm_hour != 0)
14470 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000014471#if HAVE_TZNAME
14472 /* For UTC, tzname[1] is sometimes "", sometimes " " */
14473 if (strcmp(tzname[0], "UTC") ||
14474 (tzname[1][0] != 0 && tzname[1][0] != ' '))
14475 exit(1);
14476#endif
Brett Cannon18367812003-09-19 00:59:16 +000014477
Neal Norwitz7f2588c2003-04-11 15:35:53 +000014478 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014479 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000014480 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014481 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000014482#if HAVE_TZNAME
14483 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
14484 exit(1);
14485#endif
Brett Cannon18367812003-09-19 00:59:16 +000014486
14487 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
14488 tzset();
14489 if (localtime(&groundhogday)->tm_hour != 11)
14490 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000014491#if HAVE_TZNAME
14492 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
14493 exit(1);
14494#endif
14495
14496#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000014497 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
14498 exit(1);
14499 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
14500 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000014501#endif
Brett Cannon18367812003-09-19 00:59:16 +000014502
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014503 exit(0);
14504}
14505
14506_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014507if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014508 ac_cv_working_tzset=yes
14509else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014510 ac_cv_working_tzset=no
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014511fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014512rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14513 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014514fi
14515
Martin v. Löwiseba40652007-08-30 20:10:57 +000014516fi
14517
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014518{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_tzset" >&5
14519$as_echo "$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014520if test "$ac_cv_working_tzset" = yes
14521then
14522
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014523$as_echo "#define HAVE_WORKING_TZSET 1" >>confdefs.h
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014524
14525fi
14526
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014527# Look for subsecond timestamps in struct stat
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014528{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec in struct stat" >&5
14529$as_echo_n "checking for tv_nsec in struct stat... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010014530if ${ac_cv_stat_tv_nsec+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014531 $as_echo_n "(cached) " >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014532else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014533 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014534/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014535#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014536int
14537main ()
14538{
14539
14540struct stat st;
14541st.st_mtim.tv_nsec = 1;
14542
14543 ;
14544 return 0;
14545}
14546_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014547if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa32c9942002-09-09 16:17:47 +000014548 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014549else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014550 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014551fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014552rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14553fi
14554
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014555{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec" >&5
14556$as_echo "$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014557if test "$ac_cv_stat_tv_nsec" = yes
14558then
14559
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014560$as_echo "#define HAVE_STAT_TV_NSEC 1" >>confdefs.h
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014561
14562fi
14563
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014564# Look for BSD style subsecond timestamps in struct stat
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014565{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec2 in struct stat" >&5
14566$as_echo_n "checking for tv_nsec2 in struct stat... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010014567if ${ac_cv_stat_tv_nsec2+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014568 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014569else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014570 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014571/* end confdefs.h. */
14572#include <sys/stat.h>
14573int
14574main ()
14575{
14576
14577struct stat st;
14578st.st_mtimespec.tv_nsec = 1;
14579
14580 ;
14581 return 0;
14582}
14583_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014584if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014585 ac_cv_stat_tv_nsec2=yes
14586else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014587 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014588fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014589rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14590fi
14591
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014592{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec2" >&5
14593$as_echo "$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014594if test "$ac_cv_stat_tv_nsec2" = yes
14595then
14596
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014597$as_echo "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014598
14599fi
14600
doko@ubuntu.comf27ec3e2014-04-17 20:11:19 +020014601# first curses configure check
14602ac_save_cppflags="$CPPFLAGS"
14603CPPFLAGS="$CPPFLAGS -I/usr/include/ncursesw"
14604
14605for ac_header in curses.h ncurses.h
14606do :
14607 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
14608ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
14609if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
14610 cat >>confdefs.h <<_ACEOF
14611#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
14612_ACEOF
14613
14614fi
14615
14616done
14617
14618
14619# On Solaris, term.h requires curses.h
14620for ac_header in term.h
14621do :
14622 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "
14623#ifdef HAVE_CURSES_H
14624#include <curses.h>
14625#endif
14626
14627"
14628if test "x$ac_cv_header_term_h" = xyes; then :
14629 cat >>confdefs.h <<_ACEOF
14630#define HAVE_TERM_H 1
14631_ACEOF
14632
14633fi
14634
14635done
14636
14637
Jack Jansen666b1e72001-10-31 12:11:48 +000014638# On HP/UX 11.0, mvwdelch is a block with a return statement
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014639{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mvwdelch is an expression" >&5
14640$as_echo_n "checking whether mvwdelch is an expression... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010014641if ${ac_cv_mvwdelch_is_expression+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014642 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000014643else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014644 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014645/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000014646#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014647int
14648main ()
14649{
Jack Jansen666b1e72001-10-31 12:11:48 +000014650
14651 int rtn;
14652 rtn = mvwdelch(0,0,0);
14653
Martin v. Löwis11437992002-04-12 09:54:03 +000014654 ;
14655 return 0;
14656}
14657_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014658if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000014659 ac_cv_mvwdelch_is_expression=yes
14660else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014661 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000014662fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014663rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14664fi
14665
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014666{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mvwdelch_is_expression" >&5
14667$as_echo "$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000014668
14669if test "$ac_cv_mvwdelch_is_expression" = yes
14670then
Martin v. Löwis11437992002-04-12 09:54:03 +000014671
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014672$as_echo "#define MVWDELCH_IS_EXPRESSION 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000014673
14674fi
14675
Miss Islington (bot)6ba0b582017-11-01 05:36:48 -070014676# Issue #25720: ncurses has introduced the NCURSES_OPAQUE symbol making opaque
14677# structs since version 5.7. If the macro is defined as zero before including
14678# [n]curses.h, ncurses will expose fields of the structs regardless of the
14679# configuration.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014680{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WINDOW has _flags" >&5
14681$as_echo_n "checking whether WINDOW has _flags... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010014682if ${ac_cv_window_has_flags+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014683 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000014684else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014685 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014686/* end confdefs.h. */
Miss Islington (bot)6ba0b582017-11-01 05:36:48 -070014687
14688 #define NCURSES_OPAQUE 0
14689 #include <curses.h>
14690
Martin v. Löwis11437992002-04-12 09:54:03 +000014691int
14692main ()
14693{
Jack Jansen666b1e72001-10-31 12:11:48 +000014694
14695 WINDOW *w;
14696 w->_flags = 0;
14697
Martin v. Löwis11437992002-04-12 09:54:03 +000014698 ;
14699 return 0;
14700}
14701_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014702if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000014703 ac_cv_window_has_flags=yes
14704else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014705 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000014706fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014707rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14708fi
14709
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014710{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_window_has_flags" >&5
14711$as_echo "$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000014712
Jack Jansen666b1e72001-10-31 12:11:48 +000014713
14714if test "$ac_cv_window_has_flags" = yes
14715then
Martin v. Löwis11437992002-04-12 09:54:03 +000014716
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014717$as_echo "#define WINDOW_HAS_FLAGS 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000014718
14719fi
14720
Miss Islington (bot)6ba0b582017-11-01 05:36:48 -070014721{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_pad" >&5
14722$as_echo_n "checking for is_pad... " >&6; }
14723cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14724/* end confdefs.h. */
14725#include <curses.h>
14726int
14727main ()
14728{
14729
14730#ifndef is_pad
14731void *x=is_pad
14732#endif
14733
14734 ;
14735 return 0;
14736}
14737_ACEOF
14738if ac_fn_c_try_compile "$LINENO"; then :
14739
14740$as_echo "#define HAVE_CURSES_IS_PAD 1" >>confdefs.h
14741
14742 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14743$as_echo "yes" >&6; }
14744else
14745 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14746$as_echo "no" >&6; }
14747
14748fi
14749rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14750
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014751{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_term_resized" >&5
14752$as_echo_n "checking for is_term_resized... " >&6; }
14753cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Walter Dörwald4994d952006-06-19 08:07:50 +000014754/* end confdefs.h. */
14755#include <curses.h>
14756int
14757main ()
14758{
14759void *x=is_term_resized
14760 ;
14761 return 0;
14762}
14763_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014764if ac_fn_c_try_compile "$LINENO"; then :
Walter Dörwald4994d952006-06-19 08:07:50 +000014765
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014766$as_echo "#define HAVE_CURSES_IS_TERM_RESIZED 1" >>confdefs.h
Walter Dörwald4994d952006-06-19 08:07:50 +000014767
Matthias Klosec511b472010-05-08 11:01:39 +000014768 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014769$as_echo "yes" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000014770else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014771 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14772$as_echo "no" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000014773
14774fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014775rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14776
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014777{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resize_term" >&5
14778$as_echo_n "checking for resize_term... " >&6; }
14779cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Walter Dörwald4994d952006-06-19 08:07:50 +000014780/* end confdefs.h. */
14781#include <curses.h>
14782int
14783main ()
14784{
14785void *x=resize_term
14786 ;
14787 return 0;
14788}
14789_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014790if ac_fn_c_try_compile "$LINENO"; then :
Walter Dörwald4994d952006-06-19 08:07:50 +000014791
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014792$as_echo "#define HAVE_CURSES_RESIZE_TERM 1" >>confdefs.h
Walter Dörwald4994d952006-06-19 08:07:50 +000014793
Matthias Klosec511b472010-05-08 11:01:39 +000014794 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014795$as_echo "yes" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000014796else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014797 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14798$as_echo "no" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000014799
14800fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014801rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14802
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014803{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resizeterm" >&5
14804$as_echo_n "checking for resizeterm... " >&6; }
14805cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Walter Dörwald4994d952006-06-19 08:07:50 +000014806/* end confdefs.h. */
14807#include <curses.h>
14808int
14809main ()
14810{
14811void *x=resizeterm
14812 ;
14813 return 0;
14814}
14815_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014816if ac_fn_c_try_compile "$LINENO"; then :
Walter Dörwald4994d952006-06-19 08:07:50 +000014817
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014818$as_echo "#define HAVE_CURSES_RESIZETERM 1" >>confdefs.h
Walter Dörwald4994d952006-06-19 08:07:50 +000014819
Matthias Klosec511b472010-05-08 11:01:39 +000014820 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014821$as_echo "yes" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000014822else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014823 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14824$as_echo "no" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000014825
14826fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014827rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Serhiy Storchakae0fc1af2017-10-31 16:12:35 +020014828
14829{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for immedok" >&5
14830$as_echo_n "checking for immedok... " >&6; }
14831cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14832/* end confdefs.h. */
14833#include <curses.h>
14834int
14835main ()
14836{
14837
14838#ifndef immedok
14839void *x=immedok
14840#endif
14841
14842 ;
14843 return 0;
14844}
14845_ACEOF
14846if ac_fn_c_try_compile "$LINENO"; then :
14847
14848$as_echo "#define HAVE_CURSES_IMMEDOK 1" >>confdefs.h
14849
14850 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14851$as_echo "yes" >&6; }
14852else
14853 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14854$as_echo "no" >&6; }
14855
14856fi
14857rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14858
14859{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for syncok" >&5
14860$as_echo_n "checking for syncok... " >&6; }
14861cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14862/* end confdefs.h. */
14863#include <curses.h>
14864int
14865main ()
14866{
14867
14868#ifndef syncok
14869void *x=syncok
14870#endif
14871
14872 ;
14873 return 0;
14874}
14875_ACEOF
14876if ac_fn_c_try_compile "$LINENO"; then :
14877
14878$as_echo "#define HAVE_CURSES_SYNCOK 1" >>confdefs.h
14879
14880 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14881$as_echo "yes" >&6; }
14882else
14883 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14884$as_echo "no" >&6; }
14885
14886fi
14887rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14888
Miss Islington (bot)87c66e42017-11-01 06:11:18 -070014889{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for wchgat" >&5
14890$as_echo_n "checking for wchgat... " >&6; }
14891cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14892/* end confdefs.h. */
14893#include <curses.h>
14894int
14895main ()
14896{
14897
14898#ifndef wchgat
14899void *x=wchgat
14900#endif
14901
14902 ;
14903 return 0;
14904}
14905_ACEOF
14906if ac_fn_c_try_compile "$LINENO"; then :
14907
14908$as_echo "#define HAVE_CURSES_WCHGAT 1" >>confdefs.h
14909
14910 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14911$as_echo "yes" >&6; }
14912else
14913 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14914$as_echo "no" >&6; }
14915
14916fi
14917rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14918
Serhiy Storchakae0fc1af2017-10-31 16:12:35 +020014919{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for filter" >&5
14920$as_echo_n "checking for filter... " >&6; }
14921cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14922/* end confdefs.h. */
14923#include <curses.h>
14924int
14925main ()
14926{
14927
14928#ifndef filter
14929void *x=filter
14930#endif
14931
14932 ;
14933 return 0;
14934}
14935_ACEOF
14936if ac_fn_c_try_compile "$LINENO"; then :
14937
14938$as_echo "#define HAVE_CURSES_FILTER 1" >>confdefs.h
14939
14940 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14941$as_echo "yes" >&6; }
14942else
14943 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14944$as_echo "no" >&6; }
14945
14946fi
14947rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14948
14949{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for has_key" >&5
14950$as_echo_n "checking for has_key... " >&6; }
14951cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14952/* end confdefs.h. */
14953#include <curses.h>
14954int
14955main ()
14956{
14957
14958#ifndef has_key
14959void *x=has_key
14960#endif
14961
14962 ;
14963 return 0;
14964}
14965_ACEOF
14966if ac_fn_c_try_compile "$LINENO"; then :
14967
14968$as_echo "#define HAVE_CURSES_HAS_KEY 1" >>confdefs.h
14969
14970 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14971$as_echo "yes" >&6; }
14972else
14973 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14974$as_echo "no" >&6; }
14975
14976fi
14977rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14978
14979{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for typeahead" >&5
14980$as_echo_n "checking for typeahead... " >&6; }
14981cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14982/* end confdefs.h. */
14983#include <curses.h>
14984int
14985main ()
14986{
14987
14988#ifndef typeahead
14989void *x=typeahead
14990#endif
14991
14992 ;
14993 return 0;
14994}
14995_ACEOF
14996if ac_fn_c_try_compile "$LINENO"; then :
14997
14998$as_echo "#define HAVE_CURSES_TYPEAHEAD 1" >>confdefs.h
14999
15000 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15001$as_echo "yes" >&6; }
15002else
15003 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15004$as_echo "no" >&6; }
15005
15006fi
15007rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15008
15009{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for use_env" >&5
15010$as_echo_n "checking for use_env... " >&6; }
15011cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15012/* end confdefs.h. */
15013#include <curses.h>
15014int
15015main ()
15016{
15017
15018#ifndef use_env
15019void *x=use_env
15020#endif
15021
15022 ;
15023 return 0;
15024}
15025_ACEOF
15026if ac_fn_c_try_compile "$LINENO"; then :
15027
15028$as_echo "#define HAVE_CURSES_USE_ENV 1" >>confdefs.h
15029
15030 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15031$as_echo "yes" >&6; }
15032else
15033 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15034$as_echo "no" >&6; }
15035
15036fi
15037rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
doko@ubuntu.comf27ec3e2014-04-17 20:11:19 +020015038# last curses configure check
15039CPPFLAGS=$ac_save_cppflags
Martin v. Löwiseba40652007-08-30 20:10:57 +000015040
doko@python.orgd65e2ba2013-01-31 23:52:03 +010015041{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for device files" >&5
15042$as_echo "$as_me: checking for device files" >&6;}
15043
15044if test "x$cross_compiling" = xyes; then
15045 if test "${ac_cv_file__dev_ptmx+set}" != set; then
15046 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
15047$as_echo_n "checking for /dev/ptmx... " >&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_ptmx to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
15051 fi
15052 if test "${ac_cv_file__dev_ptc+set}" != set; then
15053 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
15054$as_echo_n "checking for /dev/ptc... " >&6; }
15055 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
15056$as_echo "not set" >&6; }
15057 as_fn_error $? "set ac_cv_file__dev_ptc to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
15058 fi
15059fi
15060
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015061{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
15062$as_echo_n "checking for /dev/ptmx... " >&6; }
doko@python.orgd65e2ba2013-01-31 23:52:03 +010015063if ${ac_cv_file__dev_ptmx+:} false; then :
15064 $as_echo_n "(cached) " >&6
15065else
15066 test "$cross_compiling" = yes &&
15067 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
15068if test -r "/dev/ptmx"; then
15069 ac_cv_file__dev_ptmx=yes
15070else
15071 ac_cv_file__dev_ptmx=no
15072fi
15073fi
15074{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptmx" >&5
15075$as_echo "$ac_cv_file__dev_ptmx" >&6; }
15076if test "x$ac_cv_file__dev_ptmx" = xyes; then :
Martin v. Löwisfefbc202006-10-17 18:59:23 +000015077
doko@python.orgd65e2ba2013-01-31 23:52:03 +010015078fi
15079
15080if test "x$ac_cv_file__dev_ptmx" = xyes; then
Martin v. Löwis24a880b2002-12-31 12:55:15 +000015081
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015082$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
Martin v. Löwis24a880b2002-12-31 12:55:15 +000015083
Martin v. Löwis24a880b2002-12-31 12:55:15 +000015084fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015085{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
15086$as_echo_n "checking for /dev/ptc... " >&6; }
doko@python.orgd65e2ba2013-01-31 23:52:03 +010015087if ${ac_cv_file__dev_ptc+:} false; then :
15088 $as_echo_n "(cached) " >&6
15089else
15090 test "$cross_compiling" = yes &&
15091 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
15092if test -r "/dev/ptc"; then
15093 ac_cv_file__dev_ptc=yes
15094else
15095 ac_cv_file__dev_ptc=no
15096fi
15097fi
15098{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptc" >&5
15099$as_echo "$ac_cv_file__dev_ptc" >&6; }
15100if test "x$ac_cv_file__dev_ptc" = xyes; then :
Martin v. Löwisfefbc202006-10-17 18:59:23 +000015101
doko@python.orgd65e2ba2013-01-31 23:52:03 +010015102fi
15103
15104if test "x$ac_cv_file__dev_ptc" = xyes; then
Neal Norwitz865400f2003-03-21 01:42:58 +000015105
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015106$as_echo "#define HAVE_DEV_PTC 1" >>confdefs.h
Neal Norwitz865400f2003-03-21 01:42:58 +000015107
Neal Norwitz865400f2003-03-21 01:42:58 +000015108fi
15109
Mark Dickinson82864d12009-11-15 16:18:58 +000015110if test "$have_long_long" = yes
15111then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015112 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for %lld and %llu printf() format support" >&5
15113$as_echo_n "checking for %lld and %llu printf() format support... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010015114 if ${ac_cv_have_long_long_format+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015115 $as_echo_n "(cached) " >&6
Mark Dickinson82864d12009-11-15 16:18:58 +000015116else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015117 if test "$cross_compiling" = yes; then :
doko@python.orgd65e2ba2013-01-31 23:52:03 +010015118 ac_cv_have_long_long_format="cross -- assuming no"
15119 if test x$GCC = xyes; then
15120 save_CFLAGS=$CFLAGS
15121 CFLAGS="$CFLAGS -Werror -Wformat"
15122 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15123/* end confdefs.h. */
15124
15125 #include <stdio.h>
15126 #include <stddef.h>
15127
15128int
15129main ()
15130{
15131
15132 char *buffer;
15133 sprintf(buffer, "%lld", (long long)123);
15134 sprintf(buffer, "%lld", (long long)-123);
15135 sprintf(buffer, "%llu", (unsigned long long)123);
15136
15137 ;
15138 return 0;
15139}
15140_ACEOF
15141if ac_fn_c_try_compile "$LINENO"; then :
15142 ac_cv_have_long_long_format=yes
15143
15144fi
15145rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15146 CFLAGS=$save_CFLAGS
15147 fi
Mark Dickinson82864d12009-11-15 16:18:58 +000015148else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015149 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson82864d12009-11-15 16:18:58 +000015150/* end confdefs.h. */
15151
15152 #include <stdio.h>
15153 #include <stddef.h>
15154 #include <string.h>
15155
15156 #ifdef HAVE_SYS_TYPES_H
15157 #include <sys/types.h>
15158 #endif
15159
15160 int main()
15161 {
15162 char buffer[256];
15163
15164 if (sprintf(buffer, "%lld", (long long)123) < 0)
15165 return 1;
15166 if (strcmp(buffer, "123"))
15167 return 1;
15168
15169 if (sprintf(buffer, "%lld", (long long)-123) < 0)
15170 return 1;
15171 if (strcmp(buffer, "-123"))
15172 return 1;
15173
15174 if (sprintf(buffer, "%llu", (unsigned long long)123) < 0)
15175 return 1;
15176 if (strcmp(buffer, "123"))
15177 return 1;
15178
15179 return 0;
15180 }
15181
15182_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015183if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson82864d12009-11-15 16:18:58 +000015184 ac_cv_have_long_long_format=yes
15185else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015186 ac_cv_have_long_long_format=no
Mark Dickinson82864d12009-11-15 16:18:58 +000015187fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015188rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15189 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson82864d12009-11-15 16:18:58 +000015190fi
15191
15192
Mark Dickinson82864d12009-11-15 16:18:58 +000015193fi
15194
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015195 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_long_long_format" >&5
15196$as_echo "$ac_cv_have_long_long_format" >&6; }
Mark Dickinson82864d12009-11-15 16:18:58 +000015197fi
15198
Mark Dickinson5ce84742009-12-31 20:48:04 +000015199if test "$ac_cv_have_long_long_format" = yes
Mark Dickinson82864d12009-11-15 16:18:58 +000015200then
15201
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015202$as_echo "#define PY_FORMAT_LONG_LONG \"ll\"" >>confdefs.h
Mark Dickinson82864d12009-11-15 16:18:58 +000015203
15204fi
15205
Ronald Oussoren315cd0c2009-11-19 16:25:21 +000015206if test $ac_sys_system = Darwin
15207then
15208 LIBS="$LIBS -framework CoreFoundation"
15209fi
15210
Mark Dickinson82864d12009-11-15 16:18:58 +000015211
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015212{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for %zd printf() format support" >&5
15213$as_echo_n "checking for %zd printf() format support... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010015214if ${ac_cv_have_size_t_format+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015215 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000015216else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015217 if test "$cross_compiling" = yes; then :
Gregory P. Smithc9ff3a72009-11-02 02:03:16 +000015218 ac_cv_have_size_t_format="cross -- assuming yes"
15219
Brett Cannon09d12362006-05-11 05:11:33 +000015220else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015221 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Brett Cannon09d12362006-05-11 05:11:33 +000015222/* end confdefs.h. */
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000015223
Brett Cannon09d12362006-05-11 05:11:33 +000015224#include <stdio.h>
15225#include <stddef.h>
15226#include <string.h>
15227
Christian Heimesdb3d6cb2007-12-16 21:39:43 +000015228#ifdef HAVE_SYS_TYPES_H
15229#include <sys/types.h>
15230#endif
Neal Norwitz4a8fbdb2006-09-22 08:16:26 +000015231
15232#ifdef HAVE_SSIZE_T
15233typedef ssize_t Py_ssize_t;
15234#elif SIZEOF_VOID_P == SIZEOF_LONG
15235typedef long Py_ssize_t;
15236#else
15237typedef int Py_ssize_t;
15238#endif
Brett Cannon09d12362006-05-11 05:11:33 +000015239
Christian Heimesdb3d6cb2007-12-16 21:39:43 +000015240int main()
15241{
15242 char buffer[256];
15243
Brett Cannon09d12362006-05-11 05:11:33 +000015244 if(sprintf(buffer, "%zd", (size_t)123) < 0)
15245 return 1;
15246
Neal Norwitz4a8fbdb2006-09-22 08:16:26 +000015247 if (strcmp(buffer, "123"))
15248 return 1;
15249
15250 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
15251 return 1;
15252
15253 if (strcmp(buffer, "-123"))
Brett Cannon09d12362006-05-11 05:11:33 +000015254 return 1;
15255
15256 return 0;
15257}
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000015258
Brett Cannon09d12362006-05-11 05:11:33 +000015259_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015260if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000015261 ac_cv_have_size_t_format=yes
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015262else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015263 ac_cv_have_size_t_format=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015264fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015265rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15266 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +000015267fi
15268
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000015269fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015270{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t_format" >&5
15271$as_echo "$ac_cv_have_size_t_format" >&6; }
Gregory P. Smithc9ff3a72009-11-02 02:03:16 +000015272if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000015273
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015274$as_echo "#define PY_FORMAT_SIZE_T \"z\"" >>confdefs.h
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000015275
15276fi
15277
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015278ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
Martin v. Löwis01c04012002-11-11 14:58:44 +000015279#ifdef HAVE_SYS_TYPES_H
15280#include <sys/types.h>
15281#endif
15282#ifdef HAVE_SYS_SOCKET_H
15283#include <sys/socket.h>
15284#endif
15285
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015286"
Matthias Klose3cef2a92012-03-14 23:39:33 +010015287if test "x$ac_cv_type_socklen_t" = xyes; then :
Martin v. Löwis01c04012002-11-11 14:58:44 +000015288
Martin v. Löwis11437992002-04-12 09:54:03 +000015289else
Guido van Rossum95713eb2000-05-18 20:53:31 +000015290
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015291$as_echo "#define socklen_t int" >>confdefs.h
Guido van Rossum95713eb2000-05-18 20:53:31 +000015292
15293fi
15294
Michael W. Hudson54241132001-12-07 15:38:26 +000015295
Benjamin Peterson7497e912010-10-16 00:53:39 +000015296case $ac_sys_system in
15297AIX*)
15298
15299$as_echo "#define HAVE_BROKEN_PIPE_BUF 1" >>confdefs.h
15300 ;;
15301esac
15302
15303
Michael W. Hudson54241132001-12-07 15:38:26 +000015304
15305
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000015306for h in `(cd $srcdir;echo Python/thread_*.h)`
15307do
15308 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
15309done
15310
Michael W. Hudson54241132001-12-07 15:38:26 +000015311
Victor Stinner5f4056a2017-04-28 03:41:40 +020015312SRCDIRS="Parser Objects Python Modules"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015313{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5
15314$as_echo_n "checking for build directories... " >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015315for dir in $SRCDIRS; do
15316 if test ! -d $dir; then
15317 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000015318 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015319done
Benjamin Peterson2c992a02015-05-28 12:45:31 -050015320
15321# BEGIN_COMPUTED_GOTO
15322# Check for --with-computed-gotos
15323{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-computed-gotos" >&5
15324$as_echo_n "checking for --with-computed-gotos... " >&6; }
15325
15326# Check whether --with-computed-gotos was given.
15327if test "${with_computed_gotos+set}" = set; then :
15328 withval=$with_computed_gotos;
15329if test "$withval" = yes
15330then
15331
15332$as_echo "#define USE_COMPUTED_GOTOS 1" >>confdefs.h
15333
15334 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15335$as_echo "yes" >&6; }
15336fi
15337if test "$withval" = no
15338then
15339
15340$as_echo "#define USE_COMPUTED_GOTOS 0" >>confdefs.h
15341
15342 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15343$as_echo "no" >&6; }
15344fi
15345
15346else
15347 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
15348$as_echo "no value specified" >&6; }
15349fi
15350
15351
15352{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports computed gotos" >&5
15353$as_echo_n "checking whether $CC supports computed gotos... " >&6; }
15354if ${ac_cv_computed_gotos+:} false; then :
15355 $as_echo_n "(cached) " >&6
15356else
15357 if test "$cross_compiling" = yes; then :
15358 if test "${with_computed_gotos+set}" = set; then
15359 ac_cv_computed_gotos="$with_computed_gotos -- configured --with(out)-computed-gotos"
15360 else
15361 ac_cv_computed_gotos=no
15362 fi
15363else
15364 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15365/* end confdefs.h. */
15366
15367int main(int argc, char **argv)
15368{
15369 static void *targets[1] = { &&LABEL1 };
15370 goto LABEL2;
15371LABEL1:
15372 return 0;
15373LABEL2:
15374 goto *targets[0];
15375 return 1;
15376}
15377
15378_ACEOF
15379if ac_fn_c_try_run "$LINENO"; then :
15380 ac_cv_computed_gotos=yes
15381else
15382 ac_cv_computed_gotos=no
15383fi
15384rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15385 conftest.$ac_objext conftest.beam conftest.$ac_ext
15386fi
15387
15388fi
15389
15390{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_computed_gotos" >&5
15391$as_echo "$ac_cv_computed_gotos" >&6; }
15392case "$ac_cv_computed_gotos" in yes*)
15393
15394$as_echo "#define HAVE_COMPUTED_GOTOS 1" >>confdefs.h
15395
15396esac
15397# END_COMPUTED_GOTO
15398
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015399{ $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
15400$as_echo "done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000015401
Ned Deily3f1d0b32014-11-20 02:11:03 -080015402# ensurepip option
15403{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ensurepip" >&5
15404$as_echo_n "checking for ensurepip... " >&6; }
15405
15406# Check whether --with-ensurepip was given.
15407if test "${with_ensurepip+set}" = set; then :
15408 withval=$with_ensurepip;
15409else
15410 with_ensurepip=no
15411fi
15412
15413case $with_ensurepip in #(
15414 yes|upgrade) :
15415 ENSUREPIP=upgrade ;; #(
15416 install) :
15417 ENSUREPIP=install ;; #(
15418 no) :
15419 ENSUREPIP=no ;; #(
15420 *) :
15421 as_fn_error $? "--with-ensurepip=upgrade|install|no" "$LINENO" 5 ;;
15422esac
15423{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENSUREPIP" >&5
15424$as_echo "$ENSUREPIP" >&6; }
15425
15426
Guido van Rossum627b2d71993-12-24 10:39:16 +000015427# generate output files
Antoine Pitrouf2caeed2009-05-24 20:23:57 +000015428ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config Misc/python.pc"
Martin v. Löwis88afe662002-10-26 13:47:44 +000015429
Antoine Pitrouaabdceb2010-09-10 20:03:17 +000015430ac_config_files="$ac_config_files Modules/ld_so_aix"
15431
Martin v. Löwis11437992002-04-12 09:54:03 +000015432cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015433# This file is a shell script that caches the results of configure
15434# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000015435# scripts and configure runs, see configure's option --config-cache.
15436# It is not useful on other systems. If it contains results you don't
15437# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015438#
Martin v. Löwis11437992002-04-12 09:54:03 +000015439# config.status only pays attention to the cache file if you give it
15440# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015441#
Skip Montanaro6dead952003-09-25 14:50:04 +000015442# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000015443# loading this file, other *unset* `ac_cv_foo' will be assigned the
15444# following values.
15445
15446_ACEOF
15447
Guido van Rossumf78abae1997-01-21 22:02:36 +000015448# The following way of writing the cache mishandles newlines in values,
15449# but we know of no workaround that is simple, portable, and efficient.
Martin v. Löwiseba40652007-08-30 20:10:57 +000015450# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015451# Ultrix sh set writes to stderr and can't be redirected directly,
15452# and sets the high bit in the cache file unless we assign to the vars.
Martin v. Löwiseba40652007-08-30 20:10:57 +000015453(
15454 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
15455 eval ac_val=\$$ac_var
15456 case $ac_val in #(
15457 *${as_nl}*)
15458 case $ac_var in #(
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015459 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
15460$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015461 esac
15462 case $ac_var in #(
15463 _ | IFS | as_nl) ;; #(
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015464 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
15465 *) { eval $ac_var=; unset $ac_var;} ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015466 esac ;;
15467 esac
15468 done
15469
Martin v. Löwis11437992002-04-12 09:54:03 +000015470 (set) 2>&1 |
Martin v. Löwiseba40652007-08-30 20:10:57 +000015471 case $as_nl`(ac_space=' '; set) 2>&1` in #(
15472 *${as_nl}ac_space=\ *)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015473 # `set' does not quote correctly, so add quotes: double-quote
15474 # substitution turns \\\\ into \\, and sed turns \\ into \.
Martin v. Löwis11437992002-04-12 09:54:03 +000015475 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015476 "s/'/'\\\\''/g;
15477 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Martin v. Löwiseba40652007-08-30 20:10:57 +000015478 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000015479 *)
15480 # `set' quotes correctly as required by POSIX, so do not add quotes.
Martin v. Löwiseba40652007-08-30 20:10:57 +000015481 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000015482 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015483 esac |
15484 sort
15485) |
Martin v. Löwis11437992002-04-12 09:54:03 +000015486 sed '
Martin v. Löwiseba40652007-08-30 20:10:57 +000015487 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000015488 t clear
Martin v. Löwiseba40652007-08-30 20:10:57 +000015489 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000015490 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
15491 t end
Martin v. Löwiseba40652007-08-30 20:10:57 +000015492 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
15493 :end' >>confcache
15494if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
15495 if test -w "$cache_file"; then
Matthias Klose3cef2a92012-03-14 23:39:33 +010015496 if test "x$cache_file" != "x/dev/null"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015497 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
15498$as_echo "$as_me: updating cache $cache_file" >&6;}
Matthias Klose3cef2a92012-03-14 23:39:33 +010015499 if test ! -f "$cache_file" || test -h "$cache_file"; then
15500 cat confcache >"$cache_file"
15501 else
15502 case $cache_file in #(
15503 */* | ?:*)
15504 mv -f confcache "$cache_file"$$ &&
15505 mv -f "$cache_file"$$ "$cache_file" ;; #(
15506 *)
15507 mv -f confcache "$cache_file" ;;
15508 esac
15509 fi
15510 fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015511 else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015512 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
15513$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015514 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015515fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015516rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000015517
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015518test "x$prefix" = xNONE && prefix=$ac_default_prefix
15519# Let make expand exec_prefix.
15520test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000015521
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015522DEFS=-DHAVE_CONFIG_H
15523
Skip Montanaro6dead952003-09-25 14:50:04 +000015524ac_libobjs=
15525ac_ltlibobjs=
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015526U=
Skip Montanaro6dead952003-09-25 14:50:04 +000015527for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
15528 # 1. Remove the extension, and $U if already installed.
Martin v. Löwiseba40652007-08-30 20:10:57 +000015529 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015530 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
Martin v. Löwiseba40652007-08-30 20:10:57 +000015531 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
15532 # will be set to the directory where LIBOBJS objects are built.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015533 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
15534 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000015535done
15536LIBOBJS=$ac_libobjs
15537
15538LTLIBOBJS=$ac_ltlibobjs
15539
15540
Martin v. Löwis11437992002-04-12 09:54:03 +000015541
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015542
Matthias Klose3cef2a92012-03-14 23:39:33 +010015543: "${CONFIG_STATUS=./config.status}"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015544ac_write_fail=0
Martin v. Löwis11437992002-04-12 09:54:03 +000015545ac_clean_files_save=$ac_clean_files
15546ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015547{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
15548$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
15549as_write_fail=0
15550cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015551#! $SHELL
15552# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000015553# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015554# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000015555# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000015556
Martin v. Löwis11437992002-04-12 09:54:03 +000015557debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000015558ac_cs_recheck=false
15559ac_cs_silent=false
Jack Jansendd19cf82001-12-06 22:36:17 +000015560
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015561SHELL=\${CONFIG_SHELL-$SHELL}
15562export SHELL
15563_ASEOF
15564cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
15565## -------------------- ##
15566## M4sh Initialization. ##
15567## -------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000015568
Martin v. Löwiseba40652007-08-30 20:10:57 +000015569# Be more Bourne compatible
15570DUALCASE=1; export DUALCASE # for MKS sh
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015571if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015572 emulate sh
15573 NULLCMD=:
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015574 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000015575 # is contrary to our usage. Disable this feature.
15576 alias -g '${1+"$@"}'='"$@"'
Martin v. Löwiseba40652007-08-30 20:10:57 +000015577 setopt NO_GLOB_SUBST
Skip Montanaro89e975f2007-08-22 19:05:21 +000015578else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015579 case `(set -o) 2>/dev/null` in #(
15580 *posix*) :
15581 set -o posix ;; #(
15582 *) :
15583 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015584esac
Martin v. Löwis11437992002-04-12 09:54:03 +000015585fi
Michael W. Hudson54241132001-12-07 15:38:26 +000015586
Skip Montanaro6dead952003-09-25 14:50:04 +000015587
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015588as_nl='
15589'
15590export as_nl
15591# Printing a long string crashes Solaris 7 /usr/bin/printf.
15592as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
15593as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
15594as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
15595# Prefer a ksh shell builtin over an external printf program on Solaris,
15596# but without wasting forks for bash or zsh.
15597if test -z "$BASH_VERSION$ZSH_VERSION" \
15598 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
15599 as_echo='print -r --'
15600 as_echo_n='print -rn --'
15601elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
15602 as_echo='printf %s\n'
15603 as_echo_n='printf %s'
15604else
15605 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
15606 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
15607 as_echo_n='/usr/ucb/echo -n'
15608 else
15609 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
15610 as_echo_n_body='eval
15611 arg=$1;
15612 case $arg in #(
15613 *"$as_nl"*)
15614 expr "X$arg" : "X\\(.*\\)$as_nl";
15615 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
15616 esac;
15617 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
15618 '
15619 export as_echo_n_body
15620 as_echo_n='sh -c $as_echo_n_body as_echo'
15621 fi
15622 export as_echo_body
15623 as_echo='sh -c $as_echo_body as_echo'
15624fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015625
15626# The user is always right.
15627if test "${PATH_SEPARATOR+set}" != set; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015628 PATH_SEPARATOR=:
15629 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
15630 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
15631 PATH_SEPARATOR=';'
15632 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000015633fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015634
Martin v. Löwiseba40652007-08-30 20:10:57 +000015635
15636# IFS
15637# We need space, tab and new line, in precisely that order. Quoting is
15638# there to prevent editors from complaining about space-tab.
15639# (If _AS_PATH_WALK were called with IFS unset, it would disable word
15640# splitting by setting IFS to empty value.)
Martin v. Löwiseba40652007-08-30 20:10:57 +000015641IFS=" "" $as_nl"
15642
15643# Find who we are. Look in the path if we contain no directory separator.
Matthias Klose3cef2a92012-03-14 23:39:33 +010015644as_myself=
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015645case $0 in #((
Martin v. Löwiseba40652007-08-30 20:10:57 +000015646 *[\\/]* ) as_myself=$0 ;;
15647 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000015648for as_dir in $PATH
15649do
15650 IFS=$as_save_IFS
15651 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015652 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
15653 done
Martin v. Löwiseba40652007-08-30 20:10:57 +000015654IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000015655
Martin v. Löwiseba40652007-08-30 20:10:57 +000015656 ;;
15657esac
15658# We did not find ourselves, most probably we were run as `sh COMMAND'
15659# in which case we are not to be found in the path.
15660if test "x$as_myself" = x; then
15661 as_myself=$0
15662fi
15663if test ! -f "$as_myself"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015664 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
15665 exit 1
Martin v. Löwiseba40652007-08-30 20:10:57 +000015666fi
15667
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015668# Unset variables that we do not need and which cause bugs (e.g. in
15669# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
15670# suppresses any "Segmentation fault" message there. '((' could
15671# trigger a bug in pdksh 5.2.14.
15672for as_var in BASH_ENV ENV MAIL MAILPATH
15673do eval test x\${$as_var+set} = xset \
15674 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Martin v. Löwiseba40652007-08-30 20:10:57 +000015675done
15676PS1='$ '
15677PS2='> '
15678PS4='+ '
15679
15680# NLS nuisances.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015681LC_ALL=C
15682export LC_ALL
15683LANGUAGE=C
15684export LANGUAGE
Martin v. Löwiseba40652007-08-30 20:10:57 +000015685
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015686# CDPATH.
15687(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
15688
15689
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015690# as_fn_error STATUS ERROR [LINENO LOG_FD]
15691# ----------------------------------------
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015692# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
15693# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015694# script with STATUS, using 1 if that was 0.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015695as_fn_error ()
15696{
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015697 as_status=$1; test $as_status -eq 0 && as_status=1
15698 if test "$4"; then
15699 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
15700 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015701 fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015702 $as_echo "$as_me: error: $2" >&2
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015703 as_fn_exit $as_status
15704} # as_fn_error
15705
15706
15707# as_fn_set_status STATUS
15708# -----------------------
15709# Set $? to STATUS, without forking.
15710as_fn_set_status ()
15711{
15712 return $1
15713} # as_fn_set_status
15714
15715# as_fn_exit STATUS
15716# -----------------
15717# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
15718as_fn_exit ()
15719{
15720 set +e
15721 as_fn_set_status $1
15722 exit $1
15723} # as_fn_exit
15724
15725# as_fn_unset VAR
15726# ---------------
15727# Portably unset VAR.
15728as_fn_unset ()
15729{
15730 { eval $1=; unset $1;}
15731}
15732as_unset=as_fn_unset
15733# as_fn_append VAR VALUE
15734# ----------------------
15735# Append the text in VALUE to the end of the definition contained in VAR. Take
15736# advantage of any shell optimizations that allow amortized linear growth over
15737# repeated appends, instead of the typical quadratic growth present in naive
15738# implementations.
15739if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
15740 eval 'as_fn_append ()
15741 {
15742 eval $1+=\$2
15743 }'
15744else
15745 as_fn_append ()
15746 {
15747 eval $1=\$$1\$2
15748 }
15749fi # as_fn_append
15750
15751# as_fn_arith ARG...
15752# ------------------
15753# Perform arithmetic evaluation on the ARGs, and store the result in the
15754# global $as_val. Take advantage of shells that can avoid forks. The arguments
15755# must be portable across $(()) and expr.
15756if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
15757 eval 'as_fn_arith ()
15758 {
15759 as_val=$(( $* ))
15760 }'
15761else
15762 as_fn_arith ()
15763 {
15764 as_val=`expr "$@" || test $? -eq 1`
15765 }
15766fi # as_fn_arith
15767
15768
Martin v. Löwiseba40652007-08-30 20:10:57 +000015769if expr a : '\(a\)' >/dev/null 2>&1 &&
15770 test "X`expr 00001 : '.*\(...\)'`" = X001; then
15771 as_expr=expr
15772else
15773 as_expr=false
15774fi
15775
15776if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
15777 as_basename=basename
15778else
15779 as_basename=false
15780fi
15781
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015782if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
15783 as_dirname=dirname
15784else
15785 as_dirname=false
15786fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015787
Martin v. Löwiseba40652007-08-30 20:10:57 +000015788as_me=`$as_basename -- "$0" ||
15789$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
15790 X"$0" : 'X\(//\)$' \| \
15791 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015792$as_echo X/"$0" |
Martin v. Löwiseba40652007-08-30 20:10:57 +000015793 sed '/^.*\/\([^/][^/]*\)\/*$/{
15794 s//\1/
15795 q
15796 }
15797 /^X\/\(\/\/\)$/{
15798 s//\1/
15799 q
15800 }
15801 /^X\/\(\/\).*/{
15802 s//\1/
15803 q
15804 }
15805 s/.*/./; q'`
15806
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015807# Avoid depending upon Character Ranges.
15808as_cr_letters='abcdefghijklmnopqrstuvwxyz'
15809as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
15810as_cr_Letters=$as_cr_letters$as_cr_LETTERS
15811as_cr_digits='0123456789'
15812as_cr_alnum=$as_cr_Letters$as_cr_digits
Martin v. Löwiseba40652007-08-30 20:10:57 +000015813
15814ECHO_C= ECHO_N= ECHO_T=
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015815case `echo -n x` in #(((((
Martin v. Löwiseba40652007-08-30 20:10:57 +000015816-n*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015817 case `echo 'xy\c'` in
Martin v. Löwiseba40652007-08-30 20:10:57 +000015818 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015819 xy) ECHO_C='\c';;
15820 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
15821 ECHO_T=' ';;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015822 esac;;
15823*)
15824 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000015825esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015826
Martin v. Löwis11437992002-04-12 09:54:03 +000015827rm -f conf$$ conf$$.exe conf$$.file
Martin v. Löwiseba40652007-08-30 20:10:57 +000015828if test -d conf$$.dir; then
15829 rm -f conf$$.dir/conf$$.file
15830else
15831 rm -f conf$$.dir
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015832 mkdir conf$$.dir 2>/dev/null
Martin v. Löwiseba40652007-08-30 20:10:57 +000015833fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015834if (echo >conf$$.file) 2>/dev/null; then
15835 if ln -s conf$$.file conf$$ 2>/dev/null; then
15836 as_ln_s='ln -s'
15837 # ... but there are two gotchas:
15838 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
15839 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
Charles-François Natalibe2b9072013-01-08 19:47:00 +010015840 # In both cases, we have to default to `cp -pR'.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015841 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Charles-François Natalibe2b9072013-01-08 19:47:00 +010015842 as_ln_s='cp -pR'
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015843 elif ln conf$$.file conf$$ 2>/dev/null; then
15844 as_ln_s=ln
15845 else
Charles-François Natalibe2b9072013-01-08 19:47:00 +010015846 as_ln_s='cp -pR'
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015847 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015848else
Charles-François Natalibe2b9072013-01-08 19:47:00 +010015849 as_ln_s='cp -pR'
Martin v. Löwis11437992002-04-12 09:54:03 +000015850fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015851rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
15852rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000015853
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015854
15855# as_fn_mkdir_p
15856# -------------
15857# Create "$as_dir" as a directory, including parents if necessary.
15858as_fn_mkdir_p ()
15859{
15860
15861 case $as_dir in #(
15862 -*) as_dir=./$as_dir;;
15863 esac
15864 test -d "$as_dir" || eval $as_mkdir_p || {
15865 as_dirs=
15866 while :; do
15867 case $as_dir in #(
15868 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
15869 *) as_qdir=$as_dir;;
15870 esac
15871 as_dirs="'$as_qdir' $as_dirs"
15872 as_dir=`$as_dirname -- "$as_dir" ||
15873$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
15874 X"$as_dir" : 'X\(//\)[^/]' \| \
15875 X"$as_dir" : 'X\(//\)$' \| \
15876 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
15877$as_echo X"$as_dir" |
15878 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
15879 s//\1/
15880 q
15881 }
15882 /^X\(\/\/\)[^/].*/{
15883 s//\1/
15884 q
15885 }
15886 /^X\(\/\/\)$/{
15887 s//\1/
15888 q
15889 }
15890 /^X\(\/\).*/{
15891 s//\1/
15892 q
15893 }
15894 s/.*/./; q'`
15895 test -d "$as_dir" && break
15896 done
15897 test -z "$as_dirs" || eval "mkdir $as_dirs"
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015898 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015899
15900
15901} # as_fn_mkdir_p
Skip Montanaro6dead952003-09-25 14:50:04 +000015902if mkdir -p . 2>/dev/null; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015903 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +000015904else
Skip Montanarof0d5f792004-08-15 14:08:23 +000015905 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000015906 as_mkdir_p=false
15907fi
15908
Charles-François Natalibe2b9072013-01-08 19:47:00 +010015909
15910# as_fn_executable_p FILE
15911# -----------------------
15912# Test if FILE is an executable regular file.
15913as_fn_executable_p ()
15914{
15915 test -f "$1" && test -x "$1"
15916} # as_fn_executable_p
15917as_test_x='test -x'
15918as_executable_p=as_fn_executable_p
Martin v. Löwis11437992002-04-12 09:54:03 +000015919
15920# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000015921as_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 +000015922
15923# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000015924as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000015925
15926
Martin v. Löwis11437992002-04-12 09:54:03 +000015927exec 6>&1
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015928## ----------------------------------- ##
15929## Main body of $CONFIG_STATUS script. ##
15930## ----------------------------------- ##
15931_ASEOF
15932test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015933
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015934cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15935# Save the log message, to keep $0 and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000015936# report actual input values of CONFIG_FILES etc. instead of their
Martin v. Löwiseba40652007-08-30 20:10:57 +000015937# values after options handling.
15938ac_log="
Martin v. Löwis174440b2008-10-03 08:59:41 +000015939This file was extended by python $as_me 2.7, which was
Charles-François Natalibe2b9072013-01-08 19:47:00 +010015940generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000015941
15942 CONFIG_FILES = $CONFIG_FILES
15943 CONFIG_HEADERS = $CONFIG_HEADERS
15944 CONFIG_LINKS = $CONFIG_LINKS
15945 CONFIG_COMMANDS = $CONFIG_COMMANDS
15946 $ $0 $@
15947
Martin v. Löwiseba40652007-08-30 20:10:57 +000015948on `(hostname || uname -n) 2>/dev/null | sed 1q`
15949"
15950
Martin v. Löwis11437992002-04-12 09:54:03 +000015951_ACEOF
15952
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015953case $ac_config_files in *"
15954"*) set x $ac_config_files; shift; ac_config_files=$*;;
15955esac
15956
15957case $ac_config_headers in *"
15958"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
15959esac
15960
15961
15962cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015963# Files that config.status was made for.
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015964config_files="$ac_config_files"
15965config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000015966
Martin v. Löwiseba40652007-08-30 20:10:57 +000015967_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000015968
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015969cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015970ac_cs_usage="\
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015971\`$as_me' instantiates files and other configuration actions
15972from templates according to the current configuration. Unless the files
15973and actions are specified as TAGs, all are instantiated by default.
Martin v. Löwis11437992002-04-12 09:54:03 +000015974
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015975Usage: $0 [OPTION]... [TAG]...
Martin v. Löwis11437992002-04-12 09:54:03 +000015976
15977 -h, --help print this help, then exit
Martin v. Löwiseba40652007-08-30 20:10:57 +000015978 -V, --version print version number and configuration settings, then exit
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015979 --config print configuration, then exit
15980 -q, --quiet, --silent
15981 do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000015982 -d, --debug don't remove temporary files
15983 --recheck update $as_me by reconfiguring in the same conditions
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015984 --file=FILE[:TEMPLATE]
15985 instantiate the configuration file FILE
15986 --header=FILE[:TEMPLATE]
15987 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000015988
15989Configuration files:
15990$config_files
15991
15992Configuration headers:
15993$config_headers
15994
Benjamin Petersoncc8929b2016-08-03 22:01:32 -070015995Report bugs to <https://bugs.python.org/>."
Skip Montanaro89e975f2007-08-22 19:05:21 +000015996
Martin v. Löwiseba40652007-08-30 20:10:57 +000015997_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015998cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15999ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
Martin v. Löwis11437992002-04-12 09:54:03 +000016000ac_cs_version="\\
Martin v. Löwis174440b2008-10-03 08:59:41 +000016001python config.status 2.7
Charles-François Natalibe2b9072013-01-08 19:47:00 +010016002configured by $0, generated by GNU Autoconf 2.69,
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016003 with options \\"\$ac_cs_config\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000016004
Charles-François Natalibe2b9072013-01-08 19:47:00 +010016005Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000016006This config.status script is free software; the Free Software Foundation
16007gives unlimited permission to copy, distribute and modify it."
Martin v. Löwiseba40652007-08-30 20:10:57 +000016008
16009ac_pwd='$ac_pwd'
16010srcdir='$srcdir'
16011INSTALL='$INSTALL'
Trent Nelsonf6407a12012-08-30 14:56:13 +000016012MKDIR_P='$MKDIR_P'
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016013test -n "\$AWK" || AWK=awk
Martin v. Löwis11437992002-04-12 09:54:03 +000016014_ACEOF
16015
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016016cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16017# The default lists apply if the user does not specify any file.
Martin v. Löwis11437992002-04-12 09:54:03 +000016018ac_need_defaults=:
16019while test $# != 0
16020do
16021 case $1 in
Georg Brandl71f4fbb2011-02-25 11:04:50 +000016022 --*=?*)
Martin v. Löwiseba40652007-08-30 20:10:57 +000016023 ac_option=`expr "X$1" : 'X\([^=]*\)='`
16024 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000016025 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000016026 ;;
Georg Brandl71f4fbb2011-02-25 11:04:50 +000016027 --*=)
16028 ac_option=`expr "X$1" : 'X\([^=]*\)='`
16029 ac_optarg=
16030 ac_shift=:
16031 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000016032 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000016033 ac_option=$1
16034 ac_optarg=$2
16035 ac_shift=shift
16036 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016037 esac
16038
Skip Montanaro6dead952003-09-25 14:50:04 +000016039 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000016040 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000016041 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
16042 ac_cs_recheck=: ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000016043 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016044 $as_echo "$ac_cs_version"; exit ;;
16045 --config | --confi | --conf | --con | --co | --c )
16046 $as_echo "$ac_cs_config"; exit ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000016047 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000016048 debug=: ;;
16049 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000016050 $ac_shift
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016051 case $ac_optarg in
16052 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
Georg Brandl71f4fbb2011-02-25 11:04:50 +000016053 '') as_fn_error $? "missing file argument" ;;
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016054 esac
16055 as_fn_append CONFIG_FILES " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000016056 ac_need_defaults=false;;
16057 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000016058 $ac_shift
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016059 case $ac_optarg in
16060 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
16061 esac
16062 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000016063 ac_need_defaults=false;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000016064 --he | --h)
16065 # Conflict between --help and --header
Georg Brandl71f4fbb2011-02-25 11:04:50 +000016066 as_fn_error $? "ambiguous option: \`$1'
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016067Try \`$0 --help' for more information.";;
Martin v. Löwiseba40652007-08-30 20:10:57 +000016068 --help | --hel | -h )
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016069 $as_echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000016070 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
16071 | -silent | --silent | --silen | --sile | --sil | --si | --s)
16072 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016073
16074 # This is an error.
Georg Brandl71f4fbb2011-02-25 11:04:50 +000016075 -*) as_fn_error $? "unrecognized option: \`$1'
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016076Try \`$0 --help' for more information." ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016077
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016078 *) as_fn_append ac_config_targets " $1"
Martin v. Löwiseba40652007-08-30 20:10:57 +000016079 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016080
16081 esac
16082 shift
16083done
16084
Skip Montanaro6dead952003-09-25 14:50:04 +000016085ac_configure_extra_args=
16086
16087if $ac_cs_silent; then
16088 exec 6>/dev/null
16089 ac_configure_extra_args="$ac_configure_extra_args --silent"
16090fi
16091
16092_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016093cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Skip Montanaro6dead952003-09-25 14:50:04 +000016094if \$ac_cs_recheck; then
Charles-François Natalibe2b9072013-01-08 19:47:00 +010016095 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016096 shift
16097 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
16098 CONFIG_SHELL='$SHELL'
Martin v. Löwiseba40652007-08-30 20:10:57 +000016099 export CONFIG_SHELL
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016100 exec "\$@"
Skip Montanaro6dead952003-09-25 14:50:04 +000016101fi
16102
Martin v. Löwis11437992002-04-12 09:54:03 +000016103_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016104cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwiseba40652007-08-30 20:10:57 +000016105exec 5>>config.log
16106{
16107 echo
16108 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
16109## Running $as_me. ##
16110_ASBOX
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016111 $as_echo "$ac_log"
Martin v. Löwiseba40652007-08-30 20:10:57 +000016112} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016113
Martin v. Löwiseba40652007-08-30 20:10:57 +000016114_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016115cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwiseba40652007-08-30 20:10:57 +000016116_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000016117
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016118cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwiseba40652007-08-30 20:10:57 +000016119
16120# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000016121for ac_config_target in $ac_config_targets
16122do
Martin v. Löwiseba40652007-08-30 20:10:57 +000016123 case $ac_config_target in
16124 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
16125 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
16126 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
16127 "Mac/IDLE/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/IDLE/Makefile" ;;
Ronald Oussoren580c7fe2008-05-02 19:45:11 +000016128 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
16129 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000016130 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
16131 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
Antoine Pitrouf2caeed2009-05-24 20:23:57 +000016132 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
Antoine Pitrouaabdceb2010-09-10 20:03:17 +000016133 "Modules/ld_so_aix") CONFIG_FILES="$CONFIG_FILES Modules/ld_so_aix" ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000016134
Matthias Klose3cef2a92012-03-14 23:39:33 +010016135 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016136 esac
16137done
16138
Martin v. Löwiseba40652007-08-30 20:10:57 +000016139
Martin v. Löwis11437992002-04-12 09:54:03 +000016140# If the user did not use the arguments to specify the items to instantiate,
16141# then the envvar interface is used. Set only those that are not.
16142# We use the long form for the default assignment because of an extremely
16143# bizarre bug on SunOS 4.1.3.
16144if $ac_need_defaults; then
16145 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
16146 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
16147fi
16148
Skip Montanaro6dead952003-09-25 14:50:04 +000016149# Have a temporary directory for convenience. Make it in the build tree
Martin v. Löwiseba40652007-08-30 20:10:57 +000016150# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000016151# creating and moving files from /tmp can sometimes cause problems.
Martin v. Löwiseba40652007-08-30 20:10:57 +000016152# Hook for its removal unless debugging.
16153# Note that there is a small window in which the directory will not be cleaned:
16154# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000016155$debug ||
16156{
Matthias Klose3cef2a92012-03-14 23:39:33 +010016157 tmp= ac_tmp=
Martin v. Löwiseba40652007-08-30 20:10:57 +000016158 trap 'exit_status=$?
Matthias Klose3cef2a92012-03-14 23:39:33 +010016159 : "${ac_tmp:=$tmp}"
16160 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
Martin v. Löwiseba40652007-08-30 20:10:57 +000016161' 0
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016162 trap 'as_fn_exit 1' 1 2 13 15
Martin v. Löwis11437992002-04-12 09:54:03 +000016163}
Martin v. Löwis11437992002-04-12 09:54:03 +000016164# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000016165
Martin v. Löwis11437992002-04-12 09:54:03 +000016166{
Martin v. Löwiseba40652007-08-30 20:10:57 +000016167 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Matthias Klose3cef2a92012-03-14 23:39:33 +010016168 test -d "$tmp"
Martin v. Löwis11437992002-04-12 09:54:03 +000016169} ||
16170{
Martin v. Löwiseba40652007-08-30 20:10:57 +000016171 tmp=./conf$$-$RANDOM
16172 (umask 077 && mkdir "$tmp")
Georg Brandl71f4fbb2011-02-25 11:04:50 +000016173} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
Matthias Klose3cef2a92012-03-14 23:39:33 +010016174ac_tmp=$tmp
Martin v. Löwis11437992002-04-12 09:54:03 +000016175
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016176# Set up the scripts for CONFIG_FILES section.
16177# No need to generate them if there are no CONFIG_FILES.
16178# This happens for instance with `./config.status config.h'.
Martin v. Löwiseba40652007-08-30 20:10:57 +000016179if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016180
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016181
16182ac_cr=`echo X | tr X '\015'`
16183# On cygwin, bash can eat \r inside `` if the user requested igncr.
16184# But we know of no other shell where ac_cr would be empty at this
16185# point, so we can use a bashism as a fallback.
16186if test "x$ac_cr" = x; then
16187 eval ac_cr=\$\'\\r\'
16188fi
16189ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
16190if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +000016191 ac_cs_awk_cr='\\r'
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016192else
16193 ac_cs_awk_cr=$ac_cr
16194fi
16195
Matthias Klose3cef2a92012-03-14 23:39:33 +010016196echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
Martin v. Löwis11437992002-04-12 09:54:03 +000016197_ACEOF
16198
Martin v. Löwiseba40652007-08-30 20:10:57 +000016199
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016200{
16201 echo "cat >conf$$subs.awk <<_ACEOF" &&
16202 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
16203 echo "_ACEOF"
16204} >conf$$subs.sh ||
Georg Brandl71f4fbb2011-02-25 11:04:50 +000016205 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
16206ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
Martin v. Löwiseba40652007-08-30 20:10:57 +000016207ac_delim='%!_!# '
16208for ac_last_try in false false false false false :; do
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016209 . ./conf$$subs.sh ||
Georg Brandl71f4fbb2011-02-25 11:04:50 +000016210 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016211
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016212 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
16213 if test $ac_delim_n = $ac_delim_num; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000016214 break
16215 elif $ac_last_try; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +000016216 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016217 else
16218 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000016219 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016220done
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016221rm -f conf$$subs.sh
Martin v. Löwiseba40652007-08-30 20:10:57 +000016222
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016223cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Matthias Klose3cef2a92012-03-14 23:39:33 +010016224cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
Martin v. Löwiseba40652007-08-30 20:10:57 +000016225_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016226sed -n '
16227h
16228s/^/S["/; s/!.*/"]=/
16229p
16230g
16231s/^[^!]*!//
16232:repl
16233t repl
16234s/'"$ac_delim"'$//
16235t delim
16236:nl
16237h
16238s/\(.\{148\}\)..*/\1/
16239t more1
16240s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
16241p
16242n
16243b repl
16244:more1
16245s/["\\]/\\&/g; s/^/"/; s/$/"\\/
16246p
16247g
16248s/.\{148\}//
16249t nl
16250:delim
16251h
16252s/\(.\{148\}\)..*/\1/
16253t more2
16254s/["\\]/\\&/g; s/^/"/; s/$/"/
16255p
16256b
16257:more2
16258s/["\\]/\\&/g; s/^/"/; s/$/"\\/
16259p
16260g
16261s/.\{148\}//
16262t delim
16263' <conf$$subs.awk | sed '
16264/^[^""]/{
16265 N
16266 s/\n//
16267}
16268' >>$CONFIG_STATUS || ac_write_fail=1
16269rm -f conf$$subs.awk
16270cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16271_ACAWK
Matthias Klose3cef2a92012-03-14 23:39:33 +010016272cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016273 for (key in S) S_is_set[key] = 1
16274 FS = ""
16275
16276}
16277{
16278 line = $ 0
16279 nfields = split(line, field, "@")
16280 substed = 0
16281 len = length(field[1])
16282 for (i = 2; i < nfields; i++) {
16283 key = field[i]
16284 keylen = length(key)
16285 if (S_is_set[key]) {
16286 value = S[key]
16287 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
16288 len += length(value) + length(field[++i])
16289 substed = 1
16290 } else
16291 len += 1 + keylen
16292 }
16293
16294 print line
16295}
16296
16297_ACAWK
Martin v. Löwiseba40652007-08-30 20:10:57 +000016298_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016299cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16300if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
16301 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
16302else
16303 cat
Matthias Klose3cef2a92012-03-14 23:39:33 +010016304fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
Georg Brandl71f4fbb2011-02-25 11:04:50 +000016305 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016306_ACEOF
16307
Georg Brandl71f4fbb2011-02-25 11:04:50 +000016308# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
16309# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
Martin v. Löwiseba40652007-08-30 20:10:57 +000016310# trailing colons and then remove the whole line if VPATH becomes empty
16311# (actually we leave an empty line to preserve line numbers).
16312if test "x$srcdir" = x.; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +000016313 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
16314h
16315s///
16316s/^/:/
16317s/[ ]*$/:/
16318s/:\$(srcdir):/:/g
16319s/:\${srcdir}:/:/g
16320s/:@srcdir@:/:/g
16321s/^:*//
Martin v. Löwiseba40652007-08-30 20:10:57 +000016322s/:*$//
Georg Brandl71f4fbb2011-02-25 11:04:50 +000016323x
16324s/\(=[ ]*\).*/\1/
16325G
16326s/\n//
Martin v. Löwiseba40652007-08-30 20:10:57 +000016327s/^[^=]*=[ ]*$//
16328}'
16329fi
16330
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016331cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016332fi # test -n "$CONFIG_FILES"
16333
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016334# Set up the scripts for CONFIG_HEADERS section.
16335# No need to generate them if there are no CONFIG_HEADERS.
16336# This happens for instance with `./config.status Makefile'.
16337if test -n "$CONFIG_HEADERS"; then
Matthias Klose3cef2a92012-03-14 23:39:33 +010016338cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016339BEGIN {
16340_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000016341
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016342# Transform confdefs.h into an awk script `defines.awk', embedded as
16343# here-document in config.status, that substitutes the proper values into
16344# config.h.in to produce config.h.
16345
16346# Create a delimiter string that does not exist in confdefs.h, to ease
16347# handling of long lines.
16348ac_delim='%!_!# '
16349for ac_last_try in false false :; do
Matthias Klose3cef2a92012-03-14 23:39:33 +010016350 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
16351 if test -z "$ac_tt"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016352 break
16353 elif $ac_last_try; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +000016354 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016355 else
16356 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
16357 fi
16358done
16359
16360# For the awk script, D is an array of macro values keyed by name,
16361# likewise P contains macro parameters if any. Preserve backslash
16362# newline sequences.
16363
16364ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
16365sed -n '
16366s/.\{148\}/&'"$ac_delim"'/g
16367t rset
16368:rset
16369s/^[ ]*#[ ]*define[ ][ ]*/ /
16370t def
16371d
16372:def
16373s/\\$//
16374t bsnl
16375s/["\\]/\\&/g
16376s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
16377D["\1"]=" \3"/p
16378s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
16379d
16380:bsnl
16381s/["\\]/\\&/g
16382s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
16383D["\1"]=" \3\\\\\\n"\\/p
16384t cont
16385s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
16386t cont
16387d
16388:cont
16389n
16390s/.\{148\}/&'"$ac_delim"'/g
16391t clear
16392:clear
16393s/\\$//
16394t bsnlc
16395s/["\\]/\\&/g; s/^/"/; s/$/"/p
16396d
16397:bsnlc
16398s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
16399b cont
16400' <confdefs.h | sed '
16401s/'"$ac_delim"'/"\\\
16402"/g' >>$CONFIG_STATUS || ac_write_fail=1
16403
16404cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16405 for (key in D) D_is_set[key] = 1
16406 FS = ""
16407}
16408/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
16409 line = \$ 0
16410 split(line, arg, " ")
16411 if (arg[1] == "#") {
16412 defundef = arg[2]
16413 mac1 = arg[3]
16414 } else {
16415 defundef = substr(arg[1], 2)
16416 mac1 = arg[2]
16417 }
16418 split(mac1, mac2, "(") #)
16419 macro = mac2[1]
16420 prefix = substr(line, 1, index(line, defundef) - 1)
16421 if (D_is_set[macro]) {
16422 # Preserve the white space surrounding the "#".
16423 print prefix "define", macro P[macro] D[macro]
16424 next
16425 } else {
16426 # Replace #undef with comments. This is necessary, for example,
16427 # in the case of _POSIX_SOURCE, which is predefined and required
16428 # on some systems where configure will not decide to define it.
16429 if (defundef == "undef") {
16430 print "/*", prefix defundef, macro, "*/"
16431 next
16432 }
16433 }
16434}
16435{ print }
16436_ACAWK
16437_ACEOF
16438cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Georg Brandl71f4fbb2011-02-25 11:04:50 +000016439 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016440fi # test -n "$CONFIG_HEADERS"
16441
16442
16443eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
16444shift
16445for ac_tag
Martin v. Löwiseba40652007-08-30 20:10:57 +000016446do
16447 case $ac_tag in
16448 :[FHLC]) ac_mode=$ac_tag; continue;;
16449 esac
16450 case $ac_mode$ac_tag in
16451 :[FHL]*:*);;
Matthias Klose3cef2a92012-03-14 23:39:33 +010016452 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000016453 :[FH]-) ac_tag=-:-;;
16454 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
16455 esac
16456 ac_save_IFS=$IFS
16457 IFS=:
16458 set x $ac_tag
16459 IFS=$ac_save_IFS
16460 shift
16461 ac_file=$1
16462 shift
16463
16464 case $ac_mode in
16465 :L) ac_source=$1;;
16466 :[FH])
16467 ac_file_inputs=
16468 for ac_f
16469 do
16470 case $ac_f in
Matthias Klose3cef2a92012-03-14 23:39:33 +010016471 -) ac_f="$ac_tmp/stdin";;
Martin v. Löwiseba40652007-08-30 20:10:57 +000016472 *) # Look for the file first in the build tree, then in the source tree
16473 # (if the path is not absolute). The absolute path cannot be DOS-style,
16474 # because $ac_f cannot contain `:'.
16475 test -f "$ac_f" ||
16476 case $ac_f in
16477 [\\/$]*) false;;
16478 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
16479 esac ||
Matthias Klose3cef2a92012-03-14 23:39:33 +010016480 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000016481 esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016482 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
16483 as_fn_append ac_file_inputs " '$ac_f'"
Martin v. Löwiseba40652007-08-30 20:10:57 +000016484 done
16485
16486 # Let's still pretend it is `configure' which instantiates (i.e., don't
16487 # use $as_me), people would be surprised to read:
16488 # /* config.h. Generated by config.status. */
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016489 configure_input='Generated from '`
16490 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
16491 `' by configure.'
Martin v. Löwiseba40652007-08-30 20:10:57 +000016492 if test x"$ac_file" != x-; then
16493 configure_input="$ac_file. $configure_input"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016494 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
16495$as_echo "$as_me: creating $ac_file" >&6;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000016496 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016497 # Neutralize special characters interpreted by sed in replacement strings.
16498 case $configure_input in #(
16499 *\&* | *\|* | *\\* )
16500 ac_sed_conf_input=`$as_echo "$configure_input" |
16501 sed 's/[\\\\&|]/\\\\&/g'`;; #(
16502 *) ac_sed_conf_input=$configure_input;;
16503 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000016504
16505 case $ac_tag in
Matthias Klose3cef2a92012-03-14 23:39:33 +010016506 *:-:* | *:-) cat >"$ac_tmp/stdin" \
16507 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000016508 esac
16509 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016510 esac
16511
Martin v. Löwiseba40652007-08-30 20:10:57 +000016512 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000016513$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016514 X"$ac_file" : 'X\(//\)[^/]' \| \
16515 X"$ac_file" : 'X\(//\)$' \| \
Martin v. Löwiseba40652007-08-30 20:10:57 +000016516 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016517$as_echo X"$ac_file" |
Martin v. Löwiseba40652007-08-30 20:10:57 +000016518 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
16519 s//\1/
16520 q
16521 }
16522 /^X\(\/\/\)[^/].*/{
16523 s//\1/
16524 q
16525 }
16526 /^X\(\/\/\)$/{
16527 s//\1/
16528 q
16529 }
16530 /^X\(\/\).*/{
16531 s//\1/
16532 q
16533 }
16534 s/.*/./; q'`
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016535 as_dir="$ac_dir"; as_fn_mkdir_p
Martin v. Löwis11437992002-04-12 09:54:03 +000016536 ac_builddir=.
16537
Martin v. Löwiseba40652007-08-30 20:10:57 +000016538case "$ac_dir" in
16539.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
16540*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016541 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Martin v. Löwiseba40652007-08-30 20:10:57 +000016542 # A ".." for each directory in $ac_dir_suffix.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016543 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Martin v. Löwiseba40652007-08-30 20:10:57 +000016544 case $ac_top_builddir_sub in
16545 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
16546 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
16547 esac ;;
16548esac
16549ac_abs_top_builddir=$ac_pwd
16550ac_abs_builddir=$ac_pwd$ac_dir_suffix
16551# for backward compatibility:
16552ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000016553
16554case $srcdir in
Martin v. Löwiseba40652007-08-30 20:10:57 +000016555 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000016556 ac_srcdir=.
Martin v. Löwiseba40652007-08-30 20:10:57 +000016557 ac_top_srcdir=$ac_top_builddir_sub
16558 ac_abs_top_srcdir=$ac_pwd ;;
16559 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000016560 ac_srcdir=$srcdir$ac_dir_suffix;
Martin v. Löwiseba40652007-08-30 20:10:57 +000016561 ac_top_srcdir=$srcdir
16562 ac_abs_top_srcdir=$srcdir ;;
16563 *) # Relative name.
16564 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
16565 ac_top_srcdir=$ac_top_build_prefix$srcdir
16566 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016567esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000016568ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000016569
Martin v. Löwis11437992002-04-12 09:54:03 +000016570
Martin v. Löwiseba40652007-08-30 20:10:57 +000016571 case $ac_mode in
16572 :F)
16573 #
16574 # CONFIG_FILE
16575 #
Martin v. Löwis11437992002-04-12 09:54:03 +000016576
16577 case $INSTALL in
16578 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000016579 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016580 esac
Trent Nelsonf6407a12012-08-30 14:56:13 +000016581 ac_MKDIR_P=$MKDIR_P
16582 case $MKDIR_P in
16583 [\\/$]* | ?:[\\/]* ) ;;
16584 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
16585 esac
Brett Cannon19fab762007-06-02 03:02:29 +000016586_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000016587
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016588cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwiseba40652007-08-30 20:10:57 +000016589# If the template does not know about datarootdir, expand it.
16590# FIXME: This hack should be removed a few years after 2.60.
16591ac_datarootdir_hack=; ac_datarootdir_seen=
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016592ac_sed_dataroot='
16593/datarootdir/ {
Martin v. Löwiseba40652007-08-30 20:10:57 +000016594 p
16595 q
16596}
16597/@datadir@/p
16598/@docdir@/p
16599/@infodir@/p
16600/@localedir@/p
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016601/@mandir@/p'
16602case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
Martin v. Löwiseba40652007-08-30 20:10:57 +000016603*datarootdir*) ac_datarootdir_seen=yes;;
16604*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016605 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
16606$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000016607_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016608cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwiseba40652007-08-30 20:10:57 +000016609 ac_datarootdir_hack='
16610 s&@datadir@&$datadir&g
16611 s&@docdir@&$docdir&g
16612 s&@infodir@&$infodir&g
16613 s&@localedir@&$localedir&g
16614 s&@mandir@&$mandir&g
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016615 s&\\\${datarootdir}&$datarootdir&g' ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000016616esac
16617_ACEOF
16618
16619# Neutralize VPATH when `$srcdir' = `.'.
16620# Shell code in configure.ac might set extrasub.
16621# FIXME: do we really want to maintain this feature?
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016622cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16623ac_sed_extra="$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000016624$extrasub
16625_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016626cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016627:t
16628/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016629s|@configure_input@|$ac_sed_conf_input|;t t
Martin v. Löwiseba40652007-08-30 20:10:57 +000016630s&@top_builddir@&$ac_top_builddir_sub&;t t
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016631s&@top_build_prefix@&$ac_top_build_prefix&;t t
Martin v. Löwiseba40652007-08-30 20:10:57 +000016632s&@srcdir@&$ac_srcdir&;t t
16633s&@abs_srcdir@&$ac_abs_srcdir&;t t
16634s&@top_srcdir@&$ac_top_srcdir&;t t
16635s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
16636s&@builddir@&$ac_builddir&;t t
16637s&@abs_builddir@&$ac_abs_builddir&;t t
16638s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
16639s&@INSTALL@&$ac_INSTALL&;t t
Trent Nelsonf6407a12012-08-30 14:56:13 +000016640s&@MKDIR_P@&$ac_MKDIR_P&;t t
Martin v. Löwiseba40652007-08-30 20:10:57 +000016641$ac_datarootdir_hack
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016642"
Matthias Klose3cef2a92012-03-14 23:39:33 +010016643eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
16644 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016645
Martin v. Löwiseba40652007-08-30 20:10:57 +000016646test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
Matthias Klose3cef2a92012-03-14 23:39:33 +010016647 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
16648 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
16649 "$ac_tmp/out"`; test -z "$ac_out"; } &&
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016650 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Georg Brandl71f4fbb2011-02-25 11:04:50 +000016651which seems to be undefined. Please make sure it is defined" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016652$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Georg Brandl71f4fbb2011-02-25 11:04:50 +000016653which seems to be undefined. Please make sure it is defined" >&2;}
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016654
Matthias Klose3cef2a92012-03-14 23:39:33 +010016655 rm -f "$ac_tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000016656 case $ac_file in
Matthias Klose3cef2a92012-03-14 23:39:33 +010016657 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
16658 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016659 esac \
Georg Brandl71f4fbb2011-02-25 11:04:50 +000016660 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016661 ;;
16662 :H)
16663 #
16664 # CONFIG_HEADER
16665 #
Martin v. Löwis11437992002-04-12 09:54:03 +000016666 if test x"$ac_file" != x-; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016667 {
16668 $as_echo "/* $configure_input */" \
Matthias Klose3cef2a92012-03-14 23:39:33 +010016669 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
16670 } >"$ac_tmp/config.h" \
Georg Brandl71f4fbb2011-02-25 11:04:50 +000016671 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Matthias Klose3cef2a92012-03-14 23:39:33 +010016672 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016673 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
16674$as_echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000016675 else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016676 rm -f "$ac_file"
Matthias Klose3cef2a92012-03-14 23:39:33 +010016677 mv "$ac_tmp/config.h" "$ac_file" \
Georg Brandl71f4fbb2011-02-25 11:04:50 +000016678 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000016679 fi
16680 else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016681 $as_echo "/* $configure_input */" \
Matthias Klose3cef2a92012-03-14 23:39:33 +010016682 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
Georg Brandl71f4fbb2011-02-25 11:04:50 +000016683 || as_fn_error $? "could not create -" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000016684 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016685 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000016686
Martin v. Löwiseba40652007-08-30 20:10:57 +000016687
16688 esac
16689
Antoine Pitrouaabdceb2010-09-10 20:03:17 +000016690
16691 case $ac_file$ac_mode in
16692 "Modules/ld_so_aix":F) chmod +x Modules/ld_so_aix ;;
16693
16694 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000016695done # for ac_tag
16696
Guido van Rossum627b2d71993-12-24 10:39:16 +000016697
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016698as_fn_exit 0
Martin v. Löwis11437992002-04-12 09:54:03 +000016699_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000016700ac_clean_files=$ac_clean_files_save
16701
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016702test $ac_write_fail = 0 ||
Georg Brandl71f4fbb2011-02-25 11:04:50 +000016703 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016704
Martin v. Löwis11437992002-04-12 09:54:03 +000016705
16706# configure is writing to config.log, and then calls config.status.
16707# config.status does its own redirection, appending to config.log.
16708# Unfortunately, on DOS this fails, as config.log is still kept open
16709# by configure, so config.status won't be able to write to it; its
16710# output is simply discarded. So we exec the FD to /dev/null,
16711# effectively closing config.log, so it can be properly (re)opened and
16712# appended to by config.status. When coming back to configure, we
16713# need to make the FD available again.
16714if test "$no_create" != yes; then
16715 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000016716 ac_config_status_args=
16717 test "$silent" = yes &&
16718 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000016719 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000016720 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000016721 exec 5>>config.log
16722 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
16723 # would make configure fail if this is the last instruction.
Georg Brandl71f4fbb2011-02-25 11:04:50 +000016724 $ac_cs_success || as_fn_exit 1
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016725fi
16726if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
16727 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
16728$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000016729fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000016730
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000016731
Martin v. Löwisf7afe952006-04-14 15:16:15 +000016732echo "creating Modules/Setup"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000016733if test ! -f Modules/Setup
16734then
16735 cp $srcdir/Modules/Setup.dist Modules/Setup
16736fi
16737
Martin v. Löwisf7afe952006-04-14 15:16:15 +000016738echo "creating Modules/Setup.local"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000016739if test ! -f Modules/Setup.local
16740then
16741 echo "# Edit this file for local setup changes" >Modules/Setup.local
16742fi
16743
16744echo "creating Makefile"
16745$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
16746 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000016747 Modules/Setup.local Modules/Setup
Skip Montanaro89e975f2007-08-22 19:05:21 +000016748
16749case $ac_sys_system in
16750BeOS)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016751 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
Skip Montanaro89e975f2007-08-22 19:05:21 +000016752
16753 Support for BeOS is deprecated as of Python 2.6.
16754 See PEP 11 for the gory details.
16755 " >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016756$as_echo "$as_me: WARNING:
Skip Montanaro89e975f2007-08-22 19:05:21 +000016757
16758 Support for BeOS is deprecated as of Python 2.6.
16759 See PEP 11 for the gory details.
16760 " >&2;}
16761 ;;
16762*) ;;
16763esac
16764
Neil Schemenauerc761fc82001-02-19 04:50:49 +000016765mv config.c Modules
Gregory P. Smith6d8fdfc2016-09-07 23:28:23 -070016766
16767if test "$Py_OPT" = 'false' -a "$Py_DEBUG" != 'true'; then
16768 echo "" >&6
16769 echo "" >&6
16770 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 +000016771 echo "please run ./configure --enable-optimizations" >&6
Gregory P. Smith6d8fdfc2016-09-07 23:28:23 -070016772 echo "" >&6
16773 echo "" >&6
16774fi