blob: 7d1f4ade7e2bb893af45a36d6fc021337c8b63c6 [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
Martin Panterbc82de02016-07-29 05:52:32 +0000743GENERATED_COMMENT
doko@python.orgd65e2ba2013-01-31 23:52:03 +0100744PYTHON_FOR_BUILD
745host_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]
Brett Cannon9a8bb0e2008-02-03 02:07:55 +00001460 Build against Mac OS X 10.4u SDK (ppc/i386)
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",
Ronald Oussoren23d92532009-09-07 06:12:00 +00001480 "64-bit", "3-way", "intel" or "all")
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00001481 --with-framework-name=FRAMEWORK
1482 specify an alternate name of the framework built
1483 with --enable-framework
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001484 --without-gcc never use gcc
Zachary Ware6ed42ea2015-12-21 11:43:03 -06001485 --with-icc build with icc
Martin v. Löwis0f48d982006-04-14 14:34:26 +00001486 --with-cxx-main=<compiler>
1487 compile main() and link python executable with C++
1488 compiler
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001489 --with-suffix=.exe set executable suffix
1490 --with-pydebug build with Py_DEBUG defined
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)c543a0f2016-06-02 23:44:40 +00001491 --with-lto Enable Link Time Optimization in PGO builds.
1492 Disabled by default.
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001493 --with-libs='lib1 ...' link against additional libs
Benjamin Peterson2c196742009-12-31 03:17:18 +00001494 --with-system-expat build pyexpat module using an installed expat
1495 library
Martin v. Löwis9176fc12006-04-11 11:12:43 +00001496 --with-system-ffi build _ctypes module using an installed ffi library
Ned Deilya2a9f572013-10-25 00:30:10 -07001497 --with-tcltk-includes='-I...'
1498 override search for Tcl and Tk include files
1499 --with-tcltk-libs='-L...'
1500 override search for Tcl and Tk libs
Benjamin Peterson867475c2009-04-29 20:36:25 +00001501 --with-dbmliborder=db1:db2:...
1502 order to check db backends for dbm. Valid value is a
1503 colon separated string with the backend names
1504 `ndbm', `gdbm' and `bdb'.
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001505 --with-signal-module disable/enable signal module
1506 --with-dec-threads use DEC Alpha/OSF1 thread-safe libraries
1507 --with(out)-threads[=DIRECTORY]
1508 disable/enable thread support
1509 --with(out)-thread[=DIRECTORY]
1510 deprecated; use --with(out)-threads
1511 --with-pth use GNU pth threading libraries
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001512 --with(out)-doc-strings disable/enable documentation strings
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00001513 --with(out)-tsc enable/disable timestamp counter profile
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001514 --with(out)-pymalloc disable/enable specialized mallocs
Benjamin Peterson91c12eb2009-12-03 02:52:39 +00001515 --with-valgrind Enable Valgrind support
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001516 --with-wctype-functions use wctype.h functions
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001517 --with-fpectl enable SIGFPE catching
1518 --with-libm=STRING math library
1519 --with-libc=STRING C library
Benjamin Peterson2c992a02015-05-28 12:45:31 -05001520 --with(out)-computed-gotos
1521 Use computed gotos in evaluation loop (enabled by
1522 default on supported compilers)
Ned Deily3f1d0b32014-11-20 02:11:03 -08001523 --with(out)-ensurepip=[=OPTION]
1524 "install" or "upgrade" using bundled pip, default is
1525 "no"
Martin v. Löwis11437992002-04-12 09:54:03 +00001526
1527Some influential environment variables:
1528 CC C compiler command
1529 CFLAGS C compiler flags
1530 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1531 nonstandard directory <lib dir>
Martin v. Löwiseba40652007-08-30 20:10:57 +00001532 LIBS libraries to pass to the linker, e.g. -l<library>
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001533 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
Martin v. Löwiseba40652007-08-30 20:10:57 +00001534 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001535 CPP C preprocessor
Benjamin Peterson64e8f6e2014-12-15 00:00:23 -05001536 PKG_CONFIG path to pkg-config utility
1537 PKG_CONFIG_PATH
1538 directories to add to pkg-config's search path
1539 PKG_CONFIG_LIBDIR
1540 path overriding pkg-config's built-in search path
Martin v. Löwis11437992002-04-12 09:54:03 +00001541
1542Use these variables to override the choices made by `configure' or to help
1543it to find libraries and programs with nonstandard names/locations.
1544
Benjamin Petersoncc8929b2016-08-03 22:01:32 -07001545Report bugs to <https://bugs.python.org/>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001546_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00001547ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001548fi
1549
1550if test "$ac_init_help" = "recursive"; then
1551 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001552 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001553 test -d "$ac_dir" ||
1554 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1555 continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001556 ac_builddir=.
1557
Martin v. Löwiseba40652007-08-30 20:10:57 +00001558case "$ac_dir" in
1559.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1560*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001561 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Martin v. Löwiseba40652007-08-30 20:10:57 +00001562 # A ".." for each directory in $ac_dir_suffix.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001563 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Martin v. Löwiseba40652007-08-30 20:10:57 +00001564 case $ac_top_builddir_sub in
1565 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1566 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1567 esac ;;
1568esac
1569ac_abs_top_builddir=$ac_pwd
1570ac_abs_builddir=$ac_pwd$ac_dir_suffix
1571# for backward compatibility:
1572ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001573
1574case $srcdir in
Martin v. Löwiseba40652007-08-30 20:10:57 +00001575 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001576 ac_srcdir=.
Martin v. Löwiseba40652007-08-30 20:10:57 +00001577 ac_top_srcdir=$ac_top_builddir_sub
1578 ac_abs_top_srcdir=$ac_pwd ;;
1579 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001580 ac_srcdir=$srcdir$ac_dir_suffix;
Martin v. Löwiseba40652007-08-30 20:10:57 +00001581 ac_top_srcdir=$srcdir
1582 ac_abs_top_srcdir=$srcdir ;;
1583 *) # Relative name.
1584 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1585 ac_top_srcdir=$ac_top_build_prefix$srcdir
1586 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001587esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00001588ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001589
Martin v. Löwiseba40652007-08-30 20:10:57 +00001590 cd "$ac_dir" || { ac_status=$?; continue; }
1591 # Check for guested configure.
1592 if test -f "$ac_srcdir/configure.gnu"; then
1593 echo &&
1594 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1595 elif test -f "$ac_srcdir/configure"; then
1596 echo &&
1597 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001598 else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001599 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Martin v. Löwiseba40652007-08-30 20:10:57 +00001600 fi || ac_status=$?
1601 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001602 done
1603fi
1604
Martin v. Löwiseba40652007-08-30 20:10:57 +00001605test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001606if $ac_init_version; then
1607 cat <<\_ACEOF
Martin v. Löwis174440b2008-10-03 08:59:41 +00001608python configure 2.7
Charles-François Natalibe2b9072013-01-08 19:47:00 +01001609generated by GNU Autoconf 2.69
Martin v. Löwis11437992002-04-12 09:54:03 +00001610
Charles-François Natalibe2b9072013-01-08 19:47:00 +01001611Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001612This configure script is free software; the Free Software Foundation
1613gives unlimited permission to copy, distribute and modify it.
1614_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00001615 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001616fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001617
1618## ------------------------ ##
1619## Autoconf initialization. ##
1620## ------------------------ ##
1621
1622# ac_fn_c_try_compile LINENO
1623# --------------------------
1624# Try to compile conftest.$ac_ext, and return whether this succeeded.
1625ac_fn_c_try_compile ()
1626{
1627 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1628 rm -f conftest.$ac_objext
1629 if { { ac_try="$ac_compile"
1630case "(($ac_try" in
1631 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1632 *) ac_try_echo=$ac_try;;
1633esac
1634eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1635$as_echo "$ac_try_echo"; } >&5
1636 (eval "$ac_compile") 2>conftest.err
1637 ac_status=$?
1638 if test -s conftest.err; then
1639 grep -v '^ *+' conftest.err >conftest.er1
1640 cat conftest.er1 >&5
1641 mv -f conftest.er1 conftest.err
1642 fi
1643 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1644 test $ac_status = 0; } && {
1645 test -z "$ac_c_werror_flag" ||
1646 test ! -s conftest.err
1647 } && test -s conftest.$ac_objext; then :
1648 ac_retval=0
1649else
1650 $as_echo "$as_me: failed program was:" >&5
1651sed 's/^/| /' conftest.$ac_ext >&5
1652
1653 ac_retval=1
1654fi
Matthias Klose3cef2a92012-03-14 23:39:33 +01001655 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001656 as_fn_set_status $ac_retval
1657
1658} # ac_fn_c_try_compile
1659
1660# ac_fn_c_try_cpp LINENO
1661# ----------------------
1662# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1663ac_fn_c_try_cpp ()
1664{
1665 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1666 if { { ac_try="$ac_cpp conftest.$ac_ext"
1667case "(($ac_try" in
1668 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1669 *) ac_try_echo=$ac_try;;
1670esac
1671eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1672$as_echo "$ac_try_echo"; } >&5
1673 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1674 ac_status=$?
1675 if test -s conftest.err; then
1676 grep -v '^ *+' conftest.err >conftest.er1
1677 cat conftest.er1 >&5
1678 mv -f conftest.er1 conftest.err
1679 fi
1680 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001681 test $ac_status = 0; } > conftest.i && {
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001682 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1683 test ! -s conftest.err
1684 }; then :
1685 ac_retval=0
1686else
1687 $as_echo "$as_me: failed program was:" >&5
1688sed 's/^/| /' conftest.$ac_ext >&5
1689
1690 ac_retval=1
1691fi
Matthias Klose3cef2a92012-03-14 23:39:33 +01001692 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001693 as_fn_set_status $ac_retval
1694
1695} # ac_fn_c_try_cpp
1696
1697# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1698# -------------------------------------------------------
1699# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1700# the include files in INCLUDES and setting the cache variable VAR
1701# accordingly.
1702ac_fn_c_check_header_mongrel ()
1703{
1704 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Matthias Klose3cef2a92012-03-14 23:39:33 +01001705 if eval \${$3+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001706 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1707$as_echo_n "checking for $2... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01001708if eval \${$3+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001709 $as_echo_n "(cached) " >&6
1710fi
1711eval ac_res=\$$3
1712 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1713$as_echo "$ac_res" >&6; }
1714else
1715 # Is the header compilable?
1716{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1717$as_echo_n "checking $2 usability... " >&6; }
1718cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1719/* end confdefs.h. */
1720$4
1721#include <$2>
1722_ACEOF
1723if ac_fn_c_try_compile "$LINENO"; then :
1724 ac_header_compiler=yes
1725else
1726 ac_header_compiler=no
1727fi
1728rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1729{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1730$as_echo "$ac_header_compiler" >&6; }
1731
1732# Is the header present?
1733{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1734$as_echo_n "checking $2 presence... " >&6; }
1735cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1736/* end confdefs.h. */
1737#include <$2>
1738_ACEOF
1739if ac_fn_c_try_cpp "$LINENO"; then :
1740 ac_header_preproc=yes
1741else
1742 ac_header_preproc=no
1743fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001744rm -f conftest.err conftest.i conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001745{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1746$as_echo "$ac_header_preproc" >&6; }
1747
1748# So? What about this header?
1749case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1750 yes:no: )
1751 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1752$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1753 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1754$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1755 ;;
1756 no:yes:* )
1757 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1758$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1759 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1760$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1761 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1762$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1763 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1764$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1765 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1766$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
Benjamin Petersoncc8929b2016-08-03 22:01:32 -07001767( $as_echo "## --------------------------------------- ##
1768## Report this to https://bugs.python.org/ ##
1769## --------------------------------------- ##"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001770 ) | sed "s/^/$as_me: WARNING: /" >&2
1771 ;;
1772esac
1773 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1774$as_echo_n "checking for $2... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01001775if eval \${$3+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001776 $as_echo_n "(cached) " >&6
1777else
1778 eval "$3=\$ac_header_compiler"
1779fi
1780eval ac_res=\$$3
1781 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1782$as_echo "$ac_res" >&6; }
1783fi
Matthias Klose3cef2a92012-03-14 23:39:33 +01001784 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001785
1786} # ac_fn_c_check_header_mongrel
1787
1788# ac_fn_c_try_run LINENO
1789# ----------------------
1790# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1791# that executables *can* be run.
1792ac_fn_c_try_run ()
1793{
1794 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1795 if { { ac_try="$ac_link"
1796case "(($ac_try" in
1797 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1798 *) ac_try_echo=$ac_try;;
1799esac
1800eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1801$as_echo "$ac_try_echo"; } >&5
1802 (eval "$ac_link") 2>&5
1803 ac_status=$?
1804 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1805 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1806 { { case "(($ac_try" in
1807 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1808 *) ac_try_echo=$ac_try;;
1809esac
1810eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1811$as_echo "$ac_try_echo"; } >&5
1812 (eval "$ac_try") 2>&5
1813 ac_status=$?
1814 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1815 test $ac_status = 0; }; }; then :
1816 ac_retval=0
1817else
1818 $as_echo "$as_me: program exited with status $ac_status" >&5
1819 $as_echo "$as_me: failed program was:" >&5
1820sed 's/^/| /' conftest.$ac_ext >&5
1821
1822 ac_retval=$ac_status
1823fi
1824 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Matthias Klose3cef2a92012-03-14 23:39:33 +01001825 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001826 as_fn_set_status $ac_retval
1827
1828} # ac_fn_c_try_run
1829
1830# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1831# -------------------------------------------------------
1832# Tests whether HEADER exists and can be compiled using the include files in
1833# INCLUDES, setting the cache variable VAR accordingly.
1834ac_fn_c_check_header_compile ()
1835{
1836 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1837 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1838$as_echo_n "checking for $2... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01001839if eval \${$3+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001840 $as_echo_n "(cached) " >&6
1841else
1842 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1843/* end confdefs.h. */
1844$4
1845#include <$2>
1846_ACEOF
1847if ac_fn_c_try_compile "$LINENO"; then :
1848 eval "$3=yes"
1849else
1850 eval "$3=no"
1851fi
1852rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1853fi
1854eval ac_res=\$$3
1855 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1856$as_echo "$ac_res" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01001857 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001858
1859} # ac_fn_c_check_header_compile
1860
1861# ac_fn_c_try_link LINENO
1862# -----------------------
1863# Try to link conftest.$ac_ext, and return whether this succeeded.
1864ac_fn_c_try_link ()
1865{
1866 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1867 rm -f conftest.$ac_objext conftest$ac_exeext
1868 if { { ac_try="$ac_link"
1869case "(($ac_try" in
1870 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1871 *) ac_try_echo=$ac_try;;
1872esac
1873eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1874$as_echo "$ac_try_echo"; } >&5
1875 (eval "$ac_link") 2>conftest.err
1876 ac_status=$?
1877 if test -s conftest.err; then
1878 grep -v '^ *+' conftest.err >conftest.er1
1879 cat conftest.er1 >&5
1880 mv -f conftest.er1 conftest.err
1881 fi
1882 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1883 test $ac_status = 0; } && {
1884 test -z "$ac_c_werror_flag" ||
1885 test ! -s conftest.err
1886 } && test -s conftest$ac_exeext && {
1887 test "$cross_compiling" = yes ||
Charles-François Natalibe2b9072013-01-08 19:47:00 +01001888 test -x conftest$ac_exeext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001889 }; then :
1890 ac_retval=0
1891else
1892 $as_echo "$as_me: failed program was:" >&5
1893sed 's/^/| /' conftest.$ac_ext >&5
1894
1895 ac_retval=1
1896fi
1897 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1898 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1899 # interfere with the next link command; also delete a directory that is
1900 # left behind by Apple's compiler. We do this before executing the actions.
1901 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Matthias Klose3cef2a92012-03-14 23:39:33 +01001902 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001903 as_fn_set_status $ac_retval
1904
1905} # ac_fn_c_try_link
1906
1907# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
1908# -------------------------------------------
1909# Tests whether TYPE exists after having included INCLUDES, setting cache
1910# variable VAR accordingly.
1911ac_fn_c_check_type ()
1912{
1913 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1914 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1915$as_echo_n "checking for $2... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01001916if eval \${$3+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001917 $as_echo_n "(cached) " >&6
1918else
1919 eval "$3=no"
1920 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1921/* end confdefs.h. */
1922$4
1923int
1924main ()
1925{
1926if (sizeof ($2))
1927 return 0;
1928 ;
1929 return 0;
1930}
1931_ACEOF
1932if ac_fn_c_try_compile "$LINENO"; then :
1933 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1934/* end confdefs.h. */
1935$4
1936int
1937main ()
1938{
1939if (sizeof (($2)))
1940 return 0;
1941 ;
1942 return 0;
1943}
1944_ACEOF
1945if ac_fn_c_try_compile "$LINENO"; then :
1946
1947else
1948 eval "$3=yes"
1949fi
1950rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1951fi
1952rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1953fi
1954eval ac_res=\$$3
1955 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1956$as_echo "$ac_res" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01001957 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001958
1959} # ac_fn_c_check_type
1960
1961# ac_fn_c_find_uintX_t LINENO BITS VAR
1962# ------------------------------------
1963# Finds an unsigned integer type with width BITS, setting cache variable VAR
1964# accordingly.
1965ac_fn_c_find_uintX_t ()
1966{
1967 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1968 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uint$2_t" >&5
1969$as_echo_n "checking for uint$2_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01001970if eval \${$3+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001971 $as_echo_n "(cached) " >&6
1972else
1973 eval "$3=no"
1974 # Order is important - never check a type that is potentially smaller
1975 # than half of the expected target width.
1976 for ac_type in uint$2_t 'unsigned int' 'unsigned long int' \
1977 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
1978 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1979/* end confdefs.h. */
1980$ac_includes_default
1981int
1982main ()
1983{
1984static int test_array [1 - 2 * !((($ac_type) -1 >> ($2 / 2 - 1)) >> ($2 / 2 - 1) == 3)];
Charles-François Natalibe2b9072013-01-08 19:47:00 +01001985test_array [0] = 0;
1986return test_array [0];
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001987
1988 ;
1989 return 0;
1990}
1991_ACEOF
1992if ac_fn_c_try_compile "$LINENO"; then :
1993 case $ac_type in #(
1994 uint$2_t) :
1995 eval "$3=yes" ;; #(
1996 *) :
1997 eval "$3=\$ac_type" ;;
1998esac
1999fi
2000rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002001 if eval test \"x\$"$3"\" = x"no"; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002002
2003else
2004 break
2005fi
2006 done
2007fi
2008eval ac_res=\$$3
2009 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2010$as_echo "$ac_res" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01002011 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002012
2013} # ac_fn_c_find_uintX_t
2014
2015# ac_fn_c_find_intX_t LINENO BITS VAR
2016# -----------------------------------
2017# Finds a signed integer type with width BITS, setting cache variable VAR
2018# accordingly.
2019ac_fn_c_find_intX_t ()
2020{
2021 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2022 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for int$2_t" >&5
2023$as_echo_n "checking for int$2_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01002024if eval \${$3+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002025 $as_echo_n "(cached) " >&6
2026else
2027 eval "$3=no"
2028 # Order is important - never check a type that is potentially smaller
2029 # than half of the expected target width.
2030 for ac_type in int$2_t 'int' 'long int' \
2031 'long long int' 'short int' 'signed char'; do
2032 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2033/* end confdefs.h. */
2034$ac_includes_default
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002035 enum { N = $2 / 2 - 1 };
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002036int
2037main ()
2038{
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002039static 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 +01002040test_array [0] = 0;
2041return test_array [0];
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002042
2043 ;
2044 return 0;
2045}
2046_ACEOF
2047if ac_fn_c_try_compile "$LINENO"; then :
2048 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2049/* end confdefs.h. */
2050$ac_includes_default
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002051 enum { N = $2 / 2 - 1 };
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002052int
2053main ()
2054{
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002055static int test_array [1 - 2 * !(($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002056 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 2))];
Charles-François Natalibe2b9072013-01-08 19:47:00 +01002057test_array [0] = 0;
2058return test_array [0];
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002059
2060 ;
2061 return 0;
2062}
2063_ACEOF
2064if ac_fn_c_try_compile "$LINENO"; then :
2065
2066else
2067 case $ac_type in #(
2068 int$2_t) :
2069 eval "$3=yes" ;; #(
2070 *) :
2071 eval "$3=\$ac_type" ;;
2072esac
2073fi
2074rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2075fi
2076rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002077 if eval test \"x\$"$3"\" = x"no"; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002078
2079else
2080 break
2081fi
2082 done
2083fi
2084eval ac_res=\$$3
2085 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2086$as_echo "$ac_res" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01002087 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002088
2089} # ac_fn_c_find_intX_t
2090
2091# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2092# --------------------------------------------
2093# Tries to find the compile-time value of EXPR in a program that includes
2094# INCLUDES, setting VAR accordingly. Returns whether the value could be
2095# computed
2096ac_fn_c_compute_int ()
2097{
2098 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2099 if test "$cross_compiling" = yes; then
2100 # Depending upon the size, compute the lo and hi bounds.
2101cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2102/* end confdefs.h. */
2103$4
2104int
2105main ()
2106{
2107static int test_array [1 - 2 * !(($2) >= 0)];
Charles-François Natalibe2b9072013-01-08 19:47:00 +01002108test_array [0] = 0;
2109return test_array [0];
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002110
2111 ;
2112 return 0;
2113}
2114_ACEOF
2115if ac_fn_c_try_compile "$LINENO"; then :
2116 ac_lo=0 ac_mid=0
2117 while :; do
2118 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2119/* end confdefs.h. */
2120$4
2121int
2122main ()
2123{
2124static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Charles-François Natalibe2b9072013-01-08 19:47:00 +01002125test_array [0] = 0;
2126return test_array [0];
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002127
2128 ;
2129 return 0;
2130}
2131_ACEOF
2132if ac_fn_c_try_compile "$LINENO"; then :
2133 ac_hi=$ac_mid; break
2134else
2135 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2136 if test $ac_lo -le $ac_mid; then
2137 ac_lo= ac_hi=
2138 break
2139 fi
2140 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2141fi
2142rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2143 done
2144else
2145 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2146/* end confdefs.h. */
2147$4
2148int
2149main ()
2150{
2151static int test_array [1 - 2 * !(($2) < 0)];
Charles-François Natalibe2b9072013-01-08 19:47:00 +01002152test_array [0] = 0;
2153return test_array [0];
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002154
2155 ;
2156 return 0;
2157}
2158_ACEOF
2159if ac_fn_c_try_compile "$LINENO"; then :
2160 ac_hi=-1 ac_mid=-1
2161 while :; do
2162 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2163/* end confdefs.h. */
2164$4
2165int
2166main ()
2167{
2168static int test_array [1 - 2 * !(($2) >= $ac_mid)];
Charles-François Natalibe2b9072013-01-08 19:47:00 +01002169test_array [0] = 0;
2170return test_array [0];
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002171
2172 ;
2173 return 0;
2174}
2175_ACEOF
2176if ac_fn_c_try_compile "$LINENO"; then :
2177 ac_lo=$ac_mid; break
2178else
2179 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2180 if test $ac_mid -le $ac_hi; then
2181 ac_lo= ac_hi=
2182 break
2183 fi
2184 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2185fi
2186rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2187 done
2188else
2189 ac_lo= ac_hi=
2190fi
2191rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2192fi
2193rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2194# Binary search between lo and hi bounds.
2195while test "x$ac_lo" != "x$ac_hi"; do
2196 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2197 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2198/* end confdefs.h. */
2199$4
2200int
2201main ()
2202{
2203static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Charles-François Natalibe2b9072013-01-08 19:47:00 +01002204test_array [0] = 0;
2205return test_array [0];
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002206
2207 ;
2208 return 0;
2209}
2210_ACEOF
2211if ac_fn_c_try_compile "$LINENO"; then :
2212 ac_hi=$ac_mid
2213else
2214 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2215fi
2216rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2217done
2218case $ac_lo in #((
2219?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2220'') ac_retval=1 ;;
2221esac
2222 else
2223 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2224/* end confdefs.h. */
2225$4
2226static long int longval () { return $2; }
2227static unsigned long int ulongval () { return $2; }
2228#include <stdio.h>
2229#include <stdlib.h>
2230int
2231main ()
2232{
2233
2234 FILE *f = fopen ("conftest.val", "w");
2235 if (! f)
2236 return 1;
2237 if (($2) < 0)
2238 {
2239 long int i = longval ();
2240 if (i != ($2))
2241 return 1;
2242 fprintf (f, "%ld", i);
2243 }
2244 else
2245 {
2246 unsigned long int i = ulongval ();
2247 if (i != ($2))
2248 return 1;
2249 fprintf (f, "%lu", i);
2250 }
2251 /* Do not output a trailing newline, as this causes \r\n confusion
2252 on some platforms. */
2253 return ferror (f) || fclose (f) != 0;
2254
2255 ;
2256 return 0;
2257}
2258_ACEOF
2259if ac_fn_c_try_run "$LINENO"; then :
2260 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2261else
2262 ac_retval=1
2263fi
2264rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2265 conftest.$ac_objext conftest.beam conftest.$ac_ext
2266rm -f conftest.val
2267
2268 fi
Matthias Klose3cef2a92012-03-14 23:39:33 +01002269 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002270 as_fn_set_status $ac_retval
2271
2272} # ac_fn_c_compute_int
2273
2274# ac_fn_c_check_func LINENO FUNC VAR
2275# ----------------------------------
2276# Tests whether FUNC exists, setting the cache variable VAR accordingly
2277ac_fn_c_check_func ()
2278{
2279 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2280 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2281$as_echo_n "checking for $2... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01002282if eval \${$3+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002283 $as_echo_n "(cached) " >&6
2284else
2285 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2286/* end confdefs.h. */
2287/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2288 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2289#define $2 innocuous_$2
2290
2291/* System header to define __stub macros and hopefully few prototypes,
2292 which can conflict with char $2 (); below.
2293 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2294 <limits.h> exists even on freestanding compilers. */
2295
2296#ifdef __STDC__
2297# include <limits.h>
2298#else
2299# include <assert.h>
2300#endif
2301
2302#undef $2
2303
2304/* Override any GCC internal prototype to avoid an error.
2305 Use char because int might match the return type of a GCC
2306 builtin and then its argument prototype would still apply. */
2307#ifdef __cplusplus
2308extern "C"
2309#endif
2310char $2 ();
2311/* The GNU C library defines this for functions which it implements
2312 to always fail with ENOSYS. Some functions are actually named
2313 something starting with __ and the normal name is an alias. */
2314#if defined __stub_$2 || defined __stub___$2
2315choke me
2316#endif
2317
2318int
2319main ()
2320{
2321return $2 ();
2322 ;
2323 return 0;
2324}
2325_ACEOF
2326if ac_fn_c_try_link "$LINENO"; then :
2327 eval "$3=yes"
2328else
2329 eval "$3=no"
2330fi
2331rm -f core conftest.err conftest.$ac_objext \
2332 conftest$ac_exeext conftest.$ac_ext
2333fi
2334eval ac_res=\$$3
2335 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2336$as_echo "$ac_res" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01002337 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002338
2339} # ac_fn_c_check_func
2340
2341# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2342# ----------------------------------------------------
2343# Tries to find if the field MEMBER exists in type AGGR, after including
2344# INCLUDES, setting cache variable VAR accordingly.
2345ac_fn_c_check_member ()
2346{
2347 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2348 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2349$as_echo_n "checking for $2.$3... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01002350if eval \${$4+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002351 $as_echo_n "(cached) " >&6
2352else
2353 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2354/* end confdefs.h. */
2355$5
2356int
2357main ()
2358{
2359static $2 ac_aggr;
2360if (ac_aggr.$3)
2361return 0;
2362 ;
2363 return 0;
2364}
2365_ACEOF
2366if ac_fn_c_try_compile "$LINENO"; then :
2367 eval "$4=yes"
2368else
2369 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2370/* end confdefs.h. */
2371$5
2372int
2373main ()
2374{
2375static $2 ac_aggr;
2376if (sizeof ac_aggr.$3)
2377return 0;
2378 ;
2379 return 0;
2380}
2381_ACEOF
2382if ac_fn_c_try_compile "$LINENO"; then :
2383 eval "$4=yes"
2384else
2385 eval "$4=no"
2386fi
2387rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2388fi
2389rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2390fi
2391eval ac_res=\$$4
2392 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2393$as_echo "$ac_res" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01002394 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002395
2396} # ac_fn_c_check_member
2397
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002398# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2399# ---------------------------------------------
2400# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2401# accordingly.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002402ac_fn_c_check_decl ()
2403{
2404 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002405 as_decl_name=`echo $2|sed 's/ *(.*//'`
2406 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2407 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2408$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01002409if eval \${$3+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002410 $as_echo_n "(cached) " >&6
2411else
2412 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2413/* end confdefs.h. */
2414$4
2415int
2416main ()
2417{
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002418#ifndef $as_decl_name
2419#ifdef __cplusplus
2420 (void) $as_decl_use;
2421#else
2422 (void) $as_decl_name;
2423#endif
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002424#endif
2425
2426 ;
2427 return 0;
2428}
2429_ACEOF
2430if ac_fn_c_try_compile "$LINENO"; then :
2431 eval "$3=yes"
2432else
2433 eval "$3=no"
2434fi
2435rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2436fi
2437eval ac_res=\$$3
2438 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2439$as_echo "$ac_res" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01002440 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002441
2442} # ac_fn_c_check_decl
Martin v. Löwiseba40652007-08-30 20:10:57 +00002443cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00002444This file contains any messages produced by compilers while
2445running configure, to aid debugging if configure makes a mistake.
2446
Martin v. Löwis174440b2008-10-03 08:59:41 +00002447It was created by python $as_me 2.7, which was
Charles-François Natalibe2b9072013-01-08 19:47:00 +01002448generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00002449
2450 $ $0 $@
2451
2452_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00002453exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00002454{
2455cat <<_ASUNAME
2456## --------- ##
2457## Platform. ##
2458## --------- ##
2459
2460hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2461uname -m = `(uname -m) 2>/dev/null || echo unknown`
2462uname -r = `(uname -r) 2>/dev/null || echo unknown`
2463uname -s = `(uname -s) 2>/dev/null || echo unknown`
2464uname -v = `(uname -v) 2>/dev/null || echo unknown`
2465
2466/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2467/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2468
2469/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2470/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2471/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Martin v. Löwiseba40652007-08-30 20:10:57 +00002472/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00002473/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2474/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2475/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2476
2477_ASUNAME
2478
2479as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2480for as_dir in $PATH
2481do
2482 IFS=$as_save_IFS
2483 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002484 $as_echo "PATH: $as_dir"
2485 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002486IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002487
2488} >&5
2489
2490cat >&5 <<_ACEOF
2491
2492
2493## ----------- ##
2494## Core tests. ##
2495## ----------- ##
2496
2497_ACEOF
2498
2499
2500# Keep a trace of the command line.
2501# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00002502# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00002503# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00002504# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00002505ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00002506ac_configure_args0=
2507ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00002508ac_must_keep_next=false
2509for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00002510do
Skip Montanaro6dead952003-09-25 14:50:04 +00002511 for ac_arg
2512 do
2513 case $ac_arg in
2514 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2515 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2516 | -silent | --silent | --silen | --sile | --sil)
2517 continue ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00002518 *\'*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002519 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002520 esac
2521 case $ac_pass in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002522 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002523 2)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002524 as_fn_append ac_configure_args1 " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002525 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002526 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00002527 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00002528 case $ac_arg in
2529 *=* | --config-cache | -C | -disable-* | --disable-* \
2530 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2531 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2532 | -with-* | --with-* | -without-* | --without-* | --x)
2533 case "$ac_configure_args0 " in
2534 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2535 esac
2536 ;;
2537 -* ) ac_must_keep_next=true ;;
2538 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00002539 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002540 as_fn_append ac_configure_args " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002541 ;;
2542 esac
2543 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002544done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002545{ ac_configure_args0=; unset ac_configure_args0;}
2546{ ac_configure_args1=; unset ac_configure_args1;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002547
2548# When interrupted or exit'd, cleanup temporary files, and complete
2549# config.log. We remove comments because anyway the quotes in there
2550# would cause problems or look ugly.
Martin v. Löwiseba40652007-08-30 20:10:57 +00002551# WARNING: Use '\'' to represent an apostrophe within the trap.
2552# 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 +00002553trap 'exit_status=$?
2554 # Save into config.log some information that might help in debugging.
2555 {
2556 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002557
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002558 $as_echo "## ---------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002559## Cache variables. ##
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002560## ---------------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002561 echo
2562 # The following way of writing the cache mishandles newlines in values,
Martin v. Löwiseba40652007-08-30 20:10:57 +00002563(
2564 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2565 eval ac_val=\$$ac_var
2566 case $ac_val in #(
2567 *${as_nl}*)
2568 case $ac_var in #(
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002569 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2570$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00002571 esac
2572 case $ac_var in #(
2573 _ | IFS | as_nl) ;; #(
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002574 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2575 *) { eval $ac_var=; unset $ac_var;} ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00002576 esac ;;
2577 esac
2578 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002579 (set) 2>&1 |
Martin v. Löwiseba40652007-08-30 20:10:57 +00002580 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2581 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00002582 sed -n \
Martin v. Löwiseba40652007-08-30 20:10:57 +00002583 "s/'\''/'\''\\\\'\'''\''/g;
2584 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2585 ;; #(
Skip Montanaro89e975f2007-08-22 19:05:21 +00002586 *)
Martin v. Löwiseba40652007-08-30 20:10:57 +00002587 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaro89e975f2007-08-22 19:05:21 +00002588 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00002589 esac |
2590 sort
2591)
Martin v. Löwis11437992002-04-12 09:54:03 +00002592 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002593
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002594 $as_echo "## ----------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00002595## Output variables. ##
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002596## ----------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002597 echo
2598 for ac_var in $ac_subst_vars
2599 do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002600 eval ac_val=\$$ac_var
2601 case $ac_val in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002602 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00002603 esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002604 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002605 done | sort
2606 echo
2607
2608 if test -n "$ac_subst_files"; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002609 $as_echo "## ------------------- ##
Martin v. Löwiseba40652007-08-30 20:10:57 +00002610## File substitutions. ##
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002611## ------------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002612 echo
2613 for ac_var in $ac_subst_files
2614 do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002615 eval ac_val=\$$ac_var
2616 case $ac_val in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002617 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00002618 esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002619 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002620 done | sort
2621 echo
2622 fi
2623
Martin v. Löwis11437992002-04-12 09:54:03 +00002624 if test -s confdefs.h; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002625 $as_echo "## ----------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002626## confdefs.h. ##
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002627## ----------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002628 echo
Martin v. Löwiseba40652007-08-30 20:10:57 +00002629 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002630 echo
2631 fi
2632 test "$ac_signal" != 0 &&
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002633 $as_echo "$as_me: caught signal $ac_signal"
2634 $as_echo "$as_me: exit $exit_status"
Martin v. Löwis11437992002-04-12 09:54:03 +00002635 } >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00002636 rm -f core *.core core.conftest.* &&
2637 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00002638 exit $exit_status
Martin v. Löwiseba40652007-08-30 20:10:57 +00002639' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00002640for ac_signal in 1 2 13 15; do
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002641 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00002642done
2643ac_signal=0
2644
2645# confdefs.h avoids OS command line length limits that DEFS can exceed.
Martin v. Löwiseba40652007-08-30 20:10:57 +00002646rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002647
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002648$as_echo "/* confdefs.h */" > confdefs.h
2649
Martin v. Löwis11437992002-04-12 09:54:03 +00002650# Predefined preprocessor variables.
2651
2652cat >>confdefs.h <<_ACEOF
2653#define PACKAGE_NAME "$PACKAGE_NAME"
2654_ACEOF
2655
Martin v. Löwis11437992002-04-12 09:54:03 +00002656cat >>confdefs.h <<_ACEOF
2657#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2658_ACEOF
2659
Martin v. Löwis11437992002-04-12 09:54:03 +00002660cat >>confdefs.h <<_ACEOF
2661#define PACKAGE_VERSION "$PACKAGE_VERSION"
2662_ACEOF
2663
Martin v. Löwis11437992002-04-12 09:54:03 +00002664cat >>confdefs.h <<_ACEOF
2665#define PACKAGE_STRING "$PACKAGE_STRING"
2666_ACEOF
2667
Martin v. Löwis11437992002-04-12 09:54:03 +00002668cat >>confdefs.h <<_ACEOF
2669#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2670_ACEOF
2671
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002672cat >>confdefs.h <<_ACEOF
2673#define PACKAGE_URL "$PACKAGE_URL"
2674_ACEOF
2675
Martin v. Löwis11437992002-04-12 09:54:03 +00002676
2677# Let the site file select an alternate cache file if it wants to.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002678# Prefer an explicitly selected file to automatically selected ones.
2679ac_site_file1=NONE
2680ac_site_file2=NONE
Martin v. Löwiseba40652007-08-30 20:10:57 +00002681if test -n "$CONFIG_SITE"; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002682 # We do not want a PATH search for config.site.
2683 case $CONFIG_SITE in #((
2684 -*) ac_site_file1=./$CONFIG_SITE;;
2685 */*) ac_site_file1=$CONFIG_SITE;;
2686 *) ac_site_file1=./$CONFIG_SITE;;
2687 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00002688elif test "x$prefix" != xNONE; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002689 ac_site_file1=$prefix/share/config.site
2690 ac_site_file2=$prefix/etc/config.site
Martin v. Löwiseba40652007-08-30 20:10:57 +00002691else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002692 ac_site_file1=$ac_default_prefix/share/config.site
2693 ac_site_file2=$ac_default_prefix/etc/config.site
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002694fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002695for ac_site_file in "$ac_site_file1" "$ac_site_file2"
Martin v. Löwiseba40652007-08-30 20:10:57 +00002696do
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002697 test "x$ac_site_file" = xNONE && continue
2698 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2699 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2700$as_echo "$as_me: loading site script $ac_site_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002701 sed 's/^/| /' "$ac_site_file" >&5
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002702 . "$ac_site_file" \
2703 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2704$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2705as_fn_error $? "failed to load site script $ac_site_file
Matthias Klose3cef2a92012-03-14 23:39:33 +01002706See \`config.log' for more details" "$LINENO" 5; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002707 fi
2708done
2709
2710if test -r "$cache_file"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002711 # Some versions of bash will fail to source /dev/null (special files
2712 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2713 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2714 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2715$as_echo "$as_me: loading cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002716 case $cache_file in
Martin v. Löwiseba40652007-08-30 20:10:57 +00002717 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2718 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00002719 esac
2720 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002721else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002722 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2723$as_echo "$as_me: creating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002724 >$cache_file
2725fi
2726
2727# Check that the precious variables saved in the cache have kept the same
2728# value.
2729ac_cache_corrupted=false
Martin v. Löwiseba40652007-08-30 20:10:57 +00002730for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00002731 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2732 eval ac_new_set=\$ac_env_${ac_var}_set
Martin v. Löwiseba40652007-08-30 20:10:57 +00002733 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2734 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00002735 case $ac_old_set,$ac_new_set in
2736 set,)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002737 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2738$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 +00002739 ac_cache_corrupted=: ;;
2740 ,set)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002741 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2742$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002743 ac_cache_corrupted=: ;;
2744 ,);;
2745 *)
2746 if test "x$ac_old_val" != "x$ac_new_val"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002747 # differences in whitespace do not lead to failure.
2748 ac_old_val_w=`echo x $ac_old_val`
2749 ac_new_val_w=`echo x $ac_new_val`
2750 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2751 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2752$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2753 ac_cache_corrupted=:
2754 else
2755 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2756$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2757 eval $ac_var=\$ac_old_val
2758 fi
2759 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2760$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2761 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2762$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002763 fi;;
2764 esac
2765 # Pass precious variables to config.status.
2766 if test "$ac_new_set" = set; then
2767 case $ac_new_val in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002768 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002769 *) ac_arg=$ac_var=$ac_new_val ;;
2770 esac
2771 case " $ac_configure_args " in
2772 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002773 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002774 esac
2775 fi
2776done
2777if $ac_cache_corrupted; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002778 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2779$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2780 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2781$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002782 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002783fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002784## -------------------- ##
2785## Main body of script. ##
2786## -------------------- ##
Martin v. Löwiseba40652007-08-30 20:10:57 +00002787
Guido van Rossum7f43da71994-08-01 12:15:30 +00002788ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002789ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00002790ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2791ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2792ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002793
Guido van Rossum627b2d71993-12-24 10:39:16 +00002794
Michael W. Hudson54241132001-12-07 15:38:26 +00002795
Martin v. Löwiseba40652007-08-30 20:10:57 +00002796ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00002797
2798
doko@python.orgd65e2ba2013-01-31 23:52:03 +01002799ac_aux_dir=
2800for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
2801 if test -f "$ac_dir/install-sh"; then
2802 ac_aux_dir=$ac_dir
2803 ac_install_sh="$ac_aux_dir/install-sh -c"
2804 break
2805 elif test -f "$ac_dir/install.sh"; then
2806 ac_aux_dir=$ac_dir
2807 ac_install_sh="$ac_aux_dir/install.sh -c"
2808 break
2809 elif test -f "$ac_dir/shtool"; then
2810 ac_aux_dir=$ac_dir
2811 ac_install_sh="$ac_aux_dir/shtool install -c"
2812 break
2813 fi
2814done
2815if test -z "$ac_aux_dir"; then
2816 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
2817fi
2818
2819# These three variables are undocumented and unsupported,
2820# and are intended to be withdrawn in a future Autoconf release.
2821# They can cause serious problems if a builder's source tree is in a directory
2822# whose full name contains unusual characters.
2823ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
2824ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
2825ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
2826
2827
2828# Make sure we can run config.sub.
2829$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2830 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
2831
2832{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
2833$as_echo_n "checking build system type... " >&6; }
2834if ${ac_cv_build+:} false; then :
2835 $as_echo_n "(cached) " >&6
2836else
2837 ac_build_alias=$build_alias
2838test "x$ac_build_alias" = x &&
2839 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2840test "x$ac_build_alias" = x &&
2841 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
2842ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2843 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
2844
2845fi
2846{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
2847$as_echo "$ac_cv_build" >&6; }
2848case $ac_cv_build in
2849*-*-*) ;;
2850*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
2851esac
2852build=$ac_cv_build
2853ac_save_IFS=$IFS; IFS='-'
2854set x $ac_cv_build
2855shift
2856build_cpu=$1
2857build_vendor=$2
2858shift; shift
2859# Remember, the first character of IFS is used to create $*,
2860# except with old shells:
2861build_os=$*
2862IFS=$ac_save_IFS
2863case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2864
2865
2866{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
2867$as_echo_n "checking host system type... " >&6; }
2868if ${ac_cv_host+:} false; then :
2869 $as_echo_n "(cached) " >&6
2870else
2871 if test "x$host_alias" = x; then
2872 ac_cv_host=$ac_cv_build
2873else
2874 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2875 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
2876fi
2877
2878fi
2879{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
2880$as_echo "$ac_cv_host" >&6; }
2881case $ac_cv_host in
2882*-*-*) ;;
2883*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
2884esac
2885host=$ac_cv_host
2886ac_save_IFS=$IFS; IFS='-'
2887set x $ac_cv_host
2888shift
2889host_cpu=$1
2890host_vendor=$2
2891shift; shift
2892# Remember, the first character of IFS is used to create $*,
2893# except with old shells:
2894host_os=$*
2895IFS=$ac_save_IFS
2896case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
2897
2898
2899
2900
2901
Ned Deily983df862014-08-22 13:30:59 -07002902# pybuilddir.txt will be created by --generate-posix-vars in the Makefile
2903rm -f pybuilddir.txt
2904
doko@python.orgd65e2ba2013-01-31 23:52:03 +01002905if test "$cross_compiling" = yes; then
2906 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for python interpreter for cross build" >&5
2907$as_echo_n "checking for python interpreter for cross build... " >&6; }
2908 if test -z "$PYTHON_FOR_BUILD"; then
2909 for interp in python$PACKAGE_VERSION python2 python; do
2910 which $interp >/dev/null 2>&1 || continue
2911 if $interp -c 'import sys;sys.exit(not (sys.version_info[:2] >= (2,7) and sys.version_info[0] < 3))'; then
2912 break
2913 fi
2914 interp=
2915 done
2916 if test x$interp = x; then
2917 as_fn_error $? "python$PACKAGE_VERSION interpreter not found" "$LINENO" 5
2918 fi
2919 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $interp" >&5
2920$as_echo "$interp" >&6; }
doko@ubuntu.coma50b0de2015-04-13 21:55:59 +02002921 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 +01002922 fi
Martin Panterbc82de02016-07-29 05:52:32 +00002923 # Used to comment out stuff for rebuilding generated files
2924 GENERATED_COMMENT='#'
doko@python.orgd65e2ba2013-01-31 23:52:03 +01002925elif test "$cross_compiling" = maybe; then
2926 as_fn_error $? "Cross compiling required --host=HOST-TUPLE and --build=ARCH" "$LINENO" 5
2927else
2928 PYTHON_FOR_BUILD='./$(BUILDPYTHON) -E'
Martin Panterbc82de02016-07-29 05:52:32 +00002929 GENERATED_COMMENT=''
doko@python.orgd65e2ba2013-01-31 23:52:03 +01002930fi
2931
2932
Martin v. Löwis11437992002-04-12 09:54:03 +00002933
Martin Panter801110b2016-07-28 01:28:27 +00002934
Georg Brandlbcd64a32009-03-31 21:45:18 +00002935if test "$prefix" != "/"; then
2936 prefix=`echo "$prefix" | sed -e 's/\/$//g'`
2937fi
2938
2939
Martin v. Löwis11437992002-04-12 09:54:03 +00002940
2941
Martin v. Löwis8316feb2003-06-14 07:48:07 +00002942# We don't use PACKAGE_ variables, and they cause conflicts
2943# with other autoconf-based packages that include Python.h
2944grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
2945rm confdefs.h
2946mv confdefs.h.new confdefs.h
2947
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00002948
Martin v. Löwis174440b2008-10-03 08:59:41 +00002949VERSION=2.7
Guido van Rossum1fd74a71997-07-19 19:36:02 +00002950
Martin v. Löwis1142de32002-03-29 16:28:31 +00002951
2952SOVERSION=1.0
2953
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002954# The later defininition of _XOPEN_SOURCE disables certain features
2955# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
2956
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002957$as_echo "#define _GNU_SOURCE 1" >>confdefs.h
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002958
2959
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002960# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2961# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
2962# them.
2963
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002964$as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002965
2966
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002967# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2968# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
2969# them.
2970
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002971$as_echo "#define __BSD_VISIBLE 1" >>confdefs.h
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002972
2973
Martin v. Löwisd6320502004-08-12 13:45:08 +00002974# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2975# u_int on Irix 5.3. Defining _BSD_TYPES brings it back.
2976
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002977$as_echo "#define _BSD_TYPES 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +00002978
2979
Ronald Oussoren5640ce22008-06-05 12:58:24 +00002980# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2981# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
2982# them.
2983
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002984$as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
Ronald Oussoren5640ce22008-06-05 12:58:24 +00002985
2986
2987
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002988define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002989
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00002990# Arguments passed to configure.
2991
2992CONFIG_ARGS="$ac_configure_args"
2993
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002994{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-universalsdk" >&5
2995$as_echo_n "checking for --enable-universalsdk... " >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00002996# Check whether --enable-universalsdk was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002997if test "${enable_universalsdk+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00002998 enableval=$enable_universalsdk;
Ronald Oussoren988117f2006-04-29 11:31:35 +00002999 case $enableval in
3000 yes)
3001 enableval=/Developer/SDKs/MacOSX10.4u.sdk
Ronald Oussoren3c0a1262010-01-17 19:27:57 +00003002 if test ! -d "${enableval}"
3003 then
3004 enableval=/
3005 fi
Ronald Oussoren988117f2006-04-29 11:31:35 +00003006 ;;
3007 esac
3008 case $enableval in
3009 no)
3010 UNIVERSALSDK=
3011 enable_universalsdk=
3012 ;;
3013 *)
3014 UNIVERSALSDK=$enableval
Ronald Oussoren3c0a1262010-01-17 19:27:57 +00003015 if test ! -d "${UNIVERSALSDK}"
3016 then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00003017 as_fn_error $? "--enable-universalsdk specifies non-existing SDK: ${UNIVERSALSDK}" "$LINENO" 5
Ronald Oussoren3c0a1262010-01-17 19:27:57 +00003018 fi
Ronald Oussoren988117f2006-04-29 11:31:35 +00003019 ;;
3020 esac
3021
Ronald Oussoren3c0a1262010-01-17 19:27:57 +00003022
Ronald Oussoren988117f2006-04-29 11:31:35 +00003023else
3024
3025 UNIVERSALSDK=
3026 enable_universalsdk=
3027
Martin v. Löwiseba40652007-08-30 20:10:57 +00003028fi
Ronald Oussoren988117f2006-04-29 11:31:35 +00003029
Ronald Oussoren3c0a1262010-01-17 19:27:57 +00003030if test -n "${UNIVERSALSDK}"
3031then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003032 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSALSDK}" >&5
3033$as_echo "${UNIVERSALSDK}" >&6; }
Ronald Oussoren3c0a1262010-01-17 19:27:57 +00003034else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003035 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3036$as_echo "no" >&6; }
Ronald Oussoren3c0a1262010-01-17 19:27:57 +00003037fi
Ronald Oussoren988117f2006-04-29 11:31:35 +00003038
Martin v. Löwiseba40652007-08-30 20:10:57 +00003039
Benjamin Peterson0e6ea5d2008-07-16 20:17:04 +00003040
Ned Deily8e60f6e2013-05-30 00:14:29 -07003041ARCH_RUN_32BIT=""
Benjamin Peterson0e6ea5d2008-07-16 20:17:04 +00003042
Ronald Oussoren5640ce22008-06-05 12:58:24 +00003043UNIVERSAL_ARCHS="32-bit"
Ronald Oussoren92919a62009-12-24 13:30:58 +00003044
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003045{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-universal-archs" >&5
3046$as_echo_n "checking for --with-universal-archs... " >&6; }
Ronald Oussoren5640ce22008-06-05 12:58:24 +00003047
3048# Check whether --with-universal-archs was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003049if test "${with_universal_archs+set}" = set; then :
Ronald Oussoren5640ce22008-06-05 12:58:24 +00003050 withval=$with_universal_archs;
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003051 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
3052$as_echo "$withval" >&6; }
Ronald Oussoren5640ce22008-06-05 12:58:24 +00003053 UNIVERSAL_ARCHS="$withval"
Ronald Oussoren9ebd2422009-09-29 13:00:44 +00003054 if test "${enable_universalsdk}" ; then
3055 :
3056 else
Georg Brandl71f4fbb2011-02-25 11:04:50 +00003057 as_fn_error $? "--with-universal-archs without --enable-universalsdk. See Mac/README" "$LINENO" 5
Ronald Oussoren9ebd2422009-09-29 13:00:44 +00003058 fi
Ronald Oussoren5640ce22008-06-05 12:58:24 +00003059
3060else
3061
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003062 { $as_echo "$as_me:${as_lineno-$LINENO}: result: 32-bit" >&5
3063$as_echo "32-bit" >&6; }
Ronald Oussoren5640ce22008-06-05 12:58:24 +00003064
3065fi
3066
3067
3068
3069
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00003070
3071# Check whether --with-framework-name was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003072if test "${with_framework_name+set}" = set; then :
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00003073 withval=$with_framework_name;
Ronald Oussoren9ebd2422009-09-29 13:00:44 +00003074 if test "${enable_framework}"; then
3075 :
3076 else
Georg Brandl71f4fbb2011-02-25 11:04:50 +00003077 as_fn_error $? "--with-framework-name without --enable-framework. See Mac/README" "$LINENO" 5
Ronald Oussoren9ebd2422009-09-29 13:00:44 +00003078 fi
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00003079 PYTHONFRAMEWORK=${withval}
3080 PYTHONFRAMEWORKDIR=${withval}.framework
3081 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
3082
3083else
3084
3085 PYTHONFRAMEWORK=Python
3086 PYTHONFRAMEWORKDIR=Python.framework
3087 PYTHONFRAMEWORKIDENTIFIER=org.python.python
3088
3089fi
3090
Martin v. Löwiseba40652007-08-30 20:10:57 +00003091# Check whether --enable-framework was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003092if test "${enable_framework+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00003093 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00003094 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00003095 yes)
Jack Jansene578a632001-08-15 01:27:14 +00003096 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00003097 esac
3098 case $enableval in
3099 no)
3100 PYTHONFRAMEWORK=
3101 PYTHONFRAMEWORKDIR=no-framework
3102 PYTHONFRAMEWORKPREFIX=
3103 PYTHONFRAMEWORKINSTALLDIR=
Ronald Oussoren567a8ff2006-05-26 11:43:26 +00003104 FRAMEWORKINSTALLFIRST=
3105 FRAMEWORKINSTALLLAST=
Ronald Oussoren5b787322006-06-06 19:50:24 +00003106 FRAMEWORKALTINSTALLFIRST=
3107 FRAMEWORKALTINSTALLLAST=
Ronald Oussoren2db3a8f2006-06-07 19:06:01 +00003108 if test "x${prefix}" = "xNONE"; then
3109 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3110 else
3111 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3112 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00003113 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00003114 ;;
3115 *)
Ronald Oussoren01d149f2010-04-30 11:20:14 +00003116 PYTHONFRAMEWORKPREFIX="${enableval}"
Jack Jansen127e56e2001-09-11 14:41:54 +00003117 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Ronald Oussoren567a8ff2006-05-26 11:43:26 +00003118 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussoren5640ce22008-06-05 12:58:24 +00003119 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure bininstall maninstall"
Ronald Oussoren92919a62009-12-24 13:30:58 +00003120 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
3121 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
Ronald Oussoren01d149f2010-04-30 11:20:14 +00003122 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
Ronald Oussoren5640ce22008-06-05 12:58:24 +00003123
Ronald Oussoren2db3a8f2006-06-07 19:06:01 +00003124 if test "x${prefix}" = "xNONE" ; then
3125 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
Ronald Oussoren01d149f2010-04-30 11:20:14 +00003126
Ronald Oussoren2db3a8f2006-06-07 19:06:01 +00003127 else
3128 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3129 fi
Ronald Oussoren01d149f2010-04-30 11:20:14 +00003130
3131 case "${enableval}" in
3132 /System*)
3133 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3134 if test "${prefix}" = "NONE" ; then
3135 # See below
3136 FRAMEWORKUNIXTOOLSPREFIX="/usr"
3137 fi
3138 ;;
3139
3140 /Library*)
3141 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3142 ;;
3143
3144 */Library/Frameworks)
3145 MDIR="`dirname "${enableval}"`"
3146 MDIR="`dirname "${MDIR}"`"
3147 FRAMEWORKINSTALLAPPSPREFIX="${MDIR}/Applications"
3148
3149 if test "${prefix}" = "NONE"; then
3150 # User hasn't specified the
3151 # --prefix option, but wants to install
3152 # the framework in a non-default location,
3153 # ensure that the compatibility links get
3154 # installed relative to that prefix as well
3155 # instead of in /usr/local.
3156 FRAMEWORKUNIXTOOLSPREFIX="${MDIR}"
3157 fi
3158 ;;
3159
3160 *)
3161 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3162 ;;
3163 esac
3164
Jack Jansen127e56e2001-09-11 14:41:54 +00003165 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Ronald Oussoren836b0392006-05-14 19:56:34 +00003166
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00003167 # Add files for Mac specific code to the list of output
Ronald Oussoren836b0392006-05-14 19:56:34 +00003168 # files:
Martin v. Löwiseba40652007-08-30 20:10:57 +00003169 ac_config_files="$ac_config_files Mac/Makefile"
Ronald Oussoren836b0392006-05-14 19:56:34 +00003170
Martin v. Löwiseba40652007-08-30 20:10:57 +00003171 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Ronald Oussoren836b0392006-05-14 19:56:34 +00003172
Martin v. Löwiseba40652007-08-30 20:10:57 +00003173 ac_config_files="$ac_config_files Mac/IDLE/Makefile"
Ronald Oussoren836b0392006-05-14 19:56:34 +00003174
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00003175 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
3176
3177 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
3178
Jack Jansene578a632001-08-15 01:27:14 +00003179 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003180
Guido van Rossum563e7081996-09-10 18:20:48 +00003181else
Martin v. Löwis11437992002-04-12 09:54:03 +00003182
Jack Jansene578a632001-08-15 01:27:14 +00003183 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00003184 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00003185 PYTHONFRAMEWORKPREFIX=
3186 PYTHONFRAMEWORKINSTALLDIR=
Ronald Oussoren567a8ff2006-05-26 11:43:26 +00003187 FRAMEWORKINSTALLFIRST=
3188 FRAMEWORKINSTALLLAST=
Ronald Oussoren5b787322006-06-06 19:50:24 +00003189 FRAMEWORKALTINSTALLFIRST=
3190 FRAMEWORKALTINSTALLLAST=
Ronald Oussoren2db3a8f2006-06-07 19:06:01 +00003191 if test "x${prefix}" = "xNONE" ; then
3192 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3193 else
3194 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3195 fi
Jack Jansene578a632001-08-15 01:27:14 +00003196 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003197
Ronald Oussoren5640ce22008-06-05 12:58:24 +00003198
Martin v. Löwiseba40652007-08-30 20:10:57 +00003199fi
3200
Michael W. Hudson54241132001-12-07 15:38:26 +00003201
3202
3203
3204
Jack Jansene578a632001-08-15 01:27:14 +00003205
Ronald Oussoren567a8ff2006-05-26 11:43:26 +00003206
3207
Ronald Oussoren5b787322006-06-06 19:50:24 +00003208
3209
3210
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00003211
Ronald Oussoren01d149f2010-04-30 11:20:14 +00003212
Jack Jansene578a632001-08-15 01:27:14 +00003213##AC_ARG_WITH(dyld,
Matthias Klose22520ea2010-05-08 10:14:46 +00003214## AS_HELP_STRING([--with-dyld],
3215## [Use (OpenStep|Rhapsody) dynamic linker]))
Jack Jansene578a632001-08-15 01:27:14 +00003216##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003217# Set name for machine-dependent library files
3218
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003219{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP" >&5
3220$as_echo_n "checking MACHDEP... " >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003221if test -z "$MACHDEP"
3222then
doko@python.orgd65e2ba2013-01-31 23:52:03 +01003223 # avoid using uname for cross builds
3224 if test "$cross_compiling" = yes; then
3225 # ac_sys_system and ac_sys_release are only used for setting
3226 # `define_xopen_source' in the case statement below. For the
3227 # current supported cross builds, this macro is not adjusted.
3228 case "$host" in
3229 *-*-linux*)
3230 ac_sys_system=Linux
3231 ;;
3232 *-*-cygwin*)
3233 ac_sys_system=Cygwin
3234 ;;
3235 *)
3236 # for now, limit cross builds to known configurations
3237 MACHDEP="unknown"
3238 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3239 esac
3240 ac_sys_release=
3241 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003242 ac_sys_system=`uname -s`
Georg Brandlfe18a112009-09-04 07:55:14 +00003243 if test "$ac_sys_system" = "AIX" \
Martin v. Löwis21ee4092002-09-30 16:19:48 +00003244 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00003245 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003246 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003247 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003248 fi
doko@python.orgd65e2ba2013-01-31 23:52:03 +01003249 fi
3250 ac_md_system=`echo $ac_sys_system |
3251 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
3252 ac_md_release=`echo $ac_sys_release |
3253 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
3254 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00003255
doko@python.orgd65e2ba2013-01-31 23:52:03 +01003256 case $MACHDEP in
Victor Stinneracacbaa2011-08-20 14:02:38 +02003257 linux*) MACHDEP="linux2";;
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00003258 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00003259 darwin*) MACHDEP="darwin";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00003260 atheos*) MACHDEP="atheos";;
Martin v. Löwisf3322282003-07-13 09:46:13 +00003261 irix646) MACHDEP="irix6";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00003262 '') MACHDEP="unknown";;
doko@python.orgd65e2ba2013-01-31 23:52:03 +01003263 esac
3264fi
3265
3266
3267if test "$cross_compiling" = yes; then
3268 case "$host" in
3269 *-*-linux*)
3270 case "$host_cpu" in
3271 arm*)
3272 _host_cpu=arm
3273 ;;
3274 *)
3275 _host_cpu=$host_cpu
3276 esac
3277 ;;
3278 *-*-cygwin*)
3279 _host_cpu=
3280 ;;
3281 *)
3282 # for now, limit cross builds to known configurations
3283 MACHDEP="unknown"
3284 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003285 esac
doko@python.orgd65e2ba2013-01-31 23:52:03 +01003286 _PYTHON_HOST_PLATFORM="$MACHDEP${_host_cpu:+-$_host_cpu}"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003287fi
Guido van Rossum91922671997-10-09 20:24:13 +00003288
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003289# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
3290# disable features if it is defined, without any means to access these
3291# features as extensions. For these systems, we skip the definition of
3292# _XOPEN_SOURCE. Before adding a system to the list to gain access to
3293# some feature, make sure there is no alternative way to access this
3294# feature. Also, when using wildcards, make sure you have verified the
3295# need for not defining _XOPEN_SOURCE on all systems matching the
3296# wildcard, and that the wildcard does not include future systems
3297# (which may remove their limitations).
3298case $ac_sys_system/$ac_sys_release in
3299 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
3300 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00003301 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Martin v. Löwis7875ef62010-02-15 21:41:12 +00003302 # In addition, Stefan Krah confirms that issue #1244610 exists through
3303 # OpenBSD 4.6, but is fixed in 4.7.
Charles-François Natali97781b02011-07-22 23:43:42 +02003304 OpenBSD/2.* | OpenBSD/3.* | OpenBSD/4.[0123456])
Martin v. Löwiscb78de62007-12-29 18:49:21 +00003305 define_xopen_source=no
3306 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3307 # also defined. This can be overridden by defining _BSD_SOURCE
3308 # As this has a different meaning on Linux, only define it on OpenBSD
3309
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003310$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Martin v. Löwiscb78de62007-12-29 18:49:21 +00003311
3312 ;;
Charles-François Natali97781b02011-07-22 23:43:42 +02003313 OpenBSD/*)
Martin v. Löwis5e2dd862010-02-15 08:32:00 +00003314 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3315 # also defined. This can be overridden by defining _BSD_SOURCE
3316 # As this has a different meaning on Linux, only define it on OpenBSD
3317
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003318$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Martin v. Löwis5e2dd862010-02-15 08:32:00 +00003319
3320 ;;
Martin v. Löwis4d542ec2006-11-25 15:39:19 +00003321 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
3322 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
3323 # Marc Recht
Benjamin Petersoneac68f42008-11-16 17:54:55 +00003324 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 +00003325 define_xopen_source=no;;
Martin v. Löwisb41afb52010-05-28 15:28:47 +00003326 # From the perspective of Solaris, _XOPEN_SOURCE is not so much a
3327 # request to enable features supported by the standard as a request
3328 # to disable features not supported by the standard. The best way
3329 # for Python to use Solaris is simply to leave _XOPEN_SOURCE out
3330 # entirely and define __EXTENSIONS__ instead.
3331 SunOS/*)
Martin v. Löwisa9d71422003-03-28 18:43:31 +00003332 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003333 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
3334 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00003335 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00003336 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003337 define_xopen_source=no;;
3338 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003339 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003340 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003341 define_xopen_source=no;;
Martin v. Löwisbb86d832008-11-04 20:40:09 +00003342 # On FreeBSD 4, the math functions C89 does not cover are never defined
3343 # with _XOPEN_SOURCE and __BSD_VISIBLE does not re-enable them.
3344 FreeBSD/4.*)
3345 define_xopen_source=no;;
3346 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
3347 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
3348 # identifies itself as Darwin/7.*
3349 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3350 # disables platform specific features beyond repair.
3351 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3352 # has no effect, don't bother defining them
3353 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00003354 define_xopen_source=no;;
Ronald Oussorena55af9a2010-01-17 16:25:57 +00003355 Darwin/1[0-9].*)
3356 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003357 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
3358 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
3359 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00003360 AIX/4)
3361 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003362 AIX/5)
3363 if test `uname -r` -eq 1; then
3364 define_xopen_source=no
3365 fi
3366 ;;
Martin v. Löwis8c255e42008-05-23 15:06:50 +00003367 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
3368 # defining NI_NUMERICHOST.
3369 QNX/6.3.2)
3370 define_xopen_source=no
3371 ;;
Martin v. Löwisa0588362006-04-04 06:03:50 +00003372
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003373esac
3374
3375if test $define_xopen_source = yes
3376then
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003377
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003378$as_echo "#define _XOPEN_SOURCE 600" >>confdefs.h
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003379
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003380
3381 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
3382 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
3383 # several APIs are not declared. Since this is also needed in some
3384 # cases for HP-UX, we define it globally.
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003385
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003386$as_echo "#define _XOPEN_SOURCE_EXTENDED 1" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003387
3388
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003389
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003390$as_echo "#define _POSIX_C_SOURCE 200112L" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003391
3392
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003393fi
3394
Guido van Rossum91922671997-10-09 20:24:13 +00003395#
3396# SGI compilers allow the specification of the both the ABI and the
3397# ISA on the command line. Depending on the values of these switches,
Martin Panterb1d867f2016-05-26 05:28:50 +00003398# different and often incompatible code will be generated.
Guido van Rossum91922671997-10-09 20:24:13 +00003399#
3400# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
3401# thus supply support for various ABI/ISA combinations. The MACHDEP
3402# variable is also adjusted.
3403#
3404
3405if test ! -z "$SGI_ABI"
3406then
3407 CC="cc $SGI_ABI"
3408 LDFLAGS="$SGI_ABI $LDFLAGS"
3409 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
3410fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003411{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP" >&5
3412$as_echo "$MACHDEP" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003413
doko@ubuntu.coma50b0de2015-04-13 21:55:59 +02003414
3415PLATDIR=plat-$MACHDEP
3416
Jack Jansen83f898c2002-12-30 22:23:40 +00003417# And add extra plat-mac for darwin
3418
Jack Jansen7b59b422003-03-17 15:44:10 +00003419
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003420{ $as_echo "$as_me:${as_lineno-$LINENO}: checking EXTRAPLATDIR" >&5
3421$as_echo_n "checking EXTRAPLATDIR... " >&6; }
Jack Jansen83f898c2002-12-30 22:23:40 +00003422if test -z "$EXTRAPLATDIR"
3423then
3424 case $MACHDEP in
Jack Jansen7b59b422003-03-17 15:44:10 +00003425 darwin)
3426 EXTRAPLATDIR="\$(PLATMACDIRS)"
3427 EXTRAMACHDEPPATH="\$(PLATMACPATH)"
3428 ;;
3429 *)
3430 EXTRAPLATDIR=""
3431 EXTRAMACHDEPPATH=""
3432 ;;
Jack Jansen83f898c2002-12-30 22:23:40 +00003433 esac
3434fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003435{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXTRAPLATDIR" >&5
3436$as_echo "$EXTRAPLATDIR" >&6; }
Jack Jansen83f898c2002-12-30 22:23:40 +00003437
Jack Jansen6b08a402004-06-03 12:41:45 +00003438# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
3439# it may influence the way we can build extensions, so distutils
3440# needs to check it
3441
Ronald Oussoren988117f2006-04-29 11:31:35 +00003442
Jack Jansen6b08a402004-06-03 12:41:45 +00003443CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Ronald Oussoren988117f2006-04-29 11:31:35 +00003444EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00003445
Guido van Rossum627b2d71993-12-24 10:39:16 +00003446# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00003447
3448# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
3449# for debug/optimization stuff. BASECFLAGS is for flags that are required
3450# just to get things to compile and link. Users are free to override OPT
3451# when running configure or make. The build should not break if they do.
3452# BASECFLAGS should generally not be messed with, however.
3453
3454# XXX shouldn't some/most/all of this code be merged with the stuff later
3455# on that fiddles with OPT and BASECFLAGS?
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003456{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --without-gcc" >&5
3457$as_echo_n "checking for --without-gcc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003458
Martin v. Löwiseba40652007-08-30 20:10:57 +00003459# Check whether --with-gcc was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003460if test "${with_gcc+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00003461 withval=$with_gcc;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003462 case $withval in
Mark Dickinson04b27232009-01-04 12:29:36 +00003463 no) CC=${CC:-cc}
Guido van Rossumda88dad1995-01-26 00:46:29 +00003464 without_gcc=yes;;
3465 yes) CC=gcc
3466 without_gcc=no;;
3467 *) CC=$withval
3468 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003469 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00003470else
Martin v. Löwis11437992002-04-12 09:54:03 +00003471
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003472 case $ac_sys_system in
Antoine Pitrou285cd162010-09-21 15:23:17 +00003473 AIX*) CC=${CC:-xlc_r}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003474 without_gcc=;;
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003475 BeOS*)
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003476 case $BE_HOST_CPU in
3477 ppc)
Fred Drake5790be12000-10-09 17:06:13 +00003478 CC=mwcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003479 without_gcc=yes
Skip Montanarodecc6a42003-01-01 20:07:49 +00003480 BASECFLAGS="$BASECFLAGS -export pragma"
3481 OPT="$OPT -O"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003482 LDFLAGS="$LDFLAGS -nodup"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003483 ;;
3484 x86)
Fred Drake5790be12000-10-09 17:06:13 +00003485 CC=gcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003486 without_gcc=no
Skip Montanarodecc6a42003-01-01 20:07:49 +00003487 OPT="$OPT -O"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003488 ;;
3489 *)
Georg Brandl71f4fbb2011-02-25 11:04:50 +00003490 as_fn_error $? "Unknown BeOS platform \"$BE_HOST_CPU\"" "$LINENO" 5
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003491 ;;
3492 esac
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003493 AR="\$(srcdir)/Modules/ar_beos"
3494 RANLIB=:
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003495 ;;
Martin v. Löwis130fb172001-07-19 11:00:41 +00003496 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00003497 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00003498fi
3499
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003500{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $without_gcc" >&5
3501$as_echo "$without_gcc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003502
Zachary Ware6ed42ea2015-12-21 11:43:03 -06003503{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-icc" >&5
3504$as_echo_n "checking for --with-icc... " >&6; }
3505
3506# Check whether --with-icc was given.
3507if test "${with_icc+set}" = set; then :
3508 withval=$with_icc;
3509 case $withval in
3510 no) CC=${CC:-cc}
3511 with_icc=no;;
3512 yes) CC=icc
3513 CXX=icpc
3514 with_icc=yes;;
3515 *) CC=$withval
3516 with_icc=$withval;;
3517 esac
3518else
3519
3520 with_icc=no
3521fi
3522
3523{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_icc" >&5
3524$as_echo "$with_icc" >&6; }
3525
Guido van Rossum8b131c51995-03-09 14:10:13 +00003526# If the user switches compilers, we can't believe the cache
3527if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
3528then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00003529 as_fn_error $? "cached CC is different -- throw away $cache_file
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003530(it is also a good idea to do 'make clean' before compiling)" "$LINENO" 5
Guido van Rossum8b131c51995-03-09 14:10:13 +00003531fi
3532
Trent Nelson15daa352012-12-13 06:46:39 +00003533if test "$MACHDEP" = "irix6" && test "$CC" != "gcc"; then
3534 # Normally, MIPSpro CC treats #error directives as warnings, which means
3535 # a successful exit code is returned (0). This is a problem because IRIX
3536 # has a bunch of system headers with this guard at the top:
3537 #
3538 # #ifndef __c99
3539 # #error This header file is to be used only for c99 mode compilations
3540 # #else
3541 #
3542 # When autoconf tests for such a header, like stdint.h, this happens:
3543 #
3544 # configure:4619: cc -c conftest.c >&5
3545 # cc-1035 cc: WARNING File = /usr/include/stdint.h, Line = 5
3546 # #error directive: This header file is to be used only for c99 mode
3547 # compilations
3548 #
3549 # #error This header file is to be used only for c99 mode compilations
3550 # ^
3551 #
3552 # configure:4619: $? = 0
3553 # configure:4619: result: yes
3554 #
3555 # Therefore, we use `-diag_error 1035` to have the compiler treat the
3556 # warning as an error, which causes cc to return a non-zero result,
3557 # which autoconf can interpret correctly.
3558 CFLAGS="$CFLAGS -diag_error 1035"
3559 # Whilst we're here, we might as well make sure CXX defaults to something
3560 # sensible if we're not using gcc.
3561 if test -z "$CXX"; then
3562 CXX="CC"
3563 fi
3564fi
3565
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00003566# If the user set CFLAGS, use this instead of the automatically
3567# determined setting
3568preset_cflags="$CFLAGS"
Martin v. Löwis11437992002-04-12 09:54:03 +00003569ac_ext=c
3570ac_cpp='$CPP $CPPFLAGS'
3571ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3572ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3573ac_compiler_gnu=$ac_cv_c_compiler_gnu
3574if test -n "$ac_tool_prefix"; then
3575 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3576set dummy ${ac_tool_prefix}gcc; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003577{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3578$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01003579if ${ac_cv_prog_CC+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003580 $as_echo_n "(cached) " >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003581else
3582 if test -n "$CC"; then
3583 ac_cv_prog_CC="$CC" # Let the user override the test.
3584else
Martin v. Löwis11437992002-04-12 09:54:03 +00003585as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3586for as_dir in $PATH
3587do
3588 IFS=$as_save_IFS
3589 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003590 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01003591 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003592 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003593 $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 +00003594 break 2
3595 fi
3596done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003597 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003598IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003599
Jack Jansendd19cf82001-12-06 22:36:17 +00003600fi
3601fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003602CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00003603if test -n "$CC"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003604 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3605$as_echo "$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003606else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003607 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3608$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003609fi
3610
Martin v. Löwiseba40652007-08-30 20:10:57 +00003611
Martin v. Löwis11437992002-04-12 09:54:03 +00003612fi
3613if test -z "$ac_cv_prog_CC"; then
3614 ac_ct_CC=$CC
3615 # Extract the first word of "gcc", so it can be a program name with args.
3616set dummy gcc; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003617{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3618$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01003619if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003620 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003621else
3622 if test -n "$ac_ct_CC"; then
3623 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3624else
3625as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3626for as_dir in $PATH
3627do
3628 IFS=$as_save_IFS
3629 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003630 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01003631 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003632 ac_cv_prog_ac_ct_CC="gcc"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003633 $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 +00003634 break 2
3635 fi
3636done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003637 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003638IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003639
3640fi
3641fi
3642ac_ct_CC=$ac_cv_prog_ac_ct_CC
3643if test -n "$ac_ct_CC"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003644 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3645$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003646else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003647 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3648$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003649fi
3650
Martin v. Löwiseba40652007-08-30 20:10:57 +00003651 if test "x$ac_ct_CC" = x; then
3652 CC=""
3653 else
3654 case $cross_compiling:$ac_tool_warned in
3655yes:)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003656{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3657$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00003658ac_tool_warned=yes ;;
3659esac
3660 CC=$ac_ct_CC
3661 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003662else
3663 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00003664fi
3665
Jack Jansendd19cf82001-12-06 22:36:17 +00003666if test -z "$CC"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00003667 if test -n "$ac_tool_prefix"; then
3668 # 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 +00003669set dummy ${ac_tool_prefix}cc; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003670{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3671$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01003672if ${ac_cv_prog_CC+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003673 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00003674else
3675 if test -n "$CC"; then
3676 ac_cv_prog_CC="$CC" # Let the user override the test.
3677else
Martin v. Löwis11437992002-04-12 09:54:03 +00003678as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3679for as_dir in $PATH
3680do
3681 IFS=$as_save_IFS
3682 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003683 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01003684 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003685 ac_cv_prog_CC="${ac_tool_prefix}cc"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003686 $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 +00003687 break 2
3688 fi
3689done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003690 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003691IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003692
3693fi
3694fi
3695CC=$ac_cv_prog_CC
3696if test -n "$CC"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003697 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3698$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003699else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003700 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3701$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003702fi
3703
Martin v. Löwiseba40652007-08-30 20:10:57 +00003704
Martin v. Löwis11437992002-04-12 09:54:03 +00003705 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003706fi
3707if test -z "$CC"; then
3708 # Extract the first word of "cc", so it can be a program name with args.
3709set dummy cc; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003710{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3711$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01003712if ${ac_cv_prog_CC+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003713 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003714else
3715 if test -n "$CC"; then
3716 ac_cv_prog_CC="$CC" # Let the user override the test.
3717else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003718 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003719as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3720for as_dir in $PATH
3721do
3722 IFS=$as_save_IFS
3723 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003724 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01003725 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003726 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3727 ac_prog_rejected=yes
3728 continue
3729 fi
3730 ac_cv_prog_CC="cc"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003731 $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 +00003732 break 2
3733 fi
3734done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003735 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003736IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003737
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003738if test $ac_prog_rejected = yes; then
3739 # We found a bogon in the path, so make sure we never use it.
3740 set dummy $ac_cv_prog_CC
3741 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00003742 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003743 # We chose a different compiler from the bogus one.
3744 # However, it has the same basename, so the bogon will be chosen
3745 # first if we set CC to just the basename; use the full file name.
3746 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00003747 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003748 fi
3749fi
3750fi
3751fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003752CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003753if test -n "$CC"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003754 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3755$as_echo "$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003756else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003757 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3758$as_echo "no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003759fi
3760
Martin v. Löwiseba40652007-08-30 20:10:57 +00003761
Martin v. Löwis11437992002-04-12 09:54:03 +00003762fi
3763if test -z "$CC"; then
3764 if test -n "$ac_tool_prefix"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00003765 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003766 do
3767 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3768set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003769{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3770$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01003771if ${ac_cv_prog_CC+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003772 $as_echo_n "(cached) " >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003773else
3774 if test -n "$CC"; then
3775 ac_cv_prog_CC="$CC" # Let the user override the test.
3776else
Martin v. Löwis11437992002-04-12 09:54:03 +00003777as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3778for as_dir in $PATH
3779do
3780 IFS=$as_save_IFS
3781 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003782 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01003783 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003784 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003785 $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 +00003786 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00003787 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003788done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003789 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003790IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003791
3792fi
3793fi
3794CC=$ac_cv_prog_CC
3795if test -n "$CC"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003796 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3797$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003798else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003799 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3800$as_echo "no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003801fi
3802
Martin v. Löwiseba40652007-08-30 20:10:57 +00003803
Martin v. Löwis11437992002-04-12 09:54:03 +00003804 test -n "$CC" && break
3805 done
3806fi
3807if test -z "$CC"; then
3808 ac_ct_CC=$CC
Martin v. Löwiseba40652007-08-30 20:10:57 +00003809 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003810do
3811 # Extract the first word of "$ac_prog", so it can be a program name with args.
3812set dummy $ac_prog; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003813{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3814$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01003815if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003816 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003817else
3818 if test -n "$ac_ct_CC"; then
3819 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3820else
3821as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3822for as_dir in $PATH
3823do
3824 IFS=$as_save_IFS
3825 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003826 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01003827 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003828 ac_cv_prog_ac_ct_CC="$ac_prog"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003829 $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 +00003830 break 2
3831 fi
3832done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003833 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003834IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00003835
Martin v. Löwis11437992002-04-12 09:54:03 +00003836fi
3837fi
3838ac_ct_CC=$ac_cv_prog_ac_ct_CC
3839if test -n "$ac_ct_CC"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003840 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3841$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003842else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003843 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3844$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003845fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003846
Martin v. Löwiseba40652007-08-30 20:10:57 +00003847
Martin v. Löwis11437992002-04-12 09:54:03 +00003848 test -n "$ac_ct_CC" && break
3849done
Michael W. Hudson54241132001-12-07 15:38:26 +00003850
Martin v. Löwiseba40652007-08-30 20:10:57 +00003851 if test "x$ac_ct_CC" = x; then
3852 CC=""
3853 else
3854 case $cross_compiling:$ac_tool_warned in
3855yes:)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003856{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3857$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00003858ac_tool_warned=yes ;;
3859esac
3860 CC=$ac_ct_CC
3861 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003862fi
3863
3864fi
3865
3866
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003867test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3868$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00003869as_fn_error $? "no acceptable C compiler found in \$PATH
Matthias Klose3cef2a92012-03-14 23:39:33 +01003870See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003871
3872# Provide some information about the compiler.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003873$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3874set X $ac_compile
3875ac_compiler=$2
3876for ac_option in --version -v -V -qversion; do
3877 { { ac_try="$ac_compiler $ac_option >&5"
Martin v. Löwiseba40652007-08-30 20:10:57 +00003878case "(($ac_try" in
3879 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3880 *) ac_try_echo=$ac_try;;
3881esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003882eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3883$as_echo "$ac_try_echo"; } >&5
3884 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003885 ac_status=$?
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003886 if test -s conftest.err; then
3887 sed '10a\
3888... rest of stderr output deleted ...
3889 10q' conftest.err >conftest.er1
3890 cat conftest.er1 >&5
3891 fi
3892 rm -f conftest.er1 conftest.err
3893 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3894 test $ac_status = 0; }
3895done
Martin v. Löwis11437992002-04-12 09:54:03 +00003896
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003897cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003898/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00003899
Martin v. Löwis11437992002-04-12 09:54:03 +00003900int
3901main ()
3902{
3903
3904 ;
3905 return 0;
3906}
3907_ACEOF
3908ac_clean_files_save=$ac_clean_files
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003909ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00003910# Try to create an executable without -o first, disregard a.out.
3911# It will help us diagnose broken compilers, and finding out an intuition
3912# of exeext.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003913{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3914$as_echo_n "checking whether the C compiler works... " >&6; }
3915ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3916
3917# The possible output files:
3918ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3919
Martin v. Löwiseba40652007-08-30 20:10:57 +00003920ac_rmfiles=
3921for ac_file in $ac_files
3922do
3923 case $ac_file in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003924 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00003925 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3926 esac
3927done
3928rm -f $ac_rmfiles
3929
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003930if { { ac_try="$ac_link_default"
Martin v. Löwiseba40652007-08-30 20:10:57 +00003931case "(($ac_try" in
3932 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3933 *) ac_try_echo=$ac_try;;
3934esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003935eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3936$as_echo "$ac_try_echo"; } >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003937 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003938 ac_status=$?
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003939 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3940 test $ac_status = 0; }; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00003941 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3942# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3943# in a Makefile. We should not override ac_cv_exeext if it was cached,
3944# so that the user can short-circuit this test for compilers unknown to
3945# Autoconf.
3946for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00003947do
3948 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00003949 case $ac_file in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003950 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
Skip Montanarof0d5f792004-08-15 14:08:23 +00003951 ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003952 [ab].out )
Skip Montanarof0d5f792004-08-15 14:08:23 +00003953 # We found the default executable, but exeext='' is most
3954 # certainly right.
3955 break;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003956 *.* )
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003957 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
Martin v. Löwiseba40652007-08-30 20:10:57 +00003958 then :; else
3959 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3960 fi
3961 # We set ac_cv_exeext here because the later test for it is not
3962 # safe: cross compilers may not add the suffix if given an `-o'
3963 # argument, so we may need to know it at that point already.
3964 # Even if this section looks crufty: it has the advantage of
3965 # actually working.
Skip Montanarof0d5f792004-08-15 14:08:23 +00003966 break;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003967 * )
Skip Montanarof0d5f792004-08-15 14:08:23 +00003968 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003969 esac
3970done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003971test "$ac_cv_exeext" = no && ac_cv_exeext=
3972
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003973else
Martin v. Löwiseba40652007-08-30 20:10:57 +00003974 ac_file=''
3975fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003976if test -z "$ac_file"; then :
3977 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3978$as_echo "no" >&6; }
3979$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003980sed 's/^/| /' conftest.$ac_ext >&5
3981
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003982{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3983$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00003984as_fn_error 77 "C compiler cannot create executables
Matthias Klose3cef2a92012-03-14 23:39:33 +01003985See \`config.log' for more details" "$LINENO" 5; }
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003986else
3987 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3988$as_echo "yes" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003989fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003990{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3991$as_echo_n "checking for C compiler default output file name... " >&6; }
3992{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3993$as_echo "$ac_file" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003994ac_exeext=$ac_cv_exeext
Michael W. Hudson54241132001-12-07 15:38:26 +00003995
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003996rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
Martin v. Löwis11437992002-04-12 09:54:03 +00003997ac_clean_files=$ac_clean_files_save
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003998{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3999$as_echo_n "checking for suffix of executables... " >&6; }
4000if { { ac_try="$ac_link"
Martin v. Löwiseba40652007-08-30 20:10:57 +00004001case "(($ac_try" in
4002 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4003 *) ac_try_echo=$ac_try;;
4004esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004005eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4006$as_echo "$ac_try_echo"; } >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00004007 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004008 ac_status=$?
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004009 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4010 test $ac_status = 0; }; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004011 # If both `conftest.exe' and `conftest' are `present' (well, observable)
4012# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
4013# work properly (i.e., refer to `conftest.exe'), while it won't with
4014# `rm'.
Skip Montanaro6dead952003-09-25 14:50:04 +00004015for ac_file in conftest.exe conftest conftest.*; do
4016 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00004017 case $ac_file in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004018 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004019 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
Skip Montanarof0d5f792004-08-15 14:08:23 +00004020 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004021 * ) break;;
4022 esac
4023done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004024else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004025 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4026$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004027as_fn_error $? "cannot compute suffix of executables: cannot compile and link
Matthias Klose3cef2a92012-03-14 23:39:33 +01004028See \`config.log' for more details" "$LINENO" 5; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004029fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004030rm -f conftest conftest$ac_cv_exeext
4031{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
4032$as_echo "$ac_cv_exeext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004033
4034rm -f conftest.$ac_ext
4035EXEEXT=$ac_cv_exeext
4036ac_exeext=$EXEEXT
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004037cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4038/* end confdefs.h. */
4039#include <stdio.h>
4040int
4041main ()
4042{
4043FILE *f = fopen ("conftest.out", "w");
4044 return ferror (f) || fclose (f) != 0;
4045
4046 ;
4047 return 0;
4048}
Skip Montanaro6dead952003-09-25 14:50:04 +00004049_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004050ac_clean_files="$ac_clean_files conftest.out"
4051# Check that the compiler produces executables we can run. If not, either
4052# the compiler is broken, or we cross compile.
4053{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
4054$as_echo_n "checking whether we are cross compiling... " >&6; }
4055if test "$cross_compiling" != yes; then
4056 { { ac_try="$ac_link"
4057case "(($ac_try" in
4058 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4059 *) ac_try_echo=$ac_try;;
4060esac
4061eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4062$as_echo "$ac_try_echo"; } >&5
4063 (eval "$ac_link") 2>&5
4064 ac_status=$?
4065 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4066 test $ac_status = 0; }
4067 if { ac_try='./conftest$ac_cv_exeext'
4068 { { case "(($ac_try" in
4069 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4070 *) ac_try_echo=$ac_try;;
4071esac
4072eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4073$as_echo "$ac_try_echo"; } >&5
4074 (eval "$ac_try") 2>&5
4075 ac_status=$?
4076 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4077 test $ac_status = 0; }; }; then
4078 cross_compiling=no
4079 else
4080 if test "$cross_compiling" = maybe; then
4081 cross_compiling=yes
4082 else
4083 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4084$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004085as_fn_error $? "cannot run C compiled programs.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004086If you meant to cross compile, use \`--host'.
Matthias Klose3cef2a92012-03-14 23:39:33 +01004087See \`config.log' for more details" "$LINENO" 5; }
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004088 fi
4089 fi
4090fi
4091{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
4092$as_echo "$cross_compiling" >&6; }
4093
4094rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
4095ac_clean_files=$ac_clean_files_save
4096{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
4097$as_echo_n "checking for suffix of object files... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01004098if ${ac_cv_objext+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004099 $as_echo_n "(cached) " >&6
4100else
4101 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004102/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004103
Martin v. Löwis11437992002-04-12 09:54:03 +00004104int
4105main ()
4106{
4107
4108 ;
4109 return 0;
4110}
4111_ACEOF
4112rm -f conftest.o conftest.obj
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004113if { { ac_try="$ac_compile"
Martin v. Löwiseba40652007-08-30 20:10:57 +00004114case "(($ac_try" in
4115 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4116 *) ac_try_echo=$ac_try;;
4117esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004118eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4119$as_echo "$ac_try_echo"; } >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00004120 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004121 ac_status=$?
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004122 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4123 test $ac_status = 0; }; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00004124 for ac_file in conftest.o conftest.obj conftest.*; do
4125 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00004126 case $ac_file in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004127 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004128 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4129 break;;
4130 esac
4131done
4132else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004133 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004134sed 's/^/| /' conftest.$ac_ext >&5
4135
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004136{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4137$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004138as_fn_error $? "cannot compute suffix of object files: cannot compile
Matthias Klose3cef2a92012-03-14 23:39:33 +01004139See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004140fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004141rm -f conftest.$ac_cv_objext conftest.$ac_ext
4142fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004143{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4144$as_echo "$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004145OBJEXT=$ac_cv_objext
4146ac_objext=$OBJEXT
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004147{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4148$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01004149if ${ac_cv_c_compiler_gnu+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004150 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004151else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004152 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004153/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004154
Martin v. Löwis11437992002-04-12 09:54:03 +00004155int
4156main ()
4157{
4158#ifndef __GNUC__
4159 choke me
4160#endif
4161
4162 ;
4163 return 0;
4164}
4165_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004166if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004167 ac_compiler_gnu=yes
4168else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004169 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00004170fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004171rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004172ac_cv_c_compiler_gnu=$ac_compiler_gnu
4173
4174fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004175{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4176$as_echo "$ac_cv_c_compiler_gnu" >&6; }
4177if test $ac_compiler_gnu = yes; then
4178 GCC=yes
4179else
4180 GCC=
4181fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004182ac_test_CFLAGS=${CFLAGS+set}
4183ac_save_CFLAGS=$CFLAGS
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004184{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4185$as_echo_n "checking whether $CC accepts -g... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01004186if ${ac_cv_prog_cc_g+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004187 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004188else
Martin v. Löwiseba40652007-08-30 20:10:57 +00004189 ac_save_c_werror_flag=$ac_c_werror_flag
4190 ac_c_werror_flag=yes
4191 ac_cv_prog_cc_g=no
4192 CFLAGS="-g"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004193 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004194/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004195
Martin v. Löwis11437992002-04-12 09:54:03 +00004196int
4197main ()
4198{
4199
4200 ;
4201 return 0;
4202}
4203_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004204if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumf78abae1997-01-21 22:02:36 +00004205 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004206else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004207 CFLAGS=""
4208 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +00004209/* end confdefs.h. */
4210
4211int
4212main ()
4213{
4214
4215 ;
4216 return 0;
4217}
4218_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004219if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00004220
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004221else
4222 ac_c_werror_flag=$ac_save_c_werror_flag
Martin v. Löwiseba40652007-08-30 20:10:57 +00004223 CFLAGS="-g"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004224 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +00004225/* end confdefs.h. */
4226
4227int
4228main ()
4229{
4230
4231 ;
4232 return 0;
4233}
4234_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004235if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00004236 ac_cv_prog_cc_g=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004237fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004238rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004239fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004240rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4241fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004242rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4243 ac_c_werror_flag=$ac_save_c_werror_flag
4244fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004245{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4246$as_echo "$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004247if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004248 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004249elif test $ac_cv_prog_cc_g = yes; then
4250 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00004251 CFLAGS="-g -O2"
4252 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004253 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004254 fi
4255else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004256 if test "$GCC" = yes; then
4257 CFLAGS="-O2"
4258 else
4259 CFLAGS=
4260 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004261fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004262{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4263$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01004264if ${ac_cv_prog_cc_c89+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004265 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004266else
Martin v. Löwiseba40652007-08-30 20:10:57 +00004267 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00004268ac_save_CC=$CC
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004269cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004270/* end confdefs.h. */
4271#include <stdarg.h>
4272#include <stdio.h>
Charles-François Natalibe2b9072013-01-08 19:47:00 +01004273struct stat;
Skip Montanaro6dead952003-09-25 14:50:04 +00004274/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4275struct buf { int x; };
4276FILE * (*rcsopen) (struct buf *, struct stat *, int);
4277static char *e (p, i)
4278 char **p;
4279 int i;
4280{
4281 return p[i];
4282}
4283static char *f (char * (*g) (char **, int), char **p, ...)
4284{
4285 char *s;
4286 va_list v;
4287 va_start (v,p);
4288 s = g (p, va_arg (v,int));
4289 va_end (v);
4290 return s;
4291}
Skip Montanarof0d5f792004-08-15 14:08:23 +00004292
4293/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
4294 function prototypes and stuff, but not '\xHH' hex character constants.
4295 These don't provoke an error unfortunately, instead are silently treated
Martin v. Löwiseba40652007-08-30 20:10:57 +00004296 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00004297 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
4298 array size at least. It's necessary to write '\x00'==0 to get something
Martin v. Löwiseba40652007-08-30 20:10:57 +00004299 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00004300int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4301
Martin v. Löwiseba40652007-08-30 20:10:57 +00004302/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4303 inside strings and character constants. */
4304#define FOO(x) 'x'
4305int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4306
Skip Montanaro6dead952003-09-25 14:50:04 +00004307int test (int i, double x);
4308struct s1 {int (*f) (int a);};
4309struct s2 {int (*f) (double a);};
4310int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4311int argc;
4312char **argv;
4313int
4314main ()
4315{
4316return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4317 ;
4318 return 0;
4319}
4320_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00004321for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4322 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00004323do
4324 CC="$ac_save_CC $ac_arg"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004325 if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00004326 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00004327fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004328rm -f core conftest.err conftest.$ac_objext
4329 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00004330done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004331rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004332CC=$ac_save_CC
4333
4334fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004335# AC_CACHE_VAL
4336case "x$ac_cv_prog_cc_c89" in
4337 x)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004338 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4339$as_echo "none needed" >&6; } ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00004340 xno)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004341 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4342$as_echo "unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004343 *)
Martin v. Löwiseba40652007-08-30 20:10:57 +00004344 CC="$CC $ac_cv_prog_cc_c89"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004345 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4346$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004347esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004348if test "x$ac_cv_prog_cc_c89" != xno; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004349
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004350fi
Skip Montanaro6dead952003-09-25 14:50:04 +00004351
Martin v. Löwis11437992002-04-12 09:54:03 +00004352ac_ext=c
4353ac_cpp='$CPP $CPPFLAGS'
4354ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4355ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4356ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004357
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00004358if test ! -z "$preset_cflags"
4359then
4360 CFLAGS=$preset_cflags
4361fi
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004362
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004363
4364
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004365{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-cxx-main=<compiler>" >&5
4366$as_echo_n "checking for --with-cxx-main=<compiler>... " >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004367
Martin v. Löwiseba40652007-08-30 20:10:57 +00004368# Check whether --with-cxx_main was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004369if test "${with_cxx_main+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00004370 withval=$with_cxx_main;
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004371
4372 case $withval in
4373 no) with_cxx_main=no
4374 MAINCC='$(CC)';;
4375 yes) with_cxx_main=yes
4376 MAINCC='$(CXX)';;
4377 *) with_cxx_main=yes
4378 MAINCC=$withval
4379 if test -z "$CXX"
4380 then
4381 CXX=$withval
4382 fi;;
4383 esac
4384else
4385
4386 with_cxx_main=no
4387 MAINCC='$(CC)'
4388
Martin v. Löwiseba40652007-08-30 20:10:57 +00004389fi
4390
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004391{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_cxx_main" >&5
4392$as_echo "$with_cxx_main" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004393
4394preset_cxx="$CXX"
4395if test -z "$CXX"
4396then
4397 case "$CC" in
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004398 gcc) if test -n "$ac_tool_prefix"; then
4399 # Extract the first word of "${ac_tool_prefix}g++", so it can be a program name with args.
4400set dummy ${ac_tool_prefix}g++; ac_word=$2
4401{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4402$as_echo_n "checking for $ac_word... " >&6; }
4403if ${ac_cv_path_CXX+:} false; then :
4404 $as_echo_n "(cached) " >&6
4405else
4406 case $CXX in
4407 [\\/]* | ?:[\\/]*)
4408 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4409 ;;
4410 *)
4411 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4412for as_dir in notfound
4413do
4414 IFS=$as_save_IFS
4415 test -z "$as_dir" && as_dir=.
4416 for ac_exec_ext in '' $ac_executable_extensions; do
4417 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4418 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4419 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4420 break 2
4421 fi
4422done
4423 done
4424IFS=$as_save_IFS
4425
4426 ;;
4427esac
4428fi
4429CXX=$ac_cv_path_CXX
4430if test -n "$CXX"; then
4431 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4432$as_echo "$CXX" >&6; }
4433else
4434 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4435$as_echo "no" >&6; }
4436fi
4437
4438
4439fi
4440if test -z "$ac_cv_path_CXX"; then
4441 ac_pt_CXX=$CXX
4442 # Extract the first word of "g++", so it can be a program name with args.
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004443set dummy g++; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004444{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4445$as_echo_n "checking for $ac_word... " >&6; }
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004446if ${ac_cv_path_ac_pt_CXX+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004447 $as_echo_n "(cached) " >&6
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004448else
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004449 case $ac_pt_CXX in
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004450 [\\/]* | ?:[\\/]*)
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004451 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 +00004452 ;;
4453 *)
4454 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4455for as_dir in notfound
4456do
4457 IFS=$as_save_IFS
4458 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004459 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01004460 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004461 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004462 $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 +00004463 break 2
4464 fi
4465done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004466 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004467IFS=$as_save_IFS
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004468
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004469 ;;
4470esac
4471fi
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004472ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4473if test -n "$ac_pt_CXX"; then
4474 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4475$as_echo "$ac_pt_CXX" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00004476else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004477 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4478$as_echo "no" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00004479fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004480
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004481 if test "x$ac_pt_CXX" = x; then
4482 CXX="g++"
4483 else
4484 case $cross_compiling:$ac_tool_warned in
4485yes:)
4486{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4487$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4488ac_tool_warned=yes ;;
4489esac
4490 CXX=$ac_pt_CXX
4491 fi
4492else
4493 CXX="$ac_cv_path_CXX"
4494fi
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004495 ;;
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004496 cc) if test -n "$ac_tool_prefix"; then
4497 # Extract the first word of "${ac_tool_prefix}c++", so it can be a program name with args.
4498set dummy ${ac_tool_prefix}c++; 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; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01004501if ${ac_cv_path_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
4504 case $CXX in
4505 [\\/]* | ?:[\\/]*)
4506 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4507 ;;
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
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004516 ac_cv_path_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
4527CXX=$ac_cv_path_CXX
Skip Montanaro89e975f2007-08-22 19:05:21 +00004528if test -n "$CXX"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004529 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4530$as_echo "$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
4537fi
4538if test -z "$ac_cv_path_CXX"; then
4539 ac_pt_CXX=$CXX
4540 # Extract the first word of "c++", so it can be a program name with args.
4541set dummy c++; ac_word=$2
4542{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4543$as_echo_n "checking for $ac_word... " >&6; }
4544if ${ac_cv_path_ac_pt_CXX+:} false; then :
4545 $as_echo_n "(cached) " >&6
4546else
4547 case $ac_pt_CXX in
4548 [\\/]* | ?:[\\/]*)
4549 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4550 ;;
4551 *)
4552 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4553for as_dir in notfound
4554do
4555 IFS=$as_save_IFS
4556 test -z "$as_dir" && as_dir=.
4557 for ac_exec_ext in '' $ac_executable_extensions; do
4558 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4559 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4560 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4561 break 2
4562 fi
4563done
4564 done
4565IFS=$as_save_IFS
4566
4567 ;;
4568esac
4569fi
4570ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4571if test -n "$ac_pt_CXX"; then
4572 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4573$as_echo "$ac_pt_CXX" >&6; }
4574else
4575 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4576$as_echo "no" >&6; }
4577fi
4578
4579 if test "x$ac_pt_CXX" = x; then
4580 CXX="c++"
4581 else
4582 case $cross_compiling:$ac_tool_warned in
4583yes:)
4584{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4585$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4586ac_tool_warned=yes ;;
4587esac
4588 CXX=$ac_pt_CXX
4589 fi
4590else
4591 CXX="$ac_cv_path_CXX"
4592fi
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004593 ;;
4594 esac
4595 if test "$CXX" = "notfound"
4596 then
4597 CXX=""
4598 fi
4599fi
4600if test -z "$CXX"
4601then
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004602 if test -n "$ac_tool_prefix"; then
4603 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
4604 do
4605 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4606set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004607{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4608$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01004609if ${ac_cv_prog_CXX+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004610 $as_echo_n "(cached) " >&6
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004611else
4612 if test -n "$CXX"; then
4613 ac_cv_prog_CXX="$CXX" # Let the user override the test.
4614else
4615as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4616for as_dir in $PATH
4617do
4618 IFS=$as_save_IFS
4619 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004620 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01004621 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004622 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004623 $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 +00004624 break 2
4625 fi
4626done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004627 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004628IFS=$as_save_IFS
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004629
4630fi
4631fi
4632CXX=$ac_cv_prog_CXX
4633if test -n "$CXX"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004634 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4635$as_echo "$CXX" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004636else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004637 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4638$as_echo "no" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004639fi
4640
Martin v. Löwiseba40652007-08-30 20:10:57 +00004641
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004642 test -n "$CXX" && break
4643 done
4644fi
4645if test -z "$CXX"; then
4646 ac_ct_CXX=$CXX
4647 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
4648do
4649 # Extract the first word of "$ac_prog", so it can be a program name with args.
4650set dummy $ac_prog; ac_word=$2
4651{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4652$as_echo_n "checking for $ac_word... " >&6; }
4653if ${ac_cv_prog_ac_ct_CXX+:} false; then :
4654 $as_echo_n "(cached) " >&6
4655else
4656 if test -n "$ac_ct_CXX"; then
4657 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
4658else
4659as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4660for as_dir in $PATH
4661do
4662 IFS=$as_save_IFS
4663 test -z "$as_dir" && as_dir=.
4664 for ac_exec_ext in '' $ac_executable_extensions; do
4665 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4666 ac_cv_prog_ac_ct_CXX="$ac_prog"
4667 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4668 break 2
4669 fi
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004670done
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004671 done
4672IFS=$as_save_IFS
4673
4674fi
4675fi
4676ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
4677if test -n "$ac_ct_CXX"; then
4678 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
4679$as_echo "$ac_ct_CXX" >&6; }
4680else
4681 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4682$as_echo "no" >&6; }
4683fi
4684
4685
4686 test -n "$ac_ct_CXX" && break
4687done
4688
4689 if test "x$ac_ct_CXX" = x; then
4690 CXX="notfound"
4691 else
4692 case $cross_compiling:$ac_tool_warned in
4693yes:)
4694{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4695$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4696ac_tool_warned=yes ;;
4697esac
4698 CXX=$ac_ct_CXX
4699 fi
4700fi
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004701
4702 if test "$CXX" = "notfound"
4703 then
4704 CXX=""
4705 fi
4706fi
4707if test "$preset_cxx" != "$CXX"
4708then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004709 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004710
4711 By default, distutils will build C++ extension modules with \"$CXX\".
4712 If this is not intended, then set CXX on the configure command line.
4713 " >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004714$as_echo "$as_me: WARNING:
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004715
4716 By default, distutils will build C++ extension modules with \"$CXX\".
4717 If this is not intended, then set CXX on the configure command line.
4718 " >&2;}
4719fi
4720
doko@python.org4e63fbe2013-01-25 13:08:27 +01004721MULTIARCH=$($CC --print-multiarch 2>/dev/null)
4722
4723
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004724
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004725# checks for UNIX variants that set C preprocessor variables
Martin v. Löwis11437992002-04-12 09:54:03 +00004726
4727ac_ext=c
4728ac_cpp='$CPP $CPPFLAGS'
4729ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4730ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4731ac_compiler_gnu=$ac_cv_c_compiler_gnu
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004732{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4733$as_echo_n "checking how to run the C preprocessor... " >&6; }
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004734# On Suns, sometimes $CPP names a directory.
4735if test -n "$CPP" && test -d "$CPP"; then
4736 CPP=
4737fi
4738if test -z "$CPP"; then
Matthias Klose3cef2a92012-03-14 23:39:33 +01004739 if ${ac_cv_prog_CPP+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004740 $as_echo_n "(cached) " >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004741else
Martin v. Löwis11437992002-04-12 09:54:03 +00004742 # Double quotes because CPP needs to be expanded
4743 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4744 do
4745 ac_preproc_ok=false
4746for ac_c_preproc_warn_flag in '' yes
4747do
4748 # Use a header file that comes with gcc, so configuring glibc
4749 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00004750 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4751 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004752 # On the NeXT, cc -E runs the code through the compiler's parser,
Martin v. Löwis11437992002-04-12 09:54:03 +00004753 # not just through cpp. "Syntax error" is here to catch this case.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004754 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004755/* end confdefs.h. */
4756#ifdef __STDC__
4757# include <limits.h>
4758#else
4759# include <assert.h>
4760#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00004761 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00004762_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004763if ac_fn_c_try_cpp "$LINENO"; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004764
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004765else
Martin v. Löwis11437992002-04-12 09:54:03 +00004766 # Broken: fails on valid input.
4767continue
Jack Jansendd19cf82001-12-06 22:36:17 +00004768fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004769rm -f conftest.err conftest.i conftest.$ac_ext
Jack Jansendd19cf82001-12-06 22:36:17 +00004770
Martin v. Löwiseba40652007-08-30 20:10:57 +00004771 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00004772 # can be detected and how.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004773 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004774/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004775#include <ac_nonexistent.h>
4776_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004777if ac_fn_c_try_cpp "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004778 # Broken: success on invalid input.
4779continue
4780else
Martin v. Löwis11437992002-04-12 09:54:03 +00004781 # Passes both tests.
4782ac_preproc_ok=:
4783break
4784fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004785rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004786
4787done
4788# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004789rm -f conftest.i conftest.err conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004790if $ac_preproc_ok; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004791 break
4792fi
4793
4794 done
4795 ac_cv_prog_CPP=$CPP
4796
4797fi
4798 CPP=$ac_cv_prog_CPP
4799else
4800 ac_cv_prog_CPP=$CPP
4801fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004802{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4803$as_echo "$CPP" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004804ac_preproc_ok=false
4805for ac_c_preproc_warn_flag in '' yes
4806do
4807 # Use a header file that comes with gcc, so configuring glibc
4808 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00004809 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4810 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis11437992002-04-12 09:54:03 +00004811 # On the NeXT, cc -E runs the code through the compiler's parser,
4812 # not just through cpp. "Syntax error" is here to catch this case.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004813 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004814/* end confdefs.h. */
4815#ifdef __STDC__
4816# include <limits.h>
4817#else
4818# include <assert.h>
4819#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00004820 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00004821_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004822if ac_fn_c_try_cpp "$LINENO"; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004823
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004824else
Martin v. Löwis11437992002-04-12 09:54:03 +00004825 # Broken: fails on valid input.
4826continue
4827fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004828rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004829
Martin v. Löwiseba40652007-08-30 20:10:57 +00004830 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00004831 # can be detected and how.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004832 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004833/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004834#include <ac_nonexistent.h>
4835_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004836if ac_fn_c_try_cpp "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004837 # Broken: success on invalid input.
4838continue
4839else
Martin v. Löwis11437992002-04-12 09:54:03 +00004840 # Passes both tests.
4841ac_preproc_ok=:
4842break
4843fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004844rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004845
4846done
4847# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004848rm -f conftest.i conftest.err conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004849if $ac_preproc_ok; then :
4850
Martin v. Löwis11437992002-04-12 09:54:03 +00004851else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004852 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4853$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004854as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
Matthias Klose3cef2a92012-03-14 23:39:33 +01004855See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004856fi
4857
4858ac_ext=c
4859ac_cpp='$CPP $CPPFLAGS'
4860ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4861ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4862ac_compiler_gnu=$ac_cv_c_compiler_gnu
4863
4864
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004865{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4866$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01004867if ${ac_cv_path_GREP+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004868 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004869else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004870 if test -z "$GREP"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00004871 ac_path_GREP_found=false
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004872 # Loop through the user's path and test for each of PROGNAME-LIST
4873 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwiseba40652007-08-30 20:10:57 +00004874for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4875do
4876 IFS=$as_save_IFS
4877 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004878 for ac_prog in grep ggrep; do
4879 for ac_exec_ext in '' $ac_executable_extensions; do
4880 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
Charles-François Natalibe2b9072013-01-08 19:47:00 +01004881 as_fn_executable_p "$ac_path_GREP" || continue
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004882# Check for GNU ac_path_GREP and select it if it is found.
Martin v. Löwiseba40652007-08-30 20:10:57 +00004883 # Check for GNU $ac_path_GREP
4884case `"$ac_path_GREP" --version 2>&1` in
4885*GNU*)
4886 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4887*)
4888 ac_count=0
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004889 $as_echo_n 0123456789 >"conftest.in"
Martin v. Löwiseba40652007-08-30 20:10:57 +00004890 while :
4891 do
4892 cat "conftest.in" "conftest.in" >"conftest.tmp"
4893 mv "conftest.tmp" "conftest.in"
4894 cp "conftest.in" "conftest.nl"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004895 $as_echo 'GREP' >> "conftest.nl"
Martin v. Löwiseba40652007-08-30 20:10:57 +00004896 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4897 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004898 as_fn_arith $ac_count + 1 && ac_count=$as_val
Martin v. Löwiseba40652007-08-30 20:10:57 +00004899 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4900 # Best one so far, save it but keep looking for a better one
4901 ac_cv_path_GREP="$ac_path_GREP"
4902 ac_path_GREP_max=$ac_count
Skip Montanaro6dead952003-09-25 14:50:04 +00004903 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004904 # 10*(2^10) chars as input seems more than enough
4905 test $ac_count -gt 10 && break
4906 done
4907 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4908esac
4909
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004910 $ac_path_GREP_found && break 3
4911 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004912 done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004913 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004914IFS=$as_save_IFS
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004915 if test -z "$ac_cv_path_GREP"; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004916 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 +00004917 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004918else
4919 ac_cv_path_GREP=$GREP
4920fi
4921
Martin v. Löwiseba40652007-08-30 20:10:57 +00004922fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004923{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4924$as_echo "$ac_cv_path_GREP" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00004925 GREP="$ac_cv_path_GREP"
4926
4927
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004928{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
4929$as_echo_n "checking for egrep... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01004930if ${ac_cv_path_EGREP+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004931 $as_echo_n "(cached) " >&6
Martin v. Löwiseba40652007-08-30 20:10:57 +00004932else
4933 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
4934 then ac_cv_path_EGREP="$GREP -E"
4935 else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004936 if test -z "$EGREP"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00004937 ac_path_EGREP_found=false
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004938 # Loop through the user's path and test for each of PROGNAME-LIST
4939 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwiseba40652007-08-30 20:10:57 +00004940for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4941do
4942 IFS=$as_save_IFS
4943 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004944 for ac_prog in egrep; do
4945 for ac_exec_ext in '' $ac_executable_extensions; do
4946 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
Charles-François Natalibe2b9072013-01-08 19:47:00 +01004947 as_fn_executable_p "$ac_path_EGREP" || continue
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004948# Check for GNU ac_path_EGREP and select it if it is found.
Martin v. Löwiseba40652007-08-30 20:10:57 +00004949 # Check for GNU $ac_path_EGREP
4950case `"$ac_path_EGREP" --version 2>&1` in
4951*GNU*)
4952 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
4953*)
4954 ac_count=0
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004955 $as_echo_n 0123456789 >"conftest.in"
Martin v. Löwiseba40652007-08-30 20:10:57 +00004956 while :
4957 do
4958 cat "conftest.in" "conftest.in" >"conftest.tmp"
4959 mv "conftest.tmp" "conftest.in"
4960 cp "conftest.in" "conftest.nl"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004961 $as_echo 'EGREP' >> "conftest.nl"
Martin v. Löwiseba40652007-08-30 20:10:57 +00004962 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4963 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004964 as_fn_arith $ac_count + 1 && ac_count=$as_val
Martin v. Löwiseba40652007-08-30 20:10:57 +00004965 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
4966 # Best one so far, save it but keep looking for a better one
4967 ac_cv_path_EGREP="$ac_path_EGREP"
4968 ac_path_EGREP_max=$ac_count
4969 fi
4970 # 10*(2^10) chars as input seems more than enough
4971 test $ac_count -gt 10 && break
4972 done
4973 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4974esac
4975
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004976 $ac_path_EGREP_found && break 3
4977 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004978 done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004979 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004980IFS=$as_save_IFS
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004981 if test -z "$ac_cv_path_EGREP"; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004982 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 +00004983 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004984else
4985 ac_cv_path_EGREP=$EGREP
4986fi
4987
Martin v. Löwiseba40652007-08-30 20:10:57 +00004988 fi
4989fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004990{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
4991$as_echo "$ac_cv_path_EGREP" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00004992 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00004993
4994
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004995{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
4996$as_echo_n "checking for ANSI C header files... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01004997if ${ac_cv_header_stdc+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004998 $as_echo_n "(cached) " >&6
4999else
5000 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitrouf2caeed2009-05-24 20:23:57 +00005001/* end confdefs.h. */
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005002#include <stdlib.h>
5003#include <stdarg.h>
5004#include <string.h>
5005#include <float.h>
5006
5007int
5008main ()
5009{
5010
5011 ;
5012 return 0;
5013}
5014_ACEOF
5015if ac_fn_c_try_compile "$LINENO"; then :
5016 ac_cv_header_stdc=yes
5017else
5018 ac_cv_header_stdc=no
5019fi
5020rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5021
5022if test $ac_cv_header_stdc = yes; then
5023 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5024 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5025/* end confdefs.h. */
5026#include <string.h>
Antoine Pitrouf2caeed2009-05-24 20:23:57 +00005027
Antoine Pitrouf2caeed2009-05-24 20:23:57 +00005028_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005029if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005030 $EGREP "memchr" >/dev/null 2>&1; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005031
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005032else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005033 ac_cv_header_stdc=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005034fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00005035rm -f conftest*
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005036
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005037fi
5038
5039if test $ac_cv_header_stdc = yes; then
5040 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5041 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5042/* end confdefs.h. */
5043#include <stdlib.h>
5044
5045_ACEOF
5046if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5047 $EGREP "free" >/dev/null 2>&1; then :
5048
5049else
5050 ac_cv_header_stdc=no
5051fi
5052rm -f conftest*
5053
5054fi
5055
5056if test $ac_cv_header_stdc = yes; then
5057 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5058 if test "$cross_compiling" = yes; then :
5059 :
5060else
5061 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5062/* end confdefs.h. */
5063#include <ctype.h>
5064#include <stdlib.h>
5065#if ((' ' & 0x0FF) == 0x020)
5066# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5067# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5068#else
5069# define ISLOWER(c) \
5070 (('a' <= (c) && (c) <= 'i') \
5071 || ('j' <= (c) && (c) <= 'r') \
5072 || ('s' <= (c) && (c) <= 'z'))
5073# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5074#endif
5075
5076#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5077int
5078main ()
5079{
5080 int i;
5081 for (i = 0; i < 256; i++)
5082 if (XOR (islower (i), ISLOWER (i))
5083 || toupper (i) != TOUPPER (i))
5084 return 2;
5085 return 0;
5086}
5087_ACEOF
5088if ac_fn_c_try_run "$LINENO"; then :
5089
5090else
5091 ac_cv_header_stdc=no
5092fi
5093rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5094 conftest.$ac_objext conftest.beam conftest.$ac_ext
5095fi
5096
5097fi
5098fi
5099{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
5100$as_echo "$ac_cv_header_stdc" >&6; }
5101if test $ac_cv_header_stdc = yes; then
5102
5103$as_echo "#define STDC_HEADERS 1" >>confdefs.h
5104
5105fi
5106
5107# On IRIX 5.3, sys/types and inttypes.h are conflicting.
5108for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
5109 inttypes.h stdint.h unistd.h
5110do :
5111 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
5112ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
5113"
Georg Brandl71f4fbb2011-02-25 11:04:50 +00005114if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005115 cat >>confdefs.h <<_ACEOF
5116#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
5117_ACEOF
5118
5119fi
5120
5121done
5122
5123
5124
5125 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 +01005126if test "x$ac_cv_header_minix_config_h" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005127 MINIX=yes
5128else
5129 MINIX=
5130fi
5131
5132
5133 if test "$MINIX" = yes; then
5134
5135$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
5136
5137
5138$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
5139
5140
5141$as_echo "#define _MINIX 1" >>confdefs.h
5142
5143 fi
5144
5145
5146 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
5147$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01005148if ${ac_cv_safe_to_define___extensions__+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005149 $as_echo_n "(cached) " >&6
5150else
5151 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5152/* end confdefs.h. */
5153
Charles-François Natalibe2b9072013-01-08 19:47:00 +01005154# define __EXTENSIONS__ 1
5155 $ac_includes_default
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005156int
5157main ()
5158{
5159
5160 ;
5161 return 0;
5162}
5163_ACEOF
5164if ac_fn_c_try_compile "$LINENO"; then :
5165 ac_cv_safe_to_define___extensions__=yes
5166else
5167 ac_cv_safe_to_define___extensions__=no
5168fi
5169rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5170fi
5171{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
5172$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
5173 test $ac_cv_safe_to_define___extensions__ = yes &&
5174 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
5175
5176 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
5177
5178 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
5179
5180 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
5181
5182 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
5183
5184
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005185
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005186# Check for unsupported systems
5187case $ac_sys_system/$ac_sys_release in
5188atheos*|Linux*/1*)
5189 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
5190 echo See README for details.
5191 exit 1;;
5192esac
5193
5194
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005195{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-suffix" >&5
5196$as_echo_n "checking for --with-suffix... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005197
5198# Check whether --with-suffix was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005199if test "${with_suffix+set}" = set; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005200 withval=$with_suffix;
5201 case $withval in
5202 no) EXEEXT=;;
5203 yes) EXEEXT=.exe;;
5204 *) EXEEXT=$withval;;
5205 esac
5206fi
5207
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005208{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXEEXT" >&5
5209$as_echo "$EXEEXT" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005210
5211# Test whether we're running on a non-case-sensitive system, in which
5212# case we give a warning if no ext is given
5213
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005214{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for case-insensitive build directory" >&5
5215$as_echo_n "checking for case-insensitive build directory... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005216if test ! -d CaseSensitiveTestDir; then
5217mkdir CaseSensitiveTestDir
5218fi
5219
5220if test -d casesensitivetestdir
5221then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005222 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5223$as_echo "yes" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005224 BUILDEXEEXT=.exe
5225else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005226 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5227$as_echo "no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005228 BUILDEXEEXT=$EXEEXT
5229fi
5230rmdir CaseSensitiveTestDir
5231
5232case $MACHDEP in
5233bsdos*)
5234 case $CC in
5235 gcc) CC="$CC -D_HAVE_BSDI";;
5236 esac;;
5237esac
5238
5239case $ac_sys_system in
5240hp*|HP*)
5241 case $CC in
5242 cc|*/cc) CC="$CC -Ae";;
5243 esac;;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005244SunOS*)
5245 # Some functions have a prototype only with that define, e.g. confstr
5246
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005247$as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005248
5249 ;;
5250esac
5251
5252
5253
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005254{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBRARY" >&5
5255$as_echo_n "checking LIBRARY... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005256if test -z "$LIBRARY"
5257then
5258 LIBRARY='libpython$(VERSION).a'
5259fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005260{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBRARY" >&5
5261$as_echo "$LIBRARY" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005262
5263# LDLIBRARY is the name of the library to link against (as opposed to the
5264# name of the library into which to insert object files). BLDLIBRARY is also
5265# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
5266# is blank as the main program is not linked directly against LDLIBRARY.
5267# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
5268# systems without shared libraries, LDLIBRARY is the same as LIBRARY
5269# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
5270# DLLLIBRARY is the shared (i.e., DLL) library.
5271#
5272# RUNSHARED is used to run shared python without installed libraries
5273#
5274# INSTSONAME is the name of the shared library that will be use to install
5275# on the system - some systems like version suffix, others don't
5276
5277
5278
5279
5280
5281
5282LDLIBRARY="$LIBRARY"
5283BLDLIBRARY='$(LDLIBRARY)'
5284INSTSONAME='$(LDLIBRARY)'
5285DLLLIBRARY=''
5286LDLIBRARYDIR=''
5287RUNSHARED=''
5288
5289# LINKCC is the command that links the python executable -- default is $(CC).
5290# If CXX is set, and if it is needed to link a main function that was
5291# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
5292# python might then depend on the C++ runtime
5293# This is altered for AIX in order to build the export list before
5294# linking.
5295
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005296{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKCC" >&5
5297$as_echo_n "checking LINKCC... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005298if test -z "$LINKCC"
5299then
5300 LINKCC='$(PURIFY) $(MAINCC)'
5301 case $ac_sys_system in
5302 AIX*)
5303 exp_extra="\"\""
5304 if test $ac_sys_release -ge 5 -o \
5305 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
5306 exp_extra="."
5307 fi
5308 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005309 QNX*)
5310 # qcc must be used because the other compilers do not
5311 # support -N.
5312 LINKCC=qcc;;
5313 esac
5314fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005315{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKCC" >&5
5316$as_echo "$LINKCC" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005317
5318# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
5319# make sure we default having it set to "no": this is used by
5320# distutils.unixccompiler to know if it should add --enable-new-dtags
5321# to linker command lines, and failing to detect GNU ld simply results
5322# in the same bahaviour as before.
5323
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005324{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
5325$as_echo_n "checking for GNU ld... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005326ac_prog=ld
5327if test "$GCC" = yes; then
5328 ac_prog=`$CC -print-prog-name=ld`
5329fi
5330case `"$ac_prog" -V 2>&1 < /dev/null` in
5331 *GNU*)
5332 GNULD=yes;;
5333 *)
5334 GNULD=no;;
5335esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005336{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNULD" >&5
5337$as_echo "$GNULD" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005338
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005339{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-shared" >&5
5340$as_echo_n "checking for --enable-shared... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005341# Check whether --enable-shared was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005342if test "${enable_shared+set}" = set; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005343 enableval=$enable_shared;
5344fi
5345
5346
5347if test -z "$enable_shared"
5348then
5349 case $ac_sys_system in
5350 CYGWIN* | atheos*)
5351 enable_shared="yes";;
5352 *)
5353 enable_shared="no";;
5354 esac
5355fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005356{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
5357$as_echo "$enable_shared" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005358
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005359{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-profiling" >&5
5360$as_echo_n "checking for --enable-profiling... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005361# Check whether --enable-profiling was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005362if test "${enable_profiling+set}" = set; then :
doko@python.orgd65e2ba2013-01-31 23:52:03 +01005363 enableval=$enable_profiling;
5364fi
5365
5366if test "x$enable_profiling" = xyes; then
5367 ac_save_cc="$CC"
Benjamin Petersonb9be7bb2013-03-26 08:55:37 -04005368 CC="$CC -pg"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005369 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005370/* end confdefs.h. */
5371int main() { return 0; }
5372_ACEOF
doko@python.orgd65e2ba2013-01-31 23:52:03 +01005373if ac_fn_c_try_link "$LINENO"; then :
5374
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005375else
doko@python.orgd65e2ba2013-01-31 23:52:03 +01005376 enable_profiling=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005377fi
doko@python.orgd65e2ba2013-01-31 23:52:03 +01005378rm -f core conftest.err conftest.$ac_objext \
5379 conftest$ac_exeext conftest.$ac_ext
5380 CC="$ac_save_cc"
5381else
5382 enable_profiling=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005383fi
doko@python.orgd65e2ba2013-01-31 23:52:03 +01005384{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_profiling" >&5
5385$as_echo "$enable_profiling" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005386
doko@python.orgd65e2ba2013-01-31 23:52:03 +01005387if test "x$enable_profiling" = xyes; then
5388 BASECFLAGS="-pg $BASECFLAGS"
5389 LDFLAGS="-pg $LDFLAGS"
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005390fi
5391
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005392{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDLIBRARY" >&5
5393$as_echo_n "checking LDLIBRARY... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005394
5395# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
5396# library that we build, but we do not want to link against it (we
5397# will find it with a -framework option). For this reason there is an
5398# extra variable BLDLIBRARY against which Python and the extension
5399# modules are linked, BLDLIBRARY. This is normally the same as
5400# LDLIBRARY, but empty for MacOSX framework builds.
5401if test "$enable_framework"
5402then
5403 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
doko@ubuntu.com9ba90c92014-05-07 04:41:26 +02005404 RUNSHARED=DYLD_FRAMEWORK_PATH=`pwd`${DYLD_FRAMEWORK_PATH:+:${DYLD_FRAMEWORK_PATH}}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005405 BLDLIBRARY=''
5406else
5407 BLDLIBRARY='$(LDLIBRARY)'
5408fi
5409
5410# Other platforms follow
5411if test $enable_shared = "yes"; then
5412
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005413$as_echo "#define Py_ENABLE_SHARED 1" >>confdefs.h
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005414
5415 case $ac_sys_system in
5416 BeOS*)
5417 LDLIBRARY='libpython$(VERSION).so'
5418 ;;
5419 CYGWIN*)
5420 LDLIBRARY='libpython$(VERSION).dll.a'
5421 DLLLIBRARY='libpython$(VERSION).dll'
5422 ;;
5423 SunOS*)
5424 LDLIBRARY='libpython$(VERSION).so'
5425 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(VERSION)'
doko@ubuntu.com9ba90c92014-05-07 04:41:26 +02005426 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005427 INSTSONAME="$LDLIBRARY".$SOVERSION
5428 ;;
Charles-François Natali3de8c732011-07-24 22:33:35 +02005429 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*|OpenBSD*)
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005430 LDLIBRARY='libpython$(VERSION).so'
5431 BLDLIBRARY='-L. -lpython$(VERSION)'
doko@ubuntu.com9ba90c92014-05-07 04:41:26 +02005432 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005433 case $ac_sys_system in
5434 FreeBSD*)
5435 SOVERSION=`echo $SOVERSION|cut -d "." -f 1`
5436 ;;
5437 esac
5438 INSTSONAME="$LDLIBRARY".$SOVERSION
5439 ;;
5440 hp*|HP*)
5441 case `uname -m` in
5442 ia64)
5443 LDLIBRARY='libpython$(VERSION).so'
5444 ;;
5445 *)
5446 LDLIBRARY='libpython$(VERSION).sl'
5447 ;;
5448 esac
5449 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(VERSION)'
doko@ubuntu.com9ba90c92014-05-07 04:41:26 +02005450 RUNSHARED=SHLIB_PATH=`pwd`${SHLIB_PATH:+:${SHLIB_PATH}}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005451 ;;
5452 OSF*)
5453 LDLIBRARY='libpython$(VERSION).so'
5454 BLDLIBRARY='-rpath $(LIBDIR) -L. -lpython$(VERSION)'
doko@ubuntu.com9ba90c92014-05-07 04:41:26 +02005455 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005456 ;;
5457 atheos*)
5458 LDLIBRARY='libpython$(VERSION).so'
5459 BLDLIBRARY='-L. -lpython$(VERSION)'
5460 RUNSHARED=DLL_PATH=`pwd`:${DLL_PATH:-/atheos/sys/libs:/atheos/autolnk/lib}
5461 ;;
5462 Darwin*)
5463 LDLIBRARY='libpython$(VERSION).dylib'
5464 BLDLIBRARY='-L. -lpython$(VERSION)'
doko@ubuntu.com9ba90c92014-05-07 04:41:26 +02005465 RUNSHARED=DYLD_LIBRARY_PATH=`pwd`${DYLD_LIBRARY_PATH:+:${DYLD_LIBRARY_PATH}}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005466 ;;
Antoine Pitrouaabdceb2010-09-10 20:03:17 +00005467 AIX*)
5468 LDLIBRARY='libpython$(VERSION).so'
doko@ubuntu.com9ba90c92014-05-07 04:41:26 +02005469 RUNSHARED=LIBPATH=`pwd`${LIBPATH:+:${LIBPATH}}
Antoine Pitrouaabdceb2010-09-10 20:03:17 +00005470 ;;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005471
5472 esac
5473else # shared is disabled
5474 case $ac_sys_system in
5475 CYGWIN*)
5476 BLDLIBRARY='$(LIBRARY)'
5477 LDLIBRARY='libpython$(VERSION).dll.a'
5478 ;;
5479 esac
5480fi
5481
doko@python.orgd65e2ba2013-01-31 23:52:03 +01005482if test "$cross_compiling" = yes; then
5483 RUNSHARED=
5484fi
5485
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005486{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDLIBRARY" >&5
5487$as_echo "$LDLIBRARY" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005488
5489if test -n "$ac_tool_prefix"; then
5490 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
5491set dummy ${ac_tool_prefix}ranlib; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005492{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5493$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01005494if ${ac_cv_prog_RANLIB+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005495 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005496else
5497 if test -n "$RANLIB"; then
5498 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
5499else
5500as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5501for as_dir in $PATH
5502do
5503 IFS=$as_save_IFS
5504 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005505 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01005506 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005507 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005508 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005509 break 2
5510 fi
5511done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005512 done
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005513IFS=$as_save_IFS
5514
5515fi
5516fi
5517RANLIB=$ac_cv_prog_RANLIB
5518if test -n "$RANLIB"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005519 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
5520$as_echo "$RANLIB" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005521else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005522 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5523$as_echo "no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005524fi
5525
5526
5527fi
5528if test -z "$ac_cv_prog_RANLIB"; then
5529 ac_ct_RANLIB=$RANLIB
5530 # Extract the first word of "ranlib", so it can be a program name with args.
5531set dummy ranlib; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005532{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5533$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01005534if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005535 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005536else
5537 if test -n "$ac_ct_RANLIB"; then
5538 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
5539else
5540as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5541for as_dir in $PATH
5542do
5543 IFS=$as_save_IFS
5544 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005545 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01005546 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005547 ac_cv_prog_ac_ct_RANLIB="ranlib"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005548 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005549 break 2
5550 fi
5551done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005552 done
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005553IFS=$as_save_IFS
5554
5555fi
5556fi
5557ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
5558if test -n "$ac_ct_RANLIB"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005559 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
5560$as_echo "$ac_ct_RANLIB" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005561else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005562 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5563$as_echo "no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005564fi
5565
5566 if test "x$ac_ct_RANLIB" = x; then
5567 RANLIB=":"
5568 else
5569 case $cross_compiling:$ac_tool_warned in
5570yes:)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005571{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5572$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005573ac_tool_warned=yes ;;
5574esac
5575 RANLIB=$ac_ct_RANLIB
5576 fi
5577else
5578 RANLIB="$ac_cv_prog_RANLIB"
5579fi
5580
5581
doko@python.orgd65e2ba2013-01-31 23:52:03 +01005582if test -n "$ac_tool_prefix"; then
5583 for ac_prog in ar aal
5584 do
5585 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5586set dummy $ac_tool_prefix$ac_prog; 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_AR+:} 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 "$AR"; then
5593 ac_cv_prog_AR="$AR" # 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
doko@python.orgd65e2ba2013-01-31 23:52:03 +01005602 ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
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
5612AR=$ac_cv_prog_AR
5613if test -n "$AR"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005614 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
5615$as_echo "$AR" >&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
doko@python.orgd65e2ba2013-01-31 23:52:03 +01005622 test -n "$AR" && break
5623 done
5624fi
5625if test -z "$AR"; then
5626 ac_ct_AR=$AR
5627 for ac_prog in ar aal
5628do
5629 # Extract the first word of "$ac_prog", so it can be a program name with args.
5630set dummy $ac_prog; ac_word=$2
5631{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5632$as_echo_n "checking for $ac_word... " >&6; }
5633if ${ac_cv_prog_ac_ct_AR+:} false; then :
5634 $as_echo_n "(cached) " >&6
5635else
5636 if test -n "$ac_ct_AR"; then
5637 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
5638else
5639as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5640for as_dir in $PATH
5641do
5642 IFS=$as_save_IFS
5643 test -z "$as_dir" && as_dir=.
5644 for ac_exec_ext in '' $ac_executable_extensions; do
5645 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5646 ac_cv_prog_ac_ct_AR="$ac_prog"
5647 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5648 break 2
5649 fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005650done
doko@python.orgd65e2ba2013-01-31 23:52:03 +01005651 done
5652IFS=$as_save_IFS
5653
5654fi
5655fi
5656ac_ct_AR=$ac_cv_prog_ac_ct_AR
5657if test -n "$ac_ct_AR"; then
5658 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
5659$as_echo "$ac_ct_AR" >&6; }
5660else
5661 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5662$as_echo "no" >&6; }
5663fi
5664
5665
5666 test -n "$ac_ct_AR" && break
5667done
5668
5669 if test "x$ac_ct_AR" = x; then
5670 AR="ar"
5671 else
5672 case $cross_compiling:$ac_tool_warned in
5673yes:)
5674{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5675$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5676ac_tool_warned=yes ;;
5677esac
5678 AR=$ac_ct_AR
5679 fi
5680fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005681
5682
5683# tweak ARFLAGS only if the user didn't set it on the command line
5684
5685if test -z "$ARFLAGS"
5686then
5687 ARFLAGS="rc"
5688fi
5689
5690
Victor Stinner2c7085f2017-05-02 16:55:50 +02005691
5692
5693
5694if test -e $srcdir/.git/HEAD
5695then
5696# Extract the first word of "git", so it can be a program name with args.
5697set dummy git; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005698{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5699$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinner2c7085f2017-05-02 16:55:50 +02005700if ${ac_cv_prog_HAS_GIT+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005701 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005702else
Victor Stinner2c7085f2017-05-02 16:55:50 +02005703 if test -n "$HAS_GIT"; then
5704 ac_cv_prog_HAS_GIT="$HAS_GIT" # Let the user override the test.
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005705else
5706as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5707for as_dir in $PATH
5708do
5709 IFS=$as_save_IFS
5710 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005711 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01005712 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Victor Stinner2c7085f2017-05-02 16:55:50 +02005713 ac_cv_prog_HAS_GIT="found"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005714 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005715 break 2
5716 fi
5717done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005718 done
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005719IFS=$as_save_IFS
5720
Victor Stinner2c7085f2017-05-02 16:55:50 +02005721 test -z "$ac_cv_prog_HAS_GIT" && ac_cv_prog_HAS_GIT="not-found"
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005722fi
5723fi
Victor Stinner2c7085f2017-05-02 16:55:50 +02005724HAS_GIT=$ac_cv_prog_HAS_GIT
5725if test -n "$HAS_GIT"; then
5726 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAS_GIT" >&5
5727$as_echo "$HAS_GIT" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005728else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005729 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5730$as_echo "no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005731fi
5732
5733
Victor Stinner2c7085f2017-05-02 16:55:50 +02005734else
5735HAS_GIT=no-repository
5736fi
5737if test $HAS_GIT = found
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005738then
Victor Stinner2c7085f2017-05-02 16:55:50 +02005739 GITVERSION="git -C \$(srcdir) rev-parse --short HEAD"
5740 GITTAG="git -C \$(srcdir) describe --all --always --dirty"
5741 GITBRANCH="git -C \$(srcdir) name-rev --name-only HEAD"
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005742else
Victor Stinner2c7085f2017-05-02 16:55:50 +02005743 GITVERSION=""
5744 GITTAG=""
5745 GITBRANCH=""
Georg Brandl3a5508e2011-03-06 10:42:21 +01005746fi
5747
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005748case $MACHDEP in
5749bsdos*|hp*|HP*)
5750 # install -d does not work on BSDI or HP-UX
5751 if test -z "$INSTALL"
5752 then
5753 INSTALL="${srcdir}/install-sh -c"
5754 fi
5755esac
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005756# Find a good install program. We prefer a C program (faster),
5757# so one script is as good as another. But avoid the broken or
5758# incompatible versions:
5759# SysV /etc/install, /usr/sbin/install
5760# SunOS /usr/etc/install
5761# IRIX /sbin/install
5762# AIX /bin/install
5763# AmigaOS /C/install, which installs bootblocks on floppy discs
5764# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
5765# AFS /usr/afsws/bin/install, which mishandles nonexistent args
5766# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
5767# OS/2's system install, which has a completely different semantic
5768# ./install, which can be erroneously created by make from ./install.sh.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005769# Reject install programs that cannot install multiple files.
5770{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
5771$as_echo_n "checking for a BSD-compatible install... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005772if test -z "$INSTALL"; then
Matthias Klose3cef2a92012-03-14 23:39:33 +01005773if ${ac_cv_path_install+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005774 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005775else
5776 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5777for as_dir in $PATH
5778do
5779 IFS=$as_save_IFS
5780 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005781 # Account for people who put trailing slashes in PATH elements.
5782case $as_dir/ in #((
5783 ./ | .// | /[cC]/* | \
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005784 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005785 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005786 /usr/ucb/* ) ;;
5787 *)
5788 # OSF1 and SCO ODT 3.0 have their own names for install.
5789 # Don't use installbsd from OSF since it installs stuff as root
5790 # by default.
5791 for ac_prog in ginstall scoinst install; do
5792 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01005793 if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005794 if test $ac_prog = install &&
5795 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
5796 # AIX install. It has an incompatible calling convention.
5797 :
5798 elif test $ac_prog = install &&
5799 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
5800 # program-specific install script used by HP pwplus--don't use.
5801 :
5802 else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005803 rm -rf conftest.one conftest.two conftest.dir
5804 echo one > conftest.one
5805 echo two > conftest.two
5806 mkdir conftest.dir
5807 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
5808 test -s conftest.one && test -s conftest.two &&
5809 test -s conftest.dir/conftest.one &&
5810 test -s conftest.dir/conftest.two
5811 then
5812 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
5813 break 3
5814 fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005815 fi
5816 fi
5817 done
5818 done
5819 ;;
5820esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005821
5822 done
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005823IFS=$as_save_IFS
5824
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005825rm -rf conftest.one conftest.two conftest.dir
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005826
5827fi
5828 if test "${ac_cv_path_install+set}" = set; then
5829 INSTALL=$ac_cv_path_install
5830 else
5831 # As a last resort, use the slow shell script. Don't cache a
5832 # value for INSTALL within a source directory, because that will
5833 # break other packages using the cache if that directory is
5834 # removed, or if the value is a relative name.
5835 INSTALL=$ac_install_sh
5836 fi
5837fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005838{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
5839$as_echo "$INSTALL" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005840
5841# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
5842# It thinks the first close brace ends the variable substitution.
5843test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
5844
5845test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
5846
5847test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
5848
Trent Nelsonf6407a12012-08-30 14:56:13 +00005849{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
5850$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
5851if test -z "$MKDIR_P"; then
5852 if ${ac_cv_path_mkdir+:} false; then :
5853 $as_echo_n "(cached) " >&6
5854else
5855 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5856for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
5857do
5858 IFS=$as_save_IFS
5859 test -z "$as_dir" && as_dir=.
5860 for ac_prog in mkdir gmkdir; do
5861 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01005862 as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
Trent Nelsonf6407a12012-08-30 14:56:13 +00005863 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
5864 'mkdir (GNU coreutils) '* | \
5865 'mkdir (coreutils) '* | \
5866 'mkdir (fileutils) '4.1*)
5867 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
5868 break 3;;
5869 esac
5870 done
5871 done
5872 done
5873IFS=$as_save_IFS
5874
5875fi
5876
5877 test -d ./--version && rmdir ./--version
5878 if test "${ac_cv_path_mkdir+set}" = set; then
5879 MKDIR_P="$ac_cv_path_mkdir -p"
5880 else
5881 # As a last resort, use the slow shell script. Don't cache a
5882 # value for MKDIR_P within a source directory, because that will
5883 # break other packages using the cache if that directory is
5884 # removed, or if the value is a relative name.
5885 MKDIR_P="$ac_install_sh -d"
5886 fi
5887fi
5888{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
5889$as_echo "$MKDIR_P" >&6; }
5890
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005891
5892# Not every filesystem supports hard links
5893
5894if test -z "$LN" ; then
5895 case $ac_sys_system in
5896 BeOS*) LN="ln -s";;
5897 CYGWIN*) LN="ln -s";;
5898 atheos*) LN="ln -s";;
5899 *) LN=ln;;
5900 esac
5901fi
5902
5903# Check for --with-pydebug
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005904{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pydebug" >&5
5905$as_echo_n "checking for --with-pydebug... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005906
5907# Check whether --with-pydebug was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005908if test "${with_pydebug+set}" = set; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005909 withval=$with_pydebug;
5910if test "$withval" != no
5911then
5912
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005913$as_echo "#define Py_DEBUG 1" >>confdefs.h
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005914
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005915 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5916$as_echo "yes" >&6; };
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005917 Py_DEBUG='true'
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005918else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5919$as_echo "no" >&6; }; Py_DEBUG='false'
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005920fi
5921else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005922 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5923$as_echo "no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005924fi
5925
5926
5927# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
5928# merged with this chunk of code?
5929
5930# Optimizer/debugger flags
5931# ------------------------
5932# (The following bit of code is complicated enough - please keep things
5933# indented properly. Just pretend you're editing Python code. ;-)
5934
5935# There are two parallel sets of case statements below, one that checks to
5936# see if OPT was set and one that does BASECFLAGS setting based upon
5937# compiler and platform. BASECFLAGS tweaks need to be made even if the
5938# user set OPT.
5939
5940# tweak OPT based on compiler and platform, only if the user didn't set
5941# it on the command line
5942
Benjamin Petersond4b721b2010-03-23 20:58:37 +00005943if test "${OPT-unset}" = "unset"
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005944then
5945 case $GCC in
5946 yes)
5947 if test "$CC" != 'g++' ; then
5948 STRICT_PROTO="-Wstrict-prototypes"
5949 fi
5950 # For gcc 4.x we need to use -fwrapv so lets check if its supported
5951 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
5952 WRAP="-fwrapv"
5953 fi
Stefan Krah503e5e12011-09-14 15:19:42 +02005954
5955 # Clang also needs -fwrapv
Stefan Krah2bc1e8f2011-12-08 22:26:06 +01005956 case $CC in
5957 *clang*) WRAP="-fwrapv"
5958 ;;
5959 esac
Stefan Krah503e5e12011-09-14 15:19:42 +02005960
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005961 case $ac_cv_prog_cc_g in
5962 yes)
5963 if test "$Py_DEBUG" = 'true' ; then
5964 # Optimization messes up debuggers, so turn it off for
5965 # debug builds.
Mark Dickinsond2f3e3f2010-05-05 22:23:58 +00005966 OPT="-g -O0 -Wall $STRICT_PROTO"
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005967 else
5968 OPT="-g $WRAP -O3 -Wall $STRICT_PROTO"
5969 fi
5970 ;;
5971 *)
5972 OPT="-O3 -Wall $STRICT_PROTO"
5973 ;;
5974 esac
5975 case $ac_sys_system in
5976 SCO_SV*) OPT="$OPT -m486 -DSCO5"
5977 ;;
5978 esac
5979 ;;
5980
5981 *)
5982 OPT="-O"
5983 ;;
5984 esac
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005985fi
5986
5987
5988
5989# The -arch flags for universal builds on OSX
5990UNIVERSAL_ARCH_FLAGS=
5991
5992
5993# tweak BASECFLAGS based on compiler and platform
5994case $GCC in
5995yes)
5996 # Python violates C99 rules, by casting between incompatible
5997 # pointer types. GCC may generate bad code as a result of that,
5998 # so use -fno-strict-aliasing if supported.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005999 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -fno-strict-aliasing" >&5
6000$as_echo_n "checking whether $CC accepts -fno-strict-aliasing... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006001 ac_save_cc="$CC"
6002 CC="$CC -fno-strict-aliasing"
Matthias Klose3cef2a92012-03-14 23:39:33 +01006003 if ${ac_cv_no_strict_aliasing_ok+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006004 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00006005else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006006 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006007/* end confdefs.h. */
Gregory P. Smith373469a2009-11-01 21:03:38 +00006008
6009int
6010main ()
6011{
Mark Dickinson5e13e292010-05-11 08:55:06 +00006012
Gregory P. Smith373469a2009-11-01 21:03:38 +00006013 ;
6014 return 0;
6015}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006016_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006017if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006018 ac_cv_no_strict_aliasing_ok=yes
6019else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006020 ac_cv_no_strict_aliasing_ok=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006021fi
Gregory P. Smith373469a2009-11-01 21:03:38 +00006022rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00006023fi
6024
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006025 CC="$ac_save_cc"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006026 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_no_strict_aliasing_ok" >&5
6027$as_echo "$ac_cv_no_strict_aliasing_ok" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006028 if test $ac_cv_no_strict_aliasing_ok = yes
6029 then
6030 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
6031 fi
6032
6033 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
6034 # support. Without this, treatment of subnormals doesn't follow
6035 # the standard.
doko@python.orgd65e2ba2013-01-31 23:52:03 +01006036 case $host in
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006037 alpha*)
6038 BASECFLAGS="$BASECFLAGS -mieee"
6039 ;;
6040 esac
6041
6042 case $ac_sys_system in
6043 SCO_SV*)
6044 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
6045 ;;
6046 # is there any other compiler on Darwin besides gcc?
6047 Darwin*)
6048 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
6049 # used to be here, but non-Apple gcc doesn't accept them.
Ronald Oussorena55af9a2010-01-17 16:25:57 +00006050 if test "${CC}" = gcc
6051 then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006052 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which compiler should be used" >&5
6053$as_echo_n "checking which compiler should be used... " >&6; }
Ronald Oussorena55af9a2010-01-17 16:25:57 +00006054 case "${UNIVERSALSDK}" in
6055 */MacOSX10.4u.sdk)
6056 # Build using 10.4 SDK, force usage of gcc when the
6057 # compiler is gcc, otherwise the user will get very
6058 # confusing error messages when building on OSX 10.6
6059 CC=gcc-4.0
6060 CPP=cpp-4.0
6061 ;;
6062 esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006063 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
6064$as_echo "$CC" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006065 fi
6066
6067 # Calculate the right deployment target for this build.
6068 #
Ned Deilyc40b9032014-06-25 13:48:46 -07006069 cur_target_major=`sw_vers -productVersion | \
6070 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
6071 cur_target_minor=`sw_vers -productVersion | \
6072 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
6073 cur_target="${cur_target_major}.${cur_target_minor}"
6074 if test ${cur_target_major} -eq 10 && \
6075 test ${cur_target_minor} -ge 3
6076 then
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006077 cur_target=10.3
Ronald Oussoren25967582009-09-06 10:00:26 +00006078 if test ${enable_universalsdk}; then
6079 if test "${UNIVERSAL_ARCHS}" = "all"; then
6080 # Ensure that the default platform for a
6081 # 4-way universal build is OSX 10.5,
6082 # that's the first OS release where
6083 # 4-way builds make sense.
6084 cur_target='10.5'
Ronald Oussoren23d92532009-09-07 06:12:00 +00006085
6086 elif test "${UNIVERSAL_ARCHS}" = "3-way"; then
6087 cur_target='10.5'
6088
6089 elif test "${UNIVERSAL_ARCHS}" = "intel"; then
6090 cur_target='10.5'
6091
6092 elif test "${UNIVERSAL_ARCHS}" = "64-bit"; then
6093 cur_target='10.5'
Ronald Oussoren25967582009-09-06 10:00:26 +00006094 fi
6095 else
Ronald Oussorenbc0e83c2010-02-11 13:26:54 +00006096 if test `/usr/bin/arch` = "i386"; then
Ronald Oussoren25967582009-09-06 10:00:26 +00006097 # On Intel macs default to a deployment
6098 # target of 10.4, that's the first OSX
6099 # release with Intel support.
6100 cur_target="10.4"
6101 fi
6102 fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006103 fi
6104 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
6105
6106 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
6107 # environment with a value that is the same as what we'll use
6108 # in the Makefile to ensure that we'll get the same compiler
6109 # environment during configure and build time.
6110 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
6111 export MACOSX_DEPLOYMENT_TARGET
6112 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
6113
Ronald Oussorena55af9a2010-01-17 16:25:57 +00006114 if test "${enable_universalsdk}"; then
6115 UNIVERSAL_ARCH_FLAGS=""
6116 if test "$UNIVERSAL_ARCHS" = "32-bit" ; then
6117 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
6118 ARCH_RUN_32BIT=""
Ronald Oussoren75912852010-04-08 08:13:31 +00006119 LIPO_32BIT_FLAGS=""
Ronald Oussorena55af9a2010-01-17 16:25:57 +00006120
6121 elif test "$UNIVERSAL_ARCHS" = "64-bit" ; then
6122 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
6123 LIPO_32BIT_FLAGS=""
6124 ARCH_RUN_32BIT="true"
6125
6126 elif test "$UNIVERSAL_ARCHS" = "all" ; then
6127 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
6128 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Ronald Oussoren92397ce2010-01-17 19:32:00 +00006129 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
Ronald Oussorena55af9a2010-01-17 16:25:57 +00006130
6131 elif test "$UNIVERSAL_ARCHS" = "intel" ; then
6132 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
6133 LIPO_32BIT_FLAGS="-extract i386"
Ronald Oussoren92397ce2010-01-17 19:32:00 +00006134 ARCH_RUN_32BIT="/usr/bin/arch -i386"
Ronald Oussorena55af9a2010-01-17 16:25:57 +00006135
6136 elif test "$UNIVERSAL_ARCHS" = "3-way" ; then
6137 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
6138 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Ronald Oussoren9922f172010-02-11 13:19:34 +00006139 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
Ronald Oussorena55af9a2010-01-17 16:25:57 +00006140
6141 else
Georg Brandl71f4fbb2011-02-25 11:04:50 +00006142 as_fn_error $? "proper usage is --with-universal-arch=32-bit|64-bit|all|intel|3-way" "$LINENO" 5
Ronald Oussorena55af9a2010-01-17 16:25:57 +00006143
6144 fi
6145
6146
Ronald Oussoren974eb5e2010-04-18 17:59:37 +00006147 CFLAGS="${UNIVERSAL_ARCH_FLAGS} ${CFLAGS}"
6148 if test "${UNIVERSALSDK}" != "/"
6149 then
6150 CPPFLAGS="-isysroot ${UNIVERSALSDK} ${CPPFLAGS}"
6151 LDFLAGS="-isysroot ${UNIVERSALSDK} ${LDFLAGS}"
6152 CFLAGS="-isysroot ${UNIVERSALSDK} ${CFLAGS}"
Ronald Oussorena55af9a2010-01-17 16:25:57 +00006153 fi
6154
6155 fi
6156
6157
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006158 ;;
6159 OSF*)
6160 BASECFLAGS="$BASECFLAGS -mieee"
6161 ;;
6162 esac
6163 ;;
6164
6165*)
6166 case $ac_sys_system in
6167 OpenUNIX*|UnixWare*)
6168 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
6169 ;;
6170 OSF*)
6171 BASECFLAGS="$BASECFLAGS -ieee -std"
6172 ;;
6173 SCO_SV*)
6174 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
6175 ;;
6176 esac
6177 ;;
6178esac
6179
Zachary Ware6ed42ea2015-12-21 11:43:03 -06006180# ICC needs -fp-model strict or floats behave badly
6181case "$CC" in
6182*icc*)
6183 BASECFLAGS="$BASECFLAGS -fp-model strict"
6184 ;;
6185esac
6186
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006187if test "$Py_DEBUG" = 'true'; then
6188 :
6189else
6190 OPT="-DNDEBUG $OPT"
6191fi
6192
6193if test "$ac_arch_flags"
6194then
6195 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
6196fi
6197
6198# disable check for icc since it seems to pass, but generates a warning
6199if test "$CC" = icc
6200then
6201 ac_cv_opt_olimit_ok=no
6202fi
6203
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006204{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -OPT:Olimit=0" >&5
6205$as_echo_n "checking whether $CC accepts -OPT:Olimit=0... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01006206if ${ac_cv_opt_olimit_ok+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006207 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006208else
6209 ac_save_cc="$CC"
6210CC="$CC -OPT:Olimit=0"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006211cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006212/* end confdefs.h. */
Gregory P. Smith373469a2009-11-01 21:03:38 +00006213
6214int
6215main ()
6216{
Mark Dickinson5e13e292010-05-11 08:55:06 +00006217
Gregory P. Smith373469a2009-11-01 21:03:38 +00006218 ;
6219 return 0;
6220}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006221_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006222if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006223 ac_cv_opt_olimit_ok=yes
6224else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006225 ac_cv_opt_olimit_ok=no
Matthias Klosec511b472010-05-08 11:01:39 +00006226
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006227fi
Gregory P. Smith373469a2009-11-01 21:03:38 +00006228rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006229CC="$ac_save_cc"
6230fi
6231
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006232{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_opt_olimit_ok" >&5
6233$as_echo "$ac_cv_opt_olimit_ok" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006234if test $ac_cv_opt_olimit_ok = yes; then
6235 case $ac_sys_system in
6236 # XXX is this branch needed? On MacOSX 10.2.2 the result of the
6237 # olimit_ok test is "no". Is it "yes" in some other Darwin-esque
6238 # environment?
6239 Darwin*)
6240 ;;
Trent Nelson34562e12012-10-17 18:01:12 -04006241 # XXX thankfully this useless troublemaker of a flag has been
6242 # eradicated in the 3.x line. For now, make sure it isn't picked
6243 # up by any of our other platforms that use CC.
6244 AIX*|SunOS*|HP-UX*|IRIX*)
6245 ;;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006246 *)
6247 BASECFLAGS="$BASECFLAGS -OPT:Olimit=0"
6248 ;;
6249 esac
6250else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006251 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Olimit 1500" >&5
6252$as_echo_n "checking whether $CC accepts -Olimit 1500... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01006253 if ${ac_cv_olimit_ok+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006254 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006255else
6256 ac_save_cc="$CC"
6257 CC="$CC -Olimit 1500"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006258 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006259/* end confdefs.h. */
Gregory P. Smith373469a2009-11-01 21:03:38 +00006260
6261int
6262main ()
6263{
Mark Dickinson5e13e292010-05-11 08:55:06 +00006264
Gregory P. Smith373469a2009-11-01 21:03:38 +00006265 ;
6266 return 0;
6267}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006268_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006269if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006270 ac_cv_olimit_ok=yes
6271else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006272 ac_cv_olimit_ok=no
Matthias Klosec511b472010-05-08 11:01:39 +00006273
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006274fi
Gregory P. Smith373469a2009-11-01 21:03:38 +00006275rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006276 CC="$ac_save_cc"
6277fi
6278
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006279 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_olimit_ok" >&5
6280$as_echo "$ac_cv_olimit_ok" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006281 if test $ac_cv_olimit_ok = yes; then
Stefan Krah67473262012-11-29 00:17:05 +01006282 case $ac_sys_system in
6283 # Issue #16534: On HP-UX ac_cv_olimit_ok=yes is a false positive.
6284 HP-UX*)
6285 ;;
6286 *)
6287 BASECFLAGS="$BASECFLAGS -Olimit 1500"
6288 ;;
6289 esac
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006290 fi
6291fi
6292
6293# Check whether GCC supports PyArg_ParseTuple format
6294if test "$GCC" = "yes"
6295then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006296 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc supports ParseTuple __format__" >&5
6297$as_echo_n "checking whether gcc supports ParseTuple __format__... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006298 save_CFLAGS=$CFLAGS
Benjamin Petersonc8759662013-05-11 13:00:05 -05006299 CFLAGS="$CFLAGS -Werror -Wformat"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006300 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006301/* end confdefs.h. */
6302
6303 void f(char*,...)__attribute((format(PyArg_ParseTuple, 1, 2)));
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006304int
6305main ()
6306{
6307
6308 ;
6309 return 0;
6310}
Matthias Klosec511b472010-05-08 11:01:39 +00006311
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006312_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006313if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006314
Matthias Klosec511b472010-05-08 11:01:39 +00006315
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006316$as_echo "#define HAVE_ATTRIBUTE_FORMAT_PARSETUPLE 1" >>confdefs.h
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006317
Matthias Klosec511b472010-05-08 11:01:39 +00006318 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006319$as_echo "yes" >&6; }
Matthias Klosec511b472010-05-08 11:01:39 +00006320
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006321else
Matthias Klosec511b472010-05-08 11:01:39 +00006322
6323 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006324$as_echo "no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006325
6326fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006327rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6328 CFLAGS=$save_CFLAGS
6329fi
6330
Brett Cannon4ff151a2015-09-18 15:09:42 -07006331
Gregory P. Smith6d8fdfc2016-09-07 23:28:23 -07006332# Enable optimization flags
6333
6334
6335Py_OPT='false'
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)b9999152016-11-20 21:19:36 +00006336{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-optimizations" >&5
6337$as_echo_n "checking for --enable-optimizations... " >&6; }
6338# Check whether --enable-optimizations was given.
6339if test "${enable_optimizations+set}" = set; then :
6340 enableval=$enable_optimizations;
INADA Naoki6a04ef72017-03-29 01:50:48 +09006341if test "$enableval" != no
Gregory P. Smith6d8fdfc2016-09-07 23:28:23 -07006342then
6343 Py_OPT='true'
6344 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6345$as_echo "yes" >&6; };
6346else
6347 Py_OPT='false'
6348 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6349$as_echo "no" >&6; };
6350fi
6351else
6352 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6353$as_echo "no" >&6; }
6354fi
6355
6356if test "$Py_OPT" = 'true' ; then
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)9cbfa792016-09-08 22:44:44 +00006357 # Intentionally not forcing Py_LTO='true' here. Too many toolchains do not
6358 # compile working code using it and both test_distutils and test_gdb are
6359 # broken when you do managed to get a toolchain that works with it. People
6360 # who want LTO need to use --with-lto themselves.
Gregory P. Smith6d8fdfc2016-09-07 23:28:23 -07006361 Py_LTO='true'
6362 DEF_MAKE_ALL_RULE="profile-opt"
Gregory P. Smith794b2912016-09-08 00:07:40 -07006363 REQUIRE_PGO="yes"
Gregory P. Smith6d8fdfc2016-09-07 23:28:23 -07006364 DEF_MAKE_RULE="build_all"
6365else
6366 DEF_MAKE_ALL_RULE="build_all"
Gregory P. Smith794b2912016-09-08 00:07:40 -07006367 REQUIRE_PGO="no"
Gregory P. Smith6d8fdfc2016-09-07 23:28:23 -07006368 DEF_MAKE_RULE="all"
6369fi
6370
6371
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)c543a0f2016-06-02 23:44:40 +00006372# Enable LTO flags
6373
6374{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-lto" >&5
6375$as_echo_n "checking for --with-lto... " >&6; }
6376
6377# Check whether --with-lto was given.
6378if test "${with_lto+set}" = set; then :
6379 withval=$with_lto;
6380if test "$withval" != no
6381then
6382 Py_LTO='true'
6383 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6384$as_echo "yes" >&6; };
6385else
6386 Py_LTO='false'
6387 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6388$as_echo "no" >&6; };
6389fi
6390else
6391 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6392$as_echo "no" >&6; }
6393fi
6394
6395if test "$Py_LTO" = 'true' ; then
6396 case $CC in
6397 *clang*)
6398 # Any changes made here should be reflected in the GCC+Darwin case below
6399 LTOFLAGS="-flto"
6400 ;;
6401 *gcc*)
6402 case $ac_sys_system in
6403 Darwin*)
6404 LTOFLAGS="-flto"
6405 ;;
6406 *)
6407 LTOFLAGS="-flto -fuse-linker-plugin -ffat-lto-objects -flto-partition=none"
6408 ;;
6409 esac
6410 ;;
6411 esac
6412fi
6413
6414
Brett Cannon4ff151a2015-09-18 15:09:42 -07006415# Enable PGO flags.
Zachary Ware6ed42ea2015-12-21 11:43:03 -06006416
6417
6418
6419
6420
Gregory P. Smith794b2912016-09-08 00:07:40 -07006421# Make this work on systems where llvm tools are not installed with their
6422# normal names in the default $PATH (ie: Ubuntu). They exist under the
6423# non-suffixed name in their versioned llvm directory.
6424llvm_bin_dir=''
6425llvm_path="${PATH}"
6426if test "${CC}" = "clang"
6427then
6428 clang_bin=`which clang`
6429 # Some systems install clang elsewhere as a symlink to the real path
6430 # which is where the related llvm tools are located.
6431 if test -L "${clang_bin}"
6432 then
6433 clang_dir=`dirname "${clang_bin}"`
6434 clang_bin=`readlink "${clang_bin}"`
6435 llvm_bin_dir="${clang_dir}/"`dirname "${clang_bin}"`
6436 llvm_path="${llvm_path}${PATH_SEPARATOR}${llvm_bin_dir}"
6437 fi
6438fi
Zachary Ware6ed42ea2015-12-21 11:43:03 -06006439
Gregory P. Smith794b2912016-09-08 00:07:40 -07006440{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
6441$as_echo_n "checking target system type... " >&6; }
6442if ${ac_cv_target+:} false; then :
Brett Cannon4ff151a2015-09-18 15:09:42 -07006443 $as_echo_n "(cached) " >&6
6444else
Gregory P. Smith794b2912016-09-08 00:07:40 -07006445 if test "x$target_alias" = x; then
6446 ac_cv_target=$ac_cv_host
Brett Cannon4ff151a2015-09-18 15:09:42 -07006447else
Gregory P. Smith794b2912016-09-08 00:07:40 -07006448 ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
6449 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
6450fi
6451
6452fi
6453{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
6454$as_echo "$ac_cv_target" >&6; }
6455case $ac_cv_target in
6456*-*-*) ;;
6457*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
6458esac
6459target=$ac_cv_target
6460ac_save_IFS=$IFS; IFS='-'
6461set x $ac_cv_target
6462shift
6463target_cpu=$1
6464target_vendor=$2
6465shift; shift
6466# Remember, the first character of IFS is used to create $*,
6467# except with old shells:
6468target_os=$*
6469IFS=$ac_save_IFS
6470case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
6471
6472
6473# The aliases save the names the user supplied, while $host etc.
6474# will get canonicalized.
6475test -n "$target_alias" &&
6476 test "$program_prefix$program_suffix$program_transform_name" = \
6477 NONENONEs,x,x, &&
6478 program_prefix=${target_alias}-
6479# Extract the first word of "$target_alias-llvm-profdata", so it can be a program name with args.
6480set dummy $target_alias-llvm-profdata; ac_word=$2
6481{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6482$as_echo_n "checking for $ac_word... " >&6; }
6483if ${ac_cv_path_LLVM_PROFDATA+:} false; then :
6484 $as_echo_n "(cached) " >&6
6485else
6486 case $LLVM_PROFDATA in
6487 [\\/]* | ?:[\\/]*)
6488 ac_cv_path_LLVM_PROFDATA="$LLVM_PROFDATA" # Let the user override the test with a path.
6489 ;;
6490 *)
6491 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6492for as_dir in ${llvm_path}
Brett Cannon4ff151a2015-09-18 15:09:42 -07006493do
6494 IFS=$as_save_IFS
6495 test -z "$as_dir" && as_dir=.
6496 for ac_exec_ext in '' $ac_executable_extensions; do
6497 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Gregory P. Smith794b2912016-09-08 00:07:40 -07006498 ac_cv_path_LLVM_PROFDATA="$as_dir/$ac_word$ac_exec_ext"
Brett Cannon4ff151a2015-09-18 15:09:42 -07006499 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6500 break 2
6501 fi
6502done
6503 done
6504IFS=$as_save_IFS
6505
Gregory P. Smith794b2912016-09-08 00:07:40 -07006506 ;;
6507esac
Brett Cannon4ff151a2015-09-18 15:09:42 -07006508fi
Gregory P. Smith794b2912016-09-08 00:07:40 -07006509LLVM_PROFDATA=$ac_cv_path_LLVM_PROFDATA
6510if test -n "$LLVM_PROFDATA"; then
6511 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_PROFDATA" >&5
6512$as_echo "$LLVM_PROFDATA" >&6; }
Brett Cannon4ff151a2015-09-18 15:09:42 -07006513else
6514 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6515$as_echo "no" >&6; }
6516fi
6517
6518
Gregory P. Smith794b2912016-09-08 00:07:40 -07006519if test -z "$ac_cv_path_LLVM_PROFDATA"; then
6520 if test "$build" = "$target"; then
6521 ac_pt_LLVM_PROFDATA=$LLVM_PROFDATA
6522 # Extract the first word of "llvm-profdata", so it can be a program name with args.
6523set dummy llvm-profdata; ac_word=$2
6524{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6525$as_echo_n "checking for $ac_word... " >&6; }
6526if ${ac_cv_path_ac_pt_LLVM_PROFDATA+:} false; then :
6527 $as_echo_n "(cached) " >&6
6528else
6529 case $ac_pt_LLVM_PROFDATA in
6530 [\\/]* | ?:[\\/]*)
6531 ac_cv_path_ac_pt_LLVM_PROFDATA="$ac_pt_LLVM_PROFDATA" # Let the user override the test with a path.
6532 ;;
6533 *)
6534 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6535for as_dir in ${llvm_path}
6536do
6537 IFS=$as_save_IFS
6538 test -z "$as_dir" && as_dir=.
6539 for ac_exec_ext in '' $ac_executable_extensions; do
6540 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6541 ac_cv_path_ac_pt_LLVM_PROFDATA="$as_dir/$ac_word$ac_exec_ext"
6542 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6543 break 2
6544 fi
6545done
6546 done
6547IFS=$as_save_IFS
6548
6549 test -z "$ac_cv_path_ac_pt_LLVM_PROFDATA" && ac_cv_path_ac_pt_LLVM_PROFDATA="''"
6550 ;;
6551esac
6552fi
6553ac_pt_LLVM_PROFDATA=$ac_cv_path_ac_pt_LLVM_PROFDATA
6554if test -n "$ac_pt_LLVM_PROFDATA"; then
6555 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_LLVM_PROFDATA" >&5
6556$as_echo "$ac_pt_LLVM_PROFDATA" >&6; }
6557else
6558 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6559$as_echo "no" >&6; }
6560fi
6561
6562 LLVM_PROFDATA=$ac_pt_LLVM_PROFDATA
6563 else
6564 LLVM_PROFDATA="''"
6565 fi
6566else
6567 LLVM_PROFDATA="$ac_cv_path_LLVM_PROFDATA"
6568fi
6569
6570
6571if test -n "${LLVM_PROFDATA}" -a -x "${LLVM_PROFDATA}"
6572then
6573 LLVM_PROF_FOUND="found"
6574else
6575 LLVM_PROF_FOUND="not-found"
6576fi
6577if test "$ac_sys_system" = "Darwin" -a "${LLVM_PROF_FOUND}" = "not-found"
6578then
6579 found_llvm_profdata=`/usr/bin/xcrun -find llvm-profdata 2>/dev/null`
6580 if test -n "${found_llvm_profdata}"
6581 then
6582 # llvm-profdata isn't directly in $PATH in some cases.
6583 # https://apple.stackexchange.com/questions/197053/
6584 LLVM_PROFDATA='/usr/bin/xcrun llvm-profdata'
6585 LLVM_PROF_FOUND=found
6586 { $as_echo "$as_me:${as_lineno-$LINENO}: llvm-profdata found via xcrun: ${LLVM_PROFDATA}" >&5
6587$as_echo "$as_me: llvm-profdata found via xcrun: ${LLVM_PROFDATA}" >&6;}
6588 fi
6589fi
Brett Cannon4ff151a2015-09-18 15:09:42 -07006590LLVM_PROF_ERR=no
6591case $CC in
6592 *clang*)
6593 # Any changes made here should be reflected in the GCC+Darwin case below
6594 PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
6595 PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd"
Gregory P. Smith794b2912016-09-08 00:07:40 -07006596 LLVM_PROF_MERGER="${LLVM_PROFDATA} merge -output=code.profclangd *.profclangr"
Brett Cannon4ff151a2015-09-18 15:09:42 -07006597 LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"code-%p.profclangr\""
6598 if test $LLVM_PROF_FOUND = not-found
6599 then
6600 LLVM_PROF_ERR=yes
Gregory P. Smith794b2912016-09-08 00:07:40 -07006601 if test "${REQUIRE_PGO}" = "yes"
6602 then
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)b9999152016-11-20 21:19:36 +00006603 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 -07006604 fi
Brett Cannon4ff151a2015-09-18 15:09:42 -07006605 fi
6606 ;;
6607 *gcc*)
6608 case $ac_sys_system in
6609 Darwin*)
6610 PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
6611 PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd"
Gregory P. Smith794b2912016-09-08 00:07:40 -07006612 LLVM_PROF_MERGER="${LLVM_PROFDATA} merge -output=code.profclangd *.profclangr"
Brett Cannon4ff151a2015-09-18 15:09:42 -07006613 LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"code-%p.profclangr\""
Gregory P. Smith794b2912016-09-08 00:07:40 -07006614 if test "${LLVM_PROF_FOUND}" = "not-found"
Brett Cannon4ff151a2015-09-18 15:09:42 -07006615 then
6616 LLVM_PROF_ERR=yes
Gregory P. Smith794b2912016-09-08 00:07:40 -07006617 if test "${REQUIRE_PGO}" = "yes"
6618 then
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)b9999152016-11-20 21:19:36 +00006619 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 -07006620 fi
Brett Cannon4ff151a2015-09-18 15:09:42 -07006621 fi
6622 ;;
6623 *)
6624 PGO_PROF_GEN_FLAG="-fprofile-generate"
6625 PGO_PROF_USE_FLAG="-fprofile-use -fprofile-correction"
6626 LLVM_PROF_MERGER="true"
6627 LLVM_PROF_FILE=""
6628 ;;
6629 esac
6630 ;;
Zachary Ware6ed42ea2015-12-21 11:43:03 -06006631 *icc*)
6632 PGO_PROF_GEN_FLAG="-prof-gen"
6633 PGO_PROF_USE_FLAG="-prof-use"
6634 LLVM_PROF_MERGER="true"
6635 LLVM_PROF_FILE=""
6636 ;;
Brett Cannon4ff151a2015-09-18 15:09:42 -07006637esac
6638
6639
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006640# On some compilers, pthreads are available without further options
6641# (e.g. MacOS X). On some of these systems, the compiler will not
6642# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
6643# So we have to see first whether pthreads are available without
6644# options before we can check whether -Kpthread improves anything.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006645{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads are available without options" >&5
6646$as_echo_n "checking whether pthreads are available without options... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01006647if ${ac_cv_pthread_is_default+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006648 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006649else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006650 if test "$cross_compiling" = yes; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006651 ac_cv_pthread_is_default=no
6652else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006653 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006654/* end confdefs.h. */
6655
Stefan Krahae66ca62012-11-22 22:36:57 +01006656#include <stdio.h>
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006657#include <pthread.h>
6658
6659void* routine(void* p){return NULL;}
6660
6661int main(){
6662 pthread_t p;
6663 if(pthread_create(&p,NULL,routine,NULL)!=0)
6664 return 1;
6665 (void)pthread_detach(p);
6666 return 0;
6667}
6668
6669_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006670if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006671
6672 ac_cv_pthread_is_default=yes
6673 ac_cv_kthread=no
6674 ac_cv_pthread=no
6675
6676else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006677 ac_cv_pthread_is_default=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006678fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006679rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6680 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006681fi
6682
6683
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006684fi
6685
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006686{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_is_default" >&5
6687$as_echo "$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006688
6689
6690if test $ac_cv_pthread_is_default = yes
6691then
6692 ac_cv_kpthread=no
6693else
6694# -Kpthread, if available, provides the right #defines
6695# and linker options to make pthread_create available
6696# Some compilers won't report that they do not support -Kpthread,
6697# so we need to run a program to see whether it really made the
6698# function available.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006699{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kpthread" >&5
6700$as_echo_n "checking whether $CC accepts -Kpthread... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01006701if ${ac_cv_kpthread+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006702 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006703else
6704 ac_save_cc="$CC"
6705CC="$CC -Kpthread"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006706if test "$cross_compiling" = yes; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006707 ac_cv_kpthread=no
6708else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006709 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006710/* end confdefs.h. */
6711
Stefan Krahae66ca62012-11-22 22:36:57 +01006712#include <stdio.h>
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006713#include <pthread.h>
6714
6715void* routine(void* p){return NULL;}
6716
6717int main(){
6718 pthread_t p;
6719 if(pthread_create(&p,NULL,routine,NULL)!=0)
6720 return 1;
6721 (void)pthread_detach(p);
6722 return 0;
6723}
6724
6725_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006726if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006727 ac_cv_kpthread=yes
6728else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006729 ac_cv_kpthread=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006730fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006731rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6732 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006733fi
6734
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006735CC="$ac_save_cc"
6736fi
6737
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006738{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kpthread" >&5
6739$as_echo "$ac_cv_kpthread" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006740fi
6741
6742if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
6743then
6744# -Kthread, if available, provides the right #defines
6745# and linker options to make pthread_create available
6746# Some compilers won't report that they do not support -Kthread,
6747# so we need to run a program to see whether it really made the
6748# function available.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006749{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kthread" >&5
6750$as_echo_n "checking whether $CC accepts -Kthread... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01006751if ${ac_cv_kthread+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006752 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006753else
6754 ac_save_cc="$CC"
6755CC="$CC -Kthread"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006756if test "$cross_compiling" = yes; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006757 ac_cv_kthread=no
6758else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006759 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006760/* end confdefs.h. */
6761
Stefan Krahae66ca62012-11-22 22:36:57 +01006762#include <stdio.h>
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006763#include <pthread.h>
6764
6765void* routine(void* p){return NULL;}
6766
6767int main(){
6768 pthread_t p;
6769 if(pthread_create(&p,NULL,routine,NULL)!=0)
6770 return 1;
6771 (void)pthread_detach(p);
6772 return 0;
6773}
6774
6775_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006776if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006777 ac_cv_kthread=yes
6778else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006779 ac_cv_kthread=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006780fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006781rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6782 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006783fi
6784
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006785CC="$ac_save_cc"
6786fi
6787
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006788{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kthread" >&5
6789$as_echo "$ac_cv_kthread" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006790fi
6791
6792if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
6793then
6794# -pthread, if available, provides the right #defines
6795# and linker options to make pthread_create available
6796# Some compilers won't report that they do not support -pthread,
6797# so we need to run a program to see whether it really made the
6798# function available.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006799{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -pthread" >&5
6800$as_echo_n "checking whether $CC accepts -pthread... " >&6; }
doko@python.orgfa3f9a32013-01-25 15:32:31 +01006801if ${ac_cv_pthread+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006802 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006803else
6804 ac_save_cc="$CC"
6805CC="$CC -pthread"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006806if test "$cross_compiling" = yes; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006807 ac_cv_pthread=no
6808else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006809 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006810/* end confdefs.h. */
6811
Stefan Krahae66ca62012-11-22 22:36:57 +01006812#include <stdio.h>
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006813#include <pthread.h>
6814
6815void* routine(void* p){return NULL;}
6816
6817int main(){
6818 pthread_t p;
6819 if(pthread_create(&p,NULL,routine,NULL)!=0)
6820 return 1;
6821 (void)pthread_detach(p);
6822 return 0;
6823}
6824
6825_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006826if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006827 ac_cv_pthread=yes
6828else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006829 ac_cv_pthread=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006830fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006831rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6832 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006833fi
6834
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006835CC="$ac_save_cc"
6836fi
6837
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006838{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread" >&5
6839$as_echo "$ac_cv_pthread" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006840fi
6841
6842# If we have set a CC compiler flag for thread support then
6843# check if it works for CXX, too.
6844ac_cv_cxx_thread=no
6845if test ! -z "$CXX"
6846then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006847{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX also accepts flags for thread support" >&5
6848$as_echo_n "checking whether $CXX also accepts flags for thread support... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006849ac_save_cxx="$CXX"
6850
6851if test "$ac_cv_kpthread" = "yes"
6852then
6853 CXX="$CXX -Kpthread"
6854 ac_cv_cxx_thread=yes
6855elif test "$ac_cv_kthread" = "yes"
6856then
6857 CXX="$CXX -Kthread"
6858 ac_cv_cxx_thread=yes
6859elif test "$ac_cv_pthread" = "yes"
6860then
6861 CXX="$CXX -pthread"
6862 ac_cv_cxx_thread=yes
6863fi
6864
6865if test $ac_cv_cxx_thread = yes
6866then
6867 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
6868 $CXX -c conftest.$ac_ext 2>&5
6869 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
6870 && test -s conftest$ac_exeext && ./conftest$ac_exeext
6871 then
6872 ac_cv_cxx_thread=yes
6873 else
6874 ac_cv_cxx_thread=no
6875 fi
6876 rm -fr conftest*
6877fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006878{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_thread" >&5
6879$as_echo "$ac_cv_cxx_thread" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006880fi
6881CXX="$ac_save_cxx"
6882
6883
6884# checks for header files
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006885{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
6886$as_echo_n "checking for ANSI C header files... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01006887if ${ac_cv_header_stdc+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006888 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006889else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006890 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006891/* end confdefs.h. */
6892#include <stdlib.h>
6893#include <stdarg.h>
6894#include <string.h>
6895#include <float.h>
6896
6897int
6898main ()
6899{
6900
6901 ;
6902 return 0;
6903}
6904_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006905if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006906 ac_cv_header_stdc=yes
6907else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006908 ac_cv_header_stdc=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006909fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006910rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6911
6912if test $ac_cv_header_stdc = yes; then
6913 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006914 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006915/* end confdefs.h. */
6916#include <string.h>
6917
6918_ACEOF
6919if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006920 $EGREP "memchr" >/dev/null 2>&1; then :
6921
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006922else
6923 ac_cv_header_stdc=no
6924fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00006925rm -f conftest*
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006926
6927fi
6928
6929if test $ac_cv_header_stdc = yes; then
6930 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006931 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006932/* end confdefs.h. */
6933#include <stdlib.h>
6934
6935_ACEOF
6936if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006937 $EGREP "free" >/dev/null 2>&1; then :
6938
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006939else
6940 ac_cv_header_stdc=no
6941fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00006942rm -f conftest*
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006943
6944fi
6945
6946if test $ac_cv_header_stdc = yes; then
6947 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006948 if test "$cross_compiling" = yes; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006949 :
6950else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006951 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006952/* end confdefs.h. */
6953#include <ctype.h>
6954#include <stdlib.h>
6955#if ((' ' & 0x0FF) == 0x020)
6956# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
6957# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
6958#else
6959# define ISLOWER(c) \
6960 (('a' <= (c) && (c) <= 'i') \
6961 || ('j' <= (c) && (c) <= 'r') \
6962 || ('s' <= (c) && (c) <= 'z'))
6963# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
6964#endif
6965
6966#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
6967int
6968main ()
6969{
6970 int i;
6971 for (i = 0; i < 256; i++)
6972 if (XOR (islower (i), ISLOWER (i))
6973 || toupper (i) != TOUPPER (i))
6974 return 2;
6975 return 0;
6976}
6977_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006978if ac_fn_c_try_run "$LINENO"; then :
6979
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006980else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006981 ac_cv_header_stdc=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006982fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006983rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6984 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006985fi
6986
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006987fi
6988fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006989{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
6990$as_echo "$ac_cv_header_stdc" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006991if test $ac_cv_header_stdc = yes; then
6992
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006993$as_echo "#define STDC_HEADERS 1" >>confdefs.h
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006994
6995fi
6996
doko@ubuntu.comf27ec3e2014-04-17 20:11:19 +02006997for ac_header in asm/types.h conio.h direct.h dlfcn.h errno.h \
Martin v. Löwis0e8bd7e2006-06-10 12:23:46 +00006998fcntl.h grp.h \
doko@ubuntu.comf27ec3e2014-04-17 20:11:19 +02006999ieeefp.h io.h langinfo.h libintl.h poll.h process.h pthread.h \
Martin v. Löwis40e9aed2006-10-02 15:20:37 +00007000shadow.h signal.h stdint.h stropts.h termios.h thread.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00007001unistd.h utime.h \
Christian Heimes0e9ab5f2008-03-21 23:49:44 +00007002sys/audioio.h sys/bsdtty.h sys/epoll.h sys/event.h sys/file.h sys/loadavg.h \
7003sys/lock.h sys/mkdev.h sys/modem.h \
Benjamin Peterson6b1c9092016-12-19 23:54:25 -08007004sys/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 +00007005sys/termio.h sys/time.h \
Martin v. Löwis0e8bd7e2006-06-10 12:23:46 +00007006sys/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 +00007007sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Christian Heimes3aa138f2013-06-18 13:25:24 +02007008bluetooth/bluetooth.h linux/tipc.h spawn.h util.h alloca.h
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007009do :
7010 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7011ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007012if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007013 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007014#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00007015_ACEOF
7016
7017fi
7018
Guido van Rossum627b2d71993-12-24 10:39:16 +00007019done
7020
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007021ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00007022for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007023 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
7024{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
7025$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007026if eval \${$as_ac_Header+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007027 $as_echo_n "(cached) " >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00007028else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007029 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007030/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007031#include <sys/types.h>
7032#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00007033
Martin v. Löwis11437992002-04-12 09:54:03 +00007034int
7035main ()
7036{
7037if ((DIR *) 0)
7038return 0;
7039 ;
7040 return 0;
7041}
7042_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007043if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007044 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00007045else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007046 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007047fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007048rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00007049fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007050eval ac_res=\$$as_ac_Header
7051 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
7052$as_echo "$ac_res" >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007053if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007054 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007055#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00007056_ACEOF
7057
7058ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00007059fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007060
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007061done
7062# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
7063if test $ac_header_dirent = dirent.h; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007064 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
7065$as_echo_n "checking for library containing opendir... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007066if ${ac_cv_search_opendir+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007067 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007068else
Martin v. Löwis11437992002-04-12 09:54:03 +00007069 ac_func_search_save_LIBS=$LIBS
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007070cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007071/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007072
Martin v. Löwiseba40652007-08-30 20:10:57 +00007073/* Override any GCC internal prototype to avoid an error.
7074 Use char because int might match the return type of a GCC
7075 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007076#ifdef __cplusplus
7077extern "C"
7078#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007079char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007080int
7081main ()
7082{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007083return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007084 ;
7085 return 0;
7086}
7087_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00007088for ac_lib in '' dir; do
7089 if test -z "$ac_lib"; then
7090 ac_res="none required"
7091 else
7092 ac_res=-l$ac_lib
Skip Montanaro89e975f2007-08-22 19:05:21 +00007093 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Martin v. Löwiseba40652007-08-30 20:10:57 +00007094 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007095 if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00007096 ac_cv_search_opendir=$ac_res
Brett Cannon19fab762007-06-02 03:02:29 +00007097fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007098rm -f core conftest.err conftest.$ac_objext \
7099 conftest$ac_exeext
Matthias Klose3cef2a92012-03-14 23:39:33 +01007100 if ${ac_cv_search_opendir+:} false; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00007101 break
Skip Montanaro89e975f2007-08-22 19:05:21 +00007102fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007103done
Matthias Klose3cef2a92012-03-14 23:39:33 +01007104if ${ac_cv_search_opendir+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007105
Martin v. Löwiseba40652007-08-30 20:10:57 +00007106else
7107 ac_cv_search_opendir=no
7108fi
7109rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007110LIBS=$ac_func_search_save_LIBS
7111fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007112{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
7113$as_echo "$ac_cv_search_opendir" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007114ac_res=$ac_cv_search_opendir
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007115if test "$ac_res" != no; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00007116 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00007117
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007118fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007119
Michael W. Hudson54241132001-12-07 15:38:26 +00007120else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007121 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
7122$as_echo_n "checking for library containing opendir... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007123if ${ac_cv_search_opendir+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007124 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007125else
7126 ac_func_search_save_LIBS=$LIBS
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007127cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007128/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007129
Martin v. Löwiseba40652007-08-30 20:10:57 +00007130/* Override any GCC internal prototype to avoid an error.
7131 Use char because int might match the return type of a GCC
7132 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007133#ifdef __cplusplus
7134extern "C"
7135#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007136char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007137int
7138main ()
7139{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007140return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007141 ;
7142 return 0;
7143}
7144_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00007145for ac_lib in '' x; do
7146 if test -z "$ac_lib"; then
7147 ac_res="none required"
7148 else
7149 ac_res=-l$ac_lib
Skip Montanaro89e975f2007-08-22 19:05:21 +00007150 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Martin v. Löwiseba40652007-08-30 20:10:57 +00007151 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007152 if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00007153 ac_cv_search_opendir=$ac_res
Brett Cannon19fab762007-06-02 03:02:29 +00007154fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007155rm -f core conftest.err conftest.$ac_objext \
7156 conftest$ac_exeext
Matthias Klose3cef2a92012-03-14 23:39:33 +01007157 if ${ac_cv_search_opendir+:} false; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00007158 break
Skip Montanaro89e975f2007-08-22 19:05:21 +00007159fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007160done
Matthias Klose3cef2a92012-03-14 23:39:33 +01007161if ${ac_cv_search_opendir+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007162
Martin v. Löwiseba40652007-08-30 20:10:57 +00007163else
7164 ac_cv_search_opendir=no
7165fi
7166rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007167LIBS=$ac_func_search_save_LIBS
7168fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007169{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
7170$as_echo "$ac_cv_search_opendir" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007171ac_res=$ac_cv_search_opendir
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007172if test "$ac_res" != no; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00007173 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00007174
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007175fi
7176
7177fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00007178
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007179{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5
7180$as_echo_n "checking whether sys/types.h defines makedev... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007181if ${ac_cv_header_sys_types_h_makedev+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007182 $as_echo_n "(cached) " >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007183else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007184 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007185/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007186#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007187int
7188main ()
7189{
7190return makedev(0, 0);
7191 ;
7192 return 0;
7193}
7194_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007195if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007196 ac_cv_header_sys_types_h_makedev=yes
7197else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007198 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007199fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007200rm -f core conftest.err conftest.$ac_objext \
7201 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007202
7203fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007204{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_types_h_makedev" >&5
7205$as_echo "$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007206
7207if test $ac_cv_header_sys_types_h_makedev = no; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007208ac_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 +01007209if test "x$ac_cv_header_sys_mkdev_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007210
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007211$as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007212
7213fi
7214
7215
7216
7217 if test $ac_cv_header_sys_mkdev_h = no; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007218 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 +01007219if test "x$ac_cv_header_sys_sysmacros_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007220
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007221$as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007222
7223fi
7224
7225
7226 fi
7227fi
7228
Michael W. Hudson54241132001-12-07 15:38:26 +00007229
Martin v. Löwis11017b12006-01-14 18:12:57 +00007230# On Linux, netlink.h requires asm/types.h
Martin v. Löwis11017b12006-01-14 18:12:57 +00007231for ac_header in linux/netlink.h
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007232do :
7233 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 +00007234#ifdef HAVE_ASM_TYPES_H
7235#include <asm/types.h>
7236#endif
7237#ifdef HAVE_SYS_SOCKET_H
7238#include <sys/socket.h>
7239#endif
7240
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007241"
Matthias Klose3cef2a92012-03-14 23:39:33 +01007242if test "x$ac_cv_header_linux_netlink_h" = xyes; then :
Martin v. Löwis11017b12006-01-14 18:12:57 +00007243 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007244#define HAVE_LINUX_NETLINK_H 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00007245_ACEOF
7246
7247fi
7248
7249done
7250
7251
Guido van Rossum627b2d71993-12-24 10:39:16 +00007252# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00007253was_it_defined=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007254{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_t in time.h" >&5
7255$as_echo_n "checking for clock_t in time.h... " >&6; }
7256cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007257/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007258#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007259
7260_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007261if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007262 $EGREP "clock_t" >/dev/null 2>&1; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +00007263 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00007264else
Martin v. Löwis11437992002-04-12 09:54:03 +00007265
7266
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007267$as_echo "#define clock_t long" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00007268
Martin v. Löwisc45929e2002-04-06 10:10:49 +00007269
Guido van Rossum627b2d71993-12-24 10:39:16 +00007270fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00007271rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00007272
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007273{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
7274$as_echo "$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00007275
Neal Norwitz11690112002-07-30 01:08:28 +00007276# Check whether using makedev requires defining _OSF_SOURCE
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007277{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for makedev" >&5
7278$as_echo_n "checking for makedev... " >&6; }
7279cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007280/* end confdefs.h. */
Jesus Cea616de772010-04-28 10:32:30 +00007281
7282#if defined(MAJOR_IN_MKDEV)
7283#include <sys/mkdev.h>
7284#elif defined(MAJOR_IN_SYSMACROS)
7285#include <sys/sysmacros.h>
7286#else
Neal Norwitz6eb37f02003-02-23 23:28:15 +00007287#include <sys/types.h>
Jesus Cea616de772010-04-28 10:32:30 +00007288#endif
Neal Norwitz11690112002-07-30 01:08:28 +00007289int
7290main ()
7291{
7292 makedev(0, 0)
7293 ;
7294 return 0;
7295}
7296_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007297if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00007298 ac_cv_has_makedev=yes
7299else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007300 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00007301fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007302rm -f core conftest.err conftest.$ac_objext \
7303 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00007304if test "$ac_cv_has_makedev" = "no"; then
7305 # we didn't link, try if _OSF_SOURCE will allow us to link
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007306 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007307/* end confdefs.h. */
Neal Norwitz11690112002-07-30 01:08:28 +00007308
Neal Norwitz6eb37f02003-02-23 23:28:15 +00007309#define _OSF_SOURCE 1
7310#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00007311
Neal Norwitz11690112002-07-30 01:08:28 +00007312int
7313main ()
7314{
7315 makedev(0, 0)
7316 ;
7317 return 0;
7318}
7319_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007320if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00007321 ac_cv_has_makedev=yes
7322else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007323 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00007324fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007325rm -f core conftest.err conftest.$ac_objext \
7326 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00007327 if test "$ac_cv_has_makedev" = "yes"; then
7328
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007329$as_echo "#define _OSF_SOURCE 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00007330
7331 fi
7332fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007333{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_makedev" >&5
7334$as_echo "$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00007335if test "$ac_cv_has_makedev" = "yes"; then
7336
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007337$as_echo "#define HAVE_MAKEDEV 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00007338
7339fi
7340
Martin v. Löwis399a6892002-10-04 10:22:02 +00007341# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
7342# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
7343# defined, but the compiler does not support pragma redefine_extname,
7344# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
7345# structures (such as rlimit64) without declaring them. As a
7346# work-around, disable LFS on such configurations
7347
7348use_lfs=yes
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007349{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Solaris LFS bug" >&5
7350$as_echo_n "checking Solaris LFS bug... " >&6; }
7351cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007352/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00007353
7354#define _LARGEFILE_SOURCE 1
7355#define _FILE_OFFSET_BITS 64
7356#include <sys/resource.h>
7357
Martin v. Löwis399a6892002-10-04 10:22:02 +00007358int
7359main ()
7360{
7361struct rlimit foo;
7362 ;
7363 return 0;
7364}
7365_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007366if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis399a6892002-10-04 10:22:02 +00007367 sol_lfs_bug=no
7368else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007369 sol_lfs_bug=yes
Martin v. Löwis399a6892002-10-04 10:22:02 +00007370fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007371rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007372{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $sol_lfs_bug" >&5
7373$as_echo "$sol_lfs_bug" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00007374if test "$sol_lfs_bug" = "yes"; then
7375 use_lfs=no
7376fi
7377
7378if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00007379# Two defines needed to enable largefile support on various platforms
7380# These may affect some typedefs
Georg Brandl94800df2011-02-25 11:09:02 +00007381case $ac_sys_system/$ac_sys_release in
7382AIX*)
7383
7384$as_echo "#define _LARGE_FILES 1" >>confdefs.h
7385
7386 ;;
7387esac
Guido van Rossum810cc512001-09-09 23:51:39 +00007388
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007389$as_echo "#define _LARGEFILE_SOURCE 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007390
7391
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007392$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
Guido van Rossum810cc512001-09-09 23:51:39 +00007393
Martin v. Löwis399a6892002-10-04 10:22:02 +00007394fi
Michael W. Hudson54241132001-12-07 15:38:26 +00007395
Guido van Rossum84e7b241996-08-19 21:59:00 +00007396# Add some code to confdefs.h so that the test for off_t works on SCO
7397cat >> confdefs.h <<\EOF
7398#if defined(SCO_DS)
7399#undef _OFF_T
7400#endif
7401EOF
7402
Guido van Rossumef2255b2000-03-10 22:30:29 +00007403# Type availability checks
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007404ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
Matthias Klose3cef2a92012-03-14 23:39:33 +01007405if test "x$ac_cv_type_mode_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007406
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007407else
Martin v. Löwis11437992002-04-12 09:54:03 +00007408
7409cat >>confdefs.h <<_ACEOF
7410#define mode_t int
7411_ACEOF
7412
7413fi
7414
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007415ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
Matthias Klose3cef2a92012-03-14 23:39:33 +01007416if test "x$ac_cv_type_off_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007417
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007418else
Martin v. Löwis11437992002-04-12 09:54:03 +00007419
7420cat >>confdefs.h <<_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00007421#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00007422_ACEOF
7423
7424fi
7425
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007426ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
Matthias Klose3cef2a92012-03-14 23:39:33 +01007427if test "x$ac_cv_type_pid_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007428
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007429else
Martin v. Löwis11437992002-04-12 09:54:03 +00007430
7431cat >>confdefs.h <<_ACEOF
7432#define pid_t int
7433_ACEOF
7434
7435fi
7436
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00007437
Martin v. Löwis11437992002-04-12 09:54:03 +00007438cat >>confdefs.h <<_ACEOF
Matthias Klosecbf54b12010-05-08 11:04:18 +00007439#define RETSIGTYPE void
Martin v. Löwis11437992002-04-12 09:54:03 +00007440_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00007441
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007442ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
Matthias Klose3cef2a92012-03-14 23:39:33 +01007443if test "x$ac_cv_type_size_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007444
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007445else
Martin v. Löwis11437992002-04-12 09:54:03 +00007446
7447cat >>confdefs.h <<_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00007448#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00007449_ACEOF
7450
7451fi
7452
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007453{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
7454$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007455if ${ac_cv_type_uid_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007456 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007457else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007458 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007459/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007460#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007461
7462_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007463if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007464 $EGREP "uid_t" >/dev/null 2>&1; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007465 ac_cv_type_uid_t=yes
7466else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007467 ac_cv_type_uid_t=no
7468fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00007469rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00007470
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007471fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007472{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
7473$as_echo "$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00007474if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007475
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007476$as_echo "#define uid_t int" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007477
7478
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007479$as_echo "#define gid_t int" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007480
7481fi
7482
Mark Dickinson17c50cd2012-12-02 13:13:56 +00007483
7484# There are two separate checks for each of the exact-width integer types we
7485# need. First we check whether the type is available using the usual
7486# AC_CHECK_TYPE macro with the default includes (which includes <inttypes.h>
7487# and <stdint.h> where available). We then also use the special type checks of
7488# the form AC_TYPE_UINT32_T, which in the case that uint32_t is not available
7489# directly, #define's uint32_t to be a suitable type.
7490
7491ac_fn_c_check_type "$LINENO" "uint32_t" "ac_cv_type_uint32_t" "$ac_includes_default"
7492if test "x$ac_cv_type_uint32_t" = xyes; then :
7493
7494$as_echo "#define HAVE_UINT32_T 1" >>confdefs.h
7495
7496fi
7497
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007498ac_fn_c_find_uintX_t "$LINENO" "32" "ac_cv_c_uint32_t"
7499case $ac_cv_c_uint32_t in #(
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007500 no|yes) ;; #(
7501 *)
7502
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007503$as_echo "#define _UINT32_T 1" >>confdefs.h
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007504
7505
7506cat >>confdefs.h <<_ACEOF
7507#define uint32_t $ac_cv_c_uint32_t
7508_ACEOF
7509;;
7510 esac
7511
Mark Dickinson17c50cd2012-12-02 13:13:56 +00007512
7513ac_fn_c_check_type "$LINENO" "uint64_t" "ac_cv_type_uint64_t" "$ac_includes_default"
7514if test "x$ac_cv_type_uint64_t" = xyes; then :
7515
7516$as_echo "#define HAVE_UINT64_T 1" >>confdefs.h
7517
7518fi
7519
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007520ac_fn_c_find_uintX_t "$LINENO" "64" "ac_cv_c_uint64_t"
7521case $ac_cv_c_uint64_t in #(
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007522 no|yes) ;; #(
7523 *)
7524
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007525$as_echo "#define _UINT64_T 1" >>confdefs.h
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007526
7527
7528cat >>confdefs.h <<_ACEOF
7529#define uint64_t $ac_cv_c_uint64_t
7530_ACEOF
7531;;
7532 esac
7533
Mark Dickinson17c50cd2012-12-02 13:13:56 +00007534
7535ac_fn_c_check_type "$LINENO" "int32_t" "ac_cv_type_int32_t" "$ac_includes_default"
7536if test "x$ac_cv_type_int32_t" = xyes; then :
7537
7538$as_echo "#define HAVE_INT32_T 1" >>confdefs.h
7539
7540fi
7541
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007542ac_fn_c_find_intX_t "$LINENO" "32" "ac_cv_c_int32_t"
7543case $ac_cv_c_int32_t in #(
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007544 no|yes) ;; #(
7545 *)
7546
7547cat >>confdefs.h <<_ACEOF
7548#define int32_t $ac_cv_c_int32_t
7549_ACEOF
7550;;
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007551esac
7552
Mark Dickinson17c50cd2012-12-02 13:13:56 +00007553
7554ac_fn_c_check_type "$LINENO" "int64_t" "ac_cv_type_int64_t" "$ac_includes_default"
7555if test "x$ac_cv_type_int64_t" = xyes; then :
7556
7557$as_echo "#define HAVE_INT64_T 1" >>confdefs.h
7558
7559fi
7560
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007561ac_fn_c_find_intX_t "$LINENO" "64" "ac_cv_c_int64_t"
7562case $ac_cv_c_int64_t in #(
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007563 no|yes) ;; #(
7564 *)
7565
7566cat >>confdefs.h <<_ACEOF
7567#define int64_t $ac_cv_c_int64_t
7568_ACEOF
7569;;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00007570esac
Martin v. Löwis18e16552006-02-15 17:27:45 +00007571
Mark Dickinson17c50cd2012-12-02 13:13:56 +00007572
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007573ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
Matthias Klose3cef2a92012-03-14 23:39:33 +01007574if test "x$ac_cv_type_ssize_t" = xyes; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00007575
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007576$as_echo "#define HAVE_SSIZE_T 1" >>confdefs.h
Martin v. Löwis18e16552006-02-15 17:27:45 +00007577
7578fi
7579
Jack Jansendd19cf82001-12-06 22:36:17 +00007580
Michael W. Hudson54241132001-12-07 15:38:26 +00007581# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00007582# ANSI C requires sizeof(char) == 1, so no need to check it
Martin v. Löwiseba40652007-08-30 20:10:57 +00007583# The cast to long int works around a bug in the HP C Compiler
7584# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7585# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7586# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007587{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
7588$as_echo_n "checking size of int... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007589if ${ac_cv_sizeof_int+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007590 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007591else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007592 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 +00007593
Martin v. Löwis11437992002-04-12 09:54:03 +00007594else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007595 if test "$ac_cv_type_int" = yes; then
7596 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7597$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007598as_fn_error 77 "cannot compute sizeof (int)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007599See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007600 else
7601 ac_cv_sizeof_int=0
7602 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007603fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007604
Martin v. Löwis11437992002-04-12 09:54:03 +00007605fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007606{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
7607$as_echo "$ac_cv_sizeof_int" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007608
7609
7610
Martin v. Löwis11437992002-04-12 09:54:03 +00007611cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007612#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00007613_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007614
7615
Martin v. Löwiseba40652007-08-30 20:10:57 +00007616# The cast to long int works around a bug in the HP C Compiler
7617# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7618# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7619# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007620{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
7621$as_echo_n "checking size of long... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007622if ${ac_cv_sizeof_long+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007623 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007624else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007625 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 +00007626
Martin v. Löwis11437992002-04-12 09:54:03 +00007627else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007628 if test "$ac_cv_type_long" = yes; then
7629 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7630$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007631as_fn_error 77 "cannot compute sizeof (long)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007632See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007633 else
7634 ac_cv_sizeof_long=0
7635 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007636fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007637
Martin v. Löwis11437992002-04-12 09:54:03 +00007638fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007639{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
7640$as_echo "$ac_cv_sizeof_long" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007641
7642
7643
Martin v. Löwis11437992002-04-12 09:54:03 +00007644cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007645#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00007646_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007647
7648
Martin v. Löwiseba40652007-08-30 20:10:57 +00007649# The cast to long int works around a bug in the HP C Compiler
7650# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7651# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7652# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007653{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
7654$as_echo_n "checking size of void *... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007655if ${ac_cv_sizeof_void_p+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007656 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007657else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007658 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 +00007659
Martin v. Löwis11437992002-04-12 09:54:03 +00007660else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007661 if test "$ac_cv_type_void_p" = yes; then
7662 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7663$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007664as_fn_error 77 "cannot compute sizeof (void *)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007665See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007666 else
7667 ac_cv_sizeof_void_p=0
7668 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007669fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007670
Martin v. Löwis11437992002-04-12 09:54:03 +00007671fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007672{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
7673$as_echo "$ac_cv_sizeof_void_p" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007674
7675
7676
Martin v. Löwis11437992002-04-12 09:54:03 +00007677cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00007678#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00007679_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00007680
7681
Martin v. Löwiseba40652007-08-30 20:10:57 +00007682# The cast to long int works around a bug in the HP C Compiler
7683# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7684# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7685# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007686{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
7687$as_echo_n "checking size of short... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007688if ${ac_cv_sizeof_short+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007689 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007690else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007691 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 +00007692
Martin v. Löwis11437992002-04-12 09:54:03 +00007693else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007694 if test "$ac_cv_type_short" = yes; then
7695 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7696$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007697as_fn_error 77 "cannot compute sizeof (short)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007698See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007699 else
7700 ac_cv_sizeof_short=0
7701 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007702fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007703
Martin v. Löwis11437992002-04-12 09:54:03 +00007704fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007705{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
7706$as_echo "$ac_cv_sizeof_short" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007707
7708
7709
Martin v. Löwis11437992002-04-12 09:54:03 +00007710cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007711#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00007712_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007713
7714
Martin v. Löwiseba40652007-08-30 20:10:57 +00007715# The cast to long int works around a bug in the HP C Compiler
7716# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7717# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7718# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007719{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of float" >&5
7720$as_echo_n "checking size of float... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007721if ${ac_cv_sizeof_float+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007722 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007723else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007724 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 +00007725
Martin v. Löwis11437992002-04-12 09:54:03 +00007726else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007727 if test "$ac_cv_type_float" = yes; then
7728 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7729$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007730as_fn_error 77 "cannot compute sizeof (float)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007731See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007732 else
7733 ac_cv_sizeof_float=0
7734 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007735fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007736
Martin v. Löwis11437992002-04-12 09:54:03 +00007737fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007738{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_float" >&5
7739$as_echo "$ac_cv_sizeof_float" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007740
7741
7742
Martin v. Löwis11437992002-04-12 09:54:03 +00007743cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007744#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00007745_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007746
7747
Martin v. Löwiseba40652007-08-30 20:10:57 +00007748# The cast to long int works around a bug in the HP C Compiler
7749# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7750# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7751# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007752{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of double" >&5
7753$as_echo_n "checking size of double... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007754if ${ac_cv_sizeof_double+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007755 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007756else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007757 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 +00007758
Martin v. Löwis11437992002-04-12 09:54:03 +00007759else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007760 if test "$ac_cv_type_double" = yes; then
7761 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7762$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007763as_fn_error 77 "cannot compute sizeof (double)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007764See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007765 else
7766 ac_cv_sizeof_double=0
7767 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007768fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007769
Martin v. Löwis11437992002-04-12 09:54:03 +00007770fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007771{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5
7772$as_echo "$ac_cv_sizeof_double" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007773
7774
7775
Martin v. Löwis11437992002-04-12 09:54:03 +00007776cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007777#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00007778_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007779
7780
Martin v. Löwiseba40652007-08-30 20:10:57 +00007781# The cast to long int works around a bug in the HP C Compiler
7782# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7783# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7784# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007785{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of fpos_t" >&5
7786$as_echo_n "checking size of fpos_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007787if ${ac_cv_sizeof_fpos_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007788 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007789else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007790 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 +00007791
Martin v. Löwis11437992002-04-12 09:54:03 +00007792else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007793 if test "$ac_cv_type_fpos_t" = yes; then
7794 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7795$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007796as_fn_error 77 "cannot compute sizeof (fpos_t)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007797See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007798 else
7799 ac_cv_sizeof_fpos_t=0
7800 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007801fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007802
Martin v. Löwis11437992002-04-12 09:54:03 +00007803fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007804{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_fpos_t" >&5
7805$as_echo "$ac_cv_sizeof_fpos_t" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007806
7807
7808
Martin v. Löwis11437992002-04-12 09:54:03 +00007809cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007810#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007811_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007812
Michael W. Hudson54241132001-12-07 15:38:26 +00007813
Martin v. Löwiseba40652007-08-30 20:10:57 +00007814# The cast to long int works around a bug in the HP C Compiler
7815# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7816# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7817# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007818{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
7819$as_echo_n "checking size of size_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007820if ${ac_cv_sizeof_size_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007821 $as_echo_n "(cached) " >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00007822else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007823 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 +00007824
Martin v. Löwis18e16552006-02-15 17:27:45 +00007825else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007826 if test "$ac_cv_type_size_t" = yes; then
7827 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7828$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007829as_fn_error 77 "cannot compute sizeof (size_t)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007830See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007831 else
7832 ac_cv_sizeof_size_t=0
7833 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +00007834fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007835
Martin v. Löwis18e16552006-02-15 17:27:45 +00007836fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007837{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
7838$as_echo "$ac_cv_sizeof_size_t" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007839
7840
7841
Martin v. Löwis18e16552006-02-15 17:27:45 +00007842cat >>confdefs.h <<_ACEOF
7843#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
7844_ACEOF
7845
7846
Christian Heimes951cc0f2008-01-31 23:08:23 +00007847# The cast to long int works around a bug in the HP C Compiler
7848# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7849# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7850# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007851{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pid_t" >&5
7852$as_echo_n "checking size of pid_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007853if ${ac_cv_sizeof_pid_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007854 $as_echo_n "(cached) " >&6
Christian Heimes951cc0f2008-01-31 23:08:23 +00007855else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007856 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 +00007857
Christian Heimes951cc0f2008-01-31 23:08:23 +00007858else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007859 if test "$ac_cv_type_pid_t" = yes; then
7860 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7861$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007862as_fn_error 77 "cannot compute sizeof (pid_t)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007863See \`config.log' for more details" "$LINENO" 5; }
Christian Heimes951cc0f2008-01-31 23:08:23 +00007864 else
7865 ac_cv_sizeof_pid_t=0
7866 fi
7867fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007868
Christian Heimes951cc0f2008-01-31 23:08:23 +00007869fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007870{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pid_t" >&5
7871$as_echo "$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes951cc0f2008-01-31 23:08:23 +00007872
7873
7874
7875cat >>confdefs.h <<_ACEOF
7876#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
7877_ACEOF
7878
7879
Michael W. Hudson54241132001-12-07 15:38:26 +00007880
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007881{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support" >&5
7882$as_echo_n "checking for long long support... " >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007883have_long_long=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007884cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007885/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007886
Martin v. Löwis11437992002-04-12 09:54:03 +00007887int
7888main ()
7889{
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007890long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007891 ;
7892 return 0;
7893}
7894_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007895if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007896
7897
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007898$as_echo "#define HAVE_LONG_LONG 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007899
Martin v. Löwisc45929e2002-04-06 10:10:49 +00007900 have_long_long=yes
7901
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007902fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007903rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007904{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_long" >&5
7905$as_echo "$have_long_long" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +00007906if test "$have_long_long" = yes ; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00007907# The cast to long int works around a bug in the HP C Compiler
7908# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7909# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7910# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007911{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
7912$as_echo_n "checking size of long long... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007913if ${ac_cv_sizeof_long_long+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007914 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007915else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007916 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 +00007917
Martin v. Löwis11437992002-04-12 09:54:03 +00007918else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007919 if test "$ac_cv_type_long_long" = yes; then
7920 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7921$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007922as_fn_error 77 "cannot compute sizeof (long long)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007923See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007924 else
7925 ac_cv_sizeof_long_long=0
7926 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007927fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007928
Martin v. Löwis11437992002-04-12 09:54:03 +00007929fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007930{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
7931$as_echo "$ac_cv_sizeof_long_long" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007932
7933
7934
Martin v. Löwis11437992002-04-12 09:54:03 +00007935cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007936#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +00007937_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007938
Michael W. Hudson54241132001-12-07 15:38:26 +00007939
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007940fi
7941
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007942{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support" >&5
7943$as_echo_n "checking for long double support... " >&6; }
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007944have_long_double=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007945cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007946/* end confdefs.h. */
7947
7948int
7949main ()
7950{
Matthias Klosec511b472010-05-08 11:01:39 +00007951long double x; x = (long double)0;
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007952 ;
7953 return 0;
7954}
7955_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007956if ac_fn_c_try_compile "$LINENO"; then :
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007957
7958
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007959$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007960
7961 have_long_double=yes
7962
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007963fi
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007964rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007965{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_double" >&5
7966$as_echo "$have_long_double" >&6; }
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007967if test "$have_long_double" = yes ; then
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007968# The cast to long int works around a bug in the HP C Compiler
7969# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7970# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7971# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007972{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long double" >&5
7973$as_echo_n "checking size of long double... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007974if ${ac_cv_sizeof_long_double+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007975 $as_echo_n "(cached) " >&6
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007976else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007977 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 +00007978
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007979else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007980 if test "$ac_cv_type_long_double" = yes; then
7981 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7982$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007983as_fn_error 77 "cannot compute sizeof (long double)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007984See \`config.log' for more details" "$LINENO" 5; }
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007985 else
7986 ac_cv_sizeof_long_double=0
7987 fi
7988fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007989
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007990fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007991{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double" >&5
7992$as_echo "$ac_cv_sizeof_long_double" >&6; }
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007993
7994
7995
7996cat >>confdefs.h <<_ACEOF
7997#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
7998_ACEOF
7999
8000
8001fi
8002
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008003{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _Bool support" >&5
8004$as_echo_n "checking for _Bool support... " >&6; }
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00008005have_c99_bool=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008006cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00008007/* end confdefs.h. */
8008
8009int
8010main ()
8011{
8012_Bool x; x = (_Bool)0;
8013 ;
8014 return 0;
8015}
8016_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008017if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00008018
8019
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008020$as_echo "#define HAVE_C99_BOOL 1" >>confdefs.h
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00008021
8022 have_c99_bool=yes
8023
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00008024fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008025rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008026{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_c99_bool" >&5
8027$as_echo "$have_c99_bool" >&6; }
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00008028if test "$have_c99_bool" = yes ; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00008029# The cast to long int works around a bug in the HP C Compiler
8030# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8031# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8032# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008033{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of _Bool" >&5
8034$as_echo_n "checking size of _Bool... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008035if ${ac_cv_sizeof__Bool+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008036 $as_echo_n "(cached) " >&6
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00008037else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008038 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 +00008039
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00008040else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008041 if test "$ac_cv_type__Bool" = yes; then
8042 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8043$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00008044as_fn_error 77 "cannot compute sizeof (_Bool)
Matthias Klose3cef2a92012-03-14 23:39:33 +01008045See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008046 else
8047 ac_cv_sizeof__Bool=0
8048 fi
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00008049fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008050
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00008051fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008052{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof__Bool" >&5
8053$as_echo "$ac_cv_sizeof__Bool" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008054
8055
8056
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00008057cat >>confdefs.h <<_ACEOF
8058#define SIZEOF__BOOL $ac_cv_sizeof__Bool
8059_ACEOF
8060
8061
8062fi
8063
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008064ac_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 +00008065 #include <stdint.h>
8066 #endif
Antoine Pitrou7be5a652010-10-10 08:14:41 +00008067 #ifdef HAVE_INTTYPES_H
8068 #include <inttypes.h>
8069 #endif
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008070"
Matthias Klose3cef2a92012-03-14 23:39:33 +01008071if test "x$ac_cv_type_uintptr_t" = xyes; then :
Martin v. Löwisebe26702006-10-02 14:55:51 +00008072
8073cat >>confdefs.h <<_ACEOF
8074#define HAVE_UINTPTR_T 1
8075_ACEOF
8076
Martin v. Löwiseba40652007-08-30 20:10:57 +00008077# The cast to long int works around a bug in the HP C Compiler
8078# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8079# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8080# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008081{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of uintptr_t" >&5
8082$as_echo_n "checking size of uintptr_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008083if ${ac_cv_sizeof_uintptr_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008084 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008085else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008086 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 +00008087
Martin v. Löwis11437992002-04-12 09:54:03 +00008088else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008089 if test "$ac_cv_type_uintptr_t" = yes; then
8090 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8091$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00008092as_fn_error 77 "cannot compute sizeof (uintptr_t)
Matthias Klose3cef2a92012-03-14 23:39:33 +01008093See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008094 else
8095 ac_cv_sizeof_uintptr_t=0
8096 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008097fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008098
Martin v. Löwis11437992002-04-12 09:54:03 +00008099fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008100{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uintptr_t" >&5
8101$as_echo "$ac_cv_sizeof_uintptr_t" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008102
8103
8104
Martin v. Löwis11437992002-04-12 09:54:03 +00008105cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008106#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008107_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008108
Michael W. Hudson54241132001-12-07 15:38:26 +00008109
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008110fi
8111
Martin v. Löwisebe26702006-10-02 14:55:51 +00008112
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008113# The cast to long int works around a bug in the HP C Compiler
8114# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8115# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8116# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008117{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
8118$as_echo_n "checking size of off_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008119if ${ac_cv_sizeof_off_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008120 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008121else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008122 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008123#ifdef HAVE_SYS_TYPES_H
8124#include <sys/types.h>
8125#endif
8126
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008127"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008128
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008129else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008130 if test "$ac_cv_type_off_t" = yes; then
8131 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8132$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00008133as_fn_error 77 "cannot compute sizeof (off_t)
Matthias Klose3cef2a92012-03-14 23:39:33 +01008134See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008135 else
8136 ac_cv_sizeof_off_t=0
8137 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008138fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008139
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008140fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008141{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
8142$as_echo "$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008143
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008144
8145
Martin v. Löwis11437992002-04-12 09:54:03 +00008146cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008147#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008148_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008149
Michael W. Hudson54241132001-12-07 15:38:26 +00008150
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008151
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008152{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable large file support" >&5
8153$as_echo_n "checking whether to enable large file support... " >&6; }
Mark Dickinson0ef0b912009-12-31 21:11:48 +00008154if test "$have_long_long" = yes
8155then
8156if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +00008157 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008158
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008159$as_echo "#define HAVE_LARGEFILE_SUPPORT 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008160
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008161 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8162$as_echo "yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008163else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008164 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8165$as_echo "no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008166fi
Mark Dickinson0ef0b912009-12-31 21:11:48 +00008167else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008168 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8169$as_echo "no" >&6; }
Mark Dickinson0ef0b912009-12-31 21:11:48 +00008170fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008171
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008172# The cast to long int works around a bug in the HP C Compiler
8173# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8174# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8175# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008176{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
8177$as_echo_n "checking size of time_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008178if ${ac_cv_sizeof_time_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008179 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008180else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008181 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008182#ifdef HAVE_SYS_TYPES_H
8183#include <sys/types.h>
8184#endif
8185#ifdef HAVE_TIME_H
8186#include <time.h>
8187#endif
8188
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008189"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008190
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008191else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008192 if test "$ac_cv_type_time_t" = yes; then
8193 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8194$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00008195as_fn_error 77 "cannot compute sizeof (time_t)
Matthias Klose3cef2a92012-03-14 23:39:33 +01008196See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008197 else
8198 ac_cv_sizeof_time_t=0
8199 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008200fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008201
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008202fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008203{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
8204$as_echo "$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008205
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008206
8207
Martin v. Löwis11437992002-04-12 09:54:03 +00008208cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008209#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008210_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008211
Michael W. Hudson54241132001-12-07 15:38:26 +00008212
8213
Trent Mick635f6fb2000-08-23 21:33:05 +00008214# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008215ac_save_cc="$CC"
8216if test "$ac_cv_kpthread" = "yes"
8217then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00008218elif test "$ac_cv_kthread" = "yes"
8219then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008220elif test "$ac_cv_pthread" = "yes"
8221then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008222fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008223{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_t" >&5
8224$as_echo_n "checking for pthread_t... " >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00008225have_pthread_t=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008226cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008227/* end confdefs.h. */
Matthias Klosec511b472010-05-08 11:01:39 +00008228
8229 #include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008230int
8231main ()
8232{
Guido van Rossum12580492000-09-24 16:47:19 +00008233pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008234 ;
8235 return 0;
8236}
Matthias Klosec511b472010-05-08 11:01:39 +00008237
Martin v. Löwis11437992002-04-12 09:54:03 +00008238_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008239if ac_fn_c_try_compile "$LINENO"; then :
Trent Mick635f6fb2000-08-23 21:33:05 +00008240 have_pthread_t=yes
Trent Mick635f6fb2000-08-23 21:33:05 +00008241fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008242rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008243{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_pthread_t" >&5
8244$as_echo "$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00008245if test "$have_pthread_t" = yes ; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008246 # The cast to long int works around a bug in the HP C Compiler
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008247# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8248# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8249# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008250{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
8251$as_echo_n "checking size of pthread_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008252if ${ac_cv_sizeof_pthread_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008253 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008254else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008255 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t" "
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008256#ifdef HAVE_PTHREAD_H
8257#include <pthread.h>
8258#endif
8259
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008260"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008261
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008262else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008263 if test "$ac_cv_type_pthread_t" = yes; then
8264 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8265$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00008266as_fn_error 77 "cannot compute sizeof (pthread_t)
Matthias Klose3cef2a92012-03-14 23:39:33 +01008267See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008268 else
8269 ac_cv_sizeof_pthread_t=0
8270 fi
Trent Mick635f6fb2000-08-23 21:33:05 +00008271fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008272
Trent Mick635f6fb2000-08-23 21:33:05 +00008273fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008274{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
8275$as_echo "$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008276
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008277
8278
Martin v. Löwis11437992002-04-12 09:54:03 +00008279cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00008280#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008281_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00008282
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008283
Trent Mick635f6fb2000-08-23 21:33:05 +00008284fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008285CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00008286
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008287{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-toolbox-glue" >&5
8288$as_echo_n "checking for --enable-toolbox-glue... " >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008289# Check whether --enable-toolbox-glue was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008290if test "${enable_toolbox_glue+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00008291 enableval=$enable_toolbox_glue;
8292fi
Jack Jansene578a632001-08-15 01:27:14 +00008293
8294
8295if test -z "$enable_toolbox_glue"
Martin v. Löwis11437992002-04-12 09:54:03 +00008296then
Jack Jansene578a632001-08-15 01:27:14 +00008297 case $ac_sys_system/$ac_sys_release in
8298 Darwin/*)
8299 enable_toolbox_glue="yes";;
8300 *)
8301 enable_toolbox_glue="no";;
8302 esac
8303fi
8304case "$enable_toolbox_glue" in
8305yes)
Jack Jansene578a632001-08-15 01:27:14 +00008306 extra_machdep_objs="Python/mactoolboxglue.o"
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00008307 extra_undefs="-u _PyMac_Error"
Martin v. Löwis11437992002-04-12 09:54:03 +00008308
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008309$as_echo "#define USE_TOOLBOX_OBJECT_GLUE 1" >>confdefs.h
Jack Jansene578a632001-08-15 01:27:14 +00008310
8311 ;;
8312*)
Jack Jansene578a632001-08-15 01:27:14 +00008313 extra_machdep_objs=""
Jack Jansen591cbed2001-08-15 13:55:15 +00008314 extra_undefs=""
Jack Jansene578a632001-08-15 01:27:14 +00008315 ;;
8316esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008317{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_toolbox_glue" >&5
8318$as_echo "$enable_toolbox_glue" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00008319
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008320
Ronald Oussoren0d236eb2008-06-06 21:31:33 +00008321
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008322case $ac_sys_system/$ac_sys_release in
Anthony Baxter82201742006-04-09 15:07:40 +00008323 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008324 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
8325 ;;
8326 Darwin/*)
8327 OTHER_LIBTOOL_OPT=""
8328 ;;
8329esac
8330
8331
Ronald Oussoren25967582009-09-06 10:00:26 +00008332
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008333case $ac_sys_system/$ac_sys_release in
Anthony Baxter82201742006-04-09 15:07:40 +00008334 Darwin/[01567]\..*)
Ronald Oussoren988117f2006-04-29 11:31:35 +00008335 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
8336 if test "${enable_universalsdk}"; then
8337 :
8338 else
Ronald Oussorenbc0e83c2010-02-11 13:26:54 +00008339 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Ronald Oussoren988117f2006-04-29 11:31:35 +00008340 fi
Jack Jansenb36687a2004-07-16 08:43:47 +00008341 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00008342 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00008343 Darwin/*)
Ronald Oussorena55af9a2010-01-17 16:25:57 +00008344 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008345 if test ${gcc_version} '<' 4.0
8346 then
8347 LIBTOOL_CRUFT="-lcc_dynamic"
8348 else
8349 LIBTOOL_CRUFT=""
8350 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008351 if test "$cross_compiling" = yes; then :
Ronald Oussoren23d92532009-09-07 06:12:00 +00008352 ac_osx_32bit=yes
Ronald Oussoren25967582009-09-06 10:00:26 +00008353else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008354 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren25967582009-09-06 10:00:26 +00008355/* end confdefs.h. */
Ronald Oussoren23d92532009-09-07 06:12:00 +00008356
Ronald Oussoren25967582009-09-06 10:00:26 +00008357 #include <unistd.h>
8358 int main(int argc, char*argv[])
8359 {
8360 if (sizeof(long) == 4) {
8361 return 0;
8362 } else {
8363 return 1;
8364 }
Ronald Oussoren84ddd722009-09-08 07:17:10 +00008365 }
Ronald Oussoren23d92532009-09-07 06:12:00 +00008366
Ronald Oussoren25967582009-09-06 10:00:26 +00008367_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008368if ac_fn_c_try_run "$LINENO"; then :
Ronald Oussoren25967582009-09-06 10:00:26 +00008369 ac_osx_32bit=yes
8370else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008371 ac_osx_32bit=no
Ronald Oussoren25967582009-09-06 10:00:26 +00008372fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008373rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8374 conftest.$ac_objext conftest.beam conftest.$ac_ext
Ronald Oussoren25967582009-09-06 10:00:26 +00008375fi
8376
8377
Ronald Oussoren25967582009-09-06 10:00:26 +00008378 if test "${ac_osx_32bit}" = "yes"; then
Ronald Oussorenbc0e83c2010-02-11 13:26:54 +00008379 case `/usr/bin/arch` in
Ronald Oussoren25967582009-09-06 10:00:26 +00008380 i386)
8381 MACOSX_DEFAULT_ARCH="i386"
8382 ;;
8383 ppc)
8384 MACOSX_DEFAULT_ARCH="ppc"
8385 ;;
8386 *)
Georg Brandl71f4fbb2011-02-25 11:04:50 +00008387 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren25967582009-09-06 10:00:26 +00008388 ;;
8389 esac
8390 else
Ronald Oussorenbc0e83c2010-02-11 13:26:54 +00008391 case `/usr/bin/arch` in
Ronald Oussoren25967582009-09-06 10:00:26 +00008392 i386)
8393 MACOSX_DEFAULT_ARCH="x86_64"
8394 ;;
8395 ppc)
8396 MACOSX_DEFAULT_ARCH="ppc64"
8397 ;;
8398 *)
Georg Brandl71f4fbb2011-02-25 11:04:50 +00008399 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren25967582009-09-06 10:00:26 +00008400 ;;
8401 esac
8402
8403 #ARCH_RUN_32BIT="true"
8404 fi
8405
8406 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +00008407 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00008408 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008409esac
8410
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008411{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-framework" >&5
8412$as_echo_n "checking for --enable-framework... " >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00008413if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008414then
Skip Montanarodecc6a42003-01-01 20:07:49 +00008415 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00008416 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00008417 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008418
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008419$as_echo "#define WITH_NEXT_FRAMEWORK 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008420
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008421 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8422$as_echo "yes" >&6; }
Ronald Oussoren450d5612009-06-08 21:12:41 +00008423 if test $enable_shared = "yes"
8424 then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00008425 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 +00008426 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008427else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008428 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8429$as_echo "no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008430fi
8431
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008432{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dyld" >&5
8433$as_echo_n "checking for dyld... " >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008434case $ac_sys_system/$ac_sys_release in
8435 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008436
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008437$as_echo "#define WITH_DYLD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008438
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008439 { $as_echo "$as_me:${as_lineno-$LINENO}: result: always on for Darwin" >&5
8440$as_echo "always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008441 ;;
8442 *)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008443 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8444$as_echo "no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00008445 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008446esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008447
Guido van Rossum0a516c91994-09-12 10:58:40 +00008448# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00008449
Michael W. Hudson54241132001-12-07 15:38:26 +00008450
8451
8452
8453
Ronald Oussoren75912852010-04-08 08:13:31 +00008454
Guido van Rossum0a516c91994-09-12 10:58:40 +00008455# SO is the extension of shared libraries `(including the dot!)
Guido van Rossumaef734b2001-01-10 21:09:12 +00008456# -- usually .so, .sl on HP-UX, .dll on Cygwin
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008457{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SO" >&5
8458$as_echo_n "checking SO... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008459if test -z "$SO"
8460then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008461 case $ac_sys_system in
Neal Norwitz58e28882006-05-19 07:00:58 +00008462 hp*|HP*)
8463 case `uname -m` in
8464 ia64) SO=.so;;
8465 *) SO=.sl;;
8466 esac
8467 ;;
Guido van Rossumaef734b2001-01-10 21:09:12 +00008468 CYGWIN*) SO=.dll;;
Guido van Rossum563e7081996-09-10 18:20:48 +00008469 *) SO=.so;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008470 esac
Martin v. Löwis368de8f2003-06-14 14:46:38 +00008471else
8472 # this might also be a termcap variable, see #610332
8473 echo
8474 echo '====================================================================='
8475 echo '+ +'
8476 echo '+ WARNING: You have set SO in your environment. +'
8477 echo '+ Do you really mean to change the extension for shared libraries? +'
8478 echo '+ Continuing in 10 seconds to let you to ponder. +'
8479 echo '+ +'
8480 echo '====================================================================='
8481 sleep 10
Guido van Rossum0a516c91994-09-12 10:58:40 +00008482fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008483{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SO" >&5
8484$as_echo "$SO" >&6; }
Neal Norwitz58e28882006-05-19 07:00:58 +00008485
Ronald Oussoren79f90492009-01-02 10:44:46 +00008486
Neal Norwitz58e28882006-05-19 07:00:58 +00008487cat >>confdefs.h <<_ACEOF
8488#define SHLIB_EXT "$SO"
8489_ACEOF
8490
Guido van Rossum0a516c91994-09-12 10:58:40 +00008491# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +00008492# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008493# (Shared libraries in this instance are shared modules to be loaded into
8494# Python, as opposed to building Python itself as a shared library.)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008495{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDSHARED" >&5
8496$as_echo_n "checking LDSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008497if test -z "$LDSHARED"
8498then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008499 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008500 AIX*)
Martin Panterf75a2eb2016-11-20 09:31:41 +00008501 BLDSHARED="Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +00008502 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008503 ;;
8504 BeOS*)
8505 BLDSHARED="\$(srcdir)/Modules/ld_so_beos $LDLIBRARY"
Guido van Rossumce608b02001-09-28 15:59:38 +00008506 LDSHARED="\$(BINLIBDEST)/config/ld_so_beos \$(LIBDIR)/$LDLIBRARY"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008507 ;;
Guido van Rossum07397971997-04-29 21:49:50 +00008508 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00008509 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +00008510 SunOS/5*)
Ronald Oussoren75912852010-04-08 08:13:31 +00008511 if test "$GCC" = "yes" ; then
8512 LDSHARED='$(CC) -shared'
8513 LDCXXSHARED='$(CXX) -shared'
8514 else
8515 LDSHARED='$(CC) -G'
8516 LDCXXSHARED='$(CXX) -G'
Greg Ward57c9a662000-05-26 12:22:54 +00008517 fi ;;
Thomas Hellerdc96a772008-04-04 10:07:55 +00008518 hp*|HP*)
Ronald Oussoren75912852010-04-08 08:13:31 +00008519 if test "$GCC" = "yes" ; then
8520 LDSHARED='$(CC) -shared'
8521 LDCXXSHARED='$(CXX) -shared'
8522 else
8523 LDSHARED='ld -b'
Thomas Hellerdc96a772008-04-04 10:07:55 +00008524 fi ;;
Guido van Rossumda88dad1995-01-26 00:46:29 +00008525 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
Jack Jansen418c3b12001-11-14 10:59:57 +00008526 Darwin/1.3*)
Stefan Krah3a3e2032010-11-28 15:30:05 +00008527 LDSHARED='$(CC) -bundle'
8528 LDCXXSHARED='$(CXX) -bundle'
Jack Jansena3891ea2001-09-07 14:25:12 +00008529 if test "$enable_framework" ; then
8530 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00008531 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
8532 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Ronald Oussoren75912852010-04-08 08:13:31 +00008533 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00008534 else
8535 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00008536 LDSHARED="$LDSHARED -undefined suppress"
Ronald Oussoren75912852010-04-08 08:13:31 +00008537 LDCXXSHARED="$LDCXXSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00008538 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00008539 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Stefan Krah3a3e2032010-11-28 15:30:05 +00008540 LDSHARED='$(CC) -bundle'
8541 LDCXXSHARED='$(CXX) -bundle'
Jack Jansene578a632001-08-15 01:27:14 +00008542 if test "$enable_framework" ; then
8543 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00008544 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
8545 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Ronald Oussoren75912852010-04-08 08:13:31 +00008546 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00008547 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00008548 # No framework, use the Python app as bundle-loader
8549 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00008550 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Ronald Oussoren75912852010-04-08 08:13:31 +00008551 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008552 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00008553 Darwin/*)
8554 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
8555 # This allows an extension to be used in any Python
Ronald Oussoren38f1b982007-09-02 09:46:07 +00008556
Ned Deilyc40b9032014-06-25 13:48:46 -07008557 dep_target_major=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
8558 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
8559 dep_target_minor=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
8560 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
8561 if test ${dep_target_major} -eq 10 && \
8562 test ${dep_target_minor} -le 2
Jack Jansen6b08a402004-06-03 12:41:45 +00008563 then
Ned Deilyc40b9032014-06-25 13:48:46 -07008564 # building for OS X 10.0 through 10.2
Stefan Krah3a3e2032010-11-28 15:30:05 +00008565 LDSHARED='$(CC) -bundle'
8566 LDCXXSHARED='$(CXX) -bundle'
Jack Jansen6b08a402004-06-03 12:41:45 +00008567 if test "$enable_framework" ; then
8568 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00008569 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
8570 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Ronald Oussoren75912852010-04-08 08:13:31 +00008571 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +00008572 else
8573 # No framework, use the Python app as bundle-loader
8574 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
8575 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Ronald Oussoren75912852010-04-08 08:13:31 +00008576 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Jack Jansen6b08a402004-06-03 12:41:45 +00008577 fi
Ned Deilyc40b9032014-06-25 13:48:46 -07008578 else
8579 # building for OS X 10.3 and later
8580 if test "${enable_universalsdk}"; then
8581 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
8582 fi
8583 LDSHARED='$(CC) -bundle -undefined dynamic_lookup'
8584 LDCXXSHARED='$(CXX) -bundle -undefined dynamic_lookup'
8585 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +00008586 fi
8587 ;;
Ronald Oussoren75912852010-04-08 08:13:31 +00008588 Linux*|GNU*|QNX*)
8589 LDSHARED='$(CC) -shared'
8590 LDCXXSHARED='$(CXX) -shared';;
8591 BSD/OS*/4*)
8592 LDSHARED="gcc -shared"
8593 LDCXXSHARED="g++ -shared";;
Martin v. Löwis222c5152006-06-03 07:37:13 +00008594 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00008595 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00008596 then
Stefan Krah3a3e2032010-11-28 15:30:05 +00008597 LDSHARED='$(CC) -shared'
8598 LDCXXSHARED='$(CXX) -shared'
Guido van Rossum0286ae82000-08-29 15:06:49 +00008599 else
Stefan Krah3a3e2032010-11-28 15:30:05 +00008600 LDSHARED="ld -Bshareable"
Guido van Rossum0286ae82000-08-29 15:06:49 +00008601 fi;;
Martin v. Löwis222c5152006-06-03 07:37:13 +00008602 OpenBSD*)
8603 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
8604 then
Stefan Krah3a3e2032010-11-28 15:30:05 +00008605 LDSHARED='$(CC) -shared $(CCSHARED)'
8606 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Martin v. Löwis222c5152006-06-03 07:37:13 +00008607 else
8608 case `uname -r` in
8609 [01].* | 2.[0-7] | 2.[0-7].*)
8610 LDSHARED="ld -Bshareable ${LDFLAGS}"
8611 ;;
8612 *)
Stefan Krah3a3e2032010-11-28 15:30:05 +00008613 LDSHARED='$(CC) -shared $(CCSHARED)'
8614 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Martin v. Löwis222c5152006-06-03 07:37:13 +00008615 ;;
8616 esac
8617 fi;;
Ronald Oussoren75912852010-04-08 08:13:31 +00008618 NetBSD*|DragonFly*)
Antoine Pitroucb402772011-01-02 20:51:34 +00008619 LDSHARED='$(CC) -shared'
8620 LDCXXSHARED='$(CXX) -shared';;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00008621 OpenUNIX*|UnixWare*)
Ronald Oussoren75912852010-04-08 08:13:31 +00008622 if test "$GCC" = "yes" ; then
8623 LDSHARED='$(CC) -shared'
8624 LDCXXSHARED='$(CXX) -shared'
8625 else
8626 LDSHARED='$(CC) -G'
8627 LDCXXSHARED='$(CXX) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00008628 fi;;
Ronald Oussoren75912852010-04-08 08:13:31 +00008629 SCO_SV*)
8630 LDSHARED='$(CC) -Wl,-G,-Bexport'
8631 LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
8632 CYGWIN*)
8633 LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
8634 LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
8635 atheos*)
8636 LDSHARED="gcc -shared"
8637 LDCXXSHARED="g++ -shared";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008638 *) LDSHARED="ld";;
8639 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008640fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008641{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDSHARED" >&5
8642$as_echo "$LDSHARED" >&6; }
Ronald Oussoren75912852010-04-08 08:13:31 +00008643LDCXXSHARED=${LDCXXSHARED-$LDSHARED}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008644BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00008645# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008646# library (module) -- this is only needed for a few systems
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008647{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CCSHARED" >&5
8648$as_echo_n "checking CCSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008649if test -z "$CCSHARED"
8650then
Guido van Rossum07397971997-04-29 21:49:50 +00008651 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00008652 SunOS*) if test "$GCC" = yes;
Martin v. Löwiseb623572007-03-12 10:50:39 +00008653 then CCSHARED="-fPIC";
8654 elif test `uname -p` = sparc;
8655 then CCSHARED="-xcode=pic32";
8656 else CCSHARED="-Kpic";
8657 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00008658 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00008659 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00008660 else CCSHARED="+z";
8661 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008662 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00008663 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00008664 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00008665 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00008666 if test "$GCC" = "yes"
8667 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008668 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00008669 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00008670 SCO_SV*)
8671 if test "$GCC" = "yes"
8672 then CCSHARED="-fPIC"
8673 else CCSHARED="-Kpic -belf"
8674 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008675 IRIX*/6*) case $CC in
8676 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00008677 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008678 esac;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008679 atheos*) CCSHARED="-fPIC";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008680 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008681fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008682{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCSHARED" >&5
8683$as_echo "$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008684# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008685# the python executable -- this is only needed for a few systems
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008686{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKFORSHARED" >&5
8687$as_echo_n "checking LINKFORSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008688if test -z "$LINKFORSHARED"
8689then
Guido van Rossum07397971997-04-29 21:49:50 +00008690 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008691 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008692 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00008693 LINKFORSHARED="-Wl,-E -Wl,+s";;
8694# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00008695 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008696 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008697 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00008698 Darwin/*)
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00008699 # -u _PyMac_Error is needed to pull in the mac toolbox glue,
8700 # which is
Jack Jansene578a632001-08-15 01:27:14 +00008701 # not used by the core itself but which needs to be in the core so
8702 # that dynamically loaded extension modules have access to it.
Jack Jansen97e3f002003-02-23 22:59:01 +00008703 # -prebind is no longer used, because it actually seems to give a
8704 # slowdown in stead of a speedup, maybe due to the large number of
8705 # dynamic loads Python does.
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00008706
8707 LINKFORSHARED="$extra_undefs"
Jack Jansene578a632001-08-15 01:27:14 +00008708 if test "$enable_framework"
8709 then
Jack Jansenda49e192005-01-07 13:08:22 +00008710 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00008711 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00008712 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00008713 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00008714 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00008715 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00008716 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +00008717 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
8718 then
8719 LINKFORSHARED="-Wl,--export-dynamic"
8720 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008721 SunOS/5*) case $CC in
8722 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00008723 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00008724 then
8725 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008726 fi;;
8727 esac;;
Jason Tishler30765592003-09-04 11:04:06 +00008728 CYGWIN*)
8729 if test $enable_shared = "no"
8730 then
8731 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
8732 fi;;
Martin v. Löwis8c255e42008-05-23 15:06:50 +00008733 QNX*)
8734 # -Wl,-E causes the symbols to be added to the dynamic
8735 # symbol table so that they can be found when a module
8736 # is loaded. -N 2048K causes the stack size to be set
8737 # to 2048 kilobytes so that the stack doesn't overflow
8738 # when running test_compile.py.
8739 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008740 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008741fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008742{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKFORSHARED" >&5
8743$as_echo "$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008744
Michael W. Hudson54241132001-12-07 15:38:26 +00008745
Ronald Oussoren0d236eb2008-06-06 21:31:33 +00008746
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008747{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAGSFORSHARED" >&5
8748$as_echo_n "checking CFLAGSFORSHARED... " >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00008749if test ! "$LIBRARY" = "$LDLIBRARY"
8750then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00008751 case $ac_sys_system in
8752 CYGWIN*)
8753 # Cygwin needs CCSHARED when building extension DLLs
8754 # but not when building the interpreter DLL.
8755 CFLAGSFORSHARED='';;
8756 *)
8757 CFLAGSFORSHARED='$(CCSHARED)'
8758 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00008759fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008760{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CFLAGSFORSHARED" >&5
8761$as_echo "$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00008762
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008763# SHLIBS are libraries (except -lc and -lm) to link to the python shared
8764# library (with --enable-shared).
8765# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00008766# symbols, this must be set to $(LIBS) (expanded by make). We do this even
8767# if it is not required, since it creates a dependency of the shared library
8768# to LIBS. This, in turn, means that applications linking the shared libpython
8769# don't need to link LIBS explicitly. The default should be only changed
8770# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008771
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008772{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SHLIBS" >&5
8773$as_echo_n "checking SHLIBS... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008774case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008775 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00008776 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008777esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008778{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIBS" >&5
8779$as_echo "$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008780
8781
Guido van Rossum627b2d71993-12-24 10:39:16 +00008782# checks for libraries
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008783{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
8784$as_echo_n "checking for dlopen in -ldl... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008785if ${ac_cv_lib_dl_dlopen+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008786 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008787else
Martin v. Löwis11437992002-04-12 09:54:03 +00008788 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008789LIBS="-ldl $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008790cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008791/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008792
Martin v. Löwiseba40652007-08-30 20:10:57 +00008793/* Override any GCC internal prototype to avoid an error.
8794 Use char because int might match the return type of a GCC
8795 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008796#ifdef __cplusplus
8797extern "C"
8798#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008799char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008800int
8801main ()
8802{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008803return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008804 ;
8805 return 0;
8806}
8807_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008808if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008809 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008810else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008811 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008812fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008813rm -f core conftest.err conftest.$ac_objext \
8814 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008815LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00008816fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008817{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
8818$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008819if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008820 cat >>confdefs.h <<_ACEOF
8821#define HAVE_LIBDL 1
8822_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00008823
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008824 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00008825
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008826fi
8827 # Dynamic linking for SunOS/Solaris and SYSV
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008828{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
8829$as_echo_n "checking for shl_load in -ldld... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008830if ${ac_cv_lib_dld_shl_load+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008831 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008832else
Martin v. Löwis11437992002-04-12 09:54:03 +00008833 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008834LIBS="-ldld $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008835cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008836/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008837
Martin v. Löwiseba40652007-08-30 20:10:57 +00008838/* Override any GCC internal prototype to avoid an error.
8839 Use char because int might match the return type of a GCC
8840 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008841#ifdef __cplusplus
8842extern "C"
8843#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008844char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008845int
8846main ()
8847{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008848return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008849 ;
8850 return 0;
8851}
8852_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008853if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008854 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008855else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008856 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008857fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008858rm -f core conftest.err conftest.$ac_objext \
8859 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008860LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00008861fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008862{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
8863$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008864if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008865 cat >>confdefs.h <<_ACEOF
8866#define HAVE_LIBDLD 1
8867_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00008868
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008869 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008870
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008871fi
8872 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +00008873
Ronald Oussoren79f90492009-01-02 10:44:46 +00008874# only check for sem_init if thread support is requested
Martin v. Löwis519adae2003-09-20 10:47:47 +00008875if test "$with_threads" = "yes" -o -z "$with_threads"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008876 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
8877$as_echo_n "checking for library containing sem_init... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008878if ${ac_cv_search_sem_init+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008879 $as_echo_n "(cached) " >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00008880else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00008881 ac_func_search_save_LIBS=$LIBS
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008882cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008883/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008884
Martin v. Löwiseba40652007-08-30 20:10:57 +00008885/* Override any GCC internal prototype to avoid an error.
8886 Use char because int might match the return type of a GCC
8887 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008888#ifdef __cplusplus
8889extern "C"
8890#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008891char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008892int
8893main ()
8894{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008895return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008896 ;
8897 return 0;
8898}
8899_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00008900for ac_lib in '' pthread rt posix4; do
8901 if test -z "$ac_lib"; then
8902 ac_res="none required"
8903 else
8904 ac_res=-l$ac_lib
Skip Montanaro89e975f2007-08-22 19:05:21 +00008905 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Martin v. Löwiseba40652007-08-30 20:10:57 +00008906 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008907 if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00008908 ac_cv_search_sem_init=$ac_res
Brett Cannon19fab762007-06-02 03:02:29 +00008909fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008910rm -f core conftest.err conftest.$ac_objext \
8911 conftest$ac_exeext
Matthias Klose3cef2a92012-03-14 23:39:33 +01008912 if ${ac_cv_search_sem_init+:} false; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00008913 break
Skip Montanaro89e975f2007-08-22 19:05:21 +00008914fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008915done
Matthias Klose3cef2a92012-03-14 23:39:33 +01008916if ${ac_cv_search_sem_init+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008917
Martin v. Löwiseba40652007-08-30 20:10:57 +00008918else
8919 ac_cv_search_sem_init=no
8920fi
8921rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00008922LIBS=$ac_func_search_save_LIBS
8923fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008924{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
8925$as_echo "$ac_cv_search_sem_init" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008926ac_res=$ac_cv_search_sem_init
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008927if test "$ac_res" != no; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00008928 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00008929
Martin v. Löwis41933dd2002-03-21 15:10:58 +00008930fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +00008931 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +00008932 # posix4 on Solaris 2.6
8933 # pthread (first!) on Linux
8934fi
8935
Martin v. Löwis19d17342003-06-14 21:03:05 +00008936# check if we need libintl for locale functions
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008937{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for textdomain in -lintl" >&5
8938$as_echo_n "checking for textdomain in -lintl... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008939if ${ac_cv_lib_intl_textdomain+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008940 $as_echo_n "(cached) " >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +00008941else
8942 ac_check_lib_save_LIBS=$LIBS
8943LIBS="-lintl $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008944cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008945/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00008946
Martin v. Löwiseba40652007-08-30 20:10:57 +00008947/* Override any GCC internal prototype to avoid an error.
8948 Use char because int might match the return type of a GCC
8949 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00008950#ifdef __cplusplus
8951extern "C"
8952#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +00008953char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00008954int
8955main ()
8956{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008957return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00008958 ;
8959 return 0;
8960}
8961_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008962if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00008963 ac_cv_lib_intl_textdomain=yes
8964else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008965 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +00008966fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008967rm -f core conftest.err conftest.$ac_objext \
8968 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +00008969LIBS=$ac_check_lib_save_LIBS
8970fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008971{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_textdomain" >&5
8972$as_echo "$ac_cv_lib_intl_textdomain" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008973if test "x$ac_cv_lib_intl_textdomain" = xyes; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00008974
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008975$as_echo "#define WITH_LIBINTL 1" >>confdefs.h
Martin v. Löwis19d17342003-06-14 21:03:05 +00008976
8977fi
8978
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008979
8980# checks for system dependent C++ extensions support
8981case "$ac_sys_system" in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008982 AIX*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for genuine AIX C++ extensions support" >&5
8983$as_echo_n "checking for genuine AIX C++ extensions support... " >&6; }
8984 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008985/* end confdefs.h. */
Matthias Klosec511b472010-05-08 11:01:39 +00008986
Georg Brandl94800df2011-02-25 11:09:02 +00008987 #include <load.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008988int
8989main ()
8990{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008991loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00008992 ;
8993 return 0;
8994}
Matthias Klosec511b472010-05-08 11:01:39 +00008995
Martin v. Löwis11437992002-04-12 09:54:03 +00008996_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008997if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008998
Matthias Klosec511b472010-05-08 11:01:39 +00008999
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009000$as_echo "#define AIX_GENUINE_CPLUSPLUS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009001
Matthias Klosec511b472010-05-08 11:01:39 +00009002 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009003$as_echo "yes" >&6; }
Matthias Klosec511b472010-05-08 11:01:39 +00009004
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009005else
Matthias Klosec511b472010-05-08 11:01:39 +00009006
9007 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009008$as_echo "no" >&6; }
Matthias Klosec511b472010-05-08 11:01:39 +00009009
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009010fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009011rm -f core conftest.err conftest.$ac_objext \
9012 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009013 *) ;;
9014esac
9015
Guido van Rossum70c7f481998-03-26 18:44:10 +00009016# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009017# BeOS' sockets are stashed in libnet.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009018{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_open in -lnsl" >&5
9019$as_echo_n "checking for t_open in -lnsl... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009020if ${ac_cv_lib_nsl_t_open+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009021 $as_echo_n "(cached) " >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009022else
Martin v. Löwis11437992002-04-12 09:54:03 +00009023 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009024LIBS="-lnsl $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009025cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009026/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009027
Martin v. Löwiseba40652007-08-30 20:10:57 +00009028/* Override any GCC internal prototype to avoid an error.
9029 Use char because int might match the return type of a GCC
9030 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009031#ifdef __cplusplus
9032extern "C"
9033#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009034char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009035int
9036main ()
9037{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009038return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009039 ;
9040 return 0;
9041}
9042_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009043if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009044 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009045else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009046 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009047fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009048rm -f core conftest.err conftest.$ac_objext \
9049 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009050LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009051fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009052{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_t_open" >&5
9053$as_echo "$ac_cv_lib_nsl_t_open" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009054if test "x$ac_cv_lib_nsl_t_open" = xyes; then :
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009055 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009056fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00009057 # SVR4
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009058{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
9059$as_echo_n "checking for socket in -lsocket... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009060if ${ac_cv_lib_socket_socket+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009061 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009062else
Martin v. Löwis11437992002-04-12 09:54:03 +00009063 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009064LIBS="-lsocket $LIBS $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009065cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009066/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009067
Martin v. Löwiseba40652007-08-30 20:10:57 +00009068/* Override any GCC internal prototype to avoid an error.
9069 Use char because int might match the return type of a GCC
9070 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009071#ifdef __cplusplus
9072extern "C"
9073#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009074char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009075int
9076main ()
9077{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009078return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009079 ;
9080 return 0;
9081}
9082_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009083if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009084 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009085else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009086 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009087fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009088rm -f core conftest.err conftest.$ac_objext \
9089 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009090LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009091fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009092{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
9093$as_echo "$ac_cv_lib_socket_socket" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009094if test "x$ac_cv_lib_socket_socket" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +00009095 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +00009096fi
9097 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +00009098
Jeremy Hyltoncb25d5e2000-07-27 21:23:28 +00009099case "$ac_sys_system" in
9100BeOS*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009101{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lnet" >&5
9102$as_echo_n "checking for socket in -lnet... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009103if ${ac_cv_lib_net_socket+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009104 $as_echo_n "(cached) " >&6
Guido van Rossumad678af1998-10-02 14:42:15 +00009105else
Martin v. Löwis11437992002-04-12 09:54:03 +00009106 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +00009107LIBS="-lnet $LIBS $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009108cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009109/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009110
Martin v. Löwiseba40652007-08-30 20:10:57 +00009111/* Override any GCC internal prototype to avoid an error.
9112 Use char because int might match the return type of a GCC
9113 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009114#ifdef __cplusplus
9115extern "C"
9116#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009117char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009118int
9119main ()
9120{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009121return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009122 ;
9123 return 0;
9124}
9125_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009126if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009127 ac_cv_lib_net_socket=yes
Guido van Rossumad678af1998-10-02 14:42:15 +00009128else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009129 ac_cv_lib_net_socket=no
Guido van Rossumad678af1998-10-02 14:42:15 +00009130fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009131rm -f core conftest.err conftest.$ac_objext \
9132 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009133LIBS=$ac_check_lib_save_LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +00009134fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009135{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_net_socket" >&5
9136$as_echo "$ac_cv_lib_net_socket" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009137if test "x$ac_cv_lib_net_socket" = xyes; then :
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009138 LIBS="-lnet $LIBS"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009139fi
9140 # BeOS
9141;;
9142esac
Guido van Rossum70c7f481998-03-26 18:44:10 +00009143
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009144{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libs" >&5
9145$as_echo_n "checking for --with-libs... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009146
Martin v. Löwiseba40652007-08-30 20:10:57 +00009147# Check whether --with-libs was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009148if test "${with_libs+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00009149 withval=$with_libs;
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009150{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9151$as_echo "$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +00009152LIBS="$withval $LIBS"
9153
9154else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009155 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9156$as_echo "no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009157fi
9158
Guido van Rossum7f43da71994-08-01 12:15:30 +00009159
Benjamin Peterson64e8f6e2014-12-15 00:00:23 -05009160
9161
9162
9163
9164
9165
9166
9167if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
9168 if test -n "$ac_tool_prefix"; then
Benjamin Peterson1c335e62010-01-01 15:16:29 +00009169 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
9170set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009171{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9172$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009173if ${ac_cv_path_PKG_CONFIG+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009174 $as_echo_n "(cached) " >&6
Benjamin Peterson1c335e62010-01-01 15:16:29 +00009175else
9176 case $PKG_CONFIG in
9177 [\\/]* | ?:[\\/]*)
9178 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
9179 ;;
9180 *)
9181 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9182for as_dir in $PATH
9183do
9184 IFS=$as_save_IFS
9185 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009186 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01009187 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Benjamin Peterson1c335e62010-01-01 15:16:29 +00009188 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009189 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Peterson1c335e62010-01-01 15:16:29 +00009190 break 2
9191 fi
9192done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009193 done
Benjamin Peterson1c335e62010-01-01 15:16:29 +00009194IFS=$as_save_IFS
9195
9196 ;;
9197esac
9198fi
9199PKG_CONFIG=$ac_cv_path_PKG_CONFIG
9200if test -n "$PKG_CONFIG"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009201 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
9202$as_echo "$PKG_CONFIG" >&6; }
Benjamin Peterson1c335e62010-01-01 15:16:29 +00009203else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009204 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9205$as_echo "no" >&6; }
Benjamin Peterson1c335e62010-01-01 15:16:29 +00009206fi
9207
9208
9209fi
9210if test -z "$ac_cv_path_PKG_CONFIG"; then
9211 ac_pt_PKG_CONFIG=$PKG_CONFIG
9212 # Extract the first word of "pkg-config", so it can be a program name with args.
9213set dummy pkg-config; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009214{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9215$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009216if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009217 $as_echo_n "(cached) " >&6
Benjamin Peterson1c335e62010-01-01 15:16:29 +00009218else
9219 case $ac_pt_PKG_CONFIG in
9220 [\\/]* | ?:[\\/]*)
9221 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
9222 ;;
9223 *)
9224 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9225for as_dir in $PATH
9226do
9227 IFS=$as_save_IFS
9228 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009229 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01009230 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Benjamin Peterson1c335e62010-01-01 15:16:29 +00009231 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009232 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Peterson1c335e62010-01-01 15:16:29 +00009233 break 2
9234 fi
9235done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009236 done
Benjamin Peterson1c335e62010-01-01 15:16:29 +00009237IFS=$as_save_IFS
9238
9239 ;;
9240esac
9241fi
9242ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
9243if test -n "$ac_pt_PKG_CONFIG"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009244 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
9245$as_echo "$ac_pt_PKG_CONFIG" >&6; }
Benjamin Peterson1c335e62010-01-01 15:16:29 +00009246else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009247 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9248$as_echo "no" >&6; }
Benjamin Peterson1c335e62010-01-01 15:16:29 +00009249fi
9250
9251 if test "x$ac_pt_PKG_CONFIG" = x; then
9252 PKG_CONFIG=""
9253 else
9254 case $cross_compiling:$ac_tool_warned in
9255yes:)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009256{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9257$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Benjamin Peterson1c335e62010-01-01 15:16:29 +00009258ac_tool_warned=yes ;;
9259esac
9260 PKG_CONFIG=$ac_pt_PKG_CONFIG
9261 fi
9262else
9263 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
9264fi
9265
Benjamin Peterson64e8f6e2014-12-15 00:00:23 -05009266fi
9267if test -n "$PKG_CONFIG"; then
9268 _pkg_min_version=0.9.0
9269 { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
9270$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
9271 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
9272 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9273$as_echo "yes" >&6; }
9274 else
9275 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9276$as_echo "no" >&6; }
9277 PKG_CONFIG=""
9278 fi
9279fi
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00009280
9281# Check for use of the system expat library
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009282{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-expat" >&5
9283$as_echo_n "checking for --with-system-expat... " >&6; }
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00009284
9285# Check whether --with-system_expat was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009286if test "${with_system_expat+set}" = set; then :
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00009287 withval=$with_system_expat;
Benjamin Petersonf2d1b2a2010-10-31 16:53:53 +00009288else
9289 with_system_expat="no"
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00009290fi
9291
9292
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009293{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_expat" >&5
9294$as_echo "$with_system_expat" >&6; }
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00009295
9296# Check for use of the system libffi library
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009297{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-ffi" >&5
9298$as_echo_n "checking for --with-system-ffi... " >&6; }
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00009299
9300# Check whether --with-system_ffi was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009301if test "${with_system_ffi+set}" = set; then :
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00009302 withval=$with_system_ffi;
Benjamin Petersonf2d1b2a2010-10-31 16:53:53 +00009303else
9304 with_system_ffi="no"
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00009305fi
9306
9307
9308if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
Benjamin Peterson1c335e62010-01-01 15:16:29 +00009309 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
9310else
9311 LIBFFI_INCLUDEDIR=""
9312fi
9313
9314
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009315{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_ffi" >&5
9316$as_echo "$with_system_ffi" >&6; }
Martin v. Löwis9176fc12006-04-11 11:12:43 +00009317
Ned Deilya2a9f572013-10-25 00:30:10 -07009318# Check for --with-tcltk-includes=path and --with-tcltk-libs=path
9319
9320
9321{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-includes" >&5
9322$as_echo_n "checking for --with-tcltk-includes... " >&6; }
9323
9324# Check whether --with-tcltk-includes was given.
9325if test "${with_tcltk_includes+set}" = set; then :
9326 withval=$with_tcltk_includes;
9327else
9328 with_tcltk_includes="default"
9329fi
9330
9331{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_includes" >&5
9332$as_echo "$with_tcltk_includes" >&6; }
9333{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-libs" >&5
9334$as_echo_n "checking for --with-tcltk-libs... " >&6; }
9335
9336# Check whether --with-tcltk-libs was given.
9337if test "${with_tcltk_libs+set}" = set; then :
9338 withval=$with_tcltk_libs;
9339else
9340 with_tcltk_libs="default"
9341fi
9342
9343{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_libs" >&5
9344$as_echo "$with_tcltk_libs" >&6; }
9345if test "x$with_tcltk_includes" = xdefault || test "x$with_tcltk_libs" = xdefault
9346then
9347 if test "x$with_tcltk_includes" != "x$with_tcltk_libs"
9348 then
9349 as_fn_error $? "use both --with-tcltk-includes='...' and --with-tcltk-libs='...' or neither" "$LINENO" 5
9350 fi
9351 TCLTK_INCLUDES=""
9352 TCLTK_LIBS=""
9353else
9354 TCLTK_INCLUDES="$with_tcltk_includes"
9355 TCLTK_LIBS="$with_tcltk_libs"
9356fi
9357
Benjamin Peterson867475c2009-04-29 20:36:25 +00009358# Check for --with-dbmliborder
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009359{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dbmliborder" >&5
9360$as_echo_n "checking for --with-dbmliborder... " >&6; }
Benjamin Peterson867475c2009-04-29 20:36:25 +00009361
9362# Check whether --with-dbmliborder was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009363if test "${with_dbmliborder+set}" = set; then :
Benjamin Peterson867475c2009-04-29 20:36:25 +00009364 withval=$with_dbmliborder;
9365if test x$with_dbmliborder = xyes
9366then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00009367as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Benjamin Peterson867475c2009-04-29 20:36:25 +00009368else
9369 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
9370 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
9371 then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00009372 as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Benjamin Peterson867475c2009-04-29 20:36:25 +00009373 fi
9374 done
9375fi
9376fi
9377
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009378{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dbmliborder" >&5
9379$as_echo "$with_dbmliborder" >&6; }
Benjamin Peterson867475c2009-04-29 20:36:25 +00009380
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00009381# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009382
9383
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009384{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-signal-module" >&5
9385$as_echo_n "checking for --with-signal-module... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009386
Martin v. Löwiseba40652007-08-30 20:10:57 +00009387# Check whether --with-signal-module was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009388if test "${with_signal_module+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00009389 withval=$with_signal_module;
9390fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009391
9392
9393if test -z "$with_signal_module"
9394then with_signal_module="yes"
9395fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009396{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_signal_module" >&5
9397$as_echo "$with_signal_module" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009398
9399if test "${with_signal_module}" = "yes"; then
9400 USE_SIGNAL_MODULE=""
9401 SIGNAL_OBJS=""
9402else
9403 USE_SIGNAL_MODULE="#"
9404 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
9405fi
9406
Guido van Rossum3d15bd82001-01-10 18:53:48 +00009407# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +00009408
Barry Warsawc0d24d82000-06-29 16:12:00 +00009409USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +00009410
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009411{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dec-threads" >&5
9412$as_echo_n "checking for --with-dec-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009413
Guido van Rossumec2f0731997-01-22 20:54:01 +00009414
Martin v. Löwiseba40652007-08-30 20:10:57 +00009415# Check whether --with-dec-threads was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009416if test "${with_dec_threads+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00009417 withval=$with_dec_threads;
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009418{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9419$as_echo "$withval" >&6; }
Guido van Rossumec2f0731997-01-22 20:54:01 +00009420LDLAST=-threads
Guido van Rossumf78abae1997-01-21 22:02:36 +00009421if test "${with_thread+set}" != set; then
Guido van Rossumec2f0731997-01-22 20:54:01 +00009422 with_thread="$withval";
Guido van Rossumf78abae1997-01-21 22:02:36 +00009423fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00009424else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009425 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9426$as_echo "no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009427fi
9428
Martin v. Löwis11437992002-04-12 09:54:03 +00009429
9430# Templates for things AC_DEFINEd more than once.
9431# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +00009432
9433
Martin v. Löwis11437992002-04-12 09:54:03 +00009434
9435
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009436{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-threads" >&5
9437$as_echo_n "checking for --with-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009438
Martin v. Löwiseba40652007-08-30 20:10:57 +00009439# Check whether --with-threads was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009440if test "${with_threads+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00009441 withval=$with_threads;
9442fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00009443
9444
Barry Warsawc0d24d82000-06-29 16:12:00 +00009445# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +00009446
Martin v. Löwiseba40652007-08-30 20:10:57 +00009447# Check whether --with-thread was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009448if test "${with_thread+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00009449 withval=$with_thread; with_threads=$with_thread
9450fi
9451
Barry Warsawc0d24d82000-06-29 16:12:00 +00009452
9453if test -z "$with_threads"
9454then with_threads="yes"
9455fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009456{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_threads" >&5
9457$as_echo "$with_threads" >&6; }
Barry Warsawc0d24d82000-06-29 16:12:00 +00009458
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009459
Barry Warsawc0d24d82000-06-29 16:12:00 +00009460if test "$with_threads" = "no"
9461then
9462 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009463elif test "$ac_cv_pthread_is_default" = yes
9464then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009465 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009466
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009467 # Defining _REENTRANT on system with POSIX threads should not hurt.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009468 $as_echo "#define _REENTRANT 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009469
9470 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +00009471 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009472elif test "$ac_cv_kpthread" = "yes"
9473then
9474 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00009475 if test "$ac_cv_cxx_thread" = "yes"; then
9476 CXX="$CXX -Kpthread"
9477 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009478 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum2242f2f2001-04-11 20:58:20 +00009479
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009480 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009481 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00009482elif test "$ac_cv_kthread" = "yes"
9483then
9484 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00009485 if test "$ac_cv_cxx_thread" = "yes"; then
9486 CXX="$CXX -Kthread"
9487 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009488 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis5f433f02003-05-05 05:05:30 +00009489
9490 posix_threads=yes
9491 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009492elif test "$ac_cv_pthread" = "yes"
9493then
9494 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00009495 if test "$ac_cv_cxx_thread" = "yes"; then
9496 CXX="$CXX -pthread"
9497 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009498 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009499
9500 posix_threads=yes
9501 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009502else
9503 if test ! -z "$with_threads" -a -d "$with_threads"
9504 then LDFLAGS="$LDFLAGS -L$with_threads"
9505 fi
9506 if test ! -z "$withval" -a -d "$withval"
9507 then LDFLAGS="$LDFLAGS -L$withval"
9508 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009509
9510 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +00009511 # define _POSIX_THREADS in unistd.h. Some apparently don't
9512 # (e.g. gnu pth with pthread emulation)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009513 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _POSIX_THREADS in unistd.h" >&5
9514$as_echo_n "checking for _POSIX_THREADS in unistd.h... " >&6; }
9515 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009516/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +00009517
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009518#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +00009519#ifdef _POSIX_THREADS
9520yes
9521#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009522
9523_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009524if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009525 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009526 unistd_defines_pthreads=yes
9527else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009528 unistd_defines_pthreads=no
9529fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00009530rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009531
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009532 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $unistd_defines_pthreads" >&5
9533$as_echo "$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009534
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009535 $as_echo "#define _REENTRANT 1" >>confdefs.h
Guido van Rossum9caf77a1996-08-01 00:52:26 +00009536
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009537 ac_fn_c_check_header_mongrel "$LINENO" "cthreads.h" "ac_cv_header_cthreads_h" "$ac_includes_default"
Matthias Klose3cef2a92012-03-14 23:39:33 +01009538if test "x$ac_cv_header_cthreads_h" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009539 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +00009540
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009541 $as_echo "#define C_THREADS 1" >>confdefs.h
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009542
Martin v. Löwis11437992002-04-12 09:54:03 +00009543
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009544$as_echo "#define HURD_C_THREADS 1" >>confdefs.h
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009545
9546 LIBS="$LIBS -lthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009547 THREADOBJ="Python/thread.o"
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009548else
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009549
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009550 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 +01009551if test "x$ac_cv_header_mach_cthreads_h" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009552 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +00009553
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009554 $as_echo "#define C_THREADS 1" >>confdefs.h
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009555
Martin v. Löwis11437992002-04-12 09:54:03 +00009556
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009557$as_echo "#define MACH_C_THREADS 1" >>confdefs.h
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009558
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009559 THREADOBJ="Python/thread.o"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009560else
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009561
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009562 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pth" >&5
9563$as_echo_n "checking for --with-pth... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009564
Martin v. Löwiseba40652007-08-30 20:10:57 +00009565# Check whether --with-pth was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009566if test "${with_pth+set}" = set; then :
9567 withval=$with_pth; { $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9568$as_echo "$withval" >&6; }
9569 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009570
9571
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009572$as_echo "#define HAVE_PTH 1" >>confdefs.h
Guido van Rossum9e8181b2000-09-19 00:46:46 +00009573
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00009574 LIBS="-lpth $LIBS"
9575 THREADOBJ="Python/thread.o"
Guido van Rossum9e8181b2000-09-19 00:46:46 +00009576else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009577 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9578$as_echo "no" >&6; }
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009579
9580 # Just looking for pthread_create in libpthread is not enough:
9581 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
9582 # So we really have to include pthread.h, and then link.
9583 _libs=$LIBS
9584 LIBS="$LIBS -lpthread"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009585 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
9586$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
9587 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009588/* end confdefs.h. */
Stefan Krahae66ca62012-11-22 22:36:57 +01009589
9590#include <stdio.h>
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009591#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +00009592
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009593void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +00009594int
9595main ()
9596{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009597
9598pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +00009599 ;
9600 return 0;
9601}
9602_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009603if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009604
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009605 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9606$as_echo "yes" >&6; }
9607 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum02a1c402000-02-25 19:26:31 +00009608
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009609 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009610 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +00009611else
Martin v. Löwis11437992002-04-12 09:54:03 +00009612
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009613 LIBS=$_libs
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009614 ac_fn_c_check_func "$LINENO" "pthread_detach" "ac_cv_func_pthread_detach"
Matthias Klose3cef2a92012-03-14 23:39:33 +01009615if test "x$ac_cv_func_pthread_detach" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009616 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumad678af1998-10-02 14:42:15 +00009617
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009618 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009619 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +00009620else
Guido van Rossumad678af1998-10-02 14:42:15 +00009621
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009622 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 +01009623if test "x$ac_cv_header_atheos_threads_h" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009624 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009625
9626
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009627$as_echo "#define ATHEOS_THREADS 1" >>confdefs.h
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009628
9629 THREADOBJ="Python/thread.o"
9630else
9631
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009632 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 +01009633if test "x$ac_cv_header_kernel_OS_h" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009634 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009635
9636
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009637$as_echo "#define BEOS_THREADS 1" >>confdefs.h
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009638
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009639 THREADOBJ="Python/thread.o"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009640else
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009641
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009642 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5
9643$as_echo_n "checking for pthread_create in -lpthreads... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009644if ${ac_cv_lib_pthreads_pthread_create+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009645 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009646else
Martin v. Löwis11437992002-04-12 09:54:03 +00009647 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009648LIBS="-lpthreads $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009649cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009650/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009651
Martin v. Löwiseba40652007-08-30 20:10:57 +00009652/* Override any GCC internal prototype to avoid an error.
9653 Use char because int might match the return type of a GCC
9654 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009655#ifdef __cplusplus
9656extern "C"
9657#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009658char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009659int
9660main ()
9661{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009662return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009663 ;
9664 return 0;
9665}
9666_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009667if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009668 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +00009669else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009670 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +00009671fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009672rm -f core conftest.err conftest.$ac_objext \
9673 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009674LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00009675fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009676{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5
9677$as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009678if test "x$ac_cv_lib_pthreads_pthread_create" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009679 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Greg Steinadf63d62000-07-05 10:38:09 +00009680
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009681 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00009682 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009683 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +00009684else
Greg Steinadf63d62000-07-05 10:38:09 +00009685
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009686 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5
9687$as_echo_n "checking for pthread_create in -lc_r... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009688if ${ac_cv_lib_c_r_pthread_create+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009689 $as_echo_n "(cached) " >&6
Greg Steinadf63d62000-07-05 10:38:09 +00009690else
Martin v. Löwis11437992002-04-12 09:54:03 +00009691 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00009692LIBS="-lc_r $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009693cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009694/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009695
Martin v. Löwiseba40652007-08-30 20:10:57 +00009696/* Override any GCC internal prototype to avoid an error.
9697 Use char because int might match the return type of a GCC
9698 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009699#ifdef __cplusplus
9700extern "C"
9701#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009702char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009703int
9704main ()
9705{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009706return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009707 ;
9708 return 0;
9709}
9710_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009711if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009712 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +00009713else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009714 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +00009715fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009716rm -f core conftest.err conftest.$ac_objext \
9717 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009718LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +00009719fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009720{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5
9721$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009722if test "x$ac_cv_lib_c_r_pthread_create" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009723 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum49545951997-12-02 19:28:29 +00009724
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009725 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00009726 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009727 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +00009728else
Guido van Rossum07bd90e2000-05-08 13:41:38 +00009729
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009730 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_create_system in -lpthread" >&5
9731$as_echo_n "checking for __pthread_create_system in -lpthread... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009732if ${ac_cv_lib_pthread___pthread_create_system+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009733 $as_echo_n "(cached) " >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009734else
Martin v. Löwis11437992002-04-12 09:54:03 +00009735 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009736LIBS="-lpthread $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009737cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009738/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009739
Martin v. Löwiseba40652007-08-30 20:10:57 +00009740/* Override any GCC internal prototype to avoid an error.
9741 Use char because int might match the return type of a GCC
9742 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009743#ifdef __cplusplus
9744extern "C"
9745#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009746char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009747int
9748main ()
9749{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009750return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009751 ;
9752 return 0;
9753}
9754_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009755if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009756 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009757else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009758 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009759fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009760rm -f core conftest.err conftest.$ac_objext \
9761 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009762LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009763fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009764{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_create_system" >&5
9765$as_echo "$ac_cv_lib_pthread___pthread_create_system" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009766if test "x$ac_cv_lib_pthread___pthread_create_system" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009767 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009768
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009769 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00009770 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009771 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009772else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009773
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009774 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lcma" >&5
9775$as_echo_n "checking for pthread_create in -lcma... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009776if ${ac_cv_lib_cma_pthread_create+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009777 $as_echo_n "(cached) " >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +00009778else
Martin v. Löwis11437992002-04-12 09:54:03 +00009779 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00009780LIBS="-lcma $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009781cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009782/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009783
Martin v. Löwiseba40652007-08-30 20:10:57 +00009784/* Override any GCC internal prototype to avoid an error.
9785 Use char because int might match the return type of a GCC
9786 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009787#ifdef __cplusplus
9788extern "C"
9789#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009790char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009791int
9792main ()
9793{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009794return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009795 ;
9796 return 0;
9797}
9798_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009799if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009800 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +00009801else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009802 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +00009803fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009804rm -f core conftest.err conftest.$ac_objext \
9805 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009806LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00009807fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009808{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cma_pthread_create" >&5
9809$as_echo "$ac_cv_lib_cma_pthread_create" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009810if test "x$ac_cv_lib_cma_pthread_create" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009811 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumb93a8621998-05-07 13:27:32 +00009812
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009813 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00009814 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009815 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +00009816else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +00009817
Martin v. Löwis130fb172001-07-19 11:00:41 +00009818 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +00009819fi
9820
Guido van Rossum627b2d71993-12-24 10:39:16 +00009821
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009822fi
9823
Guido van Rossum0be3e491997-05-22 20:33:33 +00009824fi
9825
Guido van Rossum49545951997-12-02 19:28:29 +00009826fi
9827
Guido van Rossumb93a8621998-05-07 13:27:32 +00009828fi
9829
Guido van Rossum07bd90e2000-05-08 13:41:38 +00009830
Michael W. Hudson54241132001-12-07 15:38:26 +00009831fi
9832
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009833
9834fi
9835
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009836fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009837rm -f core conftest.err conftest.$ac_objext \
9838 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009839fi
9840
Martin v. Löwis11437992002-04-12 09:54:03 +00009841fi
9842
9843
9844fi
9845
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009846
Michael W. Hudson54241132001-12-07 15:38:26 +00009847
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009848 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usconfig in -lmpc" >&5
9849$as_echo_n "checking for usconfig in -lmpc... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009850if ${ac_cv_lib_mpc_usconfig+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009851 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009852else
Martin v. Löwis11437992002-04-12 09:54:03 +00009853 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009854LIBS="-lmpc $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009855cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009856/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009857
Martin v. Löwiseba40652007-08-30 20:10:57 +00009858/* Override any GCC internal prototype to avoid an error.
9859 Use char because int might match the return type of a GCC
9860 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009861#ifdef __cplusplus
9862extern "C"
9863#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009864char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009865int
9866main ()
9867{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009868return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009869 ;
9870 return 0;
9871}
9872_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009873if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009874 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009875else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009876 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009877fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009878rm -f core conftest.err conftest.$ac_objext \
9879 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009880LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009881fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009882{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpc_usconfig" >&5
9883$as_echo "$ac_cv_lib_mpc_usconfig" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009884if test "x$ac_cv_lib_mpc_usconfig" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009885 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00009886
Martin v. Löwis130fb172001-07-19 11:00:41 +00009887 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009888 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009889 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +00009890fi
9891
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00009892
Neal Norwitza978ab02002-11-02 16:58:05 +00009893 if test "$posix_threads" != "yes"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009894 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thr_create in -lthread" >&5
9895$as_echo_n "checking for thr_create in -lthread... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009896if ${ac_cv_lib_thread_thr_create+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009897 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009898else
Martin v. Löwis11437992002-04-12 09:54:03 +00009899 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009900LIBS="-lthread $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009901cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009902/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009903
Martin v. Löwiseba40652007-08-30 20:10:57 +00009904/* Override any GCC internal prototype to avoid an error.
9905 Use char because int might match the return type of a GCC
9906 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009907#ifdef __cplusplus
9908extern "C"
9909#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009910char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009911int
9912main ()
9913{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009914return thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009915 ;
9916 return 0;
9917}
9918_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009919if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009920 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009921else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009922 ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009923fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009924rm -f core conftest.err conftest.$ac_objext \
9925 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009926LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009927fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009928{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_thread_thr_create" >&5
9929$as_echo "$ac_cv_lib_thread_thr_create" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009930if test "x$ac_cv_lib_thread_thr_create" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009931 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00009932
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00009933 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009934 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00009935 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +00009936fi
9937
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00009938 fi
Michael W. Hudson54241132001-12-07 15:38:26 +00009939
Martin v. Löwis130fb172001-07-19 11:00:41 +00009940 if test "$USE_THREAD_MODULE" != "#"
9941 then
9942 # If the above checks didn't disable threads, (at least) OSF1
9943 # needs this '-threads' argument during linking.
9944 case $ac_sys_system in
9945 OSF1) LDLAST=-threads;;
9946 esac
Jeremy Hylton1a2ca862000-10-16 16:59:12 +00009947 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009948fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00009949
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009950if test "$posix_threads" = "yes"; then
9951 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00009952
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009953$as_echo "#define _POSIX_THREADS 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009954
9955 fi
9956
9957 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
9958 case $ac_sys_system/$ac_sys_release in
Charles-François Natali4929eb92011-07-21 19:41:04 +02009959 SunOS/5.6)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009960$as_echo "#define HAVE_PTHREAD_DESTRUCTOR 1" >>confdefs.h
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00009961
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009962 ;;
9963 SunOS/5.8)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009964$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009965
9966 ;;
Charles-François Natali4929eb92011-07-21 19:41:04 +02009967 AIX/*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009968$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Christian Heimescba36bb2008-01-30 22:54:18 +00009969
9970 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009971 esac
9972
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009973 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
9974$as_echo_n "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009975 if ${ac_cv_pthread_system_supported+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009976 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009977else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009978 if test "$cross_compiling" = yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009979 ac_cv_pthread_system_supported=no
9980else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009981 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009982/* end confdefs.h. */
Stefan Krahae66ca62012-11-22 22:36:57 +01009983
9984 #include <stdio.h>
9985 #include <pthread.h>
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009986 void *foo(void *parm) {
9987 return NULL;
9988 }
9989 main() {
9990 pthread_attr_t attr;
9991 pthread_t id;
9992 if (pthread_attr_init(&attr)) exit(-1);
9993 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
9994 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
9995 exit(0);
9996 }
9997_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009998if ac_fn_c_try_run "$LINENO"; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009999 ac_cv_pthread_system_supported=yes
10000else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010001 ac_cv_pthread_system_supported=no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010002fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010003rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10004 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010005fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010006
Martin v. Löwiseba40652007-08-30 20:10:57 +000010007
Guido van Rossum627b2d71993-12-24 10:39:16 +000010008fi
10009
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010010 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_system_supported" >&5
10011$as_echo "$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010012 if test "$ac_cv_pthread_system_supported" = "yes"; then
10013
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010014$as_echo "#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010015
10016 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010017 for ac_func in pthread_sigmask
10018do :
10019 ac_fn_c_check_func "$LINENO" "pthread_sigmask" "ac_cv_func_pthread_sigmask"
Matthias Klose3cef2a92012-03-14 23:39:33 +010010020if test "x$ac_cv_func_pthread_sigmask" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010021 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010022#define HAVE_PTHREAD_SIGMASK 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010023_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +000010024 case $ac_sys_system in
10025 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010026
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010027$as_echo "#define HAVE_BROKEN_PTHREAD_SIGMASK 1" >>confdefs.h
Jason Tishlerfac083d2003-07-22 15:20:49 +000010028
10029 ;;
10030 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010031fi
10032done
10033
Christian Heimes0d604cf2013-08-21 13:26:05 +020010034 for ac_func in pthread_atfork
10035do :
10036 ac_fn_c_check_func "$LINENO" "pthread_atfork" "ac_cv_func_pthread_atfork"
10037if test "x$ac_cv_func_pthread_atfork" = xyes; then :
10038 cat >>confdefs.h <<_ACEOF
10039#define HAVE_PTHREAD_ATFORK 1
10040_ACEOF
10041
10042fi
10043done
10044
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010045fi
10046
10047
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010048# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000010049
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010050{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if --enable-ipv6 is specified" >&5
10051$as_echo_n "checking if --enable-ipv6 is specified... " >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000010052# Check whether --enable-ipv6 was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010053if test "${enable_ipv6+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +000010054 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010055 no)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010056 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10057$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010058 ipv6=no
10059 ;;
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010060 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10061$as_echo "yes" >&6; }
10062 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010063
10064 ipv6=yes
10065 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010066 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010067else
Martin v. Löwis11437992002-04-12 09:54:03 +000010068
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010069 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010070/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010071 /* AF_INET6 available check */
10072#include <sys/types.h>
10073#include <sys/socket.h>
Charles-François Natalibe2b9072013-01-08 19:47:00 +010010074int
10075main ()
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010076{
Charles-François Natalibe2b9072013-01-08 19:47:00 +010010077int domain = AF_INET6;
10078 ;
10079 return 0;
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010080}
Martin v. Löwis11437992002-04-12 09:54:03 +000010081_ACEOF
Charles-François Natalibe2b9072013-01-08 19:47:00 +010010082if ac_fn_c_try_compile "$LINENO"; then :
Matthias Klosec511b472010-05-08 11:01:39 +000010083
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010084 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10085$as_echo "yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010086 ipv6=yes
Matthias Klosec511b472010-05-08 11:01:39 +000010087
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010088else
Matthias Klosec511b472010-05-08 11:01:39 +000010089
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010090 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10091$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010092 ipv6=no
Matthias Klosec511b472010-05-08 11:01:39 +000010093
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010094fi
Charles-François Natalibe2b9072013-01-08 19:47:00 +010010095rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010096
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010097if test "$ipv6" = "yes"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010098 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RFC2553 API is available" >&5
10099$as_echo_n "checking if RFC2553 API is available... " >&6; }
10100 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010101/* end confdefs.h. */
Matthias Klosec511b472010-05-08 11:01:39 +000010102
10103 #include <sys/types.h>
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010104#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010105int
10106main ()
10107{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010108struct sockaddr_in6 x;
Matthias Klosec511b472010-05-08 11:01:39 +000010109 x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000010110 ;
10111 return 0;
10112}
Matthias Klosec511b472010-05-08 11:01:39 +000010113
Martin v. Löwis11437992002-04-12 09:54:03 +000010114_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010115if ac_fn_c_try_compile "$LINENO"; then :
Matthias Klosec511b472010-05-08 11:01:39 +000010116
10117 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010118$as_echo "yes" >&6; }
Matthias Klosec511b472010-05-08 11:01:39 +000010119 ipv6=yes
10120
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010121else
Matthias Klosec511b472010-05-08 11:01:39 +000010122
10123 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010124$as_echo "no" >&6; }
Matthias Klosec511b472010-05-08 11:01:39 +000010125 ipv6=no
10126
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010127fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010128rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010129fi
10130
10131if test "$ipv6" = "yes"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010132 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010133
10134fi
10135
Martin v. Löwiseba40652007-08-30 20:10:57 +000010136fi
10137
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010138
10139ipv6type=unknown
10140ipv6lib=none
10141ipv6trylibc=no
10142
10143if test "$ipv6" = "yes"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010144 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5
10145$as_echo_n "checking ipv6 stack type... " >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +000010146 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
10147 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010148 case $i in
10149 inria)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010150 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010151/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010152
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010153#include <netinet/in.h>
10154#ifdef IPV6_INRIA_VERSION
10155yes
10156#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010157_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010158if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010159 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010160 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010161fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +000010162rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010163
10164 ;;
10165 kame)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010166 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010167/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010168
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010169#include <netinet/in.h>
10170#ifdef __KAME__
10171yes
10172#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010173_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010174if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010175 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010176 ipv6type=$i;
10177 ipv6lib=inet6
10178 ipv6libdir=/usr/local/v6/lib
10179 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010180fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +000010181rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010182
10183 ;;
10184 linux-glibc)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010185 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010186/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010187
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010188#include <features.h>
10189#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
10190yes
10191#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010192_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010193if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010194 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010195 ipv6type=$i;
10196 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010197fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +000010198rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010199
10200 ;;
10201 linux-inet6)
10202 if test -d /usr/inet6; then
10203 ipv6type=$i
10204 ipv6lib=inet6
10205 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000010206 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010207 fi
10208 ;;
10209 solaris)
10210 if test -f /etc/netconfig; then
Antoine Pitrou31e85952011-01-03 18:57:14 +000010211 if $GREP -q tcp6 /etc/netconfig; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010212 ipv6type=$i
10213 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010214 fi
10215 fi
10216 ;;
10217 toshiba)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010218 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010219/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010220
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010221#include <sys/param.h>
10222#ifdef _TOSHIBA_INET6
10223yes
10224#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010225_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010226if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010227 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010228 ipv6type=$i;
10229 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010230 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010231fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +000010232rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010233
10234 ;;
10235 v6d)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010236 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010237/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010238
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010239#include </usr/local/v6/include/sys/v6config.h>
10240#ifdef __V6D__
10241yes
10242#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010243_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010244if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010245 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010246 ipv6type=$i;
10247 ipv6lib=v6;
10248 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000010249 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010250fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +000010251rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010252
10253 ;;
10254 zeta)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010255 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010256/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010257
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010258#include <sys/param.h>
10259#ifdef _ZETA_MINAMI_INET6
10260yes
10261#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010262_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010263if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010264 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010265 ipv6type=$i;
10266 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010267 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010268fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +000010269rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010270
10271 ;;
10272 esac
10273 if test "$ipv6type" != "unknown"; then
10274 break
10275 fi
10276 done
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010277 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5
10278$as_echo "$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010279fi
10280
10281if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
10282 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
10283 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
10284 echo "using lib$ipv6lib"
10285 else
10286 if test $ipv6trylibc = "yes"; then
10287 echo "using libc"
10288 else
10289 echo 'Fatal: no $ipv6lib library found. cannot continue.'
10290 echo "You need to fetch lib$ipv6lib.a from appropriate"
10291 echo 'ipv6 kit and compile beforehand.'
10292 exit 1
10293 fi
10294 fi
10295fi
10296
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010297{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for OSX 10.5 SDK or later" >&5
10298$as_echo_n "checking for OSX 10.5 SDK or later... " >&6; }
10299cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000010300/* end confdefs.h. */
Matthias Klosec511b472010-05-08 11:01:39 +000010301
10302 #include <Carbon/Carbon.h>
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000010303int
10304main ()
10305{
10306FSIORefNum fRef = 0
10307 ;
10308 return 0;
10309}
Mark Dickinson0712b562010-05-08 19:13:21 +000010310
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000010311_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010312if ac_fn_c_try_compile "$LINENO"; then :
Matthias Klosec511b472010-05-08 11:01:39 +000010313
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000010314
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010315$as_echo "#define HAVE_OSX105_SDK 1" >>confdefs.h
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000010316
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010317 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10318$as_echo "yes" >&6; }
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000010319
Mark Dickinson0712b562010-05-08 19:13:21 +000010320else
10321
10322 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10323$as_echo "no" >&6; }
10324
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000010325fi
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000010326rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10327
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010328# Check for --with-doc-strings
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010329{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-doc-strings" >&5
10330$as_echo_n "checking for --with-doc-strings... " >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010331
Martin v. Löwiseba40652007-08-30 20:10:57 +000010332# Check whether --with-doc-strings was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010333if test "${with_doc_strings+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +000010334 withval=$with_doc_strings;
10335fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010336
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010337
10338if test -z "$with_doc_strings"
10339then with_doc_strings="yes"
10340fi
10341if test "$with_doc_strings" != "no"
10342then
10343
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010344$as_echo "#define WITH_DOC_STRINGS 1" >>confdefs.h
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010345
10346fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010347{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_doc_strings" >&5
10348$as_echo "$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010349
Neil Schemenauera35c6882001-02-27 04:45:05 +000010350# Check for Python-specific malloc support
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010351{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tsc" >&5
10352$as_echo_n "checking for --with-tsc... " >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010353
Martin v. Löwiseba40652007-08-30 20:10:57 +000010354# Check whether --with-tsc was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010355if test "${with_tsc+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +000010356 withval=$with_tsc;
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010357if test "$withval" != no
10358then
10359
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010360$as_echo "#define WITH_TSC 1" >>confdefs.h
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010361
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010362 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10363$as_echo "yes" >&6; }
10364else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10365$as_echo "no" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010366fi
10367else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010368 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10369$as_echo "no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000010370fi
10371
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010372
10373# Check for Python-specific malloc support
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010374{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pymalloc" >&5
10375$as_echo_n "checking for --with-pymalloc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010376
Martin v. Löwiseba40652007-08-30 20:10:57 +000010377# Check whether --with-pymalloc was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010378if test "${with_pymalloc+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +000010379 withval=$with_pymalloc;
10380fi
Michael W. Hudson54241132001-12-07 15:38:26 +000010381
Neil Schemenauera35c6882001-02-27 04:45:05 +000010382
Neil Schemenauer16c22972002-03-22 15:34:49 +000010383if test -z "$with_pymalloc"
10384then with_pymalloc="yes"
10385fi
10386if test "$with_pymalloc" != "no"
10387then
Martin v. Löwis11437992002-04-12 09:54:03 +000010388
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010389$as_echo "#define WITH_PYMALLOC 1" >>confdefs.h
Neil Schemenauer16c22972002-03-22 15:34:49 +000010390
10391fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010392{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pymalloc" >&5
10393$as_echo "$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +000010394
Benjamin Peterson91c12eb2009-12-03 02:52:39 +000010395# Check for Valgrind support
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010396{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-valgrind" >&5
10397$as_echo_n "checking for --with-valgrind... " >&6; }
Benjamin Peterson91c12eb2009-12-03 02:52:39 +000010398
10399# Check whether --with-valgrind was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010400if test "${with_valgrind+set}" = set; then :
Benjamin Peterson91c12eb2009-12-03 02:52:39 +000010401 withval=$with_valgrind;
10402else
10403 with_valgrind=no
10404fi
10405
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010406{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_valgrind" >&5
10407$as_echo "$with_valgrind" >&6; }
Benjamin Peterson91c12eb2009-12-03 02:52:39 +000010408if test "$with_valgrind" != no; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010409 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 +010010410if test "x$ac_cv_header_valgrind_valgrind_h" = xyes; then :
Benjamin Peterson91c12eb2009-12-03 02:52:39 +000010411
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010412$as_echo "#define WITH_VALGRIND 1" >>confdefs.h
Benjamin Peterson91c12eb2009-12-03 02:52:39 +000010413
10414else
Georg Brandl71f4fbb2011-02-25 11:04:50 +000010415 as_fn_error $? "Valgrind support requested but headers not available" "$LINENO" 5
Benjamin Peterson91c12eb2009-12-03 02:52:39 +000010416
10417fi
10418
10419
10420fi
10421
Barry Warsawef82cd72000-06-30 16:21:01 +000010422# Check for --with-wctype-functions
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010423{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-wctype-functions" >&5
10424$as_echo_n "checking for --with-wctype-functions... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010425
Martin v. Löwiseba40652007-08-30 20:10:57 +000010426# Check whether --with-wctype-functions was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010427if test "${with_wctype_functions+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +000010428 withval=$with_wctype_functions;
Barry Warsawef82cd72000-06-30 16:21:01 +000010429if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000010430then
10431
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010432$as_echo "#define WANT_WCTYPE_FUNCTIONS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000010433
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010434 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10435$as_echo "yes" >&6; }
10436else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10437$as_echo "no" >&6; }
Barry Warsawef82cd72000-06-30 16:21:01 +000010438fi
10439else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010440 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10441$as_echo "no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000010442fi
10443
Barry Warsawef82cd72000-06-30 16:21:01 +000010444
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010445# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000010446
Guido van Rossum98935bf2001-09-05 19:13:16 +000010447DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000010448
Guido van Rossume97ee181999-12-20 21:27:22 +000010449# the dlopen() function means we might want to use dynload_shlib.o. some
10450# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +000010451for ac_func in dlopen
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010452do :
10453 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
Matthias Klose3cef2a92012-03-14 23:39:33 +010010454if test "x$ac_cv_func_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010455 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010456#define HAVE_DLOPEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010457_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000010458
Guido van Rossume97ee181999-12-20 21:27:22 +000010459fi
Thomas Wouters3a584202000-08-05 23:28:51 +000010460done
Guido van Rossume97ee181999-12-20 21:27:22 +000010461
Michael W. Hudson54241132001-12-07 15:38:26 +000010462
Guido van Rossume97ee181999-12-20 21:27:22 +000010463# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
10464# loading of modules.
10465
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010466{ $as_echo "$as_me:${as_lineno-$LINENO}: checking DYNLOADFILE" >&5
10467$as_echo_n "checking DYNLOADFILE... " >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000010468if test -z "$DYNLOADFILE"
10469then
10470 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000010471 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
10472 if test "$ac_cv_func_dlopen" = yes
10473 then DYNLOADFILE="dynload_shlib.o"
10474 else DYNLOADFILE="dynload_aix.o"
10475 fi
10476 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000010477 BeOS*) DYNLOADFILE="dynload_beos.o";;
10478 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Anthony Baxter82201742006-04-09 15:07:40 +000010479 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
10480 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010481 atheos*) DYNLOADFILE="dynload_atheos.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000010482 *)
10483 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
10484 # out any dynamic loading
10485 if test "$ac_cv_func_dlopen" = yes
10486 then DYNLOADFILE="dynload_shlib.o"
10487 else DYNLOADFILE="dynload_stub.o"
10488 fi
10489 ;;
10490 esac
10491fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010492{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DYNLOADFILE" >&5
10493$as_echo "$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000010494if test "$DYNLOADFILE" != "dynload_stub.o"
10495then
Martin v. Löwis11437992002-04-12 09:54:03 +000010496
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010497$as_echo "#define HAVE_DYNAMIC_LOADING 1" >>confdefs.h
Guido van Rossume97ee181999-12-20 21:27:22 +000010498
10499fi
10500
Neil Schemenauer4e425612001-06-19 15:44:15 +000010501# MACHDEP_OBJS can be set to platform-specific object files needed by Python
10502
Michael W. Hudson54241132001-12-07 15:38:26 +000010503
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010504{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP_OBJS" >&5
10505$as_echo_n "checking MACHDEP_OBJS... " >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000010506if test -z "$MACHDEP_OBJS"
10507then
Jack Jansene578a632001-08-15 01:27:14 +000010508 MACHDEP_OBJS=$extra_machdep_objs
10509else
10510 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000010511fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010512{ $as_echo "$as_me:${as_lineno-$LINENO}: result: MACHDEP_OBJS" >&5
10513$as_echo "MACHDEP_OBJS" >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000010514
Guido van Rossum627b2d71993-12-24 10:39:16 +000010515# checks for library functions
Martin v. Löwisaef18b12008-03-24 13:31:16 +000010516for ac_func in alarm setitimer getitimer bind_textdomain_codeset chown \
10517 clock confstr ctermid execv fchmod fchown fork fpathconf ftime ftruncate \
doko@ubuntu.coma50b0de2015-04-13 21:55:59 +020010518 gai_strerror getgroups getlogin getloadavg getpeername getpgid getpid \
10519 getentropy \
Martin v. Löwis50ea4562009-11-27 13:56:01 +000010520 getpriority getresuid getresgid getpwent getspnam getspent getsid getwd \
Benjamin Petersond16e01c2014-02-04 10:20:26 -050010521 initgroups kill killpg lchmod lchown lstat mkfifo mknod mktime mmap \
Martin v. Löwisa5f09072002-10-11 05:37:59 +000010522 mremap nice pathconf pause plock poll pthread_init \
Guido van Rossum162e38c2003-02-19 15:25:10 +000010523 putenv readlink realpath \
Jesse Noller355b1262009-04-02 00:03:28 +000010524 select sem_open sem_timedwait sem_getvalue sem_unlink setegid seteuid \
10525 setgid \
Martin v. Löwis4daacb12003-03-28 18:37:01 +000010526 setlocale setregid setreuid setsid setpgid setpgrp setuid setvbuf snprintf \
Martin v. Löwis50ea4562009-11-27 13:56:01 +000010527 setlocale setregid setreuid setresuid setresgid \
10528 setsid setpgid setpgrp setuid setvbuf snprintf \
Skip Montanaro7e11a012004-02-07 12:55:46 +000010529 sigaction siginterrupt sigrelse strftime \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000010530 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Neal Norwitz05a45592006-03-20 06:30:08 +000010531 truncate uname unsetenv utimes waitpid wait3 wait4 wcscoll _getpty
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010532do :
10533 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10534ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Georg Brandl71f4fbb2011-02-25 11:04:50 +000010535if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010536 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010537#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010538_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000010539
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010540fi
10541done
10542
Michael W. Hudson54241132001-12-07 15:38:26 +000010543
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010544# For some functions, having a definition is not sufficient, since
10545# we want to take their address.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010546{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chroot" >&5
10547$as_echo_n "checking for chroot... " >&6; }
10548cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010549/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010550#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010551int
10552main ()
10553{
10554void *x=chroot
10555 ;
10556 return 0;
10557}
10558_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010559if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010560
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010561$as_echo "#define HAVE_CHROOT 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010562
Matthias Klosec511b472010-05-08 11:01:39 +000010563 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010564$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010565else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010566 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10567$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010568
10569fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010570rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010571{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for link" >&5
10572$as_echo_n "checking for link... " >&6; }
10573cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010574/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010575#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010576int
10577main ()
10578{
10579void *x=link
10580 ;
10581 return 0;
10582}
10583_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010584if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010585
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010586$as_echo "#define HAVE_LINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010587
Matthias Klosec511b472010-05-08 11:01:39 +000010588 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010589$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010590else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010591 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10592$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010593
10594fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010595rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010596{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for symlink" >&5
10597$as_echo_n "checking for symlink... " >&6; }
10598cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010599/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010600#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010601int
10602main ()
10603{
10604void *x=symlink
10605 ;
10606 return 0;
10607}
10608_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010609if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010610
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010611$as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010612
Matthias Klosec511b472010-05-08 11:01:39 +000010613 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010614$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010615else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010616 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10617$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010618
10619fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010620rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010621{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fchdir" >&5
10622$as_echo_n "checking for fchdir... " >&6; }
10623cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010624/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010625#include <unistd.h>
10626int
10627main ()
10628{
10629void *x=fchdir
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öwisa64988c2003-09-20 15:30:20 +000010635
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010636$as_echo "#define HAVE_FCHDIR 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +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öwisa64988c2003-09-20 15:30:20 +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öwisa64988c2003-09-20 15:30:20 +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 fsync" >&5
10647$as_echo_n "checking for fsync... " >&6; }
10648cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010649/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010650#include <unistd.h>
10651int
10652main ()
10653{
10654void *x=fsync
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öwisa64988c2003-09-20 15:30:20 +000010660
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010661$as_echo "#define HAVE_FSYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +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öwisa64988c2003-09-20 15:30:20 +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öwisa64988c2003-09-20 15:30:20 +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 fdatasync" >&5
10672$as_echo_n "checking for fdatasync... " >&6; }
10673cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010674/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010675#include <unistd.h>
10676int
10677main ()
10678{
10679void *x=fdatasync
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öwisa64988c2003-09-20 15:30:20 +000010685
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010686$as_echo "#define HAVE_FDATASYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +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öwisa64988c2003-09-20 15:30:20 +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öwisa64988c2003-09-20 15:30:20 +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 epoll" >&5
10697$as_echo_n "checking for epoll... " >&6; }
10698cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000010699/* end confdefs.h. */
10700#include <sys/epoll.h>
10701int
10702main ()
10703{
10704void *x=epoll_create
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öwisc8ad7cc2002-11-11 13:23:45 +000010710
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010711$as_echo "#define HAVE_EPOLL 1" >>confdefs.h
Christian Heimes0e9ab5f2008-03-21 23:49:44 +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; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000010715else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010716 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10717$as_echo "no" >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000010718
10719fi
Christian Heimes0e9ab5f2008-03-21 23:49:44 +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 kqueue" >&5
10722$as_echo_n "checking for kqueue... " >&6; }
10723cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000010724/* end confdefs.h. */
10725
10726#include <sys/types.h>
10727#include <sys/event.h>
10728
10729int
10730main ()
10731{
10732int x=kqueue()
10733 ;
10734 return 0;
10735}
10736_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010737if ac_fn_c_try_compile "$LINENO"; then :
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000010738
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010739$as_echo "#define HAVE_KQUEUE 1" >>confdefs.h
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000010740
Matthias Klosec511b472010-05-08 11:01:39 +000010741 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010742$as_echo "yes" >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000010743else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010744 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10745$as_echo "no" >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000010746
10747fi
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000010748rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000010749# On some systems (eg. FreeBSD 5), we would find a definition of the
10750# functions ctermid_r, setgroups in the library, but no prototype
10751# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
10752# address to avoid compiler warnings and potential miscompilations
10753# because of the missing prototypes.
10754
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010755{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ctermid_r" >&5
10756$as_echo_n "checking for ctermid_r... " >&6; }
10757cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010758/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000010759
Martin v. Löwisd5843682002-11-21 20:41:28 +000010760#include <stdio.h>
10761
Martin v. Löwisd5843682002-11-21 20:41:28 +000010762int
10763main ()
10764{
10765void* p = ctermid_r
10766 ;
10767 return 0;
10768}
10769_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010770if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000010771
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010772$as_echo "#define HAVE_CTERMID_R 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000010773
Matthias Klosec511b472010-05-08 11:01:39 +000010774 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010775$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010776else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010777 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10778$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010779
10780fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010781rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10782
Antoine Pitroub170f172010-09-10 18:47:36 +000010783{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock declaration" >&5
10784$as_echo_n "checking for flock declaration... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010785if ${ac_cv_flock_decl+:} false; then :
Antoine Pitroub170f172010-09-10 18:47:36 +000010786 $as_echo_n "(cached) " >&6
10787else
10788 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010789/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010790#include <sys/file.h>
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010791int
10792main ()
10793{
10794void* p = flock
Antoine Pitroub170f172010-09-10 18:47:36 +000010795
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010796 ;
10797 return 0;
10798}
10799_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010800if ac_fn_c_try_compile "$LINENO"; then :
Antoine Pitroub170f172010-09-10 18:47:36 +000010801 ac_cv_flock_decl=yes
10802else
10803 ac_cv_flock_decl=no
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010804
10805fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010806rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitrou85729812010-09-07 14:55:24 +000010807
Antoine Pitroub170f172010-09-10 18:47:36 +000010808fi
10809{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_flock_decl" >&5
10810$as_echo "$ac_cv_flock_decl" >&6; }
10811if test "x${ac_cv_flock_decl}" = xyes; then
10812 for ac_func in flock
10813do :
10814 ac_fn_c_check_func "$LINENO" "flock" "ac_cv_func_flock"
Matthias Klose3cef2a92012-03-14 23:39:33 +010010815if test "x$ac_cv_func_flock" = xyes; then :
Antoine Pitroub170f172010-09-10 18:47:36 +000010816 cat >>confdefs.h <<_ACEOF
10817#define HAVE_FLOCK 1
Antoine Pitrou85729812010-09-07 14:55:24 +000010818_ACEOF
Antoine Pitroub170f172010-09-10 18:47:36 +000010819
Antoine Pitrou85729812010-09-07 14:55:24 +000010820else
Antoine Pitroub170f172010-09-10 18:47:36 +000010821 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock in -lbsd" >&5
Antoine Pitrou85729812010-09-07 14:55:24 +000010822$as_echo_n "checking for flock in -lbsd... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010823if ${ac_cv_lib_bsd_flock+:} false; then :
Antoine Pitrou85729812010-09-07 14:55:24 +000010824 $as_echo_n "(cached) " >&6
10825else
10826 ac_check_lib_save_LIBS=$LIBS
10827LIBS="-lbsd $LIBS"
10828cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10829/* end confdefs.h. */
10830
10831/* Override any GCC internal prototype to avoid an error.
10832 Use char because int might match the return type of a GCC
10833 builtin and then its argument prototype would still apply. */
10834#ifdef __cplusplus
10835extern "C"
10836#endif
10837char flock ();
10838int
10839main ()
10840{
10841return flock ();
10842 ;
10843 return 0;
10844}
10845_ACEOF
10846if ac_fn_c_try_link "$LINENO"; then :
10847 ac_cv_lib_bsd_flock=yes
10848else
10849 ac_cv_lib_bsd_flock=no
10850fi
10851rm -f core conftest.err conftest.$ac_objext \
10852 conftest$ac_exeext conftest.$ac_ext
10853LIBS=$ac_check_lib_save_LIBS
10854fi
10855{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_flock" >&5
10856$as_echo "$ac_cv_lib_bsd_flock" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010857if test "x$ac_cv_lib_bsd_flock" = xyes; then :
Antoine Pitroub170f172010-09-10 18:47:36 +000010858 $as_echo "#define HAVE_FLOCK 1" >>confdefs.h
Antoine Pitrou85729812010-09-07 14:55:24 +000010859
10860
10861$as_echo "#define FLOCK_NEEDS_LIBBSD 1" >>confdefs.h
10862
10863
10864fi
10865
10866
10867fi
Antoine Pitroub170f172010-09-10 18:47:36 +000010868done
10869
Antoine Pitrou85729812010-09-07 14:55:24 +000010870fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010871
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010872{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
10873$as_echo_n "checking for getpagesize... " >&6; }
10874cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010875/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010876
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010877#include <unistd.h>
10878
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010879int
10880main ()
10881{
10882void* p = getpagesize
10883 ;
10884 return 0;
10885}
10886_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010887if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010888
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010889$as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010890
Matthias Klosec511b472010-05-08 11:01:39 +000010891 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010892$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010893else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010894 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10895$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010896
10897fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010898rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010899
Charles-François Natali93a11752011-11-27 13:01:35 +010010900{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken unsetenv" >&5
10901$as_echo_n "checking for broken unsetenv... " >&6; }
10902cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10903/* end confdefs.h. */
10904
10905#include <stdlib.h>
10906
10907int
10908main ()
10909{
10910int res = unsetenv("DUMMY")
10911 ;
10912 return 0;
10913}
10914_ACEOF
10915if ac_fn_c_try_compile "$LINENO"; then :
10916 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10917$as_echo "no" >&6; }
10918else
10919
10920$as_echo "#define HAVE_BROKEN_UNSETENV 1" >>confdefs.h
10921
10922 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10923$as_echo "yes" >&6; }
10924
10925fi
10926rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10927
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010928for ac_prog in true
10929do
10930 # Extract the first word of "$ac_prog", so it can be a program name with args.
10931set dummy $ac_prog; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010932{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10933$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010934if ${ac_cv_prog_TRUE+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010935 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010936else
10937 if test -n "$TRUE"; then
10938 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
10939else
10940as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10941for as_dir in $PATH
10942do
10943 IFS=$as_save_IFS
10944 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010945 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +010010946 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010947 ac_cv_prog_TRUE="$ac_prog"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010948 $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 +000010949 break 2
10950 fi
10951done
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010952 done
Martin v. Löwiseba40652007-08-30 20:10:57 +000010953IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010954
10955fi
10956fi
10957TRUE=$ac_cv_prog_TRUE
10958if test -n "$TRUE"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010959 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TRUE" >&5
10960$as_echo "$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010961else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010962 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10963$as_echo "no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010964fi
10965
Martin v. Löwiseba40652007-08-30 20:10:57 +000010966
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010967 test -n "$TRUE" && break
10968done
10969test -n "$TRUE" || TRUE="/bin/true"
10970
10971
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010972{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lc" >&5
10973$as_echo_n "checking for inet_aton in -lc... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010974if ${ac_cv_lib_c_inet_aton+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010975 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010976else
10977 ac_check_lib_save_LIBS=$LIBS
10978LIBS="-lc $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010979cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010980/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010981
Martin v. Löwiseba40652007-08-30 20:10:57 +000010982/* Override any GCC internal prototype to avoid an error.
10983 Use char because int might match the return type of a GCC
10984 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010985#ifdef __cplusplus
10986extern "C"
10987#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010988char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010989int
10990main ()
10991{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010992return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010993 ;
10994 return 0;
10995}
10996_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010997if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010998 ac_cv_lib_c_inet_aton=yes
10999else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011000 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011001fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011002rm -f core conftest.err conftest.$ac_objext \
11003 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011004LIBS=$ac_check_lib_save_LIBS
11005fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011006{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_inet_aton" >&5
11007$as_echo "$ac_cv_lib_c_inet_aton" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011008if test "x$ac_cv_lib_c_inet_aton" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011009 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011010else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011011 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5
11012$as_echo_n "checking for inet_aton in -lresolv... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011013if ${ac_cv_lib_resolv_inet_aton+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011014 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011015else
11016 ac_check_lib_save_LIBS=$LIBS
11017LIBS="-lresolv $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011018cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011019/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011020
Martin v. Löwiseba40652007-08-30 20:10:57 +000011021/* Override any GCC internal prototype to avoid an error.
11022 Use char because int might match the return type of a GCC
11023 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011024#ifdef __cplusplus
11025extern "C"
11026#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011027char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011028int
11029main ()
11030{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011031return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011032 ;
11033 return 0;
11034}
11035_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011036if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011037 ac_cv_lib_resolv_inet_aton=yes
11038else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011039 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011040fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011041rm -f core conftest.err conftest.$ac_objext \
11042 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011043LIBS=$ac_check_lib_save_LIBS
11044fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011045{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5
11046$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011047if test "x$ac_cv_lib_resolv_inet_aton" = xyes; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011048 cat >>confdefs.h <<_ACEOF
11049#define HAVE_LIBRESOLV 1
11050_ACEOF
11051
11052 LIBS="-lresolv $LIBS"
11053
11054fi
11055
11056
11057fi
11058
11059
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000011060# On Tru64, chflags seems to be present, but calling it will
11061# exit Python
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011062{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chflags" >&5
11063$as_echo_n "checking for chflags... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011064if ${ac_cv_have_chflags+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011065 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011066else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011067 if test "$cross_compiling" = yes; then :
Gregory P. Smith49437c22009-11-02 01:38:35 +000011068 ac_cv_have_chflags=cross
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000011069else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011070 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000011071/* end confdefs.h. */
Ned Deily43e10542011-06-27 23:41:53 -070011072
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000011073#include <sys/stat.h>
11074#include <unistd.h>
11075int main(int argc, char*argv[])
11076{
11077 if(chflags(argv[0], 0) != 0)
11078 return 1;
11079 return 0;
11080}
Ned Deily43e10542011-06-27 23:41:53 -070011081
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000011082_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011083if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011084 ac_cv_have_chflags=yes
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011085else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011086 ac_cv_have_chflags=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011087fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011088rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11089 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +000011090fi
11091
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011092
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011093fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011094{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_chflags" >&5
11095$as_echo "$ac_cv_have_chflags" >&6; }
Gregory P. Smith49437c22009-11-02 01:38:35 +000011096if test "$ac_cv_have_chflags" = cross ; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011097 ac_fn_c_check_func "$LINENO" "chflags" "ac_cv_func_chflags"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011098if test "x$ac_cv_func_chflags" = xyes; then :
Gregory P. Smith49437c22009-11-02 01:38:35 +000011099 ac_cv_have_chflags="yes"
11100else
11101 ac_cv_have_chflags="no"
11102fi
11103
11104fi
11105if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011106
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011107$as_echo "#define HAVE_CHFLAGS 1" >>confdefs.h
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011108
11109fi
11110
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011111{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lchflags" >&5
11112$as_echo_n "checking for lchflags... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011113if ${ac_cv_have_lchflags+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011114 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011115else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011116 if test "$cross_compiling" = yes; then :
Gregory P. Smith49437c22009-11-02 01:38:35 +000011117 ac_cv_have_lchflags=cross
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000011118else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011119 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000011120/* end confdefs.h. */
Ned Deily43e10542011-06-27 23:41:53 -070011121
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000011122#include <sys/stat.h>
11123#include <unistd.h>
11124int main(int argc, char*argv[])
11125{
11126 if(lchflags(argv[0], 0) != 0)
11127 return 1;
11128 return 0;
11129}
Ned Deily43e10542011-06-27 23:41:53 -070011130
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000011131_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011132if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011133 ac_cv_have_lchflags=yes
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011134else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011135 ac_cv_have_lchflags=no
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000011136fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011137rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11138 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011139fi
11140
11141
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011142fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011143{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lchflags" >&5
11144$as_echo "$ac_cv_have_lchflags" >&6; }
Gregory P. Smith49437c22009-11-02 01:38:35 +000011145if test "$ac_cv_have_lchflags" = cross ; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011146 ac_fn_c_check_func "$LINENO" "lchflags" "ac_cv_func_lchflags"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011147if test "x$ac_cv_func_lchflags" = xyes; then :
Gregory P. Smith49437c22009-11-02 01:38:35 +000011148 ac_cv_have_lchflags="yes"
11149else
11150 ac_cv_have_lchflags="no"
11151fi
11152
11153fi
11154if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011155
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011156$as_echo "#define HAVE_LCHFLAGS 1" >>confdefs.h
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011157
11158fi
11159
Ronald Oussorenf8752642006-07-06 10:13:35 +000011160case $ac_sys_system/$ac_sys_release in
11161Darwin/*)
11162 _CUR_CFLAGS="${CFLAGS}"
11163 _CUR_LDFLAGS="${LDFLAGS}"
11164 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
11165 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
11166 ;;
11167esac
11168
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011169{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5
11170$as_echo_n "checking for inflateCopy in -lz... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011171if ${ac_cv_lib_z_inflateCopy+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011172 $as_echo_n "(cached) " >&6
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000011173else
11174 ac_check_lib_save_LIBS=$LIBS
11175LIBS="-lz $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011176cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000011177/* end confdefs.h. */
11178
Martin v. Löwiseba40652007-08-30 20:10:57 +000011179/* Override any GCC internal prototype to avoid an error.
11180 Use char because int might match the return type of a GCC
11181 builtin and then its argument prototype would still apply. */
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000011182#ifdef __cplusplus
11183extern "C"
11184#endif
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000011185char inflateCopy ();
11186int
11187main ()
11188{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011189return inflateCopy ();
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000011190 ;
11191 return 0;
11192}
11193_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011194if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000011195 ac_cv_lib_z_inflateCopy=yes
11196else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011197 ac_cv_lib_z_inflateCopy=no
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000011198fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011199rm -f core conftest.err conftest.$ac_objext \
11200 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000011201LIBS=$ac_check_lib_save_LIBS
11202fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011203{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5
11204$as_echo "$ac_cv_lib_z_inflateCopy" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011205if test "x$ac_cv_lib_z_inflateCopy" = xyes; then :
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000011206
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011207$as_echo "#define HAVE_ZLIB_COPY 1" >>confdefs.h
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000011208
11209fi
11210
11211
Ronald Oussorenf8752642006-07-06 10:13:35 +000011212case $ac_sys_system/$ac_sys_release in
11213Darwin/*)
11214 CFLAGS="${_CUR_CFLAGS}"
11215 LDFLAGS="${_CUR_LDFLAGS}"
11216 ;;
11217esac
11218
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011219{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hstrerror" >&5
11220$as_echo_n "checking for hstrerror... " >&6; }
11221cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011222/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000011223
Martin v. Löwise9416172003-05-03 10:12:45 +000011224#include <netdb.h>
11225
Martin v. Löwise9416172003-05-03 10:12:45 +000011226int
11227main ()
11228{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011229void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000011230 ;
11231 return 0;
11232}
11233_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011234if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000011235
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011236$as_echo "#define HAVE_HSTRERROR 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000011237
Matthias Klosec511b472010-05-08 11:01:39 +000011238 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011239$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011240else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011241 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11242$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011243
11244fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011245rm -f core conftest.err conftest.$ac_objext \
11246 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011247
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011248{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5
11249$as_echo_n "checking for inet_aton... " >&6; }
11250cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011251/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000011252
Martin v. Löwis86d66262006-02-17 08:40:11 +000011253#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000011254#include <sys/socket.h>
11255#include <netinet/in.h>
11256#include <arpa/inet.h>
11257
Martin v. Löwise9416172003-05-03 10:12:45 +000011258int
11259main ()
11260{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011261void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000011262 ;
11263 return 0;
11264}
11265_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011266if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000011267
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011268$as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000011269
Matthias Klosec511b472010-05-08 11:01:39 +000011270 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011271$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011272else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011273 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11274$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011275
11276fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011277rm -f core conftest.err conftest.$ac_objext \
11278 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011279
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011280{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_pton" >&5
11281$as_echo_n "checking for inet_pton... " >&6; }
11282cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011283/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000011284
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000011285#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000011286#include <sys/socket.h>
11287#include <netinet/in.h>
11288#include <arpa/inet.h>
11289
Martin v. Löwise9416172003-05-03 10:12:45 +000011290int
11291main ()
11292{
11293void* p = inet_pton
11294 ;
11295 return 0;
11296}
11297_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011298if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000011299
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011300$as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000011301
Matthias Klosec511b472010-05-08 11:01:39 +000011302 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011303$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011304else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011305 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11306$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011307
11308fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011309rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000011310
Martin v. Löwisd6640d42003-07-06 09:29:52 +000011311# On some systems, setgroups is in unistd.h, on others, in grp.h
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011312{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for setgroups" >&5
11313$as_echo_n "checking for setgroups... " >&6; }
11314cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011315/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000011316
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000011317#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000011318#ifdef HAVE_GRP_H
11319#include <grp.h>
11320#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000011321
Martin v. Löwisd5843682002-11-21 20:41:28 +000011322int
11323main ()
11324{
11325void* p = setgroups
11326 ;
11327 return 0;
11328}
11329_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011330if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000011331
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011332$as_echo "#define HAVE_SETGROUPS 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000011333
Matthias Klosec511b472010-05-08 11:01:39 +000011334 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011335$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011336else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011337 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11338$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011339
11340fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011341rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000011342
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011343# check for openpty and forkpty
11344
11345for ac_func in openpty
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011346do :
11347 ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011348if test "x$ac_cv_func_openpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011349 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011350#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011351_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011352
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011353else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011354 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5
11355$as_echo_n "checking for openpty in -lutil... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011356if ${ac_cv_lib_util_openpty+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011357 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000011358else
Martin v. Löwis11437992002-04-12 09:54:03 +000011359 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011360LIBS="-lutil $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011361cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011362/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011363
Martin v. Löwiseba40652007-08-30 20:10:57 +000011364/* Override any GCC internal prototype to avoid an error.
11365 Use char because int might match the return type of a GCC
11366 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011367#ifdef __cplusplus
11368extern "C"
11369#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011370char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011371int
11372main ()
11373{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011374return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011375 ;
11376 return 0;
11377}
11378_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011379if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011380 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000011381else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011382 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011383fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011384rm -f core conftest.err conftest.$ac_objext \
11385 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011386LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011387fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011388{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5
11389$as_echo "$ac_cv_lib_util_openpty" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011390if test "x$ac_cv_lib_util_openpty" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011391 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000011392 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011393else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011394 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lbsd" >&5
11395$as_echo_n "checking for openpty in -lbsd... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011396if ${ac_cv_lib_bsd_openpty+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011397 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011398else
11399 ac_check_lib_save_LIBS=$LIBS
11400LIBS="-lbsd $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011401cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011402/* end confdefs.h. */
11403
Martin v. Löwiseba40652007-08-30 20:10:57 +000011404/* Override any GCC internal prototype to avoid an error.
11405 Use char because int might match the return type of a GCC
11406 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011407#ifdef __cplusplus
11408extern "C"
11409#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011410char openpty ();
11411int
11412main ()
11413{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011414return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011415 ;
11416 return 0;
11417}
11418_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011419if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011420 ac_cv_lib_bsd_openpty=yes
11421else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011422 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011423fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011424rm -f core conftest.err conftest.$ac_objext \
11425 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011426LIBS=$ac_check_lib_save_LIBS
11427fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011428{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_openpty" >&5
11429$as_echo "$ac_cv_lib_bsd_openpty" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011430if test "x$ac_cv_lib_bsd_openpty" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011431 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011432 LIBS="$LIBS -lbsd"
11433fi
11434
11435
11436fi
11437
Fred Drake8cef4cf2000-06-28 16:40:38 +000011438
11439fi
11440done
11441
11442for ac_func in forkpty
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011443do :
11444 ac_fn_c_check_func "$LINENO" "forkpty" "ac_cv_func_forkpty"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011445if test "x$ac_cv_func_forkpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011446 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011447#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011448_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011449
Fred Drake8cef4cf2000-06-28 16:40:38 +000011450else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011451 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5
11452$as_echo_n "checking for forkpty in -lutil... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011453if ${ac_cv_lib_util_forkpty+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011454 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000011455else
Martin v. Löwis11437992002-04-12 09:54:03 +000011456 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011457LIBS="-lutil $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011458cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011459/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011460
Martin v. Löwiseba40652007-08-30 20:10:57 +000011461/* Override any GCC internal prototype to avoid an error.
11462 Use char because int might match the return type of a GCC
11463 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011464#ifdef __cplusplus
11465extern "C"
11466#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011467char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011468int
11469main ()
11470{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011471return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011472 ;
11473 return 0;
11474}
11475_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011476if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011477 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000011478else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011479 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011480fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011481rm -f core conftest.err conftest.$ac_objext \
11482 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011483LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011484fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011485{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5
11486$as_echo "$ac_cv_lib_util_forkpty" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011487if test "x$ac_cv_lib_util_forkpty" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011488 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000011489 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011490else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011491 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lbsd" >&5
11492$as_echo_n "checking for forkpty in -lbsd... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011493if ${ac_cv_lib_bsd_forkpty+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011494 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011495else
11496 ac_check_lib_save_LIBS=$LIBS
11497LIBS="-lbsd $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011498cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011499/* end confdefs.h. */
11500
Martin v. Löwiseba40652007-08-30 20:10:57 +000011501/* Override any GCC internal prototype to avoid an error.
11502 Use char because int might match the return type of a GCC
11503 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011504#ifdef __cplusplus
11505extern "C"
11506#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011507char forkpty ();
11508int
11509main ()
11510{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011511return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011512 ;
11513 return 0;
11514}
11515_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011516if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011517 ac_cv_lib_bsd_forkpty=yes
11518else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011519 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011520fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011521rm -f core conftest.err conftest.$ac_objext \
11522 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011523LIBS=$ac_check_lib_save_LIBS
11524fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011525{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_forkpty" >&5
11526$as_echo "$ac_cv_lib_bsd_forkpty" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011527if test "x$ac_cv_lib_bsd_forkpty" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011528 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011529 LIBS="$LIBS -lbsd"
11530fi
11531
11532
11533fi
11534
Fred Drake8cef4cf2000-06-28 16:40:38 +000011535
11536fi
11537done
11538
Jack Jansendd19cf82001-12-06 22:36:17 +000011539
Brett Cannonaa5778d2008-03-18 04:09:00 +000011540# Stuff for expat.
Brett Cannonaa5778d2008-03-18 04:09:00 +000011541for ac_func in memmove
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011542do :
11543 ac_fn_c_check_func "$LINENO" "memmove" "ac_cv_func_memmove"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011544if test "x$ac_cv_func_memmove" = xyes; then :
Brett Cannonaa5778d2008-03-18 04:09:00 +000011545 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011546#define HAVE_MEMMOVE 1
Brett Cannonaa5778d2008-03-18 04:09:00 +000011547_ACEOF
11548
11549fi
11550done
11551
11552
Michael W. Hudson54241132001-12-07 15:38:26 +000011553# check for long file support functions
Fred Drake8cef4cf2000-06-28 16:40:38 +000011554for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011555do :
11556 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11557ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Georg Brandl71f4fbb2011-02-25 11:04:50 +000011558if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011559 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011560#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011561_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000011562
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011563fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000011564done
11565
Michael W. Hudson54241132001-12-07 15:38:26 +000011566
Georg Brandl71f4fbb2011-02-25 11:04:50 +000011567ac_fn_c_check_func "$LINENO" "dup2" "ac_cv_func_dup2"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011568if test "x$ac_cv_func_dup2" = xyes; then :
Georg Brandl71f4fbb2011-02-25 11:04:50 +000011569 $as_echo "#define HAVE_DUP2 1" >>confdefs.h
Martin v. Löwis1142de32002-03-29 16:28:31 +000011570
Martin v. Löwis1142de32002-03-29 16:28:31 +000011571else
Martin v. Löwiseba40652007-08-30 20:10:57 +000011572 case " $LIBOBJS " in
Georg Brandl71f4fbb2011-02-25 11:04:50 +000011573 *" dup2.$ac_objext "* ) ;;
11574 *) LIBOBJS="$LIBOBJS dup2.$ac_objext"
Martin v. Löwiseba40652007-08-30 20:10:57 +000011575 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000011576esac
11577
Martin v. Löwis1142de32002-03-29 16:28:31 +000011578fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +000011579
11580ac_fn_c_check_func "$LINENO" "getcwd" "ac_cv_func_getcwd"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011581if test "x$ac_cv_func_getcwd" = xyes; then :
Georg Brandl71f4fbb2011-02-25 11:04:50 +000011582 $as_echo "#define HAVE_GETCWD 1" >>confdefs.h
11583
11584else
11585 case " $LIBOBJS " in
11586 *" getcwd.$ac_objext "* ) ;;
11587 *) LIBOBJS="$LIBOBJS getcwd.$ac_objext"
11588 ;;
11589esac
11590
11591fi
11592
11593ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011594if test "x$ac_cv_func_strdup" = xyes; then :
Georg Brandl71f4fbb2011-02-25 11:04:50 +000011595 $as_echo "#define HAVE_STRDUP 1" >>confdefs.h
11596
11597else
11598 case " $LIBOBJS " in
11599 *" strdup.$ac_objext "* ) ;;
11600 *) LIBOBJS="$LIBOBJS strdup.$ac_objext"
11601 ;;
11602esac
11603
11604fi
Martin v. Löwis1142de32002-03-29 16:28:31 +000011605
11606
11607for ac_func in getpgrp
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011608do :
11609 ac_fn_c_check_func "$LINENO" "getpgrp" "ac_cv_func_getpgrp"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011610if test "x$ac_cv_func_getpgrp" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011611 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011612#define HAVE_GETPGRP 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011613_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011614 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011615/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011616#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011617int
11618main ()
11619{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011620getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000011621 ;
11622 return 0;
11623}
11624_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011625if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011626
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011627$as_echo "#define GETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000011628
Guido van Rossum627b2d71993-12-24 10:39:16 +000011629fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011630rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011631
Guido van Rossum627b2d71993-12-24 10:39:16 +000011632fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011633done
Guido van Rossum627b2d71993-12-24 10:39:16 +000011634
Jack Jansen150753c2003-03-29 22:07:47 +000011635for ac_func in setpgrp
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011636do :
11637 ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011638if test "x$ac_cv_func_setpgrp" = xyes; then :
Jack Jansen150753c2003-03-29 22:07:47 +000011639 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011640#define HAVE_SETPGRP 1
Jack Jansen150753c2003-03-29 22:07:47 +000011641_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011642 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011643/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000011644#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000011645int
11646main ()
11647{
11648setpgrp(0,0);
11649 ;
11650 return 0;
11651}
11652_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011653if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011654
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011655$as_echo "#define SETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000011656
Guido van Rossum8eee56f1994-10-20 22:18:37 +000011657fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011658rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000011659
11660fi
11661done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000011662
Thomas Wouters3a584202000-08-05 23:28:51 +000011663for ac_func in gettimeofday
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011664do :
11665 ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011666if test "x$ac_cv_func_gettimeofday" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011667 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011668#define HAVE_GETTIMEOFDAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011669_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011670 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011671/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000011672#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011673int
11674main ()
11675{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011676gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000011677 ;
11678 return 0;
11679}
11680_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011681if ac_fn_c_try_compile "$LINENO"; then :
11682
Guido van Rossum627b2d71993-12-24 10:39:16 +000011683else
Skip Montanaro6dead952003-09-25 14:50:04 +000011684
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011685$as_echo "#define GETTIMEOFDAY_NO_TZ 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000011686
Martin v. Löwis11437992002-04-12 09:54:03 +000011687
Guido van Rossum627b2d71993-12-24 10:39:16 +000011688fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011689rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011690
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011691fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011692done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011693
Michael W. Hudson54241132001-12-07 15:38:26 +000011694
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011695{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for major" >&5
11696$as_echo_n "checking for major... " >&6; }
11697cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011698/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011699
Neal Norwitz6eb37f02003-02-23 23:28:15 +000011700#if defined(MAJOR_IN_MKDEV)
11701#include <sys/mkdev.h>
11702#elif defined(MAJOR_IN_SYSMACROS)
11703#include <sys/sysmacros.h>
11704#else
11705#include <sys/types.h>
11706#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011707
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011708int
11709main ()
11710{
11711
11712 makedev(major(0),minor(0));
11713
11714 ;
11715 return 0;
11716}
11717_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011718if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011719
11720
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011721$as_echo "#define HAVE_DEVICE_MACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011722
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011723 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11724$as_echo "yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011725
11726else
Skip Montanaro6dead952003-09-25 14:50:04 +000011727
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011728 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11729$as_echo "no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011730
11731fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011732rm -f core conftest.err conftest.$ac_objext \
11733 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000011734
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011735# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000011736# for [no]getaddrinfo in netdb.h.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011737{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
11738$as_echo_n "checking for getaddrinfo... " >&6; }
11739cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011740/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011741
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000011742#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011743#include <sys/socket.h>
11744#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000011745#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011746
Martin v. Löwis11437992002-04-12 09:54:03 +000011747int
11748main ()
11749{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011750getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000011751 ;
11752 return 0;
11753}
11754_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011755if ac_fn_c_try_link "$LINENO"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011756 have_getaddrinfo=yes
11757else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011758 have_getaddrinfo=no
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011759fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011760rm -f core conftest.err conftest.$ac_objext \
11761 conftest$ac_exeext conftest.$ac_ext
11762{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getaddrinfo" >&5
11763$as_echo "$have_getaddrinfo" >&6; }
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011764if test $have_getaddrinfo = yes
11765then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011766 { $as_echo "$as_me:${as_lineno-$LINENO}: checking getaddrinfo bug" >&5
11767$as_echo_n "checking getaddrinfo bug... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011768 if ${ac_cv_buggy_getaddrinfo+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011769 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011770else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011771 if test "$cross_compiling" = yes; then :
doko@python.orgd65e2ba2013-01-31 23:52:03 +010011772
11773if test "${enable_ipv6+set}" = set; then
11774 ac_cv_buggy_getaddrinfo="no -- configured with --(en|dis)able-ipv6"
11775else
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011776 ac_cv_buggy_getaddrinfo=yes
doko@python.orgd65e2ba2013-01-31 23:52:03 +010011777fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011778else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011779 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011780/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011781
Stefan Krah0afe4e42012-11-22 23:56:51 +010011782#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011783#include <sys/types.h>
11784#include <netdb.h>
11785#include <string.h>
11786#include <sys/socket.h>
11787#include <netinet/in.h>
11788
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011789int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011790{
11791 int passive, gaierr, inet4 = 0, inet6 = 0;
11792 struct addrinfo hints, *ai, *aitop;
11793 char straddr[INET6_ADDRSTRLEN], strport[16];
11794
11795 for (passive = 0; passive <= 1; passive++) {
11796 memset(&hints, 0, sizeof(hints));
11797 hints.ai_family = AF_UNSPEC;
11798 hints.ai_flags = passive ? AI_PASSIVE : 0;
11799 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000011800 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011801 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
11802 (void)gai_strerror(gaierr);
11803 goto bad;
11804 }
11805 for (ai = aitop; ai; ai = ai->ai_next) {
11806 if (ai->ai_addr == NULL ||
11807 ai->ai_addrlen == 0 ||
11808 getnameinfo(ai->ai_addr, ai->ai_addrlen,
11809 straddr, sizeof(straddr), strport, sizeof(strport),
11810 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
11811 goto bad;
11812 }
11813 switch (ai->ai_family) {
11814 case AF_INET:
11815 if (strcmp(strport, "54321") != 0) {
11816 goto bad;
11817 }
11818 if (passive) {
11819 if (strcmp(straddr, "0.0.0.0") != 0) {
11820 goto bad;
11821 }
11822 } else {
11823 if (strcmp(straddr, "127.0.0.1") != 0) {
11824 goto bad;
11825 }
11826 }
11827 inet4++;
11828 break;
11829 case AF_INET6:
11830 if (strcmp(strport, "54321") != 0) {
11831 goto bad;
11832 }
11833 if (passive) {
11834 if (strcmp(straddr, "::") != 0) {
11835 goto bad;
11836 }
11837 } else {
11838 if (strcmp(straddr, "::1") != 0) {
11839 goto bad;
11840 }
11841 }
11842 inet6++;
11843 break;
11844 case AF_UNSPEC:
11845 goto bad;
11846 break;
11847 default:
11848 /* another family support? */
11849 break;
11850 }
11851 }
Benjamin Petersond34677c2016-09-06 15:54:24 -070011852 freeaddrinfo(aitop);
11853 aitop = NULL;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011854 }
11855
11856 if (!(inet4 == 0 || inet4 == 2))
11857 goto bad;
11858 if (!(inet6 == 0 || inet6 == 2))
11859 goto bad;
11860
11861 if (aitop)
11862 freeaddrinfo(aitop);
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011863 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011864
11865 bad:
11866 if (aitop)
11867 freeaddrinfo(aitop);
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011868 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011869}
11870
Martin v. Löwis11437992002-04-12 09:54:03 +000011871_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011872if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011873 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011874else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011875 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011876fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011877rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11878 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011879fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011880
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011881fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011882
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011883fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011884
Benjamin Peterson75fed812010-11-01 01:47:19 +000011885{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_buggy_getaddrinfo" >&5
11886$as_echo "$ac_cv_buggy_getaddrinfo" >&6; }
11887
Mark Dickinson0ef0b912009-12-31 21:11:48 +000011888if test $have_getaddrinfo = no -o "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011889then
11890 if test $ipv6 = yes
11891 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011892 echo 'Fatal: You must get working getaddrinfo() function.'
11893 echo ' or you can specify "--disable-ipv6"'.
11894 exit 1
11895 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011896else
Martin v. Löwis11437992002-04-12 09:54:03 +000011897
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011898$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011899
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011900fi
Benjamin Peterson75fed812010-11-01 01:47:19 +000011901
Jack Jansen9a66b6d2001-08-08 13:56:14 +000011902for ac_func in getnameinfo
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011903do :
11904 ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011905if test "x$ac_cv_func_getnameinfo" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011906 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011907#define HAVE_GETNAMEINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011908_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011909
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011910fi
11911done
11912
Michael W. Hudson54241132001-12-07 15:38:26 +000011913
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011914# checks for structures
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011915{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
11916$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011917if ${ac_cv_header_time+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011918 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011919else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011920 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011921/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011922#include <sys/types.h>
11923#include <sys/time.h>
11924#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011925
Martin v. Löwis11437992002-04-12 09:54:03 +000011926int
11927main ()
11928{
11929if ((struct tm *) 0)
11930return 0;
11931 ;
11932 return 0;
11933}
11934_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011935if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011936 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000011937else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011938 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011939fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011940rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011941fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011942{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
11943$as_echo "$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000011944if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011945
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011946$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011947
11948fi
11949
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011950{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
11951$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011952if ${ac_cv_struct_tm+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011953 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011954else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011955 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011956/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011957#include <sys/types.h>
11958#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011959
Martin v. Löwis11437992002-04-12 09:54:03 +000011960int
11961main ()
11962{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011963struct tm tm;
11964 int *p = &tm.tm_sec;
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011965 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000011966 ;
11967 return 0;
11968}
11969_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011970if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011971 ac_cv_struct_tm=time.h
11972else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011973 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011974fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011975rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011976fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011977{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
11978$as_echo "$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000011979if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011980
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011981$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011982
11983fi
11984
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011985ac_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 +000011986#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000011987
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011988"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011989if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011990
11991cat >>confdefs.h <<_ACEOF
11992#define HAVE_STRUCT_TM_TM_ZONE 1
11993_ACEOF
11994
11995
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011996fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011997
Martin v. Löwis11437992002-04-12 09:54:03 +000011998if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
11999
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012000$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012001
12002else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012003 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
12004"
Matthias Klose3cef2a92012-03-14 23:39:33 +010012005if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012006 ac_have_decl=1
Martin v. Löwiseba40652007-08-30 20:10:57 +000012007else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012008 ac_have_decl=0
Martin v. Löwiseba40652007-08-30 20:10:57 +000012009fi
12010
Martin v. Löwiseba40652007-08-30 20:10:57 +000012011cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012012#define HAVE_DECL_TZNAME $ac_have_decl
Martin v. Löwiseba40652007-08-30 20:10:57 +000012013_ACEOF
12014
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012015 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
12016$as_echo_n "checking for tzname... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012017if ${ac_cv_var_tzname+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012018 $as_echo_n "(cached) " >&6
Martin v. Löwiseba40652007-08-30 20:10:57 +000012019else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012020 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012021/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000012022#include <time.h>
Martin v. Löwiseba40652007-08-30 20:10:57 +000012023#if !HAVE_DECL_TZNAME
12024extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000012025#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012026
Martin v. Löwis11437992002-04-12 09:54:03 +000012027int
12028main ()
12029{
Martin v. Löwiseba40652007-08-30 20:10:57 +000012030return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000012031 ;
12032 return 0;
12033}
12034_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012035if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012036 ac_cv_var_tzname=yes
12037else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012038 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012039fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012040rm -f core conftest.err conftest.$ac_objext \
12041 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000012042fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012043{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
12044$as_echo "$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000012045 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012046
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012047$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000012048
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012049 fi
12050fi
12051
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012052ac_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 +010012053if test "x$ac_cv_member_struct_stat_st_rdev" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012054
12055cat >>confdefs.h <<_ACEOF
12056#define HAVE_STRUCT_STAT_ST_RDEV 1
12057_ACEOF
12058
12059
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012060fi
12061
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012062ac_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 +010012063if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000012064
Martin v. Löwis11437992002-04-12 09:54:03 +000012065cat >>confdefs.h <<_ACEOF
12066#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
12067_ACEOF
12068
12069
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012070fi
12071
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012072ac_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 +010012073if test "x$ac_cv_member_struct_stat_st_flags" = xyes; then :
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000012074
12075cat >>confdefs.h <<_ACEOF
12076#define HAVE_STRUCT_STAT_ST_FLAGS 1
12077_ACEOF
12078
12079
12080fi
12081
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012082ac_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 +010012083if test "x$ac_cv_member_struct_stat_st_gen" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000012084
12085cat >>confdefs.h <<_ACEOF
12086#define HAVE_STRUCT_STAT_ST_GEN 1
12087_ACEOF
12088
12089
12090fi
12091
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012092ac_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 +010012093if test "x$ac_cv_member_struct_stat_st_birthtime" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000012094
12095cat >>confdefs.h <<_ACEOF
12096#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
12097_ACEOF
12098
12099
12100fi
12101
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012102ac_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 +010012103if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000012104
Martin v. Löwis11437992002-04-12 09:54:03 +000012105cat >>confdefs.h <<_ACEOF
12106#define HAVE_STRUCT_STAT_ST_BLOCKS 1
12107_ACEOF
12108
12109
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012110fi
12111
Michael W. Hudson54241132001-12-07 15:38:26 +000012112
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012113{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5
12114$as_echo_n "checking for time.h that defines altzone... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012115if ${ac_cv_header_time_altzone+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012116 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012117else
Matthias Klosec511b472010-05-08 11:01:39 +000012118
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012119 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012120/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012121#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012122int
12123main ()
12124{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012125return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000012126 ;
12127 return 0;
12128}
12129_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012130if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012131 ac_cv_header_time_altzone=yes
12132else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012133 ac_cv_header_time_altzone=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012134fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012135rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosec511b472010-05-08 11:01:39 +000012136
Martin v. Löwiseba40652007-08-30 20:10:57 +000012137fi
12138
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012139{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5
12140$as_echo "$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012141if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012142
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012143$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012144
12145fi
12146
Guido van Rossumda88dad1995-01-26 00:46:29 +000012147was_it_defined=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012148{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
12149$as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
12150cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012151/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012152
12153#include <sys/types.h>
12154#include <sys/select.h>
12155#include <sys/time.h>
12156
Martin v. Löwis11437992002-04-12 09:54:03 +000012157int
12158main ()
12159{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012160;
Martin v. Löwis11437992002-04-12 09:54:03 +000012161 ;
12162 return 0;
12163}
12164_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012165if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012166
12167
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012168$as_echo "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012169
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012170 was_it_defined=yes
12171
Martin v. Löwiseba40652007-08-30 20:10:57 +000012172fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012173rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012174{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
12175$as_echo "$was_it_defined" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012176
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012177{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for addrinfo" >&5
12178$as_echo_n "checking for addrinfo... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012179if ${ac_cv_struct_addrinfo+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012180 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012181else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012182 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012183/* end confdefs.h. */
Matthias Klosec511b472010-05-08 11:01:39 +000012184#include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012185int
12186main ()
12187{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012188struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000012189 ;
12190 return 0;
12191}
12192_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012193if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012194 ac_cv_struct_addrinfo=yes
12195else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012196 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012197fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012198rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12199fi
12200
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012201{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5
12202$as_echo "$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012203if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012204
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012205$as_echo "#define HAVE_ADDRINFO 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012206
12207fi
12208
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012209{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5
12210$as_echo_n "checking for sockaddr_storage... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012211if ${ac_cv_struct_sockaddr_storage+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012212 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012213else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012214 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012215/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012216
12217# include <sys/types.h>
12218# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012219int
12220main ()
12221{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012222struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000012223 ;
12224 return 0;
12225}
12226_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012227if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012228 ac_cv_struct_sockaddr_storage=yes
12229else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012230 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012231fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012232rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12233fi
12234
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012235{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5
12236$as_echo "$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012237if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012238
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012239$as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012240
12241fi
12242
Guido van Rossum627b2d71993-12-24 10:39:16 +000012243# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000012244
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012245{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
12246$as_echo_n "checking whether char is unsigned... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012247if ${ac_cv_c_char_unsigned+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012248 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000012249else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012250 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012251/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012252$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000012253int
12254main ()
12255{
12256static int test_array [1 - 2 * !(((char) -1) < 0)];
Charles-François Natalibe2b9072013-01-08 19:47:00 +010012257test_array [0] = 0;
12258return test_array [0];
Martin v. Löwis11437992002-04-12 09:54:03 +000012259
12260 ;
12261 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000012262}
Martin v. Löwis11437992002-04-12 09:54:03 +000012263_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012264if ac_fn_c_try_compile "$LINENO"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000012265 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000012266else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012267 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012268fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012269rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012270fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012271{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
12272$as_echo "$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012273if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012274 $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012275
12276fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000012277
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012278{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
12279$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012280if ${ac_cv_c_const+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012281 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000012282else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012283 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012284/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012285
Martin v. Löwis11437992002-04-12 09:54:03 +000012286int
12287main ()
12288{
Charles-François Natalibe2b9072013-01-08 19:47:00 +010012289
Martin v. Löwis11437992002-04-12 09:54:03 +000012290#ifndef __cplusplus
Charles-François Natalibe2b9072013-01-08 19:47:00 +010012291 /* Ultrix mips cc rejects this sort of thing. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012292 typedef int charset[2];
Charles-François Natalibe2b9072013-01-08 19:47:00 +010012293 const charset cs = { 0, 0 };
Martin v. Löwis11437992002-04-12 09:54:03 +000012294 /* SunOS 4.1.1 cc rejects this. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000012295 char const *const *pcpcc;
12296 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000012297 /* NEC SVR4.0.2 mips cc rejects this. */
12298 struct point {int x, y;};
12299 static struct point const zero = {0,0};
12300 /* AIX XL C 1.02.0.0 rejects this.
12301 It does not let you subtract one const X* pointer from another in
12302 an arm of an if-expression whose if-part is not a constant
12303 expression */
12304 const char *g = "string";
Martin v. Löwiseba40652007-08-30 20:10:57 +000012305 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012306 /* HPUX 7.0 cc rejects these. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000012307 ++pcpcc;
12308 ppc = (char**) pcpcc;
12309 pcpcc = (char const *const *) ppc;
Charles-François Natalibe2b9072013-01-08 19:47:00 +010012310 { /* SCO 3.2v4 cc rejects this sort of thing. */
12311 char tx;
12312 char *t = &tx;
Martin v. Löwis11437992002-04-12 09:54:03 +000012313 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012314
Martin v. Löwis11437992002-04-12 09:54:03 +000012315 *t++ = 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +000012316 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012317 }
12318 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
12319 int x[] = {25, 17};
12320 const int *foo = &x[0];
12321 ++foo;
12322 }
12323 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
12324 typedef const int *iptr;
12325 iptr p = 0;
12326 ++p;
12327 }
Charles-François Natalibe2b9072013-01-08 19:47:00 +010012328 { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
Martin v. Löwis11437992002-04-12 09:54:03 +000012329 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
Charles-François Natalibe2b9072013-01-08 19:47:00 +010012330 struct s { int j; const int *ap[3]; } bx;
12331 struct s *b = &bx; b->j = 5;
Martin v. Löwis11437992002-04-12 09:54:03 +000012332 }
12333 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
12334 const int foo = 10;
Martin v. Löwiseba40652007-08-30 20:10:57 +000012335 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012336 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012337 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000012338#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000012339
Martin v. Löwis11437992002-04-12 09:54:03 +000012340 ;
12341 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000012342}
Martin v. Löwis11437992002-04-12 09:54:03 +000012343_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012344if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012345 ac_cv_c_const=yes
12346else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012347 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012348fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012349rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012350fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012351{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
12352$as_echo "$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012353if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012354
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012355$as_echo "#define const /**/" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012356
12357fi
12358
Michael W. Hudson54241132001-12-07 15:38:26 +000012359
Guido van Rossumda88dad1995-01-26 00:46:29 +000012360works=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012361{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5
12362$as_echo_n "checking for working volatile... " >&6; }
12363cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012364/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000012365
Martin v. Löwis11437992002-04-12 09:54:03 +000012366int
12367main ()
12368{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012369volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012370 ;
12371 return 0;
12372}
12373_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012374if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000012375 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000012376else
Skip Montanaro6dead952003-09-25 14:50:04 +000012377
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012378$as_echo "#define volatile /**/" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000012379
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012380
Guido van Rossum627b2d71993-12-24 10:39:16 +000012381fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012382rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012383{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
12384$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000012385
Guido van Rossumda88dad1995-01-26 00:46:29 +000012386works=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012387{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working signed char" >&5
12388$as_echo_n "checking for working signed char... " >&6; }
12389cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012390/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000012391
Martin v. Löwis11437992002-04-12 09:54:03 +000012392int
12393main ()
12394{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012395signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000012396 ;
12397 return 0;
12398}
12399_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012400if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000012401 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000012402else
Skip Montanaro6dead952003-09-25 14:50:04 +000012403
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012404$as_echo "#define signed /**/" >>confdefs.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000012405
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012406
Guido van Rossum7f43da71994-08-01 12:15:30 +000012407fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012408rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012409{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
12410$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000012411
Guido van Rossumda88dad1995-01-26 00:46:29 +000012412have_prototypes=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012413{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototypes" >&5
12414$as_echo_n "checking for prototypes... " >&6; }
12415cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012416/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012417int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012418int
12419main ()
12420{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012421return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000012422 ;
12423 return 0;
12424}
12425_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012426if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012427
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012428$as_echo "#define HAVE_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012429
Matthias Klosec511b472010-05-08 11:01:39 +000012430 have_prototypes=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000012431fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012432rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012433{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_prototypes" >&5
12434$as_echo "$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012435
Guido van Rossumda88dad1995-01-26 00:46:29 +000012436works=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012437{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for variable length prototypes and stdarg.h" >&5
12438$as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; }
12439cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012440/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012441
12442#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000012443int foo(int x, ...) {
12444 va_list va;
12445 va_start(va, x);
12446 va_arg(va, int);
12447 va_arg(va, char *);
12448 va_arg(va, double);
12449 return 0;
12450}
Guido van Rossum7f43da71994-08-01 12:15:30 +000012451
Martin v. Löwis11437992002-04-12 09:54:03 +000012452int
12453main ()
12454{
Guido van Rossum90eea071996-08-30 20:58:57 +000012455return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000012456 ;
12457 return 0;
12458}
12459_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012460if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012461
12462
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012463$as_echo "#define HAVE_STDARG_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012464
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012465 works=yes
12466
Guido van Rossum627b2d71993-12-24 10:39:16 +000012467fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012468rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012469{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
12470$as_echo "$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012471
Martin v. Löwisd6320502004-08-12 13:45:08 +000012472# check for socketpair
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012473{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair" >&5
12474$as_echo_n "checking for socketpair... " >&6; }
12475cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000012476/* end confdefs.h. */
12477
12478#include <sys/types.h>
12479#include <sys/socket.h>
12480
12481int
12482main ()
12483{
12484void *x=socketpair
12485 ;
12486 return 0;
12487}
12488_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012489if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd6320502004-08-12 13:45:08 +000012490
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012491$as_echo "#define HAVE_SOCKETPAIR 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +000012492
Matthias Klosec511b472010-05-08 11:01:39 +000012493 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012494$as_echo "yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000012495else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012496 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12497$as_echo "no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000012498
12499fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012500rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000012501
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012502# check if sockaddr has sa_len member
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012503{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr has sa_len member" >&5
12504$as_echo_n "checking if sockaddr has sa_len member... " >&6; }
12505cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012506/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012507#include <sys/types.h>
12508#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012509int
12510main ()
12511{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012512struct sockaddr x;
12513x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012514 ;
12515 return 0;
12516}
12517_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012518if ac_fn_c_try_compile "$LINENO"; then :
12519 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12520$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012521
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012522$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012523
12524else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012525 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12526$as_echo "no" >&6; }
Matthias Klosec511b472010-05-08 11:01:39 +000012527
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012528fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012529rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012530
Guido van Rossumda88dad1995-01-26 00:46:29 +000012531va_list_is_array=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012532{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether va_list is an array" >&5
12533$as_echo_n "checking whether va_list is an array... " >&6; }
12534cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012535/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012536
12537#ifdef HAVE_STDARG_PROTOTYPES
12538#include <stdarg.h>
12539#else
12540#include <varargs.h>
12541#endif
12542
Martin v. Löwis11437992002-04-12 09:54:03 +000012543int
12544main ()
12545{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012546va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000012547 ;
12548 return 0;
12549}
12550_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012551if ac_fn_c_try_compile "$LINENO"; then :
12552
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012553else
Skip Montanaro6dead952003-09-25 14:50:04 +000012554
Martin v. Löwis11437992002-04-12 09:54:03 +000012555
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012556$as_echo "#define VA_LIST_IS_ARRAY 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012557
Guido van Rossumda88dad1995-01-26 00:46:29 +000012558 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012559
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012560fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012561rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012562{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $va_list_is_array" >&5
12563$as_echo "$va_list_is_array" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012564
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012565# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000012566
12567
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012568ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r"
Matthias Klose3cef2a92012-03-14 23:39:33 +010012569if test "x$ac_cv_func_gethostbyname_r" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012570
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012571 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000012572
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012573 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 6 args" >&5
12574$as_echo_n "checking gethostbyname_r with 6 args... " >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012575 OLD_CFLAGS=$CFLAGS
12576 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012577 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012578/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012579
12580# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012581
Martin v. Löwis11437992002-04-12 09:54:03 +000012582int
12583main ()
12584{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012585
12586 char *name;
12587 struct hostent *he, *res;
12588 char buffer[2048];
12589 int buflen = 2048;
12590 int h_errnop;
12591
12592 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000012593
12594 ;
12595 return 0;
12596}
12597_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012598if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012599
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012600 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000012601
Martin v. Löwis11437992002-04-12 09:54:03 +000012602
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012603$as_echo "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012604
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012605 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12606$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012607
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012608else
Skip Montanaro6dead952003-09-25 14:50:04 +000012609
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012610 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12611$as_echo "no" >&6; }
12612 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 5 args" >&5
12613$as_echo_n "checking gethostbyname_r with 5 args... " >&6; }
12614 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012615/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012616
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012617# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012618
Martin v. Löwis11437992002-04-12 09:54:03 +000012619int
12620main ()
12621{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012622
12623 char *name;
12624 struct hostent *he;
Matthias Klosec511b472010-05-08 11:01:39 +000012625 char buffer[2048];
12626 int buflen = 2048;
12627 int h_errnop;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012628
Matthias Klosec511b472010-05-08 11:01:39 +000012629 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000012630
12631 ;
12632 return 0;
12633}
12634_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012635if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012636
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012637 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000012638
Martin v. Löwis11437992002-04-12 09:54:03 +000012639
Matthias Klosec511b472010-05-08 11:01:39 +000012640$as_echo "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012641
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012642 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12643$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012644
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012645else
Skip Montanaro6dead952003-09-25 14:50:04 +000012646
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012647 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12648$as_echo "no" >&6; }
Matthias Klosec511b472010-05-08 11:01:39 +000012649 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 3 args" >&5
12650$as_echo_n "checking gethostbyname_r with 3 args... " >&6; }
12651 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12652/* end confdefs.h. */
12653
12654# include <netdb.h>
12655
12656int
12657main ()
12658{
12659
12660 char *name;
12661 struct hostent *he;
12662 struct hostent_data data;
12663
12664 (void) gethostbyname_r(name, he, &data);
12665
12666 ;
12667 return 0;
12668}
12669_ACEOF
12670if ac_fn_c_try_compile "$LINENO"; then :
12671
12672 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
12673
12674
12675$as_echo "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h
12676
12677 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12678$as_echo "yes" >&6; }
12679
12680else
12681
12682 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12683$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012684
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012685fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012686rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012687
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012688fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012689rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012690
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012691fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012692rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012693 CFLAGS=$OLD_CFLAGS
12694
12695else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012696
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012697 for ac_func in gethostbyname
12698do :
12699 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
Matthias Klose3cef2a92012-03-14 23:39:33 +010012700if test "x$ac_cv_func_gethostbyname" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012701 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012702#define HAVE_GETHOSTBYNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012703_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012704
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012705fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012706done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012707
Michael W. Hudson54241132001-12-07 15:38:26 +000012708
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012709fi
12710
Michael W. Hudson54241132001-12-07 15:38:26 +000012711
12712
12713
12714
12715
12716
Guido van Rossum627b2d71993-12-24 10:39:16 +000012717# checks for system services
12718# (none yet)
12719
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012720# Linux requires this for correct f.p. operations
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012721ac_fn_c_check_func "$LINENO" "__fpu_control" "ac_cv_func___fpu_control"
Matthias Klose3cef2a92012-03-14 23:39:33 +010012722if test "x$ac_cv_func___fpu_control" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012723
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000012724else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012725 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5
12726$as_echo_n "checking for __fpu_control in -lieee... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012727if ${ac_cv_lib_ieee___fpu_control+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012728 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012729else
Martin v. Löwis11437992002-04-12 09:54:03 +000012730 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012731LIBS="-lieee $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012732cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012733/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012734
Martin v. Löwiseba40652007-08-30 20:10:57 +000012735/* Override any GCC internal prototype to avoid an error.
12736 Use char because int might match the return type of a GCC
12737 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012738#ifdef __cplusplus
12739extern "C"
12740#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012741char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012742int
12743main ()
12744{
Martin v. Löwiseba40652007-08-30 20:10:57 +000012745return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012746 ;
12747 return 0;
12748}
12749_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012750if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012751 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000012752else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012753 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012754fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012755rm -f core conftest.err conftest.$ac_objext \
12756 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012757LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012758fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012759{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee___fpu_control" >&5
12760$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012761if test "x$ac_cv_lib_ieee___fpu_control" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012762 cat >>confdefs.h <<_ACEOF
12763#define HAVE_LIBIEEE 1
12764_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012765
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012766 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012767
Guido van Rossum627b2d71993-12-24 10:39:16 +000012768fi
12769
Michael W. Hudson54241132001-12-07 15:38:26 +000012770
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000012771fi
12772
Michael W. Hudson54241132001-12-07 15:38:26 +000012773
Guido van Rossum7f253911997-05-09 02:42:48 +000012774# Check for --with-fpectl
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012775{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-fpectl" >&5
12776$as_echo_n "checking for --with-fpectl... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012777
Martin v. Löwiseba40652007-08-30 20:10:57 +000012778# Check whether --with-fpectl was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012779if test "${with_fpectl+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +000012780 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000012781if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000012782then
12783
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012784$as_echo "#define WANT_SIGFPE_HANDLER 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012785
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012786 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12787$as_echo "yes" >&6; }
12788else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12789$as_echo "no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000012790fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000012791else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012792 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12793$as_echo "no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012794fi
12795
Guido van Rossum7f253911997-05-09 02:42:48 +000012796
Guido van Rossum7f43da71994-08-01 12:15:30 +000012797# check for --with-libm=...
12798
Guido van Rossum563e7081996-09-10 18:20:48 +000012799case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000012800Darwin) ;;
Guido van Rossumec95c7b1998-08-04 17:59:56 +000012801BeOS) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000012802*) LIBM=-lm
12803esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012804{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libm=STRING" >&5
12805$as_echo_n "checking for --with-libm=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012806
Martin v. Löwiseba40652007-08-30 20:10:57 +000012807# Check whether --with-libm was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012808if test "${with_libm+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +000012809 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000012810if test "$withval" = no
12811then LIBM=
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012812 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBM empty" >&5
12813$as_echo "force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000012814elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000012815then LIBM=$withval
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012816 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBM=\"$withval\"" >&5
12817$as_echo "set LIBM=\"$withval\"" >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +000012818else as_fn_error $? "proper usage is --with-libm=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000012819fi
Guido van Rossum7f253911997-05-09 02:42:48 +000012820else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012821 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBM=\"$LIBM\"" >&5
12822$as_echo "default LIBM=\"$LIBM\"" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012823fi
12824
Guido van Rossum7f43da71994-08-01 12:15:30 +000012825
12826# check for --with-libc=...
12827
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012828{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libc=STRING" >&5
12829$as_echo_n "checking for --with-libc=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012830
Martin v. Löwiseba40652007-08-30 20:10:57 +000012831# Check whether --with-libc was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012832if test "${with_libc+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +000012833 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000012834if test "$withval" = no
12835then LIBC=
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012836 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBC empty" >&5
12837$as_echo "force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000012838elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000012839then LIBC=$withval
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012840 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBC=\"$withval\"" >&5
12841$as_echo "set LIBC=\"$withval\"" >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +000012842else as_fn_error $? "proper usage is --with-libc=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000012843fi
Guido van Rossum7f253911997-05-09 02:42:48 +000012844else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012845 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBC=\"$LIBC\"" >&5
12846$as_echo "default LIBC=\"$LIBC\"" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012847fi
12848
Guido van Rossum7f43da71994-08-01 12:15:30 +000012849
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012850# **************************************************
12851# * Check for various properties of floating point *
12852# **************************************************
Mark Dickinson265d7382008-04-21 22:32:24 +000012853
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012854{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are little-endian IEEE 754 binary64" >&5
12855$as_echo_n "checking whether C doubles are little-endian IEEE 754 binary64... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012856if ${ac_cv_little_endian_double+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012857 $as_echo_n "(cached) " >&6
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012858else
12859
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012860if test "$cross_compiling" = yes; then :
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012861 ac_cv_little_endian_double=no
12862else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012863 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012864/* end confdefs.h. */
12865
12866#include <string.h>
12867int main() {
12868 double x = 9006104071832581.0;
12869 if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
12870 return 0;
12871 else
12872 return 1;
12873}
12874
12875_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012876if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012877 ac_cv_little_endian_double=yes
12878else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012879 ac_cv_little_endian_double=no
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012880fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012881rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12882 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012883fi
12884
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012885fi
12886
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012887{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_little_endian_double" >&5
12888$as_echo "$ac_cv_little_endian_double" >&6; }
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012889if test "$ac_cv_little_endian_double" = yes
12890then
12891
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012892$as_echo "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012893
12894fi
12895
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012896{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are big-endian IEEE 754 binary64" >&5
12897$as_echo_n "checking whether C doubles are big-endian IEEE 754 binary64... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012898if ${ac_cv_big_endian_double+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012899 $as_echo_n "(cached) " >&6
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012900else
12901
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012902if test "$cross_compiling" = yes; then :
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012903 ac_cv_big_endian_double=no
12904else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012905 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012906/* end confdefs.h. */
12907
12908#include <string.h>
12909int main() {
12910 double x = 9006104071832581.0;
12911 if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
12912 return 0;
12913 else
12914 return 1;
12915}
12916
12917_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012918if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012919 ac_cv_big_endian_double=yes
12920else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012921 ac_cv_big_endian_double=no
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012922fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012923rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12924 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012925fi
12926
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012927fi
12928
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012929{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_big_endian_double" >&5
12930$as_echo "$ac_cv_big_endian_double" >&6; }
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012931if test "$ac_cv_big_endian_double" = yes
12932then
12933
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012934$as_echo "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012935
12936fi
12937
12938# Some ARM platforms use a mixed-endian representation for doubles.
12939# While Python doesn't currently have full support for these platforms
12940# (see e.g., issue 1762561), we can at least make sure that float <-> string
12941# conversions work.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012942{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5
12943$as_echo_n "checking whether C doubles are ARM mixed-endian IEEE 754 binary64... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012944if ${ac_cv_mixed_endian_double+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012945 $as_echo_n "(cached) " >&6
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012946else
12947
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012948if test "$cross_compiling" = yes; then :
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012949 ac_cv_mixed_endian_double=no
12950else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012951 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012952/* end confdefs.h. */
12953
12954#include <string.h>
12955int main() {
12956 double x = 9006104071832581.0;
12957 if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
12958 return 0;
12959 else
12960 return 1;
12961}
12962
12963_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012964if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012965 ac_cv_mixed_endian_double=yes
12966else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012967 ac_cv_mixed_endian_double=no
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012968fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012969rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12970 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012971fi
12972
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012973fi
12974
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012975{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mixed_endian_double" >&5
12976$as_echo "$ac_cv_mixed_endian_double" >&6; }
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012977if test "$ac_cv_mixed_endian_double" = yes
12978then
12979
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012980$as_echo "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012981
12982fi
12983
12984# The short float repr introduced in Python 3.1 requires the
12985# correctly-rounded string <-> double conversion functions from
12986# Python/dtoa.c, which in turn require that the FPU uses 53-bit
12987# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsona548dee2009-11-15 13:12:43 +000012988# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012989# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsona548dee2009-11-15 13:12:43 +000012990
12991# This inline assembler syntax may also work for suncc and icc,
12992# so we try it on all platforms.
12993
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012994{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
12995$as_echo_n "checking whether we can use gcc inline assembler to get and set x87 control word... " >&6; }
12996cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012997/* end confdefs.h. */
12998
12999int
13000main ()
13001{
13002
Mark Dickinsona548dee2009-11-15 13:12:43 +000013003 unsigned short cw;
13004 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
13005 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000013006
13007 ;
13008 return 0;
13009}
13010_ACEOF
Stefan Krah99e36b92015-07-03 15:30:54 +020013011if ac_fn_c_try_link "$LINENO"; then :
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000013012 have_gcc_asm_for_x87=yes
13013else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013014 have_gcc_asm_for_x87=no
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000013015fi
Stefan Krah99e36b92015-07-03 15:30:54 +020013016rm -f core conftest.err conftest.$ac_objext \
13017 conftest$ac_exeext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013018{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x87" >&5
13019$as_echo "$have_gcc_asm_for_x87" >&6; }
Mark Dickinsona548dee2009-11-15 13:12:43 +000013020if test "$have_gcc_asm_for_x87" = yes
13021then
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000013022
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013023$as_echo "#define HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000013024
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000013025fi
Mark Dickinson7a3d8642008-04-22 00:54:27 +000013026
Mark Dickinson04b27232009-01-04 12:29:36 +000013027# Detect whether system arithmetic is subject to x87-style double
13028# rounding issues. The result of this test has little meaning on non
13029# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
13030# mode is round-to-nearest and double rounding issues are present, and
13031# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013032{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x87-style double rounding" >&5
13033$as_echo_n "checking for x87-style double rounding... " >&6; }
Mark Dickinson99abd142009-10-24 13:44:16 +000013034# $BASECFLAGS may affect the result
13035ac_save_cc="$CC"
13036CC="$CC $BASECFLAGS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013037if test "$cross_compiling" = yes; then :
Mark Dickinson04b27232009-01-04 12:29:36 +000013038 ac_cv_x87_double_rounding=no
13039else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013040 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson04b27232009-01-04 12:29:36 +000013041/* end confdefs.h. */
13042
13043#include <stdlib.h>
13044#include <math.h>
13045int main() {
13046 volatile double x, y, z;
13047 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
13048 x = 0.99999999999999989; /* 1-2**-53 */
13049 y = 1./x;
13050 if (y != 1.)
13051 exit(0);
13052 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
13053 x = 1e16;
13054 y = 2.99999;
13055 z = x + y;
13056 if (z != 1e16+4.)
13057 exit(0);
13058 /* both tests show evidence of double rounding */
13059 exit(1);
13060}
13061
13062_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013063if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson04b27232009-01-04 12:29:36 +000013064 ac_cv_x87_double_rounding=no
13065else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013066 ac_cv_x87_double_rounding=yes
Mark Dickinson04b27232009-01-04 12:29:36 +000013067fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013068rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13069 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson04b27232009-01-04 12:29:36 +000013070fi
13071
Mark Dickinson99abd142009-10-24 13:44:16 +000013072CC="$ac_save_cc"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013073{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5
13074$as_echo "$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson04b27232009-01-04 12:29:36 +000013075if test "$ac_cv_x87_double_rounding" = yes
13076then
13077
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013078$as_echo "#define X87_DOUBLE_ROUNDING 1" >>confdefs.h
Mark Dickinson04b27232009-01-04 12:29:36 +000013079
13080fi
13081
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000013082# ************************************
13083# * Check for mathematical functions *
13084# ************************************
13085
13086LIBS_SAVE=$LIBS
13087LIBS="$LIBS $LIBM"
13088
Mark Dickinson265d7382008-04-21 22:32:24 +000013089# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
13090# -0. on some architectures.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013091{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether tanh preserves the sign of zero" >&5
13092$as_echo_n "checking whether tanh preserves the sign of zero... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013093if ${ac_cv_tanh_preserves_zero_sign+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013094 $as_echo_n "(cached) " >&6
Mark Dickinson265d7382008-04-21 22:32:24 +000013095else
13096
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013097if test "$cross_compiling" = yes; then :
Mark Dickinson265d7382008-04-21 22:32:24 +000013098 ac_cv_tanh_preserves_zero_sign=no
13099else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013100 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson265d7382008-04-21 22:32:24 +000013101/* end confdefs.h. */
13102
13103#include <math.h>
Mark Dickinson7a3d8642008-04-22 00:54:27 +000013104#include <stdlib.h>
Mark Dickinson265d7382008-04-21 22:32:24 +000013105int main() {
13106 /* return 0 if either negative zeros don't exist
13107 on this platform or if negative zeros exist
13108 and tanh(-0.) == -0. */
13109 if (atan2(0., -1.) == atan2(-0., -1.) ||
13110 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
13111 else exit(1);
13112}
13113
13114_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013115if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson265d7382008-04-21 22:32:24 +000013116 ac_cv_tanh_preserves_zero_sign=yes
13117else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013118 ac_cv_tanh_preserves_zero_sign=no
Mark Dickinson265d7382008-04-21 22:32:24 +000013119fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013120rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13121 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson265d7382008-04-21 22:32:24 +000013122fi
13123
Mark Dickinson265d7382008-04-21 22:32:24 +000013124fi
13125
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013126{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_tanh_preserves_zero_sign" >&5
13127$as_echo "$ac_cv_tanh_preserves_zero_sign" >&6; }
Mark Dickinson265d7382008-04-21 22:32:24 +000013128if test "$ac_cv_tanh_preserves_zero_sign" = yes
13129then
13130
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013131$as_echo "#define TANH_PRESERVES_ZERO_SIGN 1" >>confdefs.h
Mark Dickinson265d7382008-04-21 22:32:24 +000013132
13133fi
13134
Mark Dickinson65898e02009-09-05 10:27:00 +000013135for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013136do :
13137 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13138ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Georg Brandl71f4fbb2011-02-25 11:04:50 +000013139if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinson65898e02009-09-05 10:27:00 +000013140 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013141#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Mark Dickinson65898e02009-09-05 10:27:00 +000013142_ACEOF
13143
13144fi
13145done
13146
Mark Dickinson65898e02009-09-05 10:27:00 +000013147for ac_func in hypot lgamma log1p round tgamma
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013148do :
13149 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13150ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Georg Brandl71f4fbb2011-02-25 11:04:50 +000013151if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Christian Heimes0a8143f2007-12-18 23:22:54 +000013152 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013153#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Christian Heimes0a8143f2007-12-18 23:22:54 +000013154_ACEOF
13155
13156fi
13157done
13158
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013159ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
13160"
Matthias Klose3cef2a92012-03-14 23:39:33 +010013161if test "x$ac_cv_have_decl_isinf" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013162 ac_have_decl=1
Mark Dickinsond181e3a2009-01-04 13:57:26 +000013163else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013164 ac_have_decl=0
Mark Dickinsond181e3a2009-01-04 13:57:26 +000013165fi
13166
Mark Dickinsond181e3a2009-01-04 13:57:26 +000013167cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013168#define HAVE_DECL_ISINF $ac_have_decl
Mark Dickinsond181e3a2009-01-04 13:57:26 +000013169_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013170ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h>
13171"
Matthias Klose3cef2a92012-03-14 23:39:33 +010013172if test "x$ac_cv_have_decl_isnan" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013173 ac_have_decl=1
Mark Dickinsond181e3a2009-01-04 13:57:26 +000013174else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013175 ac_have_decl=0
Mark Dickinsond181e3a2009-01-04 13:57:26 +000013176fi
Mark Dickinsond181e3a2009-01-04 13:57:26 +000013177
13178cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013179#define HAVE_DECL_ISNAN $ac_have_decl
Mark Dickinsond181e3a2009-01-04 13:57:26 +000013180_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013181ac_fn_c_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include <math.h>
13182"
Matthias Klose3cef2a92012-03-14 23:39:33 +010013183if test "x$ac_cv_have_decl_isfinite" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013184 ac_have_decl=1
Mark Dickinsond181e3a2009-01-04 13:57:26 +000013185else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013186 ac_have_decl=0
Mark Dickinsond181e3a2009-01-04 13:57:26 +000013187fi
Mark Dickinsond181e3a2009-01-04 13:57:26 +000013188
13189cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013190#define HAVE_DECL_ISFINITE $ac_have_decl
Mark Dickinsond181e3a2009-01-04 13:57:26 +000013191_ACEOF
13192
13193
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000013194LIBS=$LIBS_SAVE
13195
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013196# For multiprocessing module, check that sem_open
13197# actually works. For FreeBSD versions <= 7.2,
13198# the kernel module that provides POSIX semaphores
13199# isn't loaded by default, so an attempt to call
13200# sem_open results in a 'Signal 12' error.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013201{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX semaphores are enabled" >&5
13202$as_echo_n "checking whether POSIX semaphores are enabled... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013203if ${ac_cv_posix_semaphores_enabled+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013204 $as_echo_n "(cached) " >&6
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013205else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013206 if test "$cross_compiling" = yes; then :
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013207 ac_cv_posix_semaphores_enabled=yes
13208else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013209 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013210/* end confdefs.h. */
13211
13212#include <unistd.h>
13213#include <fcntl.h>
13214#include <stdio.h>
13215#include <semaphore.h>
13216#include <sys/stat.h>
13217
13218int main(void) {
13219 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
13220 if (a == SEM_FAILED) {
13221 perror("sem_open");
13222 return 1;
13223 }
13224 sem_close(a);
Mark Dickinson59dc89e2009-12-13 21:06:06 +000013225 sem_unlink("/autoconf");
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013226 return 0;
13227}
13228
13229_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013230if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013231 ac_cv_posix_semaphores_enabled=yes
13232else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013233 ac_cv_posix_semaphores_enabled=no
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013234fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013235rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13236 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013237fi
13238
13239
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013240fi
13241
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013242{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_semaphores_enabled" >&5
13243$as_echo "$ac_cv_posix_semaphores_enabled" >&6; }
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013244if test $ac_cv_posix_semaphores_enabled = no
13245then
13246
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013247$as_echo "#define POSIX_SEMAPHORES_NOT_ENABLED 1" >>confdefs.h
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013248
13249fi
13250
13251# Multiprocessing check for broken sem_getvalue
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013252{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken sem_getvalue" >&5
13253$as_echo_n "checking for broken sem_getvalue... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013254if ${ac_cv_broken_sem_getvalue+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013255 $as_echo_n "(cached) " >&6
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013256else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013257 if test "$cross_compiling" = yes; then :
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013258 ac_cv_broken_sem_getvalue=yes
13259else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013260 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013261/* end confdefs.h. */
13262
13263#include <unistd.h>
13264#include <fcntl.h>
13265#include <stdio.h>
13266#include <semaphore.h>
13267#include <sys/stat.h>
13268
13269int main(void){
Mark Dickinson59dc89e2009-12-13 21:06:06 +000013270 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013271 int count;
13272 int res;
13273 if(a==SEM_FAILED){
13274 perror("sem_open");
13275 return 1;
13276
13277 }
13278 res = sem_getvalue(a, &count);
13279 sem_close(a);
Mark Dickinson59dc89e2009-12-13 21:06:06 +000013280 sem_unlink("/autocftw");
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013281 return res==-1 ? 1 : 0;
13282}
13283
13284_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013285if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013286 ac_cv_broken_sem_getvalue=no
13287else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013288 ac_cv_broken_sem_getvalue=yes
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013289fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013290rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13291 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013292fi
13293
13294
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013295fi
13296
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013297{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_sem_getvalue" >&5
13298$as_echo "$ac_cv_broken_sem_getvalue" >&6; }
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013299if test $ac_cv_broken_sem_getvalue = yes
13300then
13301
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013302$as_echo "#define HAVE_BROKEN_SEM_GETVALUE 1" >>confdefs.h
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013303
13304fi
13305
Mark Dickinsonefc82f72009-03-20 15:51:55 +000013306# determine what size digit to use for Python's longs
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013307{ $as_echo "$as_me:${as_lineno-$LINENO}: checking digit size for Python's longs" >&5
13308$as_echo_n "checking digit size for Python's longs... " >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +000013309# Check whether --enable-big-digits was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013310if test "${enable_big_digits+set}" = set; then :
Mark Dickinsonefc82f72009-03-20 15:51:55 +000013311 enableval=$enable_big_digits; case $enable_big_digits in
13312yes)
13313 enable_big_digits=30 ;;
13314no)
13315 enable_big_digits=15 ;;
1331615|30)
13317 ;;
13318*)
Matthias Klose3cef2a92012-03-14 23:39:33 +010013319 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 +000013320esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013321{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_big_digits" >&5
13322$as_echo "$enable_big_digits" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +000013323
13324cat >>confdefs.h <<_ACEOF
13325#define PYLONG_BITS_IN_DIGIT $enable_big_digits
13326_ACEOF
13327
13328
13329else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013330 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
13331$as_echo "no value specified" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +000013332fi
13333
13334
Guido van Rossumef2255b2000-03-10 22:30:29 +000013335# check for wchar.h
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013336ac_fn_c_check_header_mongrel "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
Matthias Klose3cef2a92012-03-14 23:39:33 +010013337if test "x$ac_cv_header_wchar_h" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013338
13339
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013340$as_echo "#define HAVE_WCHAR_H 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013341
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013342 wchar_h="yes"
13343
Guido van Rossumef2255b2000-03-10 22:30:29 +000013344else
Martin v. Löwis11437992002-04-12 09:54:03 +000013345 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000013346
13347fi
13348
Michael W. Hudson54241132001-12-07 15:38:26 +000013349
Martin v. Löwis11437992002-04-12 09:54:03 +000013350
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013351# determine wchar_t size
13352if test "$wchar_h" = yes
13353then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013354 # The cast to long int works around a bug in the HP C Compiler
Martin v. Löwiseba40652007-08-30 20:10:57 +000013355# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
13356# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
13357# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013358{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
13359$as_echo_n "checking size of wchar_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013360if ${ac_cv_sizeof_wchar_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013361 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000013362else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013363 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "#include <wchar.h>
13364"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013365
Martin v. Löwis11437992002-04-12 09:54:03 +000013366else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013367 if test "$ac_cv_type_wchar_t" = yes; then
13368 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
13369$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +000013370as_fn_error 77 "cannot compute sizeof (wchar_t)
Matthias Klose3cef2a92012-03-14 23:39:33 +010013371See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000013372 else
13373 ac_cv_sizeof_wchar_t=0
13374 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013375fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013376
Martin v. Löwis11437992002-04-12 09:54:03 +000013377fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013378{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
13379$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000013380
13381
13382
Martin v. Löwis11437992002-04-12 09:54:03 +000013383cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013384#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000013385_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013386
Michael W. Hudson54241132001-12-07 15:38:26 +000013387
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013388fi
13389
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013390{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UCS-4 tcl" >&5
13391$as_echo_n "checking for UCS-4 tcl... " >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013392have_ucs4_tcl=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013393cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013394/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013395
13396#include <tcl.h>
13397#if TCL_UTF_MAX != 6
13398# error "NOT UCS4_TCL"
13399#endif
13400int
13401main ()
13402{
13403
13404 ;
13405 return 0;
13406}
13407_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013408if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013409
13410
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013411$as_echo "#define HAVE_UCS4_TCL 1" >>confdefs.h
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013412
13413 have_ucs4_tcl=yes
13414
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013415fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013416rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013417{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ucs4_tcl" >&5
13418$as_echo "$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013419
Skip Montanaro6dead952003-09-25 14:50:04 +000013420# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013421if test "$wchar_h" = yes
13422then
13423 # check whether wchar_t is signed or not
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013424 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is signed" >&5
13425$as_echo_n "checking whether wchar_t is signed... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013426 if ${ac_cv_wchar_t_signed+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013427 $as_echo_n "(cached) " >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013428else
13429
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013430 if test "$cross_compiling" = yes; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013431 ac_cv_wchar_t_signed=yes
13432else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013433 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013434/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013435
13436 #include <wchar.h>
13437 int main()
13438 {
Martin v. Löwis44fe0e42006-04-11 07:15:30 +000013439 /* Success: exit code 0 */
13440 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013441 }
13442
13443_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013444if ac_fn_c_try_run "$LINENO"; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013445 ac_cv_wchar_t_signed=yes
13446else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013447 ac_cv_wchar_t_signed=no
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013448fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013449rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13450 conftest.$ac_objext conftest.beam conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013451fi
13452
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013453fi
13454
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013455 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wchar_t_signed" >&5
13456$as_echo "$ac_cv_wchar_t_signed" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000013457fi
13458
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013459{ $as_echo "$as_me:${as_lineno-$LINENO}: checking what type to use for unicode" >&5
13460$as_echo_n "checking what type to use for unicode... " >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000013461# Check whether --enable-unicode was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013462if test "${enable_unicode+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +000013463 enableval=$enable_unicode;
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013464else
13465 enable_unicode=yes
Martin v. Löwiseba40652007-08-30 20:10:57 +000013466fi
13467
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013468
13469if test $enable_unicode = yes
13470then
Martin v. Löwisfd917792001-06-27 20:22:04 +000013471 # Without any arguments, Py_UNICODE defaults to two-byte mode
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013472 case "$have_ucs4_tcl" in
13473 yes) enable_unicode="ucs4"
13474 ;;
13475 *) enable_unicode="ucs2"
13476 ;;
13477 esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013478fi
13479
Martin v. Löwis0036cba2002-04-12 09:58:45 +000013480
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013481case "$enable_unicode" in
13482ucs2) unicode_size="2"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013483 $as_echo "#define Py_UNICODE_SIZE 2" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013484
13485 ;;
13486ucs4) unicode_size="4"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013487 $as_echo "#define Py_UNICODE_SIZE 4" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013488
13489 ;;
Martin v. Löwised11a5d2012-05-20 10:42:17 +020013490no) ;; # To allow --disable-unicode
Matthias Klose3cef2a92012-03-14 23:39:33 +010013491*) 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 +000013492esac
13493
Michael W. Hudson54241132001-12-07 15:38:26 +000013494
Martin v. Löwis11437992002-04-12 09:54:03 +000013495
13496
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013497if test "$enable_unicode" = "no"
13498then
Martin v. Löwis339d0f72001-08-17 18:39:25 +000013499 UNICODE_OBJS=""
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013500 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not used" >&5
13501$as_echo "not used" >&6; }
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013502else
Martin v. Löwis339d0f72001-08-17 18:39:25 +000013503 UNICODE_OBJS="Objects/unicodeobject.o Objects/unicodectype.o"
Martin v. Löwis11437992002-04-12 09:54:03 +000013504
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013505$as_echo "#define Py_USING_UNICODE 1" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013506
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013507
13508 # wchar_t is only usable if it maps to an unsigned type
13509 if test "$unicode_size" = "$ac_cv_sizeof_wchar_t" \
Matthias Klose7dbeed72004-12-24 08:22:17 +000013510 -a "$ac_cv_wchar_t_signed" = "no"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013511 then
13512 PY_UNICODE_TYPE="wchar_t"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013513
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013514$as_echo "#define HAVE_USABLE_WCHAR_T 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013515
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013516 $as_echo "#define PY_UNICODE_TYPE wchar_t" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013517
13518 elif test "$ac_cv_sizeof_short" = "$unicode_size"
13519 then
13520 PY_UNICODE_TYPE="unsigned short"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013521 $as_echo "#define PY_UNICODE_TYPE unsigned short" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013522
13523 elif test "$ac_cv_sizeof_long" = "$unicode_size"
13524 then
13525 PY_UNICODE_TYPE="unsigned long"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013526 $as_echo "#define PY_UNICODE_TYPE unsigned long" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013527
13528 else
13529 PY_UNICODE_TYPE="no type found"
13530 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013531 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PY_UNICODE_TYPE" >&5
13532$as_echo "$PY_UNICODE_TYPE" >&6; }
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013533fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000013534
13535# check for endianness
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013536 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
13537$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013538if ${ac_cv_c_bigendian+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013539 $as_echo_n "(cached) " >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000013540else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013541 ac_cv_c_bigendian=unknown
13542 # See if we're dealing with a universal compiler.
13543 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13544/* end confdefs.h. */
13545#ifndef __APPLE_CC__
13546 not a universal capable compiler
13547 #endif
13548 typedef int dummy;
13549
Skip Montanaro6dead952003-09-25 14:50:04 +000013550_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013551if ac_fn_c_try_compile "$LINENO"; then :
13552
13553 # Check for potential -arch flags. It is not universal unless
13554 # there are at least two -arch flags with different values.
13555 ac_arch=
13556 ac_prev=
13557 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
13558 if test -n "$ac_prev"; then
13559 case $ac_word in
13560 i?86 | x86_64 | ppc | ppc64)
13561 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
13562 ac_arch=$ac_word
13563 else
13564 ac_cv_c_bigendian=universal
13565 break
13566 fi
13567 ;;
13568 esac
13569 ac_prev=
13570 elif test "x$ac_word" = "x-arch"; then
13571 ac_prev=arch
13572 fi
13573 done
13574fi
13575rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13576 if test $ac_cv_c_bigendian = unknown; then
13577 # See if sys/param.h defines the BYTE_ORDER macro.
13578 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013579/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000013580#include <sys/types.h>
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013581 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000013582
Martin v. Löwis11437992002-04-12 09:54:03 +000013583int
13584main ()
13585{
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013586#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
13587 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
13588 && LITTLE_ENDIAN)
13589 bogus endian macros
13590 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013591
13592 ;
13593 return 0;
13594}
13595_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013596if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000013597 # It does; now see whether it defined to BIG_ENDIAN or not.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013598 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013599/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000013600#include <sys/types.h>
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013601 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000013602
Martin v. Löwis11437992002-04-12 09:54:03 +000013603int
13604main ()
13605{
Guido van Rossumef2255b2000-03-10 22:30:29 +000013606#if BYTE_ORDER != BIG_ENDIAN
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013607 not big endian
13608 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013609
13610 ;
13611 return 0;
13612}
13613_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013614if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000013615 ac_cv_c_bigendian=yes
13616else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013617 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000013618fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013619rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013620fi
13621rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13622 fi
13623 if test $ac_cv_c_bigendian = unknown; then
13624 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
13625 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013626/* end confdefs.h. */
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013627#include <limits.h>
13628
Martin v. Löwis11437992002-04-12 09:54:03 +000013629int
13630main ()
13631{
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013632#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
13633 bogus endian macros
13634 #endif
13635
Martin v. Löwis11437992002-04-12 09:54:03 +000013636 ;
13637 return 0;
13638}
13639_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013640if ac_fn_c_try_compile "$LINENO"; then :
13641 # It does; now see whether it defined to _BIG_ENDIAN or not.
13642 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13643/* end confdefs.h. */
13644#include <limits.h>
13645
13646int
13647main ()
13648{
13649#ifndef _BIG_ENDIAN
13650 not big endian
13651 #endif
13652
13653 ;
13654 return 0;
13655}
13656_ACEOF
13657if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013658 ac_cv_c_bigendian=yes
Alexandre Vassalottia2db6872009-07-17 07:46:46 +000013659else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013660 ac_cv_c_bigendian=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013661fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013662rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13663fi
13664rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13665 fi
13666 if test $ac_cv_c_bigendian = unknown; then
13667 # Compile a test program.
13668 if test "$cross_compiling" = yes; then :
13669 # Try to guess by grepping values from an object file.
13670 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13671/* end confdefs.h. */
13672short int ascii_mm[] =
13673 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
13674 short int ascii_ii[] =
13675 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
13676 int use_ascii (int i) {
13677 return ascii_mm[i] + ascii_ii[i];
13678 }
13679 short int ebcdic_ii[] =
13680 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
13681 short int ebcdic_mm[] =
13682 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
13683 int use_ebcdic (int i) {
13684 return ebcdic_mm[i] + ebcdic_ii[i];
13685 }
13686 extern int foo;
Martin v. Löwiseba40652007-08-30 20:10:57 +000013687
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013688int
13689main ()
13690{
13691return use_ascii (foo) == use_ebcdic (foo);
13692 ;
13693 return 0;
13694}
13695_ACEOF
13696if ac_fn_c_try_compile "$LINENO"; then :
13697 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
13698 ac_cv_c_bigendian=yes
13699 fi
13700 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
13701 if test "$ac_cv_c_bigendian" = unknown; then
13702 ac_cv_c_bigendian=no
13703 else
13704 # finding both strings is unlikely to happen, but who knows?
13705 ac_cv_c_bigendian=unknown
13706 fi
13707 fi
13708fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013709rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013710else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013711 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013712/* end confdefs.h. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000013713$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000013714int
13715main ()
13716{
Martin v. Löwiseba40652007-08-30 20:10:57 +000013717
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013718 /* Are we little or big endian? From Harbison&Steele. */
13719 union
13720 {
13721 long int l;
13722 char c[sizeof (long int)];
13723 } u;
13724 u.l = 1;
13725 return u.c[sizeof (long int) - 1] == 1;
Martin v. Löwiseba40652007-08-30 20:10:57 +000013726
13727 ;
13728 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000013729}
Martin v. Löwis11437992002-04-12 09:54:03 +000013730_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013731if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000013732 ac_cv_c_bigendian=no
13733else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013734 ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000013735fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013736rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13737 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000013738fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013739
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013740 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013741fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013742{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
13743$as_echo "$ac_cv_c_bigendian" >&6; }
13744 case $ac_cv_c_bigendian in #(
13745 yes)
13746 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
13747;; #(
13748 no)
13749 ;; #(
13750 universal)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013751
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013752$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Alexandre Vassalottia2db6872009-07-17 07:46:46 +000013753
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013754 ;; #(
13755 *)
Georg Brandl71f4fbb2011-02-25 11:04:50 +000013756 as_fn_error $? "unknown endianness
Matthias Klose3cef2a92012-03-14 23:39:33 +010013757 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013758 esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000013759
Michael W. Hudson54241132001-12-07 15:38:26 +000013760
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013761# Check whether right shifting a negative integer extends the sign bit
13762# or fills with zeros (like the Cray J90, according to Tim Peters).
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013763{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether right shift extends the sign bit" >&5
13764$as_echo_n "checking whether right shift extends the sign bit... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013765if ${ac_cv_rshift_extends_sign+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013766 $as_echo_n "(cached) " >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000013767else
Martin v. Löwis11437992002-04-12 09:54:03 +000013768
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013769if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000013770 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013771else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013772 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013773/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013774
13775int main()
13776{
Vladimir Marangozova6180282000-07-12 05:05:06 +000013777 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013778}
13779
Martin v. Löwis11437992002-04-12 09:54:03 +000013780_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013781if ac_fn_c_try_run "$LINENO"; then :
Vladimir Marangozova6180282000-07-12 05:05:06 +000013782 ac_cv_rshift_extends_sign=yes
13783else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013784 ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000013785fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013786rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13787 conftest.$ac_objext conftest.beam conftest.$ac_ext
Vladimir Marangozova6180282000-07-12 05:05:06 +000013788fi
13789
Martin v. Löwiseba40652007-08-30 20:10:57 +000013790fi
13791
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013792{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rshift_extends_sign" >&5
13793$as_echo "$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000013794if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013795then
Martin v. Löwis11437992002-04-12 09:54:03 +000013796
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013797$as_echo "#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1" >>confdefs.h
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013798
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013799fi
13800
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013801# check for getc_unlocked and related locking functions
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013802{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getc_unlocked() and friends" >&5
13803$as_echo_n "checking for getc_unlocked() and friends... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013804if ${ac_cv_have_getc_unlocked+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013805 $as_echo_n "(cached) " >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013806else
Martin v. Löwis11437992002-04-12 09:54:03 +000013807
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013808cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013809/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013810#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013811int
13812main ()
13813{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013814
13815 FILE *f = fopen("/dev/null", "r");
13816 flockfile(f);
13817 getc_unlocked(f);
13818 funlockfile(f);
13819
Martin v. Löwis11437992002-04-12 09:54:03 +000013820 ;
13821 return 0;
13822}
13823_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013824if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013825 ac_cv_have_getc_unlocked=yes
13826else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013827 ac_cv_have_getc_unlocked=no
13828fi
13829rm -f core conftest.err conftest.$ac_objext \
13830 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013831fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013832
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013833{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getc_unlocked" >&5
13834$as_echo "$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013835if test "$ac_cv_have_getc_unlocked" = yes
13836then
Martin v. Löwis11437992002-04-12 09:54:03 +000013837
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013838$as_echo "#define HAVE_GETC_UNLOCKED 1" >>confdefs.h
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013839
13840fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013841
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013842# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000013843# save the value of LIBS so we don't actually link Python with readline
13844LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013845
Gregory P. Smithcc023f12008-09-07 05:15:58 +000013846# On some systems we need to link readline to a termcap compatible
13847# library. NOTE: Keep the precedence of listed libraries synchronised
13848# with setup.py.
13849py_cv_lib_readline=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013850{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link readline libs" >&5
13851$as_echo_n "checking how to link readline libs... " >&6; }
Gregory P. Smithcc023f12008-09-07 05:15:58 +000013852for py_libtermcap in "" ncursesw ncurses curses termcap; do
13853 if test -z "$py_libtermcap"; then
13854 READLINE_LIBS="-lreadline"
13855 else
13856 READLINE_LIBS="-lreadline -l$py_libtermcap"
13857 fi
13858 LIBS="$READLINE_LIBS $LIBS_no_readline"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013859 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013860/* end confdefs.h. */
13861
Martin v. Löwiseba40652007-08-30 20:10:57 +000013862/* Override any GCC internal prototype to avoid an error.
13863 Use char because int might match the return type of a GCC
13864 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013865#ifdef __cplusplus
13866extern "C"
13867#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013868char readline ();
13869int
13870main ()
13871{
Martin v. Löwiseba40652007-08-30 20:10:57 +000013872return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013873 ;
13874 return 0;
13875}
13876_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013877if ac_fn_c_try_link "$LINENO"; then :
Gregory P. Smithcc023f12008-09-07 05:15:58 +000013878 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013879fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013880rm -f core conftest.err conftest.$ac_objext \
13881 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smithcc023f12008-09-07 05:15:58 +000013882 if test $py_cv_lib_readline = yes; then
13883 break
13884 fi
13885done
13886# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
13887#AC_SUBST([READLINE_LIBS])
Gregory P. Smithe080cdf2008-09-07 19:19:04 +000013888if test $py_cv_lib_readline = no; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013889 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
13890$as_echo "none" >&6; }
Gregory P. Smithcc023f12008-09-07 05:15:58 +000013891else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013892 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_LIBS" >&5
13893$as_echo "$READLINE_LIBS" >&6; }
Gregory P. Smithcc023f12008-09-07 05:15:58 +000013894
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013895$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013896
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013897fi
13898
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013899# check for readline 2.1
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013900{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_callback_handler_install in -lreadline" >&5
13901$as_echo_n "checking for rl_callback_handler_install in -lreadline... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013902if ${ac_cv_lib_readline_rl_callback_handler_install+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013903 $as_echo_n "(cached) " >&6
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013904else
13905 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000013906LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013907cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013908/* end confdefs.h. */
13909
Martin v. Löwiseba40652007-08-30 20:10:57 +000013910/* Override any GCC internal prototype to avoid an error.
13911 Use char because int might match the return type of a GCC
13912 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013913#ifdef __cplusplus
13914extern "C"
13915#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013916char rl_callback_handler_install ();
13917int
13918main ()
13919{
Martin v. Löwiseba40652007-08-30 20:10:57 +000013920return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013921 ;
13922 return 0;
13923}
13924_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013925if ac_fn_c_try_link "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013926 ac_cv_lib_readline_rl_callback_handler_install=yes
13927else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013928 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013929fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013930rm -f core conftest.err conftest.$ac_objext \
13931 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013932LIBS=$ac_check_lib_save_LIBS
13933fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013934{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
13935$as_echo "$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013936if test "x$ac_cv_lib_readline_rl_callback_handler_install" = xyes; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013937
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013938$as_echo "#define HAVE_RL_CALLBACK 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013939
13940fi
13941
13942
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013943# check for readline 2.2
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013944cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013945/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013946#include <readline/readline.h>
13947_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013948if ac_fn_c_try_cpp "$LINENO"; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013949 have_readline=yes
13950else
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013951 have_readline=no
Matthias Klosec511b472010-05-08 11:01:39 +000013952
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013953fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +000013954rm -f conftest.err conftest.i conftest.$ac_ext
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013955if test $have_readline = yes
13956then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013957 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013958/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013959#include <readline/readline.h>
13960
13961_ACEOF
13962if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013963 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013964
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013965$as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013966
13967fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +000013968rm -f conftest*
Antoine Pitroud9ff74e2009-10-26 19:16:46 +000013969
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013970 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroud9ff74e2009-10-26 19:16:46 +000013971/* end confdefs.h. */
13972#include <readline/readline.h>
13973
13974_ACEOF
13975if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013976 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then :
Antoine Pitroud9ff74e2009-10-26 19:16:46 +000013977
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013978$as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h
Antoine Pitroud9ff74e2009-10-26 19:16:46 +000013979
13980fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +000013981rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013982
13983fi
13984
Martin v. Löwis0daad592001-09-30 21:09:59 +000013985# check for readline 4.0
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013986{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -lreadline" >&5
13987$as_echo_n "checking for rl_pre_input_hook in -lreadline... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013988if ${ac_cv_lib_readline_rl_pre_input_hook+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013989 $as_echo_n "(cached) " >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000013990else
Martin v. Löwis11437992002-04-12 09:54:03 +000013991 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000013992LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013993cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013994/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013995
Martin v. Löwiseba40652007-08-30 20:10:57 +000013996/* Override any GCC internal prototype to avoid an error.
13997 Use char because int might match the return type of a GCC
13998 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013999#ifdef __cplusplus
14000extern "C"
14001#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014002char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014003int
14004main ()
14005{
Martin v. Löwiseba40652007-08-30 20:10:57 +000014006return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014007 ;
14008 return 0;
14009}
14010_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014011if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014012 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000014013else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014014 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000014015fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014016rm -f core conftest.err conftest.$ac_objext \
14017 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014018LIBS=$ac_check_lib_save_LIBS
14019fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014020{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
14021$as_echo "$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010014022if test "x$ac_cv_lib_readline_rl_pre_input_hook" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000014023
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014024$as_echo "#define HAVE_RL_PRE_INPUT_HOOK 1" >>confdefs.h
Martin v. Löwis0daad592001-09-30 21:09:59 +000014025
Martin v. Löwis0daad592001-09-30 21:09:59 +000014026fi
14027
Michael W. Hudson54241132001-12-07 15:38:26 +000014028
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000014029# also in 4.0
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014030{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -lreadline" >&5
14031$as_echo_n "checking for rl_completion_display_matches_hook in -lreadline... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010014032if ${ac_cv_lib_readline_rl_completion_display_matches_hook+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014033 $as_echo_n "(cached) " >&6
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000014034else
14035 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000014036LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014037cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000014038/* end confdefs.h. */
14039
14040/* Override any GCC internal prototype to avoid an error.
14041 Use char because int might match the return type of a GCC
14042 builtin and then its argument prototype would still apply. */
14043#ifdef __cplusplus
14044extern "C"
14045#endif
14046char rl_completion_display_matches_hook ();
14047int
14048main ()
14049{
14050return rl_completion_display_matches_hook ();
14051 ;
14052 return 0;
14053}
14054_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014055if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000014056 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
14057else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014058 ac_cv_lib_readline_rl_completion_display_matches_hook=no
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000014059fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014060rm -f core conftest.err conftest.$ac_objext \
14061 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000014062LIBS=$ac_check_lib_save_LIBS
14063fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014064{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
14065$as_echo "$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010014066if test "x$ac_cv_lib_readline_rl_completion_display_matches_hook" = xyes; then :
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000014067
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014068$as_echo "#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000014069
14070fi
14071
14072
Martin Pantera70c3232016-04-03 02:54:58 +000014073# also in 4.0, but not in editline
14074{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_resize_terminal in -lreadline" >&5
14075$as_echo_n "checking for rl_resize_terminal in -lreadline... " >&6; }
14076if ${ac_cv_lib_readline_rl_resize_terminal+:} false; then :
14077 $as_echo_n "(cached) " >&6
14078else
14079 ac_check_lib_save_LIBS=$LIBS
14080LIBS="-lreadline $READLINE_LIBS $LIBS"
14081cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14082/* end confdefs.h. */
14083
14084/* Override any GCC internal prototype to avoid an error.
14085 Use char because int might match the return type of a GCC
14086 builtin and then its argument prototype would still apply. */
14087#ifdef __cplusplus
14088extern "C"
14089#endif
14090char rl_resize_terminal ();
14091int
14092main ()
14093{
14094return rl_resize_terminal ();
14095 ;
14096 return 0;
14097}
14098_ACEOF
14099if ac_fn_c_try_link "$LINENO"; then :
14100 ac_cv_lib_readline_rl_resize_terminal=yes
14101else
14102 ac_cv_lib_readline_rl_resize_terminal=no
14103fi
14104rm -f core conftest.err conftest.$ac_objext \
14105 conftest$ac_exeext conftest.$ac_ext
14106LIBS=$ac_check_lib_save_LIBS
14107fi
14108{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_resize_terminal" >&5
14109$as_echo "$ac_cv_lib_readline_rl_resize_terminal" >&6; }
14110if test "x$ac_cv_lib_readline_rl_resize_terminal" = xyes; then :
14111
14112$as_echo "#define HAVE_RL_RESIZE_TERMINAL 1" >>confdefs.h
14113
14114fi
14115
14116
Martin v. Löwis0daad592001-09-30 21:09:59 +000014117# check for readline 4.2
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014118{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5
14119$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010014120if ${ac_cv_lib_readline_rl_completion_matches+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014121 $as_echo_n "(cached) " >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000014122else
Martin v. Löwis11437992002-04-12 09:54:03 +000014123 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000014124LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014125cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014126/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014127
Martin v. Löwiseba40652007-08-30 20:10:57 +000014128/* Override any GCC internal prototype to avoid an error.
14129 Use char because int might match the return type of a GCC
14130 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014131#ifdef __cplusplus
14132extern "C"
14133#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014134char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014135int
14136main ()
14137{
Martin v. Löwiseba40652007-08-30 20:10:57 +000014138return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014139 ;
14140 return 0;
14141}
14142_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014143if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014144 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000014145else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014146 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000014147fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014148rm -f core conftest.err conftest.$ac_objext \
14149 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014150LIBS=$ac_check_lib_save_LIBS
14151fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014152{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_matches" >&5
14153$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010014154if test "x$ac_cv_lib_readline_rl_completion_matches" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000014155
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014156$as_echo "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h
Guido van Rossum353ae582001-07-10 16:45:32 +000014157
Guido van Rossum353ae582001-07-10 16:45:32 +000014158fi
14159
Jack Jansendd19cf82001-12-06 22:36:17 +000014160
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014161# also in readline 4.2
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014162cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014163/* end confdefs.h. */
14164#include <readline/readline.h>
14165_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014166if ac_fn_c_try_cpp "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014167 have_readline=yes
14168else
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014169 have_readline=no
Matthias Klosec511b472010-05-08 11:01:39 +000014170
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014171fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014172rm -f conftest.err conftest.i conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014173if test $have_readline = yes
14174then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014175 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014176/* end confdefs.h. */
14177#include <readline/readline.h>
14178
14179_ACEOF
14180if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014181 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014182
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014183$as_echo "#define HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014184
14185fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +000014186rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014187
14188fi
14189
Martin v. Löwis82bca632006-02-10 20:49:30 +000014190# End of readline checks: restore LIBS
14191LIBS=$LIBS_no_readline
14192
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014193{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken nice()" >&5
14194$as_echo_n "checking for broken nice()... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010014195if ${ac_cv_broken_nice+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014196 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000014197else
Martin v. Löwis11437992002-04-12 09:54:03 +000014198
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014199if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000014200 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014201else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014202 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014203/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014204
14205int main()
14206{
14207 int val1 = nice(1);
14208 if (val1 != -1 && val1 == nice(2))
14209 exit(0);
14210 exit(1);
14211}
14212
Martin v. Löwis11437992002-04-12 09:54:03 +000014213_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014214if ac_fn_c_try_run "$LINENO"; then :
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014215 ac_cv_broken_nice=yes
14216else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014217 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014218fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014219rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14220 conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014221fi
14222
Martin v. Löwiseba40652007-08-30 20:10:57 +000014223fi
14224
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014225{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_nice" >&5
14226$as_echo "$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014227if test "$ac_cv_broken_nice" = yes
14228then
Martin v. Löwis11437992002-04-12 09:54:03 +000014229
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014230$as_echo "#define HAVE_BROKEN_NICE 1" >>confdefs.h
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014231
14232fi
14233
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014234{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken poll()" >&5
14235$as_echo_n "checking for broken poll()... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010014236if ${ac_cv_broken_poll+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014237 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014238else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014239 if test "$cross_compiling" = yes; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014240 ac_cv_broken_poll=no
14241else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014242 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014243/* end confdefs.h. */
14244
14245#include <poll.h>
14246
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014247int main()
14248{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014249 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014250 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014251
14252 close (42);
14253
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014254 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014255 if (poll_test < 0)
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014256 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014257 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014258 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014259 else
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014260 return 1;
14261}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014262
14263_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014264if ac_fn_c_try_run "$LINENO"; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014265 ac_cv_broken_poll=yes
14266else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014267 ac_cv_broken_poll=no
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014268fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014269rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14270 conftest.$ac_objext conftest.beam conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014271fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014272
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014273fi
14274
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014275{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_poll" >&5
14276$as_echo "$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014277if test "$ac_cv_broken_poll" = yes
14278then
14279
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014280$as_echo "#define HAVE_BROKEN_POLL 1" >>confdefs.h
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014281
14282fi
14283
Brett Cannon43802422005-02-10 20:48:03 +000014284# 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 +000014285# (which is not required by ISO C or UNIX spec) and/or if we support
14286# tzname[]
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014287ac_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 +000014288#include <$ac_cv_struct_tm>
14289
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014290"
Matthias Klose3cef2a92012-03-14 23:39:33 +010014291if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Brett Cannon43802422005-02-10 20:48:03 +000014292
14293cat >>confdefs.h <<_ACEOF
14294#define HAVE_STRUCT_TM_TM_ZONE 1
14295_ACEOF
14296
14297
14298fi
14299
14300if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
14301
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014302$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000014303
14304else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014305 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
14306"
Matthias Klose3cef2a92012-03-14 23:39:33 +010014307if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014308 ac_have_decl=1
Martin v. Löwiseba40652007-08-30 20:10:57 +000014309else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014310 ac_have_decl=0
Martin v. Löwiseba40652007-08-30 20:10:57 +000014311fi
14312
Martin v. Löwiseba40652007-08-30 20:10:57 +000014313cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014314#define HAVE_DECL_TZNAME $ac_have_decl
Martin v. Löwiseba40652007-08-30 20:10:57 +000014315_ACEOF
14316
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014317 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
14318$as_echo_n "checking for tzname... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010014319if ${ac_cv_var_tzname+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014320 $as_echo_n "(cached) " >&6
Martin v. Löwiseba40652007-08-30 20:10:57 +000014321else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014322 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000014323/* end confdefs.h. */
14324#include <time.h>
Martin v. Löwiseba40652007-08-30 20:10:57 +000014325#if !HAVE_DECL_TZNAME
14326extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000014327#endif
14328
14329int
14330main ()
14331{
Martin v. Löwiseba40652007-08-30 20:10:57 +000014332return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000014333 ;
14334 return 0;
14335}
14336_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014337if ac_fn_c_try_link "$LINENO"; then :
Brett Cannon43802422005-02-10 20:48:03 +000014338 ac_cv_var_tzname=yes
14339else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014340 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000014341fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014342rm -f core conftest.err conftest.$ac_objext \
14343 conftest$ac_exeext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000014344fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014345{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
14346$as_echo "$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000014347 if test $ac_cv_var_tzname = yes; then
14348
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014349$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000014350
14351 fi
14352fi
14353
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014354
Martin v. Löwis1d459062005-03-14 21:23:33 +000014355# check tzset(3) exists and works like we expect it to
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014356{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working tzset()" >&5
14357$as_echo_n "checking for working tzset()... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010014358if ${ac_cv_working_tzset+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014359 $as_echo_n "(cached) " >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014360else
14361
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014362if test "$cross_compiling" = yes; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014363 ac_cv_working_tzset=no
14364else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014365 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014366/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014367
14368#include <stdlib.h>
14369#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000014370#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000014371
14372#if HAVE_TZNAME
14373extern char *tzname[];
14374#endif
14375
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014376int main()
14377{
Brett Cannon18367812003-09-19 00:59:16 +000014378 /* Note that we need to ensure that not only does tzset(3)
14379 do 'something' with localtime, but it works as documented
14380 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000014381 This includes making sure that tzname is set properly if
14382 tm->tm_zone does not exist since it is the alternative way
14383 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000014384
14385 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000014386 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000014387 */
14388
Martin v. Löwis1d459062005-03-14 21:23:33 +000014389 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000014390 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
14391
Neal Norwitz7f2588c2003-04-11 15:35:53 +000014392 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014393 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000014394 if (localtime(&groundhogday)->tm_hour != 0)
14395 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000014396#if HAVE_TZNAME
14397 /* For UTC, tzname[1] is sometimes "", sometimes " " */
14398 if (strcmp(tzname[0], "UTC") ||
14399 (tzname[1][0] != 0 && tzname[1][0] != ' '))
14400 exit(1);
14401#endif
Brett Cannon18367812003-09-19 00:59:16 +000014402
Neal Norwitz7f2588c2003-04-11 15:35:53 +000014403 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014404 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000014405 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014406 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000014407#if HAVE_TZNAME
14408 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
14409 exit(1);
14410#endif
Brett Cannon18367812003-09-19 00:59:16 +000014411
14412 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
14413 tzset();
14414 if (localtime(&groundhogday)->tm_hour != 11)
14415 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000014416#if HAVE_TZNAME
14417 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
14418 exit(1);
14419#endif
14420
14421#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000014422 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
14423 exit(1);
14424 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
14425 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000014426#endif
Brett Cannon18367812003-09-19 00:59:16 +000014427
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014428 exit(0);
14429}
14430
14431_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014432if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014433 ac_cv_working_tzset=yes
14434else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014435 ac_cv_working_tzset=no
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014436fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014437rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14438 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014439fi
14440
Martin v. Löwiseba40652007-08-30 20:10:57 +000014441fi
14442
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014443{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_tzset" >&5
14444$as_echo "$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014445if test "$ac_cv_working_tzset" = yes
14446then
14447
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014448$as_echo "#define HAVE_WORKING_TZSET 1" >>confdefs.h
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014449
14450fi
14451
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014452# Look for subsecond timestamps in struct stat
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014453{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec in struct stat" >&5
14454$as_echo_n "checking for tv_nsec in struct stat... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010014455if ${ac_cv_stat_tv_nsec+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014456 $as_echo_n "(cached) " >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014457else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014458 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014459/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014460#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014461int
14462main ()
14463{
14464
14465struct stat st;
14466st.st_mtim.tv_nsec = 1;
14467
14468 ;
14469 return 0;
14470}
14471_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014472if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa32c9942002-09-09 16:17:47 +000014473 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014474else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014475 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014476fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014477rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14478fi
14479
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014480{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec" >&5
14481$as_echo "$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014482if test "$ac_cv_stat_tv_nsec" = yes
14483then
14484
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014485$as_echo "#define HAVE_STAT_TV_NSEC 1" >>confdefs.h
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014486
14487fi
14488
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014489# Look for BSD style subsecond timestamps in struct stat
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014490{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec2 in struct stat" >&5
14491$as_echo_n "checking for tv_nsec2 in struct stat... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010014492if ${ac_cv_stat_tv_nsec2+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014493 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014494else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014495 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014496/* end confdefs.h. */
14497#include <sys/stat.h>
14498int
14499main ()
14500{
14501
14502struct stat st;
14503st.st_mtimespec.tv_nsec = 1;
14504
14505 ;
14506 return 0;
14507}
14508_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014509if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014510 ac_cv_stat_tv_nsec2=yes
14511else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014512 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014513fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014514rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14515fi
14516
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014517{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec2" >&5
14518$as_echo "$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014519if test "$ac_cv_stat_tv_nsec2" = yes
14520then
14521
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014522$as_echo "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014523
14524fi
14525
doko@ubuntu.comf27ec3e2014-04-17 20:11:19 +020014526# first curses configure check
14527ac_save_cppflags="$CPPFLAGS"
14528CPPFLAGS="$CPPFLAGS -I/usr/include/ncursesw"
14529
14530for ac_header in curses.h ncurses.h
14531do :
14532 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
14533ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
14534if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
14535 cat >>confdefs.h <<_ACEOF
14536#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
14537_ACEOF
14538
14539fi
14540
14541done
14542
14543
14544# On Solaris, term.h requires curses.h
14545for ac_header in term.h
14546do :
14547 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "
14548#ifdef HAVE_CURSES_H
14549#include <curses.h>
14550#endif
14551
14552"
14553if test "x$ac_cv_header_term_h" = xyes; then :
14554 cat >>confdefs.h <<_ACEOF
14555#define HAVE_TERM_H 1
14556_ACEOF
14557
14558fi
14559
14560done
14561
14562
Jack Jansen666b1e72001-10-31 12:11:48 +000014563# On HP/UX 11.0, mvwdelch is a block with a return statement
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014564{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mvwdelch is an expression" >&5
14565$as_echo_n "checking whether mvwdelch is an expression... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010014566if ${ac_cv_mvwdelch_is_expression+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014567 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000014568else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014569 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014570/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000014571#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014572int
14573main ()
14574{
Jack Jansen666b1e72001-10-31 12:11:48 +000014575
14576 int rtn;
14577 rtn = mvwdelch(0,0,0);
14578
Martin v. Löwis11437992002-04-12 09:54:03 +000014579 ;
14580 return 0;
14581}
14582_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014583if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000014584 ac_cv_mvwdelch_is_expression=yes
14585else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014586 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000014587fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014588rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14589fi
14590
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014591{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mvwdelch_is_expression" >&5
14592$as_echo "$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000014593
14594if test "$ac_cv_mvwdelch_is_expression" = yes
14595then
Martin v. Löwis11437992002-04-12 09:54:03 +000014596
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014597$as_echo "#define MVWDELCH_IS_EXPRESSION 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000014598
14599fi
14600
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014601{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WINDOW has _flags" >&5
14602$as_echo_n "checking whether WINDOW has _flags... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010014603if ${ac_cv_window_has_flags+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014604 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000014605else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014606 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014607/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000014608#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014609int
14610main ()
14611{
Jack Jansen666b1e72001-10-31 12:11:48 +000014612
14613 WINDOW *w;
14614 w->_flags = 0;
14615
Martin v. Löwis11437992002-04-12 09:54:03 +000014616 ;
14617 return 0;
14618}
14619_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014620if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000014621 ac_cv_window_has_flags=yes
14622else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014623 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000014624fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014625rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14626fi
14627
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014628{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_window_has_flags" >&5
14629$as_echo "$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000014630
Jack Jansen666b1e72001-10-31 12:11:48 +000014631
14632if test "$ac_cv_window_has_flags" = yes
14633then
Martin v. Löwis11437992002-04-12 09:54:03 +000014634
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014635$as_echo "#define WINDOW_HAS_FLAGS 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000014636
14637fi
14638
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014639{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_term_resized" >&5
14640$as_echo_n "checking for is_term_resized... " >&6; }
14641cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Walter Dörwald4994d952006-06-19 08:07:50 +000014642/* end confdefs.h. */
14643#include <curses.h>
14644int
14645main ()
14646{
14647void *x=is_term_resized
14648 ;
14649 return 0;
14650}
14651_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014652if ac_fn_c_try_compile "$LINENO"; then :
Walter Dörwald4994d952006-06-19 08:07:50 +000014653
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014654$as_echo "#define HAVE_CURSES_IS_TERM_RESIZED 1" >>confdefs.h
Walter Dörwald4994d952006-06-19 08:07:50 +000014655
Matthias Klosec511b472010-05-08 11:01:39 +000014656 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014657$as_echo "yes" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000014658else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014659 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14660$as_echo "no" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000014661
14662fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014663rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14664
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014665{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resize_term" >&5
14666$as_echo_n "checking for resize_term... " >&6; }
14667cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Walter Dörwald4994d952006-06-19 08:07:50 +000014668/* end confdefs.h. */
14669#include <curses.h>
14670int
14671main ()
14672{
14673void *x=resize_term
14674 ;
14675 return 0;
14676}
14677_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014678if ac_fn_c_try_compile "$LINENO"; then :
Walter Dörwald4994d952006-06-19 08:07:50 +000014679
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014680$as_echo "#define HAVE_CURSES_RESIZE_TERM 1" >>confdefs.h
Walter Dörwald4994d952006-06-19 08:07:50 +000014681
Matthias Klosec511b472010-05-08 11:01:39 +000014682 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014683$as_echo "yes" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000014684else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014685 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14686$as_echo "no" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000014687
14688fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014689rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14690
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014691{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resizeterm" >&5
14692$as_echo_n "checking for resizeterm... " >&6; }
14693cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Walter Dörwald4994d952006-06-19 08:07:50 +000014694/* end confdefs.h. */
14695#include <curses.h>
14696int
14697main ()
14698{
14699void *x=resizeterm
14700 ;
14701 return 0;
14702}
14703_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014704if ac_fn_c_try_compile "$LINENO"; then :
Walter Dörwald4994d952006-06-19 08:07:50 +000014705
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014706$as_echo "#define HAVE_CURSES_RESIZETERM 1" >>confdefs.h
Walter Dörwald4994d952006-06-19 08:07:50 +000014707
Matthias Klosec511b472010-05-08 11:01:39 +000014708 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014709$as_echo "yes" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000014710else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014711 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14712$as_echo "no" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000014713
14714fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014715rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
doko@ubuntu.comf27ec3e2014-04-17 20:11:19 +020014716# last curses configure check
14717CPPFLAGS=$ac_save_cppflags
Martin v. Löwiseba40652007-08-30 20:10:57 +000014718
doko@python.orgd65e2ba2013-01-31 23:52:03 +010014719{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for device files" >&5
14720$as_echo "$as_me: checking for device files" >&6;}
14721
14722if test "x$cross_compiling" = xyes; then
14723 if test "${ac_cv_file__dev_ptmx+set}" != set; then
14724 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
14725$as_echo_n "checking for /dev/ptmx... " >&6; }
14726 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
14727$as_echo "not set" >&6; }
14728 as_fn_error $? "set ac_cv_file__dev_ptmx to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
14729 fi
14730 if test "${ac_cv_file__dev_ptc+set}" != set; then
14731 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
14732$as_echo_n "checking for /dev/ptc... " >&6; }
14733 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
14734$as_echo "not set" >&6; }
14735 as_fn_error $? "set ac_cv_file__dev_ptc to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
14736 fi
14737fi
14738
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014739{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
14740$as_echo_n "checking for /dev/ptmx... " >&6; }
doko@python.orgd65e2ba2013-01-31 23:52:03 +010014741if ${ac_cv_file__dev_ptmx+:} false; then :
14742 $as_echo_n "(cached) " >&6
14743else
14744 test "$cross_compiling" = yes &&
14745 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
14746if test -r "/dev/ptmx"; then
14747 ac_cv_file__dev_ptmx=yes
14748else
14749 ac_cv_file__dev_ptmx=no
14750fi
14751fi
14752{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptmx" >&5
14753$as_echo "$ac_cv_file__dev_ptmx" >&6; }
14754if test "x$ac_cv_file__dev_ptmx" = xyes; then :
Martin v. Löwisfefbc202006-10-17 18:59:23 +000014755
doko@python.orgd65e2ba2013-01-31 23:52:03 +010014756fi
14757
14758if test "x$ac_cv_file__dev_ptmx" = xyes; then
Martin v. Löwis24a880b2002-12-31 12:55:15 +000014759
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014760$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
Martin v. Löwis24a880b2002-12-31 12:55:15 +000014761
Martin v. Löwis24a880b2002-12-31 12:55:15 +000014762fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014763{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
14764$as_echo_n "checking for /dev/ptc... " >&6; }
doko@python.orgd65e2ba2013-01-31 23:52:03 +010014765if ${ac_cv_file__dev_ptc+:} false; then :
14766 $as_echo_n "(cached) " >&6
14767else
14768 test "$cross_compiling" = yes &&
14769 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
14770if test -r "/dev/ptc"; then
14771 ac_cv_file__dev_ptc=yes
14772else
14773 ac_cv_file__dev_ptc=no
14774fi
14775fi
14776{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptc" >&5
14777$as_echo "$ac_cv_file__dev_ptc" >&6; }
14778if test "x$ac_cv_file__dev_ptc" = xyes; then :
Martin v. Löwisfefbc202006-10-17 18:59:23 +000014779
doko@python.orgd65e2ba2013-01-31 23:52:03 +010014780fi
14781
14782if test "x$ac_cv_file__dev_ptc" = xyes; then
Neal Norwitz865400f2003-03-21 01:42:58 +000014783
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014784$as_echo "#define HAVE_DEV_PTC 1" >>confdefs.h
Neal Norwitz865400f2003-03-21 01:42:58 +000014785
Neal Norwitz865400f2003-03-21 01:42:58 +000014786fi
14787
Mark Dickinson82864d12009-11-15 16:18:58 +000014788if test "$have_long_long" = yes
14789then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014790 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for %lld and %llu printf() format support" >&5
14791$as_echo_n "checking for %lld and %llu printf() format support... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010014792 if ${ac_cv_have_long_long_format+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014793 $as_echo_n "(cached) " >&6
Mark Dickinson82864d12009-11-15 16:18:58 +000014794else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014795 if test "$cross_compiling" = yes; then :
doko@python.orgd65e2ba2013-01-31 23:52:03 +010014796 ac_cv_have_long_long_format="cross -- assuming no"
14797 if test x$GCC = xyes; then
14798 save_CFLAGS=$CFLAGS
14799 CFLAGS="$CFLAGS -Werror -Wformat"
14800 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14801/* end confdefs.h. */
14802
14803 #include <stdio.h>
14804 #include <stddef.h>
14805
14806int
14807main ()
14808{
14809
14810 char *buffer;
14811 sprintf(buffer, "%lld", (long long)123);
14812 sprintf(buffer, "%lld", (long long)-123);
14813 sprintf(buffer, "%llu", (unsigned long long)123);
14814
14815 ;
14816 return 0;
14817}
14818_ACEOF
14819if ac_fn_c_try_compile "$LINENO"; then :
14820 ac_cv_have_long_long_format=yes
14821
14822fi
14823rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14824 CFLAGS=$save_CFLAGS
14825 fi
Mark Dickinson82864d12009-11-15 16:18:58 +000014826else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014827 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson82864d12009-11-15 16:18:58 +000014828/* end confdefs.h. */
14829
14830 #include <stdio.h>
14831 #include <stddef.h>
14832 #include <string.h>
14833
14834 #ifdef HAVE_SYS_TYPES_H
14835 #include <sys/types.h>
14836 #endif
14837
14838 int main()
14839 {
14840 char buffer[256];
14841
14842 if (sprintf(buffer, "%lld", (long long)123) < 0)
14843 return 1;
14844 if (strcmp(buffer, "123"))
14845 return 1;
14846
14847 if (sprintf(buffer, "%lld", (long long)-123) < 0)
14848 return 1;
14849 if (strcmp(buffer, "-123"))
14850 return 1;
14851
14852 if (sprintf(buffer, "%llu", (unsigned long long)123) < 0)
14853 return 1;
14854 if (strcmp(buffer, "123"))
14855 return 1;
14856
14857 return 0;
14858 }
14859
14860_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014861if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson82864d12009-11-15 16:18:58 +000014862 ac_cv_have_long_long_format=yes
14863else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014864 ac_cv_have_long_long_format=no
Mark Dickinson82864d12009-11-15 16:18:58 +000014865fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014866rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14867 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson82864d12009-11-15 16:18:58 +000014868fi
14869
14870
Mark Dickinson82864d12009-11-15 16:18:58 +000014871fi
14872
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014873 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_long_long_format" >&5
14874$as_echo "$ac_cv_have_long_long_format" >&6; }
Mark Dickinson82864d12009-11-15 16:18:58 +000014875fi
14876
Mark Dickinson5ce84742009-12-31 20:48:04 +000014877if test "$ac_cv_have_long_long_format" = yes
Mark Dickinson82864d12009-11-15 16:18:58 +000014878then
14879
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014880$as_echo "#define PY_FORMAT_LONG_LONG \"ll\"" >>confdefs.h
Mark Dickinson82864d12009-11-15 16:18:58 +000014881
14882fi
14883
Ronald Oussoren315cd0c2009-11-19 16:25:21 +000014884if test $ac_sys_system = Darwin
14885then
14886 LIBS="$LIBS -framework CoreFoundation"
14887fi
14888
Mark Dickinson82864d12009-11-15 16:18:58 +000014889
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014890{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for %zd printf() format support" >&5
14891$as_echo_n "checking for %zd printf() format support... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010014892if ${ac_cv_have_size_t_format+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014893 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014894else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014895 if test "$cross_compiling" = yes; then :
Gregory P. Smithc9ff3a72009-11-02 02:03:16 +000014896 ac_cv_have_size_t_format="cross -- assuming yes"
14897
Brett Cannon09d12362006-05-11 05:11:33 +000014898else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014899 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Brett Cannon09d12362006-05-11 05:11:33 +000014900/* end confdefs.h. */
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014901
Brett Cannon09d12362006-05-11 05:11:33 +000014902#include <stdio.h>
14903#include <stddef.h>
14904#include <string.h>
14905
Christian Heimesdb3d6cb2007-12-16 21:39:43 +000014906#ifdef HAVE_SYS_TYPES_H
14907#include <sys/types.h>
14908#endif
Neal Norwitz4a8fbdb2006-09-22 08:16:26 +000014909
14910#ifdef HAVE_SSIZE_T
14911typedef ssize_t Py_ssize_t;
14912#elif SIZEOF_VOID_P == SIZEOF_LONG
14913typedef long Py_ssize_t;
14914#else
14915typedef int Py_ssize_t;
14916#endif
Brett Cannon09d12362006-05-11 05:11:33 +000014917
Christian Heimesdb3d6cb2007-12-16 21:39:43 +000014918int main()
14919{
14920 char buffer[256];
14921
Brett Cannon09d12362006-05-11 05:11:33 +000014922 if(sprintf(buffer, "%zd", (size_t)123) < 0)
14923 return 1;
14924
Neal Norwitz4a8fbdb2006-09-22 08:16:26 +000014925 if (strcmp(buffer, "123"))
14926 return 1;
14927
14928 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
14929 return 1;
14930
14931 if (strcmp(buffer, "-123"))
Brett Cannon09d12362006-05-11 05:11:33 +000014932 return 1;
14933
14934 return 0;
14935}
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014936
Brett Cannon09d12362006-05-11 05:11:33 +000014937_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014938if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014939 ac_cv_have_size_t_format=yes
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014940else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014941 ac_cv_have_size_t_format=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014942fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014943rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14944 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +000014945fi
14946
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014947fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014948{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t_format" >&5
14949$as_echo "$ac_cv_have_size_t_format" >&6; }
Gregory P. Smithc9ff3a72009-11-02 02:03:16 +000014950if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014951
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014952$as_echo "#define PY_FORMAT_SIZE_T \"z\"" >>confdefs.h
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014953
14954fi
14955
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014956ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
Martin v. Löwis01c04012002-11-11 14:58:44 +000014957#ifdef HAVE_SYS_TYPES_H
14958#include <sys/types.h>
14959#endif
14960#ifdef HAVE_SYS_SOCKET_H
14961#include <sys/socket.h>
14962#endif
14963
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014964"
Matthias Klose3cef2a92012-03-14 23:39:33 +010014965if test "x$ac_cv_type_socklen_t" = xyes; then :
Martin v. Löwis01c04012002-11-11 14:58:44 +000014966
Martin v. Löwis11437992002-04-12 09:54:03 +000014967else
Guido van Rossum95713eb2000-05-18 20:53:31 +000014968
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014969$as_echo "#define socklen_t int" >>confdefs.h
Guido van Rossum95713eb2000-05-18 20:53:31 +000014970
14971fi
14972
Michael W. Hudson54241132001-12-07 15:38:26 +000014973
Benjamin Peterson7497e912010-10-16 00:53:39 +000014974case $ac_sys_system in
14975AIX*)
14976
14977$as_echo "#define HAVE_BROKEN_PIPE_BUF 1" >>confdefs.h
14978 ;;
14979esac
14980
14981
Michael W. Hudson54241132001-12-07 15:38:26 +000014982
14983
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000014984for h in `(cd $srcdir;echo Python/thread_*.h)`
14985do
14986 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
14987done
14988
Michael W. Hudson54241132001-12-07 15:38:26 +000014989
Victor Stinner5f4056a2017-04-28 03:41:40 +020014990SRCDIRS="Parser Objects Python Modules"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014991{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5
14992$as_echo_n "checking for build directories... " >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000014993for dir in $SRCDIRS; do
14994 if test ! -d $dir; then
14995 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000014996 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000014997done
Benjamin Peterson2c992a02015-05-28 12:45:31 -050014998
14999# BEGIN_COMPUTED_GOTO
15000# Check for --with-computed-gotos
15001{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-computed-gotos" >&5
15002$as_echo_n "checking for --with-computed-gotos... " >&6; }
15003
15004# Check whether --with-computed-gotos was given.
15005if test "${with_computed_gotos+set}" = set; then :
15006 withval=$with_computed_gotos;
15007if test "$withval" = yes
15008then
15009
15010$as_echo "#define USE_COMPUTED_GOTOS 1" >>confdefs.h
15011
15012 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15013$as_echo "yes" >&6; }
15014fi
15015if test "$withval" = no
15016then
15017
15018$as_echo "#define USE_COMPUTED_GOTOS 0" >>confdefs.h
15019
15020 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15021$as_echo "no" >&6; }
15022fi
15023
15024else
15025 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
15026$as_echo "no value specified" >&6; }
15027fi
15028
15029
15030{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports computed gotos" >&5
15031$as_echo_n "checking whether $CC supports computed gotos... " >&6; }
15032if ${ac_cv_computed_gotos+:} false; then :
15033 $as_echo_n "(cached) " >&6
15034else
15035 if test "$cross_compiling" = yes; then :
15036 if test "${with_computed_gotos+set}" = set; then
15037 ac_cv_computed_gotos="$with_computed_gotos -- configured --with(out)-computed-gotos"
15038 else
15039 ac_cv_computed_gotos=no
15040 fi
15041else
15042 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15043/* end confdefs.h. */
15044
15045int main(int argc, char **argv)
15046{
15047 static void *targets[1] = { &&LABEL1 };
15048 goto LABEL2;
15049LABEL1:
15050 return 0;
15051LABEL2:
15052 goto *targets[0];
15053 return 1;
15054}
15055
15056_ACEOF
15057if ac_fn_c_try_run "$LINENO"; then :
15058 ac_cv_computed_gotos=yes
15059else
15060 ac_cv_computed_gotos=no
15061fi
15062rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15063 conftest.$ac_objext conftest.beam conftest.$ac_ext
15064fi
15065
15066fi
15067
15068{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_computed_gotos" >&5
15069$as_echo "$ac_cv_computed_gotos" >&6; }
15070case "$ac_cv_computed_gotos" in yes*)
15071
15072$as_echo "#define HAVE_COMPUTED_GOTOS 1" >>confdefs.h
15073
15074esac
15075# END_COMPUTED_GOTO
15076
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015077{ $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
15078$as_echo "done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000015079
Ned Deily3f1d0b32014-11-20 02:11:03 -080015080# ensurepip option
15081{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ensurepip" >&5
15082$as_echo_n "checking for ensurepip... " >&6; }
15083
15084# Check whether --with-ensurepip was given.
15085if test "${with_ensurepip+set}" = set; then :
15086 withval=$with_ensurepip;
15087else
15088 with_ensurepip=no
15089fi
15090
15091case $with_ensurepip in #(
15092 yes|upgrade) :
15093 ENSUREPIP=upgrade ;; #(
15094 install) :
15095 ENSUREPIP=install ;; #(
15096 no) :
15097 ENSUREPIP=no ;; #(
15098 *) :
15099 as_fn_error $? "--with-ensurepip=upgrade|install|no" "$LINENO" 5 ;;
15100esac
15101{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENSUREPIP" >&5
15102$as_echo "$ENSUREPIP" >&6; }
15103
15104
Guido van Rossum627b2d71993-12-24 10:39:16 +000015105# generate output files
Antoine Pitrouf2caeed2009-05-24 20:23:57 +000015106ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config Misc/python.pc"
Martin v. Löwis88afe662002-10-26 13:47:44 +000015107
Antoine Pitrouaabdceb2010-09-10 20:03:17 +000015108ac_config_files="$ac_config_files Modules/ld_so_aix"
15109
Martin v. Löwis11437992002-04-12 09:54:03 +000015110cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015111# This file is a shell script that caches the results of configure
15112# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000015113# scripts and configure runs, see configure's option --config-cache.
15114# It is not useful on other systems. If it contains results you don't
15115# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015116#
Martin v. Löwis11437992002-04-12 09:54:03 +000015117# config.status only pays attention to the cache file if you give it
15118# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015119#
Skip Montanaro6dead952003-09-25 14:50:04 +000015120# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000015121# loading this file, other *unset* `ac_cv_foo' will be assigned the
15122# following values.
15123
15124_ACEOF
15125
Guido van Rossumf78abae1997-01-21 22:02:36 +000015126# The following way of writing the cache mishandles newlines in values,
15127# but we know of no workaround that is simple, portable, and efficient.
Martin v. Löwiseba40652007-08-30 20:10:57 +000015128# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015129# Ultrix sh set writes to stderr and can't be redirected directly,
15130# and sets the high bit in the cache file unless we assign to the vars.
Martin v. Löwiseba40652007-08-30 20:10:57 +000015131(
15132 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
15133 eval ac_val=\$$ac_var
15134 case $ac_val in #(
15135 *${as_nl}*)
15136 case $ac_var in #(
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015137 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
15138$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015139 esac
15140 case $ac_var in #(
15141 _ | IFS | as_nl) ;; #(
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015142 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
15143 *) { eval $ac_var=; unset $ac_var;} ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015144 esac ;;
15145 esac
15146 done
15147
Martin v. Löwis11437992002-04-12 09:54:03 +000015148 (set) 2>&1 |
Martin v. Löwiseba40652007-08-30 20:10:57 +000015149 case $as_nl`(ac_space=' '; set) 2>&1` in #(
15150 *${as_nl}ac_space=\ *)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015151 # `set' does not quote correctly, so add quotes: double-quote
15152 # substitution turns \\\\ into \\, and sed turns \\ into \.
Martin v. Löwis11437992002-04-12 09:54:03 +000015153 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015154 "s/'/'\\\\''/g;
15155 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Martin v. Löwiseba40652007-08-30 20:10:57 +000015156 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000015157 *)
15158 # `set' quotes correctly as required by POSIX, so do not add quotes.
Martin v. Löwiseba40652007-08-30 20:10:57 +000015159 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000015160 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015161 esac |
15162 sort
15163) |
Martin v. Löwis11437992002-04-12 09:54:03 +000015164 sed '
Martin v. Löwiseba40652007-08-30 20:10:57 +000015165 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000015166 t clear
Martin v. Löwiseba40652007-08-30 20:10:57 +000015167 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000015168 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
15169 t end
Martin v. Löwiseba40652007-08-30 20:10:57 +000015170 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
15171 :end' >>confcache
15172if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
15173 if test -w "$cache_file"; then
Matthias Klose3cef2a92012-03-14 23:39:33 +010015174 if test "x$cache_file" != "x/dev/null"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015175 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
15176$as_echo "$as_me: updating cache $cache_file" >&6;}
Matthias Klose3cef2a92012-03-14 23:39:33 +010015177 if test ! -f "$cache_file" || test -h "$cache_file"; then
15178 cat confcache >"$cache_file"
15179 else
15180 case $cache_file in #(
15181 */* | ?:*)
15182 mv -f confcache "$cache_file"$$ &&
15183 mv -f "$cache_file"$$ "$cache_file" ;; #(
15184 *)
15185 mv -f confcache "$cache_file" ;;
15186 esac
15187 fi
15188 fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015189 else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015190 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
15191$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015192 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015193fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015194rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000015195
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015196test "x$prefix" = xNONE && prefix=$ac_default_prefix
15197# Let make expand exec_prefix.
15198test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000015199
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015200DEFS=-DHAVE_CONFIG_H
15201
Skip Montanaro6dead952003-09-25 14:50:04 +000015202ac_libobjs=
15203ac_ltlibobjs=
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015204U=
Skip Montanaro6dead952003-09-25 14:50:04 +000015205for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
15206 # 1. Remove the extension, and $U if already installed.
Martin v. Löwiseba40652007-08-30 20:10:57 +000015207 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015208 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
Martin v. Löwiseba40652007-08-30 20:10:57 +000015209 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
15210 # will be set to the directory where LIBOBJS objects are built.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015211 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
15212 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000015213done
15214LIBOBJS=$ac_libobjs
15215
15216LTLIBOBJS=$ac_ltlibobjs
15217
15218
Martin v. Löwis11437992002-04-12 09:54:03 +000015219
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015220
Matthias Klose3cef2a92012-03-14 23:39:33 +010015221: "${CONFIG_STATUS=./config.status}"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015222ac_write_fail=0
Martin v. Löwis11437992002-04-12 09:54:03 +000015223ac_clean_files_save=$ac_clean_files
15224ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015225{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
15226$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
15227as_write_fail=0
15228cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015229#! $SHELL
15230# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000015231# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015232# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000015233# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000015234
Martin v. Löwis11437992002-04-12 09:54:03 +000015235debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000015236ac_cs_recheck=false
15237ac_cs_silent=false
Jack Jansendd19cf82001-12-06 22:36:17 +000015238
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015239SHELL=\${CONFIG_SHELL-$SHELL}
15240export SHELL
15241_ASEOF
15242cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
15243## -------------------- ##
15244## M4sh Initialization. ##
15245## -------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000015246
Martin v. Löwiseba40652007-08-30 20:10:57 +000015247# Be more Bourne compatible
15248DUALCASE=1; export DUALCASE # for MKS sh
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015249if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015250 emulate sh
15251 NULLCMD=:
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015252 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000015253 # is contrary to our usage. Disable this feature.
15254 alias -g '${1+"$@"}'='"$@"'
Martin v. Löwiseba40652007-08-30 20:10:57 +000015255 setopt NO_GLOB_SUBST
Skip Montanaro89e975f2007-08-22 19:05:21 +000015256else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015257 case `(set -o) 2>/dev/null` in #(
15258 *posix*) :
15259 set -o posix ;; #(
15260 *) :
15261 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015262esac
Martin v. Löwis11437992002-04-12 09:54:03 +000015263fi
Michael W. Hudson54241132001-12-07 15:38:26 +000015264
Skip Montanaro6dead952003-09-25 14:50:04 +000015265
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015266as_nl='
15267'
15268export as_nl
15269# Printing a long string crashes Solaris 7 /usr/bin/printf.
15270as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
15271as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
15272as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
15273# Prefer a ksh shell builtin over an external printf program on Solaris,
15274# but without wasting forks for bash or zsh.
15275if test -z "$BASH_VERSION$ZSH_VERSION" \
15276 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
15277 as_echo='print -r --'
15278 as_echo_n='print -rn --'
15279elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
15280 as_echo='printf %s\n'
15281 as_echo_n='printf %s'
15282else
15283 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
15284 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
15285 as_echo_n='/usr/ucb/echo -n'
15286 else
15287 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
15288 as_echo_n_body='eval
15289 arg=$1;
15290 case $arg in #(
15291 *"$as_nl"*)
15292 expr "X$arg" : "X\\(.*\\)$as_nl";
15293 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
15294 esac;
15295 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
15296 '
15297 export as_echo_n_body
15298 as_echo_n='sh -c $as_echo_n_body as_echo'
15299 fi
15300 export as_echo_body
15301 as_echo='sh -c $as_echo_body as_echo'
15302fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015303
15304# The user is always right.
15305if test "${PATH_SEPARATOR+set}" != set; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015306 PATH_SEPARATOR=:
15307 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
15308 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
15309 PATH_SEPARATOR=';'
15310 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000015311fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015312
Martin v. Löwiseba40652007-08-30 20:10:57 +000015313
15314# IFS
15315# We need space, tab and new line, in precisely that order. Quoting is
15316# there to prevent editors from complaining about space-tab.
15317# (If _AS_PATH_WALK were called with IFS unset, it would disable word
15318# splitting by setting IFS to empty value.)
Martin v. Löwiseba40652007-08-30 20:10:57 +000015319IFS=" "" $as_nl"
15320
15321# Find who we are. Look in the path if we contain no directory separator.
Matthias Klose3cef2a92012-03-14 23:39:33 +010015322as_myself=
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015323case $0 in #((
Martin v. Löwiseba40652007-08-30 20:10:57 +000015324 *[\\/]* ) as_myself=$0 ;;
15325 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000015326for as_dir in $PATH
15327do
15328 IFS=$as_save_IFS
15329 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015330 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
15331 done
Martin v. Löwiseba40652007-08-30 20:10:57 +000015332IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000015333
Martin v. Löwiseba40652007-08-30 20:10:57 +000015334 ;;
15335esac
15336# We did not find ourselves, most probably we were run as `sh COMMAND'
15337# in which case we are not to be found in the path.
15338if test "x$as_myself" = x; then
15339 as_myself=$0
15340fi
15341if test ! -f "$as_myself"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015342 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
15343 exit 1
Martin v. Löwiseba40652007-08-30 20:10:57 +000015344fi
15345
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015346# Unset variables that we do not need and which cause bugs (e.g. in
15347# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
15348# suppresses any "Segmentation fault" message there. '((' could
15349# trigger a bug in pdksh 5.2.14.
15350for as_var in BASH_ENV ENV MAIL MAILPATH
15351do eval test x\${$as_var+set} = xset \
15352 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Martin v. Löwiseba40652007-08-30 20:10:57 +000015353done
15354PS1='$ '
15355PS2='> '
15356PS4='+ '
15357
15358# NLS nuisances.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015359LC_ALL=C
15360export LC_ALL
15361LANGUAGE=C
15362export LANGUAGE
Martin v. Löwiseba40652007-08-30 20:10:57 +000015363
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015364# CDPATH.
15365(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
15366
15367
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015368# as_fn_error STATUS ERROR [LINENO LOG_FD]
15369# ----------------------------------------
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015370# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
15371# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015372# script with STATUS, using 1 if that was 0.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015373as_fn_error ()
15374{
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015375 as_status=$1; test $as_status -eq 0 && as_status=1
15376 if test "$4"; then
15377 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
15378 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015379 fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015380 $as_echo "$as_me: error: $2" >&2
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015381 as_fn_exit $as_status
15382} # as_fn_error
15383
15384
15385# as_fn_set_status STATUS
15386# -----------------------
15387# Set $? to STATUS, without forking.
15388as_fn_set_status ()
15389{
15390 return $1
15391} # as_fn_set_status
15392
15393# as_fn_exit STATUS
15394# -----------------
15395# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
15396as_fn_exit ()
15397{
15398 set +e
15399 as_fn_set_status $1
15400 exit $1
15401} # as_fn_exit
15402
15403# as_fn_unset VAR
15404# ---------------
15405# Portably unset VAR.
15406as_fn_unset ()
15407{
15408 { eval $1=; unset $1;}
15409}
15410as_unset=as_fn_unset
15411# as_fn_append VAR VALUE
15412# ----------------------
15413# Append the text in VALUE to the end of the definition contained in VAR. Take
15414# advantage of any shell optimizations that allow amortized linear growth over
15415# repeated appends, instead of the typical quadratic growth present in naive
15416# implementations.
15417if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
15418 eval 'as_fn_append ()
15419 {
15420 eval $1+=\$2
15421 }'
15422else
15423 as_fn_append ()
15424 {
15425 eval $1=\$$1\$2
15426 }
15427fi # as_fn_append
15428
15429# as_fn_arith ARG...
15430# ------------------
15431# Perform arithmetic evaluation on the ARGs, and store the result in the
15432# global $as_val. Take advantage of shells that can avoid forks. The arguments
15433# must be portable across $(()) and expr.
15434if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
15435 eval 'as_fn_arith ()
15436 {
15437 as_val=$(( $* ))
15438 }'
15439else
15440 as_fn_arith ()
15441 {
15442 as_val=`expr "$@" || test $? -eq 1`
15443 }
15444fi # as_fn_arith
15445
15446
Martin v. Löwiseba40652007-08-30 20:10:57 +000015447if expr a : '\(a\)' >/dev/null 2>&1 &&
15448 test "X`expr 00001 : '.*\(...\)'`" = X001; then
15449 as_expr=expr
15450else
15451 as_expr=false
15452fi
15453
15454if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
15455 as_basename=basename
15456else
15457 as_basename=false
15458fi
15459
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015460if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
15461 as_dirname=dirname
15462else
15463 as_dirname=false
15464fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015465
Martin v. Löwiseba40652007-08-30 20:10:57 +000015466as_me=`$as_basename -- "$0" ||
15467$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
15468 X"$0" : 'X\(//\)$' \| \
15469 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015470$as_echo X/"$0" |
Martin v. Löwiseba40652007-08-30 20:10:57 +000015471 sed '/^.*\/\([^/][^/]*\)\/*$/{
15472 s//\1/
15473 q
15474 }
15475 /^X\/\(\/\/\)$/{
15476 s//\1/
15477 q
15478 }
15479 /^X\/\(\/\).*/{
15480 s//\1/
15481 q
15482 }
15483 s/.*/./; q'`
15484
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015485# Avoid depending upon Character Ranges.
15486as_cr_letters='abcdefghijklmnopqrstuvwxyz'
15487as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
15488as_cr_Letters=$as_cr_letters$as_cr_LETTERS
15489as_cr_digits='0123456789'
15490as_cr_alnum=$as_cr_Letters$as_cr_digits
Martin v. Löwiseba40652007-08-30 20:10:57 +000015491
15492ECHO_C= ECHO_N= ECHO_T=
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015493case `echo -n x` in #(((((
Martin v. Löwiseba40652007-08-30 20:10:57 +000015494-n*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015495 case `echo 'xy\c'` in
Martin v. Löwiseba40652007-08-30 20:10:57 +000015496 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015497 xy) ECHO_C='\c';;
15498 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
15499 ECHO_T=' ';;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015500 esac;;
15501*)
15502 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000015503esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015504
Martin v. Löwis11437992002-04-12 09:54:03 +000015505rm -f conf$$ conf$$.exe conf$$.file
Martin v. Löwiseba40652007-08-30 20:10:57 +000015506if test -d conf$$.dir; then
15507 rm -f conf$$.dir/conf$$.file
15508else
15509 rm -f conf$$.dir
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015510 mkdir conf$$.dir 2>/dev/null
Martin v. Löwiseba40652007-08-30 20:10:57 +000015511fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015512if (echo >conf$$.file) 2>/dev/null; then
15513 if ln -s conf$$.file conf$$ 2>/dev/null; then
15514 as_ln_s='ln -s'
15515 # ... but there are two gotchas:
15516 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
15517 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
Charles-François Natalibe2b9072013-01-08 19:47:00 +010015518 # In both cases, we have to default to `cp -pR'.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015519 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Charles-François Natalibe2b9072013-01-08 19:47:00 +010015520 as_ln_s='cp -pR'
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015521 elif ln conf$$.file conf$$ 2>/dev/null; then
15522 as_ln_s=ln
15523 else
Charles-François Natalibe2b9072013-01-08 19:47:00 +010015524 as_ln_s='cp -pR'
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015525 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015526else
Charles-François Natalibe2b9072013-01-08 19:47:00 +010015527 as_ln_s='cp -pR'
Martin v. Löwis11437992002-04-12 09:54:03 +000015528fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015529rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
15530rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000015531
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015532
15533# as_fn_mkdir_p
15534# -------------
15535# Create "$as_dir" as a directory, including parents if necessary.
15536as_fn_mkdir_p ()
15537{
15538
15539 case $as_dir in #(
15540 -*) as_dir=./$as_dir;;
15541 esac
15542 test -d "$as_dir" || eval $as_mkdir_p || {
15543 as_dirs=
15544 while :; do
15545 case $as_dir in #(
15546 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
15547 *) as_qdir=$as_dir;;
15548 esac
15549 as_dirs="'$as_qdir' $as_dirs"
15550 as_dir=`$as_dirname -- "$as_dir" ||
15551$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
15552 X"$as_dir" : 'X\(//\)[^/]' \| \
15553 X"$as_dir" : 'X\(//\)$' \| \
15554 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
15555$as_echo X"$as_dir" |
15556 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
15557 s//\1/
15558 q
15559 }
15560 /^X\(\/\/\)[^/].*/{
15561 s//\1/
15562 q
15563 }
15564 /^X\(\/\/\)$/{
15565 s//\1/
15566 q
15567 }
15568 /^X\(\/\).*/{
15569 s//\1/
15570 q
15571 }
15572 s/.*/./; q'`
15573 test -d "$as_dir" && break
15574 done
15575 test -z "$as_dirs" || eval "mkdir $as_dirs"
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015576 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015577
15578
15579} # as_fn_mkdir_p
Skip Montanaro6dead952003-09-25 14:50:04 +000015580if mkdir -p . 2>/dev/null; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015581 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +000015582else
Skip Montanarof0d5f792004-08-15 14:08:23 +000015583 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000015584 as_mkdir_p=false
15585fi
15586
Charles-François Natalibe2b9072013-01-08 19:47:00 +010015587
15588# as_fn_executable_p FILE
15589# -----------------------
15590# Test if FILE is an executable regular file.
15591as_fn_executable_p ()
15592{
15593 test -f "$1" && test -x "$1"
15594} # as_fn_executable_p
15595as_test_x='test -x'
15596as_executable_p=as_fn_executable_p
Martin v. Löwis11437992002-04-12 09:54:03 +000015597
15598# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000015599as_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 +000015600
15601# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000015602as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000015603
15604
Martin v. Löwis11437992002-04-12 09:54:03 +000015605exec 6>&1
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015606## ----------------------------------- ##
15607## Main body of $CONFIG_STATUS script. ##
15608## ----------------------------------- ##
15609_ASEOF
15610test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015611
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015612cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15613# Save the log message, to keep $0 and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000015614# report actual input values of CONFIG_FILES etc. instead of their
Martin v. Löwiseba40652007-08-30 20:10:57 +000015615# values after options handling.
15616ac_log="
Martin v. Löwis174440b2008-10-03 08:59:41 +000015617This file was extended by python $as_me 2.7, which was
Charles-François Natalibe2b9072013-01-08 19:47:00 +010015618generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000015619
15620 CONFIG_FILES = $CONFIG_FILES
15621 CONFIG_HEADERS = $CONFIG_HEADERS
15622 CONFIG_LINKS = $CONFIG_LINKS
15623 CONFIG_COMMANDS = $CONFIG_COMMANDS
15624 $ $0 $@
15625
Martin v. Löwiseba40652007-08-30 20:10:57 +000015626on `(hostname || uname -n) 2>/dev/null | sed 1q`
15627"
15628
Martin v. Löwis11437992002-04-12 09:54:03 +000015629_ACEOF
15630
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015631case $ac_config_files in *"
15632"*) set x $ac_config_files; shift; ac_config_files=$*;;
15633esac
15634
15635case $ac_config_headers in *"
15636"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
15637esac
15638
15639
15640cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015641# Files that config.status was made for.
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015642config_files="$ac_config_files"
15643config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000015644
Martin v. Löwiseba40652007-08-30 20:10:57 +000015645_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000015646
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015647cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015648ac_cs_usage="\
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015649\`$as_me' instantiates files and other configuration actions
15650from templates according to the current configuration. Unless the files
15651and actions are specified as TAGs, all are instantiated by default.
Martin v. Löwis11437992002-04-12 09:54:03 +000015652
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015653Usage: $0 [OPTION]... [TAG]...
Martin v. Löwis11437992002-04-12 09:54:03 +000015654
15655 -h, --help print this help, then exit
Martin v. Löwiseba40652007-08-30 20:10:57 +000015656 -V, --version print version number and configuration settings, then exit
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015657 --config print configuration, then exit
15658 -q, --quiet, --silent
15659 do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000015660 -d, --debug don't remove temporary files
15661 --recheck update $as_me by reconfiguring in the same conditions
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015662 --file=FILE[:TEMPLATE]
15663 instantiate the configuration file FILE
15664 --header=FILE[:TEMPLATE]
15665 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000015666
15667Configuration files:
15668$config_files
15669
15670Configuration headers:
15671$config_headers
15672
Benjamin Petersoncc8929b2016-08-03 22:01:32 -070015673Report bugs to <https://bugs.python.org/>."
Skip Montanaro89e975f2007-08-22 19:05:21 +000015674
Martin v. Löwiseba40652007-08-30 20:10:57 +000015675_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015676cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15677ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
Martin v. Löwis11437992002-04-12 09:54:03 +000015678ac_cs_version="\\
Martin v. Löwis174440b2008-10-03 08:59:41 +000015679python config.status 2.7
Charles-François Natalibe2b9072013-01-08 19:47:00 +010015680configured by $0, generated by GNU Autoconf 2.69,
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015681 with options \\"\$ac_cs_config\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000015682
Charles-François Natalibe2b9072013-01-08 19:47:00 +010015683Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000015684This config.status script is free software; the Free Software Foundation
15685gives unlimited permission to copy, distribute and modify it."
Martin v. Löwiseba40652007-08-30 20:10:57 +000015686
15687ac_pwd='$ac_pwd'
15688srcdir='$srcdir'
15689INSTALL='$INSTALL'
Trent Nelsonf6407a12012-08-30 14:56:13 +000015690MKDIR_P='$MKDIR_P'
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015691test -n "\$AWK" || AWK=awk
Martin v. Löwis11437992002-04-12 09:54:03 +000015692_ACEOF
15693
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015694cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15695# The default lists apply if the user does not specify any file.
Martin v. Löwis11437992002-04-12 09:54:03 +000015696ac_need_defaults=:
15697while test $# != 0
15698do
15699 case $1 in
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015700 --*=?*)
Martin v. Löwiseba40652007-08-30 20:10:57 +000015701 ac_option=`expr "X$1" : 'X\([^=]*\)='`
15702 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000015703 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000015704 ;;
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015705 --*=)
15706 ac_option=`expr "X$1" : 'X\([^=]*\)='`
15707 ac_optarg=
15708 ac_shift=:
15709 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015710 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000015711 ac_option=$1
15712 ac_optarg=$2
15713 ac_shift=shift
15714 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015715 esac
15716
Skip Montanaro6dead952003-09-25 14:50:04 +000015717 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000015718 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000015719 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
15720 ac_cs_recheck=: ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015721 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015722 $as_echo "$ac_cs_version"; exit ;;
15723 --config | --confi | --conf | --con | --co | --c )
15724 $as_echo "$ac_cs_config"; exit ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015725 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000015726 debug=: ;;
15727 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000015728 $ac_shift
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015729 case $ac_optarg in
15730 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015731 '') as_fn_error $? "missing file argument" ;;
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015732 esac
15733 as_fn_append CONFIG_FILES " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000015734 ac_need_defaults=false;;
15735 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000015736 $ac_shift
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015737 case $ac_optarg in
15738 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
15739 esac
15740 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000015741 ac_need_defaults=false;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015742 --he | --h)
15743 # Conflict between --help and --header
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015744 as_fn_error $? "ambiguous option: \`$1'
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015745Try \`$0 --help' for more information.";;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015746 --help | --hel | -h )
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015747 $as_echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000015748 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
15749 | -silent | --silent | --silen | --sile | --sil | --si | --s)
15750 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015751
15752 # This is an error.
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015753 -*) as_fn_error $? "unrecognized option: \`$1'
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015754Try \`$0 --help' for more information." ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015755
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015756 *) as_fn_append ac_config_targets " $1"
Martin v. Löwiseba40652007-08-30 20:10:57 +000015757 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015758
15759 esac
15760 shift
15761done
15762
Skip Montanaro6dead952003-09-25 14:50:04 +000015763ac_configure_extra_args=
15764
15765if $ac_cs_silent; then
15766 exec 6>/dev/null
15767 ac_configure_extra_args="$ac_configure_extra_args --silent"
15768fi
15769
15770_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015771cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Skip Montanaro6dead952003-09-25 14:50:04 +000015772if \$ac_cs_recheck; then
Charles-François Natalibe2b9072013-01-08 19:47:00 +010015773 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015774 shift
15775 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
15776 CONFIG_SHELL='$SHELL'
Martin v. Löwiseba40652007-08-30 20:10:57 +000015777 export CONFIG_SHELL
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015778 exec "\$@"
Skip Montanaro6dead952003-09-25 14:50:04 +000015779fi
15780
Martin v. Löwis11437992002-04-12 09:54:03 +000015781_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015782cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwiseba40652007-08-30 20:10:57 +000015783exec 5>>config.log
15784{
15785 echo
15786 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
15787## Running $as_me. ##
15788_ASBOX
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015789 $as_echo "$ac_log"
Martin v. Löwiseba40652007-08-30 20:10:57 +000015790} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015791
Martin v. Löwiseba40652007-08-30 20:10:57 +000015792_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015793cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwiseba40652007-08-30 20:10:57 +000015794_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000015795
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015796cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwiseba40652007-08-30 20:10:57 +000015797
15798# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000015799for ac_config_target in $ac_config_targets
15800do
Martin v. Löwiseba40652007-08-30 20:10:57 +000015801 case $ac_config_target in
15802 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
15803 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
15804 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
15805 "Mac/IDLE/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/IDLE/Makefile" ;;
Ronald Oussoren580c7fe2008-05-02 19:45:11 +000015806 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
15807 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015808 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
15809 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
Antoine Pitrouf2caeed2009-05-24 20:23:57 +000015810 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
Antoine Pitrouaabdceb2010-09-10 20:03:17 +000015811 "Modules/ld_so_aix") CONFIG_FILES="$CONFIG_FILES Modules/ld_so_aix" ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015812
Matthias Klose3cef2a92012-03-14 23:39:33 +010015813 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015814 esac
15815done
15816
Martin v. Löwiseba40652007-08-30 20:10:57 +000015817
Martin v. Löwis11437992002-04-12 09:54:03 +000015818# If the user did not use the arguments to specify the items to instantiate,
15819# then the envvar interface is used. Set only those that are not.
15820# We use the long form for the default assignment because of an extremely
15821# bizarre bug on SunOS 4.1.3.
15822if $ac_need_defaults; then
15823 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
15824 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
15825fi
15826
Skip Montanaro6dead952003-09-25 14:50:04 +000015827# Have a temporary directory for convenience. Make it in the build tree
Martin v. Löwiseba40652007-08-30 20:10:57 +000015828# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000015829# creating and moving files from /tmp can sometimes cause problems.
Martin v. Löwiseba40652007-08-30 20:10:57 +000015830# Hook for its removal unless debugging.
15831# Note that there is a small window in which the directory will not be cleaned:
15832# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000015833$debug ||
15834{
Matthias Klose3cef2a92012-03-14 23:39:33 +010015835 tmp= ac_tmp=
Martin v. Löwiseba40652007-08-30 20:10:57 +000015836 trap 'exit_status=$?
Matthias Klose3cef2a92012-03-14 23:39:33 +010015837 : "${ac_tmp:=$tmp}"
15838 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
Martin v. Löwiseba40652007-08-30 20:10:57 +000015839' 0
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015840 trap 'as_fn_exit 1' 1 2 13 15
Martin v. Löwis11437992002-04-12 09:54:03 +000015841}
Martin v. Löwis11437992002-04-12 09:54:03 +000015842# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000015843
Martin v. Löwis11437992002-04-12 09:54:03 +000015844{
Martin v. Löwiseba40652007-08-30 20:10:57 +000015845 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Matthias Klose3cef2a92012-03-14 23:39:33 +010015846 test -d "$tmp"
Martin v. Löwis11437992002-04-12 09:54:03 +000015847} ||
15848{
Martin v. Löwiseba40652007-08-30 20:10:57 +000015849 tmp=./conf$$-$RANDOM
15850 (umask 077 && mkdir "$tmp")
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015851} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
Matthias Klose3cef2a92012-03-14 23:39:33 +010015852ac_tmp=$tmp
Martin v. Löwis11437992002-04-12 09:54:03 +000015853
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015854# Set up the scripts for CONFIG_FILES section.
15855# No need to generate them if there are no CONFIG_FILES.
15856# This happens for instance with `./config.status config.h'.
Martin v. Löwiseba40652007-08-30 20:10:57 +000015857if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015858
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015859
15860ac_cr=`echo X | tr X '\015'`
15861# On cygwin, bash can eat \r inside `` if the user requested igncr.
15862# But we know of no other shell where ac_cr would be empty at this
15863# point, so we can use a bashism as a fallback.
15864if test "x$ac_cr" = x; then
15865 eval ac_cr=\$\'\\r\'
15866fi
15867ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
15868if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015869 ac_cs_awk_cr='\\r'
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015870else
15871 ac_cs_awk_cr=$ac_cr
15872fi
15873
Matthias Klose3cef2a92012-03-14 23:39:33 +010015874echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
Martin v. Löwis11437992002-04-12 09:54:03 +000015875_ACEOF
15876
Martin v. Löwiseba40652007-08-30 20:10:57 +000015877
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015878{
15879 echo "cat >conf$$subs.awk <<_ACEOF" &&
15880 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
15881 echo "_ACEOF"
15882} >conf$$subs.sh ||
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015883 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
15884ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
Martin v. Löwiseba40652007-08-30 20:10:57 +000015885ac_delim='%!_!# '
15886for ac_last_try in false false false false false :; do
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015887 . ./conf$$subs.sh ||
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015888 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015889
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015890 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
15891 if test $ac_delim_n = $ac_delim_num; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015892 break
15893 elif $ac_last_try; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015894 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015895 else
15896 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000015897 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015898done
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015899rm -f conf$$subs.sh
Martin v. Löwiseba40652007-08-30 20:10:57 +000015900
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015901cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Matthias Klose3cef2a92012-03-14 23:39:33 +010015902cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
Martin v. Löwiseba40652007-08-30 20:10:57 +000015903_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015904sed -n '
15905h
15906s/^/S["/; s/!.*/"]=/
15907p
15908g
15909s/^[^!]*!//
15910:repl
15911t repl
15912s/'"$ac_delim"'$//
15913t delim
15914:nl
15915h
15916s/\(.\{148\}\)..*/\1/
15917t more1
15918s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
15919p
15920n
15921b repl
15922:more1
15923s/["\\]/\\&/g; s/^/"/; s/$/"\\/
15924p
15925g
15926s/.\{148\}//
15927t nl
15928:delim
15929h
15930s/\(.\{148\}\)..*/\1/
15931t more2
15932s/["\\]/\\&/g; s/^/"/; s/$/"/
15933p
15934b
15935:more2
15936s/["\\]/\\&/g; s/^/"/; s/$/"\\/
15937p
15938g
15939s/.\{148\}//
15940t delim
15941' <conf$$subs.awk | sed '
15942/^[^""]/{
15943 N
15944 s/\n//
15945}
15946' >>$CONFIG_STATUS || ac_write_fail=1
15947rm -f conf$$subs.awk
15948cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15949_ACAWK
Matthias Klose3cef2a92012-03-14 23:39:33 +010015950cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015951 for (key in S) S_is_set[key] = 1
15952 FS = ""
15953
15954}
15955{
15956 line = $ 0
15957 nfields = split(line, field, "@")
15958 substed = 0
15959 len = length(field[1])
15960 for (i = 2; i < nfields; i++) {
15961 key = field[i]
15962 keylen = length(key)
15963 if (S_is_set[key]) {
15964 value = S[key]
15965 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
15966 len += length(value) + length(field[++i])
15967 substed = 1
15968 } else
15969 len += 1 + keylen
15970 }
15971
15972 print line
15973}
15974
15975_ACAWK
Martin v. Löwiseba40652007-08-30 20:10:57 +000015976_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015977cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15978if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
15979 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
15980else
15981 cat
Matthias Klose3cef2a92012-03-14 23:39:33 +010015982fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015983 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015984_ACEOF
15985
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015986# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
15987# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
Martin v. Löwiseba40652007-08-30 20:10:57 +000015988# trailing colons and then remove the whole line if VPATH becomes empty
15989# (actually we leave an empty line to preserve line numbers).
15990if test "x$srcdir" = x.; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015991 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
15992h
15993s///
15994s/^/:/
15995s/[ ]*$/:/
15996s/:\$(srcdir):/:/g
15997s/:\${srcdir}:/:/g
15998s/:@srcdir@:/:/g
15999s/^:*//
Martin v. Löwiseba40652007-08-30 20:10:57 +000016000s/:*$//
Georg Brandl71f4fbb2011-02-25 11:04:50 +000016001x
16002s/\(=[ ]*\).*/\1/
16003G
16004s/\n//
Martin v. Löwiseba40652007-08-30 20:10:57 +000016005s/^[^=]*=[ ]*$//
16006}'
16007fi
16008
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016009cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016010fi # test -n "$CONFIG_FILES"
16011
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016012# Set up the scripts for CONFIG_HEADERS section.
16013# No need to generate them if there are no CONFIG_HEADERS.
16014# This happens for instance with `./config.status Makefile'.
16015if test -n "$CONFIG_HEADERS"; then
Matthias Klose3cef2a92012-03-14 23:39:33 +010016016cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016017BEGIN {
16018_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000016019
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016020# Transform confdefs.h into an awk script `defines.awk', embedded as
16021# here-document in config.status, that substitutes the proper values into
16022# config.h.in to produce config.h.
16023
16024# Create a delimiter string that does not exist in confdefs.h, to ease
16025# handling of long lines.
16026ac_delim='%!_!# '
16027for ac_last_try in false false :; do
Matthias Klose3cef2a92012-03-14 23:39:33 +010016028 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
16029 if test -z "$ac_tt"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016030 break
16031 elif $ac_last_try; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +000016032 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016033 else
16034 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
16035 fi
16036done
16037
16038# For the awk script, D is an array of macro values keyed by name,
16039# likewise P contains macro parameters if any. Preserve backslash
16040# newline sequences.
16041
16042ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
16043sed -n '
16044s/.\{148\}/&'"$ac_delim"'/g
16045t rset
16046:rset
16047s/^[ ]*#[ ]*define[ ][ ]*/ /
16048t def
16049d
16050:def
16051s/\\$//
16052t bsnl
16053s/["\\]/\\&/g
16054s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
16055D["\1"]=" \3"/p
16056s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
16057d
16058:bsnl
16059s/["\\]/\\&/g
16060s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
16061D["\1"]=" \3\\\\\\n"\\/p
16062t cont
16063s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
16064t cont
16065d
16066:cont
16067n
16068s/.\{148\}/&'"$ac_delim"'/g
16069t clear
16070:clear
16071s/\\$//
16072t bsnlc
16073s/["\\]/\\&/g; s/^/"/; s/$/"/p
16074d
16075:bsnlc
16076s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
16077b cont
16078' <confdefs.h | sed '
16079s/'"$ac_delim"'/"\\\
16080"/g' >>$CONFIG_STATUS || ac_write_fail=1
16081
16082cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16083 for (key in D) D_is_set[key] = 1
16084 FS = ""
16085}
16086/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
16087 line = \$ 0
16088 split(line, arg, " ")
16089 if (arg[1] == "#") {
16090 defundef = arg[2]
16091 mac1 = arg[3]
16092 } else {
16093 defundef = substr(arg[1], 2)
16094 mac1 = arg[2]
16095 }
16096 split(mac1, mac2, "(") #)
16097 macro = mac2[1]
16098 prefix = substr(line, 1, index(line, defundef) - 1)
16099 if (D_is_set[macro]) {
16100 # Preserve the white space surrounding the "#".
16101 print prefix "define", macro P[macro] D[macro]
16102 next
16103 } else {
16104 # Replace #undef with comments. This is necessary, for example,
16105 # in the case of _POSIX_SOURCE, which is predefined and required
16106 # on some systems where configure will not decide to define it.
16107 if (defundef == "undef") {
16108 print "/*", prefix defundef, macro, "*/"
16109 next
16110 }
16111 }
16112}
16113{ print }
16114_ACAWK
16115_ACEOF
16116cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Georg Brandl71f4fbb2011-02-25 11:04:50 +000016117 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016118fi # test -n "$CONFIG_HEADERS"
16119
16120
16121eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
16122shift
16123for ac_tag
Martin v. Löwiseba40652007-08-30 20:10:57 +000016124do
16125 case $ac_tag in
16126 :[FHLC]) ac_mode=$ac_tag; continue;;
16127 esac
16128 case $ac_mode$ac_tag in
16129 :[FHL]*:*);;
Matthias Klose3cef2a92012-03-14 23:39:33 +010016130 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000016131 :[FH]-) ac_tag=-:-;;
16132 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
16133 esac
16134 ac_save_IFS=$IFS
16135 IFS=:
16136 set x $ac_tag
16137 IFS=$ac_save_IFS
16138 shift
16139 ac_file=$1
16140 shift
16141
16142 case $ac_mode in
16143 :L) ac_source=$1;;
16144 :[FH])
16145 ac_file_inputs=
16146 for ac_f
16147 do
16148 case $ac_f in
Matthias Klose3cef2a92012-03-14 23:39:33 +010016149 -) ac_f="$ac_tmp/stdin";;
Martin v. Löwiseba40652007-08-30 20:10:57 +000016150 *) # Look for the file first in the build tree, then in the source tree
16151 # (if the path is not absolute). The absolute path cannot be DOS-style,
16152 # because $ac_f cannot contain `:'.
16153 test -f "$ac_f" ||
16154 case $ac_f in
16155 [\\/$]*) false;;
16156 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
16157 esac ||
Matthias Klose3cef2a92012-03-14 23:39:33 +010016158 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000016159 esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016160 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
16161 as_fn_append ac_file_inputs " '$ac_f'"
Martin v. Löwiseba40652007-08-30 20:10:57 +000016162 done
16163
16164 # Let's still pretend it is `configure' which instantiates (i.e., don't
16165 # use $as_me), people would be surprised to read:
16166 # /* config.h. Generated by config.status. */
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016167 configure_input='Generated from '`
16168 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
16169 `' by configure.'
Martin v. Löwiseba40652007-08-30 20:10:57 +000016170 if test x"$ac_file" != x-; then
16171 configure_input="$ac_file. $configure_input"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016172 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
16173$as_echo "$as_me: creating $ac_file" >&6;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000016174 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016175 # Neutralize special characters interpreted by sed in replacement strings.
16176 case $configure_input in #(
16177 *\&* | *\|* | *\\* )
16178 ac_sed_conf_input=`$as_echo "$configure_input" |
16179 sed 's/[\\\\&|]/\\\\&/g'`;; #(
16180 *) ac_sed_conf_input=$configure_input;;
16181 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000016182
16183 case $ac_tag in
Matthias Klose3cef2a92012-03-14 23:39:33 +010016184 *:-:* | *:-) cat >"$ac_tmp/stdin" \
16185 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000016186 esac
16187 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016188 esac
16189
Martin v. Löwiseba40652007-08-30 20:10:57 +000016190 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000016191$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016192 X"$ac_file" : 'X\(//\)[^/]' \| \
16193 X"$ac_file" : 'X\(//\)$' \| \
Martin v. Löwiseba40652007-08-30 20:10:57 +000016194 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016195$as_echo X"$ac_file" |
Martin v. Löwiseba40652007-08-30 20:10:57 +000016196 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
16197 s//\1/
16198 q
16199 }
16200 /^X\(\/\/\)[^/].*/{
16201 s//\1/
16202 q
16203 }
16204 /^X\(\/\/\)$/{
16205 s//\1/
16206 q
16207 }
16208 /^X\(\/\).*/{
16209 s//\1/
16210 q
16211 }
16212 s/.*/./; q'`
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016213 as_dir="$ac_dir"; as_fn_mkdir_p
Martin v. Löwis11437992002-04-12 09:54:03 +000016214 ac_builddir=.
16215
Martin v. Löwiseba40652007-08-30 20:10:57 +000016216case "$ac_dir" in
16217.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
16218*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016219 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Martin v. Löwiseba40652007-08-30 20:10:57 +000016220 # A ".." for each directory in $ac_dir_suffix.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016221 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Martin v. Löwiseba40652007-08-30 20:10:57 +000016222 case $ac_top_builddir_sub in
16223 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
16224 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
16225 esac ;;
16226esac
16227ac_abs_top_builddir=$ac_pwd
16228ac_abs_builddir=$ac_pwd$ac_dir_suffix
16229# for backward compatibility:
16230ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000016231
16232case $srcdir in
Martin v. Löwiseba40652007-08-30 20:10:57 +000016233 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000016234 ac_srcdir=.
Martin v. Löwiseba40652007-08-30 20:10:57 +000016235 ac_top_srcdir=$ac_top_builddir_sub
16236 ac_abs_top_srcdir=$ac_pwd ;;
16237 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000016238 ac_srcdir=$srcdir$ac_dir_suffix;
Martin v. Löwiseba40652007-08-30 20:10:57 +000016239 ac_top_srcdir=$srcdir
16240 ac_abs_top_srcdir=$srcdir ;;
16241 *) # Relative name.
16242 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
16243 ac_top_srcdir=$ac_top_build_prefix$srcdir
16244 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016245esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000016246ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000016247
Martin v. Löwis11437992002-04-12 09:54:03 +000016248
Martin v. Löwiseba40652007-08-30 20:10:57 +000016249 case $ac_mode in
16250 :F)
16251 #
16252 # CONFIG_FILE
16253 #
Martin v. Löwis11437992002-04-12 09:54:03 +000016254
16255 case $INSTALL in
16256 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000016257 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016258 esac
Trent Nelsonf6407a12012-08-30 14:56:13 +000016259 ac_MKDIR_P=$MKDIR_P
16260 case $MKDIR_P in
16261 [\\/$]* | ?:[\\/]* ) ;;
16262 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
16263 esac
Brett Cannon19fab762007-06-02 03:02:29 +000016264_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000016265
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016266cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwiseba40652007-08-30 20:10:57 +000016267# If the template does not know about datarootdir, expand it.
16268# FIXME: This hack should be removed a few years after 2.60.
16269ac_datarootdir_hack=; ac_datarootdir_seen=
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016270ac_sed_dataroot='
16271/datarootdir/ {
Martin v. Löwiseba40652007-08-30 20:10:57 +000016272 p
16273 q
16274}
16275/@datadir@/p
16276/@docdir@/p
16277/@infodir@/p
16278/@localedir@/p
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016279/@mandir@/p'
16280case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
Martin v. Löwiseba40652007-08-30 20:10:57 +000016281*datarootdir*) ac_datarootdir_seen=yes;;
16282*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016283 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
16284$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000016285_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016286cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwiseba40652007-08-30 20:10:57 +000016287 ac_datarootdir_hack='
16288 s&@datadir@&$datadir&g
16289 s&@docdir@&$docdir&g
16290 s&@infodir@&$infodir&g
16291 s&@localedir@&$localedir&g
16292 s&@mandir@&$mandir&g
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016293 s&\\\${datarootdir}&$datarootdir&g' ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000016294esac
16295_ACEOF
16296
16297# Neutralize VPATH when `$srcdir' = `.'.
16298# Shell code in configure.ac might set extrasub.
16299# FIXME: do we really want to maintain this feature?
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016300cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16301ac_sed_extra="$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000016302$extrasub
16303_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016304cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016305:t
16306/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016307s|@configure_input@|$ac_sed_conf_input|;t t
Martin v. Löwiseba40652007-08-30 20:10:57 +000016308s&@top_builddir@&$ac_top_builddir_sub&;t t
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016309s&@top_build_prefix@&$ac_top_build_prefix&;t t
Martin v. Löwiseba40652007-08-30 20:10:57 +000016310s&@srcdir@&$ac_srcdir&;t t
16311s&@abs_srcdir@&$ac_abs_srcdir&;t t
16312s&@top_srcdir@&$ac_top_srcdir&;t t
16313s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
16314s&@builddir@&$ac_builddir&;t t
16315s&@abs_builddir@&$ac_abs_builddir&;t t
16316s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
16317s&@INSTALL@&$ac_INSTALL&;t t
Trent Nelsonf6407a12012-08-30 14:56:13 +000016318s&@MKDIR_P@&$ac_MKDIR_P&;t t
Martin v. Löwiseba40652007-08-30 20:10:57 +000016319$ac_datarootdir_hack
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016320"
Matthias Klose3cef2a92012-03-14 23:39:33 +010016321eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
16322 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016323
Martin v. Löwiseba40652007-08-30 20:10:57 +000016324test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
Matthias Klose3cef2a92012-03-14 23:39:33 +010016325 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
16326 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
16327 "$ac_tmp/out"`; test -z "$ac_out"; } &&
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016328 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Georg Brandl71f4fbb2011-02-25 11:04:50 +000016329which seems to be undefined. Please make sure it is defined" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016330$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Georg Brandl71f4fbb2011-02-25 11:04:50 +000016331which seems to be undefined. Please make sure it is defined" >&2;}
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016332
Matthias Klose3cef2a92012-03-14 23:39:33 +010016333 rm -f "$ac_tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000016334 case $ac_file in
Matthias Klose3cef2a92012-03-14 23:39:33 +010016335 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
16336 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016337 esac \
Georg Brandl71f4fbb2011-02-25 11:04:50 +000016338 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016339 ;;
16340 :H)
16341 #
16342 # CONFIG_HEADER
16343 #
Martin v. Löwis11437992002-04-12 09:54:03 +000016344 if test x"$ac_file" != x-; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016345 {
16346 $as_echo "/* $configure_input */" \
Matthias Klose3cef2a92012-03-14 23:39:33 +010016347 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
16348 } >"$ac_tmp/config.h" \
Georg Brandl71f4fbb2011-02-25 11:04:50 +000016349 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Matthias Klose3cef2a92012-03-14 23:39:33 +010016350 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016351 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
16352$as_echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000016353 else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016354 rm -f "$ac_file"
Matthias Klose3cef2a92012-03-14 23:39:33 +010016355 mv "$ac_tmp/config.h" "$ac_file" \
Georg Brandl71f4fbb2011-02-25 11:04:50 +000016356 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000016357 fi
16358 else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016359 $as_echo "/* $configure_input */" \
Matthias Klose3cef2a92012-03-14 23:39:33 +010016360 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
Georg Brandl71f4fbb2011-02-25 11:04:50 +000016361 || as_fn_error $? "could not create -" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000016362 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016363 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000016364
Martin v. Löwiseba40652007-08-30 20:10:57 +000016365
16366 esac
16367
Antoine Pitrouaabdceb2010-09-10 20:03:17 +000016368
16369 case $ac_file$ac_mode in
16370 "Modules/ld_so_aix":F) chmod +x Modules/ld_so_aix ;;
16371
16372 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000016373done # for ac_tag
16374
Guido van Rossum627b2d71993-12-24 10:39:16 +000016375
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016376as_fn_exit 0
Martin v. Löwis11437992002-04-12 09:54:03 +000016377_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000016378ac_clean_files=$ac_clean_files_save
16379
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016380test $ac_write_fail = 0 ||
Georg Brandl71f4fbb2011-02-25 11:04:50 +000016381 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016382
Martin v. Löwis11437992002-04-12 09:54:03 +000016383
16384# configure is writing to config.log, and then calls config.status.
16385# config.status does its own redirection, appending to config.log.
16386# Unfortunately, on DOS this fails, as config.log is still kept open
16387# by configure, so config.status won't be able to write to it; its
16388# output is simply discarded. So we exec the FD to /dev/null,
16389# effectively closing config.log, so it can be properly (re)opened and
16390# appended to by config.status. When coming back to configure, we
16391# need to make the FD available again.
16392if test "$no_create" != yes; then
16393 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000016394 ac_config_status_args=
16395 test "$silent" = yes &&
16396 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000016397 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000016398 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000016399 exec 5>>config.log
16400 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
16401 # would make configure fail if this is the last instruction.
Georg Brandl71f4fbb2011-02-25 11:04:50 +000016402 $ac_cs_success || as_fn_exit 1
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016403fi
16404if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
16405 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
16406$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000016407fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000016408
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000016409
Martin v. Löwisf7afe952006-04-14 15:16:15 +000016410echo "creating Modules/Setup"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000016411if test ! -f Modules/Setup
16412then
16413 cp $srcdir/Modules/Setup.dist Modules/Setup
16414fi
16415
Martin v. Löwisf7afe952006-04-14 15:16:15 +000016416echo "creating Modules/Setup.local"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000016417if test ! -f Modules/Setup.local
16418then
16419 echo "# Edit this file for local setup changes" >Modules/Setup.local
16420fi
16421
16422echo "creating Makefile"
16423$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
16424 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000016425 Modules/Setup.local Modules/Setup
Skip Montanaro89e975f2007-08-22 19:05:21 +000016426
16427case $ac_sys_system in
16428BeOS)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016429 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
Skip Montanaro89e975f2007-08-22 19:05:21 +000016430
16431 Support for BeOS is deprecated as of Python 2.6.
16432 See PEP 11 for the gory details.
16433 " >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016434$as_echo "$as_me: WARNING:
Skip Montanaro89e975f2007-08-22 19:05:21 +000016435
16436 Support for BeOS is deprecated as of Python 2.6.
16437 See PEP 11 for the gory details.
16438 " >&2;}
16439 ;;
16440*) ;;
16441esac
16442
Neil Schemenauerc761fc82001-02-19 04:50:49 +000016443mv config.c Modules
Gregory P. Smith6d8fdfc2016-09-07 23:28:23 -070016444
16445if test "$Py_OPT" = 'false' -a "$Py_DEBUG" != 'true'; then
16446 echo "" >&6
16447 echo "" >&6
16448 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 +000016449 echo "please run ./configure --enable-optimizations" >&6
Gregory P. Smith6d8fdfc2016-09-07 23:28:23 -070016450 echo "" >&6
16451 echo "" >&6
16452fi